Skip to content

Fix Text-Fu lesson 16: grep page serves the env lesson - #1

Open
wdecoster wants to merge 1 commit into
linuxvoyage:mainfrom
wdecoster:fix-grep-lesson-duplicate-of-env
Open

Fix Text-Fu lesson 16: grep page serves the env lesson#1
wdecoster wants to merge 1 commit into
linuxvoyage:mainfrom
wdecoster:fix-grep-lesson-duplicate-of-env

Conversation

@wdecoster

Copy link
Copy Markdown

Problem

Lesson 16 "Grep command" shows the content of lesson 5 "Env environment". The two published pages are byte-for-byte identical apart from which sidebar entry gets class="current" — the title, body, exercise and quiz on the grep page are all the env lesson.

The cause is in the source: lessons/locales/en_english/03-text-fu/16-grep-command.md starts with # env (Environment) and duplicates 05-env-environment.md.

Fix

The other locales all still carry the correct grep lesson (ru_russian, et_estonian, fa-persian), and the fa-persian copy is still the untranslated English original — the Russian translation matches it section for section. I restored the English lesson from that copy, so no text is invented here.

Three files change:

file what
lessons/locales/en_english/03-text-fu/16-grep-command.md restored grep content
lessons/locales/en_english/03-text-fu/16-grep-command.html regenerated with src/convert.py's converter
docs/lesson/grep-command.html published page updated to match

Verification

Both generated files were produced by re-running the repo's own pipeline, not hand-edited, and the pipeline was validated first against lessons this PR does not touch:

  • src/convert.py's MarkdownConverter + post-processing regenerates the committed 05-env-environment.html, 12-sort-command.html and 15-nl-wc-command.html byte-for-byte.
  • The docs/ page rewrite (same split rules as src/main.py, same block layout as templates/lesson.html) round-trips env-environment.html, cut-command.html, sort-command.html and nl-wc-command.html with zero diff.

So the diff is confined to the grep content; sidebar, links and whitespace are untouched.

I also scanned all 185 pages under docs/lesson/ for duplicated lesson bodies. After this fix the only remaining pair is vim-editing.html / vim-inserting-appending-text.html, which are both the empty # Title placeholder — a separate missing-content issue, left alone here.

Note

Issues are disabled on this repo, so I could not file this first. Happy to adjust anything.

The English grep lesson was a byte-for-byte copy of lesson 5 (env), so
https://linuxvoyage.github.io/lesson/grep-command.html served the env
content under the grep title. The other locales (ru, et, fa) all still
carry the correct grep lesson, so the English copy was restored from the
untranslated original in lessons/locales/fa-persian/text-fu/grep-command.md.

Regenerated 16-grep-command.html with src/convert.py's converter and
updated the published docs/lesson/grep-command.html to match. Both
regeneration steps were checked against untouched sibling lessons
(env, cut, sort, nl-wc) and reproduce them byte-for-byte, so the diff is
limited to the grep content itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJFZrUGJ44ozsCe9qqw6bp
wdecoster referenced this pull request in wdecoster/linuxvoyage.github.io Aug 10, 2026
The grep fix went out as its own branch for upstream PR #1, and the
later branches were cut from main rather than from it, so the fork's
main still served the env lesson under the grep title. Cherry-picked it
and regenerated all 197 pages from source.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJFZrUGJ44ozsCe9qqw6bp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant