joplin 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/jp +6 -3
  3. data/lib/joplin/version.rb +1 -1
  4. data/readme.md +36 -0
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 473edf7525029f8e4dc7a27448d9759f62666e27de6b9aef66cf472b3400b8c0
4
- data.tar.gz: b4a6869f141a74bd6a3133a74aa7788c451500152ef84c31c418159faffb9d02
3
+ metadata.gz: 4674dfac002edea97087b389c4ddf83ba19390316d991297e00cfe7b10d87b38
4
+ data.tar.gz: 3046489c3febec3b5530bfad90a742332e656c870333d201bc10c0cc2049b6d8
5
5
  SHA512:
6
- metadata.gz: 37ac89db9443e9b413495b059b8eafaf30672e4254932d912fa86822eace0a24cb5b08bdc977922872c840d6e0959427d907d5005d7988959500121fd9380d8a
7
- data.tar.gz: f7574b5afa1f55f7d06e565eb3145d9804c0c1ea9e3ca6e039f69688c72963ae2cf1389e31ebab846978f870a3e16833793774f7131a82794887522139db1391
6
+ metadata.gz: 6f82e45d6e2118ee76ce9329b36e84cb35a34bde99d8ffff6df57e62adafb71091b48a93430aeb57a2279d3b49a16760dc879d3706a52b6a97f0c7d4b04717a6
7
+ data.tar.gz: 2354fed9ef873d94de85fa1b53767e09324fcf935cc3179fc5b86006982df901e51e46d5e0ccbeb488c2a571fa6ba89519c53ef8a8741e3ccae24074383180fe
data/bin/jp CHANGED
@@ -11,8 +11,6 @@ require 'io/console'
11
11
  require 'stringio'
12
12
  require 'shellwords'
13
13
  require 'json'
14
- require 'bundler/setup'
15
-
16
14
 
17
15
  # Polyfill for CGI.parse which was removed in Ruby 4.x
18
16
  unless CGI.respond_to?(:parse)
@@ -1869,7 +1867,7 @@ class CLI < Thor
1869
1867
  super.reject { |command| command.first.include?("__complete") }
1870
1868
  end
1871
1869
 
1872
- VERSION = "0.36.0"
1870
+ VERSION = "0.36.1"
1873
1871
  DEFAULT_JOPLIN_DATA_DIR = File.join(ENV.fetch('HOME'), '.config', 'joplin')
1874
1872
 
1875
1873
  def self.joplin_data_dir
@@ -1924,6 +1922,11 @@ class CLI < Thor
1924
1922
  super
1925
1923
  @joplin_data_dir = self.class.joplin_data_dir
1926
1924
  @db_path = File.join(@joplin_data_dir, 'database.sqlite')
1925
+
1926
+ unless File.exist?(@db_path)
1927
+ raise Thor::Error, "Joplin database not found at #{@db_path}. Please check your JOPLIN_DATA_DIR.".red
1928
+ end
1929
+
1927
1930
  @db = SQLite3::Database.new(@db_path)
1928
1931
  @db.results_as_hash = true
1929
1932
  load_settings unless Array(Thread.current[:jp_args]).first == "test"
@@ -1,3 +1,3 @@
1
1
  module Joplin
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
data/readme.md CHANGED
@@ -45,6 +45,42 @@ You can specify the id of the notebook
45
45
 
46
46
  ## CLI
47
47
 
48
+ ### jp
49
+
50
+ A general purpose Joplin utility that interacts directly with the Joplin database. It uses the `JOPLIN_DATA_DIR` environment variable to locate the database.
51
+
52
+ ```text
53
+ Usage:
54
+ jp COMMAND [ARGS]
55
+
56
+ Commands:
57
+ jp add NOTEBOOK [BODY...] # Add a note
58
+ jp bkup # Backup the database
59
+ jp cal [DATE] # Show calendar
60
+ jp cat TARGET... # Display note content
61
+ jp edit TARGET # Edit a note or tag stack
62
+ jp flashback [DATE] # Show notes from this day in previous years
63
+ jp help [COMMAND] # Describe available commands or one specific command
64
+ jp info # Show JP and Joplin profile information
65
+ jp init SUBCOMMAND # Print shell integration code
66
+ jp journal [today|yesterday|YYYY-MM-DD] [TEXT...] # Append to a daily journal note; omit DATE for today
67
+ jp log [DATE] [SLICE] # Show log
68
+ jp ls [TARGET] # List notebooks, notes, or tags
69
+ jp mv SOURCE DESTINATION # Rename a notebook or tag
70
+ jp random # Display a random note
71
+ jp rm TARGET # Move a note to Trash or recursively remove a notebook or tag
72
+ jp search QUERY # Search notes for text
73
+ jp settings SUBCOMMAND # Manage settings
74
+ jp test # Run tests
75
+ jp trash SUBCOMMAND # Manage trashed notes
76
+ jp tree # Print a tree of all available commands
77
+ jp version # Show version
78
+ ```
79
+
80
+ ### joplin
81
+
82
+ Commands that interact with Joplin via the API.
83
+
48
84
  ### joplin nb2n --token <yourtoken> 'notebook name'
49
85
 
50
86
  Will take a notebook and concatenate all notes into one for easy export to PDF
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joplin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bretoi