https://github.com/zettel-lint/zettel-lint
A linter/compiler for markdown-based Zettelkasten git repositories
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A linter/compiler for markdown-based Zettelkasten git repositories
Basic Info
Statistics
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 30
- Releases: 52
Topics
Metadata Files
README.md
title: Readme references: [00000001] notes: YAML top matter is supported
If you are a coder and watch to submit a PR, please see the Contributor guide Contributor Covenant Code of Conduct.
If you are not a confident coder and would like to contribute please look at the task list. I will accept PRs that add issues from that file and update the md to point to them, so long as you at least do all the tasks in a section.
ZL
A linter/compiler for markdown-based Zettelkasten git repositories
Based on the Zettelkasten method
This is a link to a Page that doesn't exist
[[This is a link to a page that doesn't exist - an orphan]]
00000000 points back here
[ ] This is a task
[x] This completed task is ignored
- [ ] Also supports tasks in a bullet list
- [x] if they aren't completed
Tags can use #hashtag or +projectref formats for compatibility with todo.txt files
To refresh the index:
npm inpm run-script zl -- -r ../ -i "../zle/**" -r ../references.md
This will use the references.md.mustache as the template for the references file.
See example journal for the style of repo this could be used on.
Command Line
The zl command line tool provides several subcommands for managing your Zettelkasten:
Global Options
--verbose- Enable verbose output with additional details and ASCII art headers--version- Display the version number
index (alias: create)
Generate an index/reference file from your notes.
Options:
-p, --path <path>- Root path for search (default: ".")-i, --ignore-dirs <path...>- Path(s) to ignore-r, --reference-file <path>- Path to output (default "reference.md")-c, --create-file <path>- Path to output file-m, --template-file <path>- Path to input mustache template (default "reference.md.mustache")-o, --show-orphans- Output list of orphaned links to console-t, --task-display <format>- Display tasks format: 'none', 'by-file', or 'by-priority' (default: 'by-file')--json-debug-output- Output JSON intermediate representations--no-wiki- Disable wiki-style links-v, --verbose- Show additional output
import (alias: sync)
Import notes from third-party sources. Will create new files or overwrite existing ones.
Trello API Key and Token
To import directly from Trello, you will need a Trello API key and (for private boards or board name lookup) a token:
Get your API key:
- Visit https://trello.com/app-key while logged in to Trello.
- Copy the API key shown at the top of the page.
Get your token:
- On the same page, under "Token", click the link to generate a token.
- Approve the access and copy the token provided.
Keep your API key and token secret! Do not share them or commit them to public repositories.
You can now use these with --trello-api-key <key> and --trello-token <token>.
Options:
-s, --source <source>- Source type (e.g., trello, csv) Required-p, --path <path>- Search path, supports wildcards (default: ".")-o, --output-folder <path>- Folder to save notes to (default: "../import/")--trello-api-key <key>- Trello API key for direct board download (trello source only)--trello-board <idOrName>- Trello board id or name for direct download (trello source only)--trello-token <token>- Trello API token (required if using board name)--json-debug-output- Output JSON intermediate representations-v, --verbose- Show additional output
fix
Fix markdown files based on a set of rules. Will update existing files or output to a new directory.
Options:
-p, --path <path>- Root path for search (default: ".")-i, --ignore-dirs <path...>- Path(s) to ignore-o, --output-dir <path>- Directory to output fixed files to. If not specified, files will be updated in place. (default: ".")-r, --rules <rule...>- Rules to use (default: all known rules)-m, --move- Move inline properties to frontmatter instead of copying (default: false)-v, --verbose- Show additional output
Existing Rules
trailing-newline- Ensure files end with a single newlineinline-properties-to-frontmatter- Ensure YAML frontmatter is correctly formatted, with inline properties moved to frontmatter if specified- If
--moveis specified, inline properties will be moved to frontmatter instead of copied - This is useful for moving Obsidian dataview properties to YAML frontmatter
- If
notes (alias: update)
This has been DEPRECATED and will be removed in a future release. Please use zl fix instead.
Lint and fix notes markdown files. Will update existing files.
Options:
-p, --path <path>- Root path for search (default: ".")-i, --ignore-dirs <path...>- Path(s) to ignore-w, --wiki-links-from-id- Convert [id]-style links into [[wiki-links]]-o, --show-orphans- Output list of orphaned links to console--json-debug-output- Output JSON intermediate representations--no-wiki- Disable wiki-style links-v, --verbose- Show additional output
Templating (for the index and import options)
Some features accept a mustache based template to generate their output. See references.md.mustache for an example.
For the indexer, there is a {{#notes}} collection with all notes, as well as a collection named after each collector.
Each collector looks for specific features:
- the WikiCollector looks for
[[wiki]][Markdown](example.com)and footnote local references and populates the{{#Links}}collection, where each file has outgoing links in the{{#data}}collection and incoming links in the{{#bag}}collection - the TagCollector looks for #hashtag and +project references, and populates the
{{#Tags}}collection - the TaskCollector looks for
[ ] Tasksor(A) todo.txt style, and populates the{{#Tasks}}collection - the OrphanCollector looks for all wiki links with a URL, and populates the
{{#Orphans}}collection - the ContextCollector looks for
todo.txtstyle@contextlinks and populates the{{#Contexts}}collection
Each note has the following properties:
id- the unique internal id (usually the timestamp from the filename)filenamewikiname- filename without the last 3 characters, which turns a.mdfile into its wiki reference.title- taken from YAML top matter, the first# H1 headeror the filename, in that orderdata- the collection of matches by this collector in this file
Template extensions
{{markdownEscaping}}Using the a single backtick at the start of the tag will escape any markdown characters into an HTML escaped version.{{?tag/filter/}}{{/?tag}}Using a ? at the start of a tag pair will filter any output using the specified regular expression. An empty filter will match everything.{{?tag?sort(key)/filter/}}{{/?tag}}will sort the results according to the specified key, or alphabetically by name if the key name is not supplied.
Owner
- Name: zettel-lint
- Login: zettel-lint
- Kind: organization
- Repositories: 2
- Profile: https://github.com/zettel-lint
GitHub Events
Total
- Create event: 176
- Release event: 7
- Issues event: 36
- Watch event: 1
- Delete event: 165
- Issue comment event: 214
- Push event: 299
- Pull request review comment event: 136
- Pull request review event: 236
- Pull request event: 306
Last Year
- Create event: 176
- Release event: 7
- Issues event: 36
- Watch event: 1
- Delete event: 165
- Issue comment event: 214
- Push event: 299
- Pull request review comment event: 136
- Pull request review event: 236
- Pull request event: 306
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 226
- Total Committers: 6
- Avg Commits per committer: 37.667
- Development Distribution Score (DDS): 0.558
Top Committers
| Name | Commits | |
|---|---|---|
| craignicol | c****l@g****m | 100 |
| Craig Nicol | c****l@s****k | 66 |
| Craig Nicol | C****l@s****k | 24 |
| Snyk bot | s****t@s****o | 19 |
| dependabot[bot] | 4****]@u****m | 15 |
| Craig Nicol | c****l@s****t | 2 |
Committer Domains (Top 20 + Academic)
Packages
- Total packages: 1
-
Total downloads:
- npm 599 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 45
- Total maintainers: 1
npmjs.org: zettel-lint
Command line zettel linting/indexing
- Homepage: https://github.com/zettel-lint/zettel-lint#readme
- License: ISC
-
Latest release: 0.12.4
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- 581 dependencies
- @types/clear ^0.1.0 development
- @types/figlet ^1.2.0 development
- @types/glob ^7.1.1 development
- @types/mustache ^4.1.1 development
- @types/node ^13.13.5 development
- eslint ^7.0.0 development
- jest ^26.6.3 development
- nodemon ^2.0.19 development
- ts-jest ^26.4.4 development
- ts-node ^8.10.1 development
- typescript ^3.8.3 development
- @types/jest ^26.0.24
- axios ^0.27.2
- chalk ^4.1.2
- clear ^0.1.0
- commander ^5.1.0
- copyfiles ^2.4.1
- figlet ^1.5.2
- fs 0.0.2
- glob ^7.2.3
- glob-promise ^3.4.0
- mustache ^4.2.0
- path ^0.12.7
- simple-markdown ^0.7.3
- actions/checkout v2 composite
- github/codeql-action/analyze v1 composite
- github/codeql-action/autobuild v1 composite
- github/codeql-action/init v1 composite
- actions/checkout v2 composite
- github/codeql-action/upload-sarif v1 composite
- microsoft/DevSkim-Action v1 composite
- actions/first-interaction v1 composite
- Klemensas/action-autotag stable composite
- actions/checkout v2 composite
- actions/setup-node v1 composite
- actions/checkout v2 composite
- actions/setup-node v1 composite
- actions/checkout ec3a7ce113134d7a93b817d10a8272cb61118579 composite
- actions/upload-artifact 82c141cc518b40d92cc801eee768e7aafc9c2fa2 composite
- github/codeql-action/upload-sarif 5f532563584d71fdef14ee64d17bafb34f751ce5 composite
- ossf/scorecard-action e3e75cf2ffbf9364bbff86cdbdf52b23176fe492 composite