Creating a note
Joplin::token = "your joplintoken here copied from the webclippper settings"
begin
note = Joplin::Note.new
note.title = "a new note"
note.body = "markdown content"
note.save!
rescue
puts "Joplin not running?"
endupdating a note
note = Joplin::Note.new id: "6e3811c7a73148a" # note id can be found in the information of any note
note.title = "a new note title"
note.save!If you've got joplin installed, you can do:
require "joplin/token"
token = Joplin::Token.getto get the token programatically. It reads from the sqlite database located in ~/.config/joplin-desktop
You can specify the id of the notebook
note = Joplin::Note.new parent_id: 'c5e6827be8c946c78210d3508cce7ea6'A general purpose Joplin utility that interacts directly with the Joplin database. It uses the JOPLIN_DATA_DIR environment variable to locate the database.
Usage:
jp COMMAND [ARGS]
Commands:
jp add NOTEBOOK [BODY...] # Add a note
jp bkup # Backup the database
jp cal [DATE] # Show calendar
jp cat TARGET... # Display note content
jp edit TARGET # Edit a note or tag stack
jp flashback [DATE] # Show notes from this day in previous years
jp help [COMMAND] # Describe available commands or one specific command
jp info # Show JP and Joplin profile information
jp init SUBCOMMAND # Print shell integration code
jp journal [today|yesterday|YYYY-MM-DD] [TEXT...] # Append to a daily journal note; omit DATE for today
jp log [DATE] [SLICE] # Show log
jp ls [TARGET] # List notebooks, notes, or tags
jp mv SOURCE DESTINATION # Rename a notebook or tag
jp random # Display a random note
jp rm TARGET # Move a note to Trash or recursively remove a notebook or tag
jp search QUERY # Search notes for text
jp settings SUBCOMMAND # Manage settings
jp test # Run tests
jp trash SUBCOMMAND # Manage trashed notes
jp tree # Print a tree of all available commands
jp version # Show version
Commands that interact with Joplin via the API.
Will take a notebook and concatenate all notes into one for easy export to PDF
The token argument is optional and if you have it installed locally it will find the token
This will generate an epub from the referenced notes in the note. It will not include the actual note, but only linked markdown notes within. Rendering things like tables, mermaid diagrams etc is not supported