Commit Graph

187 Commits

Author SHA1 Message Date
Nick Groenen
7f94766cce
Merge pull request #41 from zoni/dependabot/cargo/serde_yaml-0.8.21
Bump serde_yaml from 0.8.20 to 0.8.21
2021-09-13 23:16:09 +02:00
dependabot[bot]
48ec896cee
Bump serde_yaml from 0.8.20 to 0.8.21
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.20 to 0.8.21.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.20...0.8.21)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-13 19:02:43 +00:00
Nick Groenen
5460368297
Release v21.9.0 2021-09-12 23:48:31 +02:00
Nick Groenen
8dc7e59a79
New: support postprocessors running on embedded notes
This introduces support for postprocessors that are run on the result of
a note that is being embedded into another note. This differs from the
existing postprocessors (which remain unchanged) that run once all
embeds have been processed and merged with the final note.

These "embed postprocessors" may be set through the new
`Exporter::add_embed_postprocessor` method.
2021-09-12 14:53:27 +02:00
Nick Groenen
6afcd75f07
Don't build docs for the bin target
The library contains documentation covering both CLI and library usage,
there's no separate documentation for just the binary target.
2021-09-12 14:42:07 +02:00
Nick Groenen
216179ef35
Move postprocessor tests into their own file for clarity 2021-09-12 12:50:11 +02:00
Nick Groenen
77e35980c4
Update indirect dependencies 2021-09-03 20:04:41 +02:00
Nick Groenen
481c62b78d
Merge pull request #38 from zoni/dependabot/cargo/serde_yaml-0.8.20
Bump serde_yaml from 0.8.19 to 0.8.20
2021-08-31 20:01:23 +02:00
dependabot[bot]
47df3739c5
Bump serde_yaml from 0.8.19 to 0.8.20
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.19 to 0.8.20.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.19...0.8.20)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 19:03:09 +00:00
Nick Groenen
d138c92a25
Merge pull request #37 from zoni/start_at
New: add start_at option to export a partial vault
2021-08-27 16:13:26 +02: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
c64d75967e
Don't borrow references that are immediately dereferenced
This was caught by a recently introduced clippy rule
2021-08-27 11:27:46 +02:00
Nick Groenen
82798daa89
Merge pull request #35 from zoni/dependabot/cargo/serde_yaml-0.8.19
Bump serde_yaml from 0.8.17 to 0.8.19
2021-08-27 11:19:57 +02:00
dependabot[bot]
ff58263707
Bump serde_yaml from 0.8.17 to 0.8.19
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.17 to 0.8.19.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.17...0.8.19)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-23 19:02:57 +00:00
Nick Groenen
18231775ae
Update dependencies 2021-07-27 15:05:29 +02:00
Nick Groenen
33eac07b1a
Fix 4 new clippy lints 2021-07-27 15:00:44 +02:00
Nick Groenen
2dc7809367
Merge pull request #23 from zoni/dependabot/cargo/regex-1.5.3
Bump regex from 1.4.6 to 1.5.3
2021-05-05 21:24:59 +02:00
dependabot[bot]
cd5b1503da
Bump regex from 1.4.6 to 1.5.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.6 to 1.5.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.6...1.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-03 06:39:59 +00:00
Nick Groenen
51d263439d
Merge pull request #19 from zoni/dependabot/cargo/pretty_assertions-0.7.2
Bump pretty_assertions from 0.7.1 to 0.7.2
2021-04-26 13:06:37 +02:00
Nick Groenen
5ff990ca20
Merge pull request #21 from zoni/dependabot/cargo/regex-1.4.6
Bump regex from 1.4.5 to 1.4.6
2021-04-26 12:41:05 +02:00
dependabot[bot]
9382ca2479
Bump regex from 1.4.5 to 1.4.6
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.5...1.4.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 06:31:06 +00:00
dependabot[bot]
d436727f9f
Bump pretty_assertions from 0.7.1 to 0.7.2
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.1...v0.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 06:13:42 +00:00
Nick Groenen
05b5a56d55
Release v0.7.0 2021-04-11 16:33:03 +02:00
Nick Groenen
5e8e8b9c96
Update release checklist 2021-04-11 16:33:03 +02:00
Nick Groenen
84a9abc98d
Add extra license disclaimer 2021-04-11 16:27:07 +02:00
Nick Groenen
50e9a3a3a3
Document workaround for relative links issue with Hugo 2021-04-11 16:22:35 +02:00
Nick Groenen
c7b1500e6f
Merge pull request #16 from zoni/dependabot/cargo/pretty_assertions-0.7.1
Bump pretty_assertions from 0.6.1 to 0.7.1
2021-04-11 15:57:56 +02:00
Nick Groenen
f2e55f285a
Merge pull request #18 from zoni/dependabot/cargo/walkdir-2.3.2
Bump walkdir from 2.3.1 to 2.3.2
2021-04-11 15:57:52 +02:00
Nick Groenen
f95afd768c
Merge pull request #15 from zoni/dependabot/cargo/regex-1.4.5
Bump regex from 1.4.3 to 1.4.5
2021-04-11 15:57:46 +02:00
Nick Groenen
638e83e9dc
Simplify and improve documentation
This removes mdBook in favor of a flat docs folder generating a single
`README.md` in the repository root.

Installation and usage instructions have also been expanded slightly.
2021-04-11 15:39:54 +02:00
dependabot[bot]
af403e8daf
Bump regex from 1.4.3 to 1.4.5
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.3 to 1.4.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.3...1.4.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-11 12:10:12 +00:00
Nick Groenen
831fd162e3
Merge pull request #10 from zoni/postprocessing
Add support for postprocessing
2021-04-11 14:08:58 +02:00
Nick Groenen
58eb79e53d
new: postprocessing support
Add support for postprocessing of Markdown prior to writing converted
notes to disk.

Postprocessors may be used when making use of Obsidian export as a Rust
library to do the following:

1. Modify a note's `Context`, for example to change the destination
   filename or update its Frontmatter.
2. Change a note's contents by altering `MarkdownEvents`.
3. Prevent later postprocessors from running or cause a note to be
   skipped entirely.

Future releases of Obsidian export may come with built-in postprocessors
for users of the command-line tool to use, if general use-cases can be
identified.

For example, a future release might include functionality to make notes
more suitable for the Hugo static site generator. This functionality
would be implemented as a postprocessor that could be enabled through
command-line flags.
2021-04-11 13:52:40 +02:00
dependabot[bot]
33ea2dea47
Bump walkdir from 2.3.1 to 2.3.2
Bumps [walkdir](https://github.com/BurntSushi/walkdir) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/BurntSushi/walkdir/releases)
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.3.1...2.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 06:26:37 +00:00
dependabot[bot]
95dee59d6c
Bump pretty_assertions from 0.6.1 to 0.7.1
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 0.6.1 to 0.7.1.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.6.1...v0.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-15 06:24:40 +00:00
Nick Groenen
f0dd6f7132
Fix: also percent-encode ? in filenames
A recent Obsidian update expanded the list of allowed characters in
filenames, which now includes `?` as well. This needs to be
percent-encoded for proper links in static site generators like Hugo.
2021-02-16 09:13:04 +01:00
Nick Groenen
5f615e8ee0
Update lockfile 2021-02-15 21:42:35 +01:00
Nick Groenen
b54d4b46e7
Release v0.6.0 2021-02-15 21:38:17 +01:00
Nick Groenen
ecf55d25db
Avoid redundant "Release" in GitHub release titles 2021-02-15 21:26:10 +01:00
Nick Groenen
acfacc690b
New: add --version flag 2021-02-15 21:24:23 +01:00
Nick Groenen
e85421609e
Merge pull request #11 from zoni/notes-with-underscores
Recognize notes beginning with underscores
2021-02-15 19:46:05 +01:00
Nick Groenen
cfd07dc5c7
Fix: Recognize notes beginning with underscores
Notes with an underscore would fail to be recognized within Obsidian
`[[_WikiLinks]]` due to the assumption that the underlying Markdown
parser (pulldown_cmark) would emit the text between [[ and ]] as a
single event.

The note parser has now been rewritten to use a more reliable state
machine which correctly recognizes this corner-case (and likely some
others).
2021-02-15 19:41:31 +01:00
Nick Groenen
138965a764
Add failing testcase for files with underscores 2021-02-15 19:41:27 +01:00
Nick Groenen
2635cdb3a7
Add unit tests for display of ObsidianNoteReference 2021-02-15 12:19:02 +01:00
Nick Groenen
25233cec4a
Add some unit tests for ObsidianNoteReference::from_str 2021-02-15 12:09:08 +01:00
Nick Groenen
2fa34fb5db
Also run tests on pull requests 2021-02-14 20:48:52 +01:00
Nick Groenen
f94753c511
Chg: Don't Box FilterFn in WalkOptions
Previously, `filter_fn` on the `WalkOptions` struct looked like:

    pub filter_fn: Option<Box<&'static FilterFn>>,

This boxing was unneccesary and has been changed to:

    pub filter_fn: Option<&'static FilterFn>,

This will only affect people who use obsidian-export as a library in
other Rust programs, not users of the CLI.

For those library users, they no longer need to supply `FilterFn`
wrapped in a Box.
2021-02-12 13:37:00 +01:00
Nick Groenen
7c7042d1dd
Apply clippy suggestions following rust 1.50.0 2021-02-12 13:36:59 +01:00
Nick Groenen
96535aef6e
Merge pull request #9 from joshuacoles/feature-same-file-section-links
Allow references to blocks/headers within the same files
2021-02-12 13:07:08 +01:00
Joshua Coles
f76fc22312 Fix infinite recursion bug with references to current file. 2021-02-09 11:32:10 +00:00