Importing notes¶
One file¶
1 2 3 | |
A folder¶
add-batch walks a directory recursively and imports every file with a
matching extension (.md and .txt by default):
1 2 3 4 | |
-x / --exclude takes a glob and can be repeated. Each pattern is
matched against the path relative to the folder and against the bare
file name, with shell-style rules where * also matches /.
Titles¶
A note's title is, in order:
- the first
# Headingin the first 2 KB of the file; - for a generic file name (
index,readme,overview,summary,introduction,intro), the folder path relative to the imported directory, such asobservability/alerting; - the file name without its extension.
Re-importing¶
Every note remembers the absolute path it came from, so importing the same files again is safe:
| The file is… | notecast… |
|---|---|
| new | adds a note (pending) |
| unchanged | skips it |
| changed (content or title) | updates the note, clears its summary, keywords, embedding and themes, and sets it back to pending |
add-batch reports the three counts:
1 | |
Files deleted from disk are not deleted from notecast; remove their notes
with notecast delete.