Commit Graph

10 Commits

Author SHA1 Message Date
Martin Heuschober 018c9606a6
Implement frontmatter based filtering (#163)
This allows limiting the notes that will be exported using `--skip-tags` and `--only-tags`

---------

Co-authored-by: Martin Heuschober <martin.heuschober@posteo.net>
Co-authored-by: Nick Groenen <nick@groenen.me>
Co-authored-by: Martin Heuschober <martin_heuschober@trimble.com>
2023-12-02 11:29:29 +01:00
Nick Groenen 84308c9f1f
New: support Obsidian's "Strict line breaks" setting
This change introduces a new `--hard-linebreaks` CLI argument. When
used, this converts soft line breaks to hard line breaks, mimicking
Obsidian's "Strict line breaks" setting.

Implementation detail: I considered naming this flag
`--strict-line-breaks` to be consistent with Obsidian itself, however I
feel the name is somewhat misleading and ill-chosen.
2022-01-02 00:42:51 +01:00
Nick Groenen 634b0d70ac
New: add start_at option to export a partial vault
This introduces a new `--start-at` CLI argument and corresponding
`start_at()` method on the Exporter type that allows exporting of only a
given subdirectory within a vault.

See the updated README file for more details on when and how this may be
used.
2021-08-27 16:03:54 +02:00
Nick Groenen 33eac07b1a
Fix 4 new clippy lints 2021-07-27 15:00:44 +02:00
Nick Groenen acfacc690b
New: add `--version` flag 2021-02-15 21:24:23 +01:00
Nick Groenen 7c7042d1dd
Apply clippy suggestions following rust 1.50.0 2021-02-12 13:36:59 +01:00
Nick Groenen a0cef3d9c8
New: Add --no-recursive-embeds to break infinite recursion cycles
It's possible to end up with "recursive embeds" when two notes embed
each other. This happens for example when a `Note A.md` contains
`![[Note B]]` but `Note B.md` also contains `![[Note A]]`.

By default, this will trigger an error and display the chain of notes
which caused the recursion.

Using the new `--no-recursive-embeds`, if a note is encountered for a
second time while processing the original note, rather than embedding it
again a link to the note is inserted instead to break the cycle.

See also: https://github.com/zoni/obsidian-export/issues/1
2021-01-05 15:45:34 +01:00
Nick Groenen cdb2517365
new: make walk options configurable on CLI
By default hidden files, patterns listed in `.export-ignore` as well as
any files ignored by git are excluded from exports. This behavior has
been made configurable on the CLI using the new flags `--hidden`,
`--ignore-file` and `--no-git`.
2021-01-05 00:05:17 +01:00
Nick Groenen 3b46d6b7d1
New: Report file tree when RecursionLimitExceeded is hit
This refactors the Context to maintain a list of all the files which
have been processed so far in a chain of embeds. This information is
then used to print a more helpful error message to users of the CLI when
RecursionLimitExceeded is returned.
2020-12-21 13:54:30 +01:00
Nick Groenen c2de776148
Public release 2020-12-07 22:35:57 +01:00