Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 2.12 KB

dist-dir-rearrange.adoc

File metadata and controls

46 lines (38 loc) · 2.12 KB

Rearranging subdirs within the distribution directories

The build process starts by copying (the English versions of) the pathway directories to distribution/en-us/courses and the lesson directories to distribution/en-us/lessons, sometimes creating multiple versions, as described in the previous section, to accommodate multiple proglangs as needed. (The other natlang versions go the corresponding subdir in distribution, e.g., es-mx, and their treatment follows a similar route, with en-us replaced.)

Modifying the distribution lesson directory

After copying a pathway into its distribution lesson directory with fixed proglang, the build process drills down its directories to see if there are any proglang-specific shadowing subdirectories. These are named for the proglang, e.g., pyret, wescheme, etc. The contents of the relevant proglang subdir are copied to the containing directory. All the other proglang subdirs are deleted. This ensures that all the files in the course directory, at whatever depth, have content appropriate to its proglang.

Next, if a subdirectory called pages occurs at any level — typically these are in the front-matter, back-matter and resources subdirs --, the build ensure that a subdir called solution-pages is alongside it. Furthermore, it ensures that its contents are the same as the pages subdir, except for such files that are pre-existent in it (from the repo).

Next the build looks for workbook-pages.txt inside these pages subdir. A sanitized version — removing comments — of this is placed in .cached/.workbook-pages.txt.kp, and an even sparer version — removing landscape/portrait information — is placed in .cached/.workbook-pages-ls.txt.kp.

Modifying the course directory

Course dirs undergo the same modifications above for proglang and solution-pages. Note here that the subdirs front-matter, back-matter, and resources may contain pages/ subdirs with the appropriate workbook-pages.txt, and these are mined to get .cached/.workbook-pages.txt.kp and .cached/.workbook-pages-ls.txt.kp as well, just as for the lessons.