Skip to content

Commit

Permalink
Merge pull request #63 from theohbrothers/docs/update-readme-on-summa…
Browse files Browse the repository at this point in the history
…ry-and-config-description

Docs: Update readme summary and configuration descriptions
  • Loading branch information
leojonathanoh committed Aug 9, 2021
2 parents 619629d + cad2fdc commit 6b89918
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
1 change: 0 additions & 1 deletion ConvertOneNote2MarkDown-v2.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions ConvertOneNote2MarkDown-v2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
'@
Expand All @@ -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
'@
Expand Down
6 changes: 3 additions & 3 deletions config.example.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
17 changes: 8 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 6b89918

Please sign in to comment.