can-note-graph constructs a list of addressed notes with metadata and AST fully prepared for storage. The AST should have any internal links pointing at an address rather than a filename.

It takes no input. When it runs, it should produce output of the following shape using any notes it finds with valid extensions (see config: extensions).

        file: string,
        metadata: {
            name: string,
        ast: unist.Node,
        address: string,
The name of the note is derived from the file name. Effectively, the notes produced by can-note-graph should be ready for storage

Error Codes

can-note-graph will exit with an error-code if it runs into any problems

code meaning
1 unknown error
2 not run in a directory with a notebook
3 notes form a cycle
4 internal links point to a file which doesn't exist yet

Error code 4 may only be used for referencing notes which don't exist at all in the future. can-note-graph may start to check inside the notebook for a note with a name. For now, pull all notes you're linking to into the writing folder before running can-note-graph

  • can commands
    • | command | description | | can-status | report the current state of the writing folder | | can-add | add notes from the writing folder into the notebook | | can-new | create a new writing-folder containing a notebook | | can-ast-at | given an address, find the AST of a note | | can-md | convert from markdown to can's internal AST format | | can-address | find the address of a particular AST | | can-note-graph | construct a list of addressed notes from the writing folder |