Moon Jot utils function to develop plugins
{{START_NOTE}}
and {{END_NOTE}}
will define a note entity, encompassing everything that is placed inside. For a note to be created, there must be a pre-defined path within the {{START_NOTE}}
and {{END_NOTE}}
. To define this path, it can be inserted between {{PATH}}
and {{END_PATH}}
.
Example:
{{START_NOTE}}
{{PATH}}/Note/title.md{{END_PATH}}
The following text has been capture with Moon Jot : {{CONTENT}}
{{END_NOTE}}
{{CONTENT}
is the content of the Moon Jot Launcher at the moment you save it.
For more options, check the concept right afterwards.
You can create a template in Obsidian that allows you to formulate your own note format, based on the data we have gathered with Moon Jot.
All that is embedded inside will be checked out as a note to be created.
{{START_NOTE}}{{END_NOTE}}
You must add a path to the {{START_NOTE}}
; otherwise, your note will not be created.
{{PATH}}{{END_PATH}}
example:
{{PATH}}
{{IF TITLE}}/Notes/{{TITLE}}.md{{END_IF TITLE}}
{{IF SOURCE.TITLE}}/Notes/{{SOURCE. TITLE}}.md{{END_IF SOURCE.TITLE}}
/Notes/ideas.md
{{END_PATH}}
If you do that, it will check the first one. If it's not good, it will take the second one. If the second one isn't good either, it will take the last one. If the path is empty at the end, it will not create the note.
You can insert content based on a condition. Currently, the condition only checks if something exists or does not exist.
{{IF ...}}Write something{{END_IF ...}}
// Example:
{{PATH}}
{{IF TITLE}}{{TITLE}}.md{{END_IF TITLE}}
{{END_PATH}}
{{IF SOURCE.RANDOM === undefined}}content{{END_IF SOURCE.RANDOM}}
{{IF SOURCE.TEXT === some text}}content{{END_IF SOURCE.TEXT}}
// content is empty make only twitter user
{{IF content === }}{{IF people.0.twitter.0}}<a href="{{people.0.twitter.0}}">{{people.0.name}}</a>{{END_IF people.0.name}}{{END_IF content}}
{{IF SOURCE.TEXT !== some text}}content{{END_IF SOURCE.TEXT}}
{{IF SOURCE.TEXT.includes(some t)}}content{{END_IF SOURCE.TEXT}}
{{IF SOURCE.TEXT.startsWith(- [ ])}}content{{END_IF SOURCE.TEXT}}
You can format the date as YYYY-MM-DD HH:mm:ss.
{{DATE}}YYYY-MM-DD{{END_DATE}}
{{DATE}}HH:mm{{END_DATE}}
// Example:
{{PATH}}/Journal/{{DATE}}YYYY-MM-DD{{END_DATE}}.md{{END_PATH}}
There are many properties that you can use.
{{CONTENT}} // What you wrote in the text editor.
{{TITLE}} // You add the title in the text editor on the first line with # Some title.
{{SOURCE.DESCRIPTION}} // The source description.
{{PEOPLE.0.NAME}} // The person captured names
{{PEOPLE.1.NAME}} // The person captured names
Check the doc here https://github.com/castroCrea/moon/blob/main/doc/Plugin_Development.md
Check also the tutorial video https://youtu.be/dvoalnWBwv4 📹
yarn
yarn build
yarn watch
First remove current git origin
git remote remove origin
Add you repo origin and change also credential iin package.json
Then
yarn pub