Repository navigation
1.7.0
-
A push puts the alert icons back when they are gone from Canvas. It used to
trust.canvas-sync.jsonalone: an icon recorded under the current theme was
taken to exist, whatever had happened to the file since. So after
npx course reset-canvasfollowed by a push, without
npx course reset-sync-statein between, or after deleting the
/course-iconsfolder by hand in Canvas, every callout the push rendered
pointed at a file that no longer existed and showed a broken image, while
statusreported the course in sync. Each run that renders a page, an
assignment or a discussion now asks Canvas whether every recorded icon is
still there, one request per icon, and uploads any that Canvas answers is
gone, recording its new id. If Canvas cannot be asked, for a lapsed token or a
network fault, the recorded icon is kept and a warning names it, so the push
goes ahead as it did before.Only the pages a push renders pick up the new icons. After
reset-canvasthat
is every page, because the push creates them all again. After a hand-deleted
/course-icons, a page you have not changed since keeps its broken icon until
you next edit and push it. -
A selection export puts a page from a module subfolder at the same heading
level as every other page. A TOC file, a list of paths and--flagged, on the
whole course or with-m, all leave out the subfolder's own heading, but the
page under it kept the extra level it has in a whole-module export. In a PDF,
a Word document and an-f mdfile alike, such a page came out one level
below the other pages, under a heading that was never printed: across several
modules, a third-level heading straight under its module's title. Every page
of a selection is now a second-level heading under its module, or a
first-level heading when the selection covers one module. Whole-module and
whole-course exports are unchanged: they keep the subfolder headings, with the
pages one level below./study-pack-buildalways exports from a TOC file, and its check pairs the
raw and the compact pack page by page on those second-level headings, which is
also where theverbatim:prefixes apply. A verbatim page in a subfolder
escaped both, so the compact pack could condense it without the check
noticing. Regenerate any study pack whose recipe lists a subfolder page with
/study-pack-build. -
export -mandexport-toc -mtake several modules, and take them by number.
-mused to want the one full folder name, so exporting modules 3 to 5 as one
document meant writing a TOC file. It now takes a folder name as before, a
number (-m 03or-m 3), a range (-m 03-05) or a comma list (-m 03,05),
and several values in one go (-m 03 05), assync,pullandstatus
already did. The modules come out in course order, each once. A range skips a
missing number; one that matches nothing, an unknown number or name, and a
number two folders share are errors that name the culprit. Several modules
export as one document titled after the course, with a first-level heading per
module and their subfolder headings intact, to
exports/<course>-03-04-05.pdf; one module exports exactly as before. Because
-mnow takes several values,export -m 03-css course/x.mdreads the path
as a module and stops withNot a module, andexport course/x.md -m 03-css
stops too, where both used to export the module and drop the path without a
word. A module and item paths never combined in one export. The VS Code
extension passes a full folder name and is unaffected. -
sync -m,push -m,pull -mandstatus -mtake modules by number too, in
the formsexport -mtakes: a folder name, a number (-m 03), a range
(-m 03-05), a comma list (-m 03,05) or several values.push -mused to
take one folder name and no more; it now takes several modules, like the other
three. A number finds whatever the full folder name would: a module under
course/, one only the sync state remembers, such as a module deleted here,
and onsync,pullandstatusa Canvas module not yet pulled. A number or
range that matches nothing, and a number two folders share, stop the run with
an error naming it. A full folder name works exactly as before, including the
refusal when nothing answers to it, so a script or the VS Code extension
passing one is unaffected. -
move-module -m,rename-module -m,delete-module -m,new-item -m,
movetomodule-item --to-moduleandbuild-glossary -mtake a module by
number. Each used to want the full folder name;-m 03or-m 3now finds
the module whose folder starts with 03. These commands act on one module, so a
range or list that selects more than one (-m 03-05,-m 03,05) stops with
This command takes one moduleand names the folders it would have meant, and
a number two folders share is refused the same way. An unknown name or number
stops withModule not found, as an unknown name always did;build-glossary
now words it that way too, in place of its own
Module "…" not found in course/ directory. A number makes a typo easier to
commit:delete-module -m 3 -ydeletes whichever module is number 03, where a
mistyped name failed. It names the folder it deleted, as it always has, and it
deletes nothing on Canvas, so a commit brings the module back.new-item -m
and--to-moduleno longer take a path below the module, such as
-m 03-css/02-sub;-sand--to-subsectionname the subfolder. The VS Code
extension passes a full folder name and is unaffected.