Skip to content

CI: main (all fixes plus keepescape mode 4) - #6

Closed
klangme1ster wants to merge 16 commits into
masterfrom
main
Closed

klangme1ster wants to merge 16 commits into
masterfrom
main

Conversation

@klangme1ster

Copy link
Copy Markdown
Owner

Runs the CI for the combined branch main (upstream master + PRs 191 to 195 + keepescape mode 4). Not meant to be merged.

🤖 Generated with Claude Code

klangme1ster and others added 12 commits September 24, 2026 15:03
With keepspaces = 1, every non-breaking space was removed. Web-clipped content often has a non-breaking space as the only space between two words (e.g. 'press the<nbsp>Windows<nbsp>key'), so words were glued together ('Windowskey').

Now non-breaking spaces are removed only at the start (keeping the line's indentation) and end of a line (incl. lines that only contain them), where converting them could create an indented code block or a trailing-double-space hard line break. Any other run of them becomes a single space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… present

The first 6 lines of pandoc's output were always discarded, assuming they are the page's title, date and time. Pages without a date and time (e.g. emails sent to OneNote) lost real content, e.g. a table and a Subject line, or a page's first command.

The new Remove-PageHeader removes the header only when there is a date line (text with a 4-digit year, any language) followed by a time line (e.g. '09:50', '9:19 AM'); the title may be empty. Without such a header, only a first line repeating the page's name is removed.

Also fix the Created/Modified offset: the 'zz00' format printed only the offset's hours, which is wrong for e.g. +05:30. The output format stays the same (e.g. '+0200').

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chment and image links

- Duplicate page names: the '-1', '-2' postfix was appended before truncating to mdFileNameAndFolderNameMaxLength, so for long names it was cut off again, and the pages overwrote each other. Duplicates are now detected on the truncated name (which also catches long names that only differ after the cut-off), and the postfix survives truncation (new Truncate-PathFileName -KeepSuffix).
- Inserted attachments: references were replaced with a plain search, so with attachments '11-36-00002.pdf' and 'Datenblatt_11-36-00002.pdf' on one page, the first name also matched inside the second, nesting one link inside the other. Only whole file names are matched now.
- Images: image file names are prefixed with the page path, which can contain characters like '#' and "'" (e.g. 'c't-expert-community--Newsletter-theohbrothers#10-image1.jpg'). A '#' in a link is read as a URL fragment, breaking the image. Image names now go through Remove-InvalidFileNameCharsInsertedFiles, like inserted attachments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OneNote reports characters that aren't allowed in section file names as '^' codes in the section's name, e.g. 'AI ^M  ML' for a section named 'AI / ML', and 'DECT^J Bluetooth' for 'DECT & Bluetooth'. These codes ended up in folder names ('AI-^M--ML').

Decode '^M' to '/' and '^J' to '&' (the codes observed so far) before removing invalid file name characters, for notebook, section group and section names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k's previous output

When converting into an existing notes folder, files of the same name are overwritten, but notes, folders and media that were renamed or deleted in OneNote since the last run are left behind.

With overwrite = 2, a notebook's previous output is removed before converting it. The notebook's docx folder is kept, so usedocx = 2 can still reuse it. Only the notebook's own folder under notesdestpath is touched. Read-only files (e.g. inserted attachments) and paths beyond 260 characters on Windows Powershell 5 are handled. The default (1) keeps the current behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…odes in notebook names

- LOCAL-CHANGES.md records the differences to upstream and the PR status.
- docs/ holds the PR texts and the 2026-11-01 transcription quality report.
- Remove-PreviousNotebookOutput now also decodes OneNote escape codes
  in the notebook name (not part of PR theohbrothers#195).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGMypgzLxRQFiU563LLb5
…scapes

OneNote pages often start paragraphs with a literal '- ' or '7.'. Pandoc
escapes them ('\- item', '7\. item'), so the notes lose their lists and
carry loose blank lines, line-end backslashes and needless escapes.

Mode 4 (Repair-MarkdownEscapes) rebuilds those lists (also inside block
quotes and after non-breaking spaces), turns a line-end backslash into two
spaces, and removes only escapes that cannot change the rendering. Code
fences and inline code are untouched. Modes 1 to 3 and the default are
unchanged.

Also adds docs (ideas, known issues, ADR 0001) and the quality report.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGMypgzLxRQFiU563LLb5
Replace LOCAL-CHANGES.md with FORK-CHANGES.md, written for people who
only know the upstream project: a "do I need this" table by symptom, one
section per change with cause, fix and before/after examples, the
recommended configuration, PR status and development notes. README gets a
fork banner and points to keepescape mode 4.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGMypgzLxRQFiU563LLb5
@klangme1ster klangme1ster reopened this Nov 1, 2026
This fork's workflow differs from upstream:
- Remove windows-2019: GitHub retired the image, the job never starts.
- Remove the PowerShell 6.0, 6.1, 6.2 and 7.0 container jobs: their
  Ubuntu 16.04/18.04 images are too old (glibc < 2.28) for the Node
  runtime GitHub forces on JavaScript actions, so actions/checkout fails
  before any test runs.
- actions/checkout v3 -> v4.
- Also run for pushes and pull requests on main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGMypgzLxRQFiU563LLb5
klangme1ster and others added 3 commits November 1, 2026 18:50
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGMypgzLxRQFiU563LLb5
… breaks

A single newline inside a paragraph is a soft break: some programs show
it as a line break, strict CommonMark renderers join the lines. Pandoc
writes OneNote's line breaks as a backslash at the line end, which is not
rendered the same everywhere either, and keepescape 1 and 2 delete it, so
the line break is lost.

hardbreaks = 2 (Add-MarkdownHardBreaks) turns that backslash into two
spaces and ends every other line that is followed by a line of the same
paragraph with two spaces. Blank lines, headings, tables, rules, HTML,
code and the line before a list item are left alone. Default 1 changes
nothing; the option works with every keepescape mode.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGMypgzLxRQFiU563LLb5
@klangme1ster

Copy link
Copy Markdown
Owner Author

Not needed any more: main is now the default branch and CI runs on it directly. Closing.

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