From cad2fdc47673f0c47c7ba73ead41e025a0b65c91 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Mon, 9 Aug 2021 15:24:08 +0000 Subject: [PATCH] Docs: Update readme summary and configuration descriptions --- ConvertOneNote2MarkDown-v2.Tests.ps1 | 1 - ConvertOneNote2MarkDown-v2.ps1 | 6 +++--- config.example.ps1 | 6 +++--- docs/README.md | 17 ++++++++--------- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/ConvertOneNote2MarkDown-v2.Tests.ps1 b/ConvertOneNote2MarkDown-v2.Tests.ps1 index 12fd566..da31f39 100644 --- a/ConvertOneNote2MarkDown-v2.Tests.ps1 +++ b/ConvertOneNote2MarkDown-v2.Tests.ps1 @@ -676,7 +676,6 @@ Describe 'New-SectionGroupConversionConfig' -Tag 'Unit' { # 9 pages from 'test' notebook, 9 pages from 'test2' notebook $result.Count | Should -Be 18 - # The 4th, 5th, and 6th pages are identically named in the fake hierarchy for ($i = 0; $i -lt $result.Count; $i = $i + 3) { # Test in threes $pageCfg1 = $result[$i] $pageCfg2 = $result[$i + 1] diff --git a/ConvertOneNote2MarkDown-v2.ps1 b/ConvertOneNote2MarkDown-v2.ps1 index 3e9fba1..0f8ac4f 100755 --- a/ConvertOneNote2MarkDown-v2.ps1 +++ b/ConvertOneNote2MarkDown-v2.ps1 @@ -33,7 +33,7 @@ Function Get-DefaultConfiguration { dryRun = @{ description = @' Whether to do a dry run -1: Convert +1: Convert - Default 2: Convert (dry run) '@ default = 1 @@ -59,7 +59,7 @@ Specify a notebook name to convert } usedocx = @{ description = @' -Whether to create new word docs or reuse existing ones +Whether to create new word .docx or reuse existing ones 1: Always create new .docx files - Default 2: Use existing .docx files (90% faster) '@ @@ -69,7 +69,7 @@ Whether to create new word docs or reuse existing ones } keepdocx = @{ description = @' -Whether to discard word docs after conversion +Whether to discard word .docx after conversion 1: Discard intermediate .docx files - Default 2: Keep .docx files '@ diff --git a/config.example.ps1 b/config.example.ps1 index 9b58e16..43eab96 100755 --- a/config.example.ps1 +++ b/config.example.ps1 @@ -7,7 +7,7 @@ # 3) Run the main script: ./ConvertOneNote2MarkDown-v2.ps1. Sit back while the script starts converting immediately. # Whether to do a dry run -# 1: Convert +# 1: Convert - Default # 2: Convert (dry run) $dryRun = 1 @@ -19,12 +19,12 @@ $notesdestpath = 'c:\temp\notes' # 'mynotebook': Convert specific notebook named 'mynotebook' $targetNotebook = '' -# Whether to create new word docs or reuse existing ones +# Whether to create new word .docx or reuse existing ones # 1: Always create new .docx files - Default # 2: Use existing .docx files (90% faster) $usedocx = 1 -# Whether to discard word docs after conversion +# Whether to discard word .docx after conversion # 1: Discard intermediate .docx files - Default # 2: Keep .docx files $keepdocx = 1 diff --git a/docs/README.md b/docs/README.md index 676c380..25659ed 100755 --- a/docs/README.md +++ b/docs/README.md @@ -29,22 +29,21 @@ The powershell script 'ConvertOneNote2MarkDown-v2.ps1' will utilize the OneNote * Process pages that are in sections at the **Notebook, Section Group and all Nested Section Group levels** * Allows to choose between **converting a specific notebook or all notebooks** * Allows to **choose between creating subfolders for subpages** (e.g. Page\Subpage.md) or **appending prefixes** (e.g. Page_Subpage.md) -* Allows to choose between putting all **Images** in a central '/media' folder for each notebook, or in a separate '/media' folder in each folder of the hierarchy -* Updates image references in the resulting .md files, generating *relative* references to the image files within the markdown document -* Extracts all **File Objects** to the same folder as Images and fix references in the resulting .md files. Symbols in file names removed for link compatibility. -* Allows to choose between **discarding or keeping intermediate Word files**. Intermedia Word files are stored in a central notebook folder. +* Allows to choose between putting all media (images, attachments) in a central '/media' folder for each notebook, or in a separate '/media' folder in each folder of the hierarchy + * Symbols in media file names removed for link compatibility + * Updates media references in the resulting .md files, generating *relative* references to the media files within the markdown document +* Allows to choose between **discarding or keeping intermediate Word files**. Intermediate Word files are stored in a central notebook folder. * Allows to choose between converting from existing docx (90% faster) and creating new ones - useful if just want to test differences in the various processing options without generating new docx each time -* Allows to **select which markdown format will be used**, defaulting to Pandoc's standard format, which strips any HTML from tables along with other desirable (for me) formatting choices. +* Allows to **select which markdown format will be used**, defaulting to Pandoc's standard format, which strips any HTML from tables along with other desirable (for me) formatting choices. ee more details on these options here: https://pandoc.org/MANUAL.html#options * markdown (Pandoc’s Markdown) * commonmark (CommonMark Markdown) * gfm (GitHub-Flavored Markdown), or the deprecated and less accurate markdown_github; use markdown_github only if you need extensions not supported in gfm. * markdown_mmd (MultiMarkdown) * markdown_phpextra (PHP Markdown Extra) * markdown_strict (original unextended Markdown) -* See more details on these options here: https://pandoc.org/MANUAL.html#options -* Allows to choose whether to include page timestamp and a separator at top of document - * Improved file headers, with title now as a # heading, standardized DateTime format, and horizontal line to separate from rest of document -* Alllos to choose whether to remove double spaces between bullet points that are created when converting with Pandoc +* Allows to choose whether to include page timestamp and a separator at top of page + * Improved headers, with title now as a # heading, standardized DateTime format, and horizontal line to separate from rest of document +* Allows to choose whether to remove double spaces between bullet points and non-breaking spaces that are created when converting with Pandoc * Allows to choose whether to remove `\` escape symbol that are created when converting with Pandoc * Allows Detailed logging. Run the script with `-Verbose` to see detailed logs of each page's conversion.