Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion options #9

Open
peter88213 opened this issue Jul 23, 2023 Discussed in #7 · 2 comments
Open

Conversion options #9

peter88213 opened this issue Jul 23, 2023 Discussed in #7 · 2 comments
Labels
enhancement New feature or request

Comments

@peter88213
Copy link
Owner

Discussed in #7

Originally posted by peter88213 July 22, 2023
Currently (v0.4), zim2obsidian has a fixed set of features:

  • Remove each note's first level heading and rename the file accordingly.
  • Replace Setext-style headers with Atx-style headers.
  • Convert horizontal rulers.
  • Convert internal links to other pages from Markdown standard to Obsidian style.

The script could be re-designed in a modular way, so that each feature is implemented in a subroutine that is called optionally.
The options can be passed by command line parameters, or read from a configuration file.

@peter88213 peter88213 added the enhancement New feature or request label Jul 23, 2023
@peter88213 peter88213 changed the title Conversion options? Conversion options Jul 23, 2023
peter88213 added a commit that referenced this issue Jul 23, 2023
- Fix a bug where directories may be linked instead of pages.
- Handle links with braces in the filename.
- Make the script configurable by modularizing the features (#9).
- Make the script no longer rename pages.
@peter88213
Copy link
Owner Author

Currently (v0.6.0), you can edit the script to enable/disable the options:

# Configuration (to be changed by the user).

RENAME_PAGES = True
# if True, rename pages according to the names given by the top first level heading.

REMOVE_FIRST_LINE = True
# If True, remove the top heading inserted with Zim's default Markdown exporter template.

CHANGE_HEADING_STYLE = True
# If True, replace Setext-style headings with Atx-style headings; convert rulers.

REFORMAT_LINKS = True
# If True, change Markdown-style links to Obsidian-style links.

peter88213 added a commit that referenced this issue Mar 26, 2024
- Make the "backticks" code conversion an option (#9, #20, #21, #22).
peter88213 added a commit that referenced this issue Mar 26, 2024
- Provide an abbreviation for the "backticks" argument
(#9, #20, #21, #22).
@peter88213
Copy link
Owner Author

With version 0.13.0, an argument parser is introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant