Skip to content

1.7.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 14:20
· 3 commits to main since this release
d3b1d90
  • A push puts the alert icons back when they are gone from Canvas. It used to
    trust .canvas-sync.json alone: an icon recorded under the current theme was
    taken to exist, whatever had happened to the file since. So after
    npx course reset-canvas followed by a push, without
    npx course reset-sync-state in between, or after deleting the
    /course-icons folder by hand in Canvas, every callout the push rendered
    pointed at a file that no longer existed and showed a broken image, while
    status reported 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-canvas that
    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 md file 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-build always 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 the verbatim: 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 -m and export-toc -m take several modules, and take them by number.
    -m used 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 03 or -m 3), a range (-m 03-05) or a comma list (-m 03,05),
    and several values in one go (-m 03 05), as sync, pull and status
    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
    -m now takes several values, export -m 03-css course/x.md reads the path
    as a module and stops with Not a module, and export 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 -m and status -m take modules by number too, in
    the forms export -m takes: a folder name, a number (-m 03), a range
    (-m 03-05), a comma list (-m 03,05) or several values. push -m used 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 on sync, pull and status a 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-module and build-glossary -m take a module by
    number. Each used to want the full folder name; -m 03 or -m 3 now 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 module and names the folders it would have meant, and
    a number two folders share is refused the same way. An unknown name or number
    stops with Module 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 -y deletes 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-module no longer take a path below the module, such as
    -m 03-css/02-sub; -s and --to-subsection name the subfolder. The VS Code
    extension passes a full folder name and is unaffected.