Documentation
¶
Overview ¶
Package zet implements basic utilities for managing zettels within the zet system.
The zet package contains operations for adding, removing, and merging zettels.
Index ¶
- Variables
- func Add(newDirPath, editor, title, body, stdin, link string, open bool) error
- func Commit(d, p, t string) error
- func CommitBulk(zetPath string, files []string) error
- func CreateAdd(path, editor, title, body, stdin, link string, open bool) error
- func Isosec() string
- func ReadmeFiles(zpath string) ([]string, error)
- func SplitZettel(zetDir, zettelDir, b string) error
Constants ¶
This section is empty.
Variables ¶
var (
Perm = 0700
)
Functions ¶
func Add ¶
Add adds a zettel (note) to an exiting zettel directory. Zettels are markdown by default. The path to the zet system is used instead of changing the zet directory to support zettel creation from scripts.
The behavior is dependent on the arguments and input methods provided:
- `zet add` with no arguments: * Creates a new, empty zettel. * Opens newly created zettel for editing.
- `zet add "title"` with one argument: * Creates a new zettel with the provided title. * Does not open the zettel for editing.
- `zet add "title" "body"` with two arguments: * Creates a new zettel with the provided title and body. * Does not open the zettel for editing.
All the above scenarios accept standard input. In which, content from Stdin is always appended after any argument data. Providing non-empty Stdin alongside `zet add` disables the interactive feature.
If link argument is not empty, it will be included in the newly created zettel.
func CommitBulk ¶
CommitBulk commits a bulk of files given a list of paths to the files. Each commit uses the zettel's title as message body.
func CreateAdd ¶
CreateAdd creates a new directory with a unique identifier and then creates a new file.
func ReadmeFiles ¶
ReadmeFiles parses the output of `git status --porcelain` to find and return the list of modified and new README.md files at the zet directory.
func SplitZettel ¶
SplitZettel splits zettel content from stdin into sub-zettels.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
zet
Zet is a command-line utility for managing a Zettelkasten.
|
Zet is a command-line utility for managing a Zettelkasten. |
internal
|
|
config
Package config provides functionality related to zet configurations.
|
Package config provides functionality related to zet configurations. |
meta
Package meta provides functions and types for handling the metadata of zettels.
|
Package meta provides functions and types for handling the metadata of zettels. |
storage
Package storage provides the functionality for interacting with the zet database.
|
Package storage provides the functionality for interacting with the zet database. |