unofficial-quiver-export 0.0.4 → 1.0.0
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.
- checksums.yaml +4 -4
- data/README.md +93 -9
- data/lib/unofficial/quiver/export/note_writer.rb +7 -3
- data/lib/unofficial/quiver/export/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b3895014b8c19356a2f2664db0b7044cbbb51c
|
4
|
+
data.tar.gz: a58350d41eeb99039993516aeff98d5519e75ee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79925ec43f4b99e74e7b5c3438efe69657cb1295f5275a14b45536e319b910824c5a292d215d124447ff171c568de0c4c9f4c2b46dfb699e5f69b4e360fecf0
|
7
|
+
data.tar.gz: d9a3a0acc45fa83f938a8ba18c33db3fa44438ffc35e20cc98f2ac2fbc9810229f8090af893f291ebc97ae22fb305738c0df88e1ca961a80b5acd7e1f20d50bf
|
data/README.md
CHANGED
@@ -4,30 +4,114 @@ This is the un-official gem for [Quiver](http://happenapps.com/#quiver). It expo
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
```
|
8
|
-
gem
|
7
|
+
```bash
|
8
|
+
gem install unofficial-quiver-export
|
9
9
|
```
|
10
10
|
|
11
|
+
## Warnings
|
12
|
+
|
13
|
+
This gem removes the selected --out option directory, if you select --clean option. Please back up the directory before execute it.
|
14
|
+
|
11
15
|
## Usage
|
12
16
|
|
13
17
|
```bash
|
14
|
-
quiver-export --in
|
18
|
+
$ quiver-export --in $HOME/Dropbox/Apps/Quiver/Quiver.qvlibrary --out $HOME/Dropbox/Apps/Quiver/Quiver.export
|
15
19
|
```
|
16
20
|
|
17
21
|
## Scheduled task
|
18
22
|
|
19
|
-
In order to execute scheduled task, you should use
|
23
|
+
In order to execute scheduled task, you should use launchctl.
|
24
|
+
|
25
|
+
For Example:
|
20
26
|
|
21
|
-
|
27
|
+
First: Create ~/Library/LaunchAgents/com.example.quiver-export.plist.
|
22
28
|
|
23
|
-
```
|
24
|
-
|
25
|
-
|
29
|
+
```xml
|
30
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
31
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
32
|
+
<plist version="1.0">
|
33
|
+
<dict>
|
34
|
+
<key>Label</key>
|
35
|
+
<string>local.job</string>
|
36
|
+
<key>ProgramArguments</key>
|
37
|
+
<array>
|
38
|
+
<string>/Users/Nori/.rbenv/shims/quiver-export</string>
|
39
|
+
<string>--in</string>
|
40
|
+
<string>/Users/Nori/Dropbox/Apps/Quiver/Quiver.qvlibrary</string>
|
41
|
+
<string>--out</string>
|
42
|
+
<string>/Users/Nori/Dropbox/Apps/Quiver/Quiver.export</string>
|
43
|
+
<string>--ext</string>
|
44
|
+
<string>.md</string>
|
45
|
+
</array>
|
46
|
+
<key>StandardErrorPath</key>
|
47
|
+
<string>/Users/Nori/LaunchctlLogs/com.nori3tsu.quiver-export.stderr</string>
|
48
|
+
<key>StandardOutPath</key>
|
49
|
+
<string>/Users/Nori/LaunchctlLogs/com.nori3tsu.quiver-export.stdout</string>
|
50
|
+
<key>StartCalendarInterval</key>
|
51
|
+
<array>
|
52
|
+
<dict/>
|
53
|
+
<dict>
|
54
|
+
<key>Minute</key>
|
55
|
+
<integer>0</integer>
|
56
|
+
</dict>
|
57
|
+
<dict>
|
58
|
+
<key>Minute</key>
|
59
|
+
<integer>5</integer>
|
60
|
+
</dict>
|
61
|
+
<dict>
|
62
|
+
<key>Minute</key>
|
63
|
+
<integer>10</integer>
|
64
|
+
</dict>
|
65
|
+
<dict>
|
66
|
+
<key>Minute</key>
|
67
|
+
<integer>15</integer>
|
68
|
+
</dict>
|
69
|
+
<dict>
|
70
|
+
<key>Minute</key>
|
71
|
+
<integer>20</integer>
|
72
|
+
</dict>
|
73
|
+
<dict>
|
74
|
+
<key>Minute</key>
|
75
|
+
<integer>25</integer>
|
76
|
+
</dict>
|
77
|
+
<dict>
|
78
|
+
<key>Minute</key>
|
79
|
+
<integer>30</integer>
|
80
|
+
</dict>
|
81
|
+
<dict>
|
82
|
+
<key>Minute</key>
|
83
|
+
<integer>35</integer>
|
84
|
+
</dict>
|
85
|
+
<dict>
|
86
|
+
<key>Minute</key>
|
87
|
+
<integer>40</integer>
|
88
|
+
</dict>
|
89
|
+
<dict>
|
90
|
+
<key>Minute</key>
|
91
|
+
<integer>45</integer>
|
92
|
+
</dict>
|
93
|
+
<dict>
|
94
|
+
<key>Minute</key>
|
95
|
+
<integer>50</integer>
|
96
|
+
</dict>
|
97
|
+
<dict>
|
98
|
+
<key>Minute</key>
|
99
|
+
<integer>55</integer>
|
100
|
+
</dict>
|
101
|
+
</array>
|
102
|
+
</dict>
|
103
|
+
</plist>
|
104
|
+
```
|
105
|
+
|
106
|
+
Second: load a setting with launchctrl.
|
107
|
+
|
108
|
+
```
|
109
|
+
$ launchctl load ~/Library/LaunchAgents/com.example.quiver-export.plist
|
26
110
|
```
|
27
111
|
|
28
112
|
## For more information
|
29
113
|
|
30
114
|
```bash
|
31
|
-
quiver-export help exec
|
115
|
+
$ quiver-export help exec
|
32
116
|
```
|
33
117
|
|
@@ -6,7 +6,7 @@ module Unofficial
|
|
6
6
|
class NoteWriter
|
7
7
|
def initialize(content_file, options)
|
8
8
|
@content_file = File.new(content_file)
|
9
|
-
@content = JSON.parse(
|
9
|
+
@content = JSON.parse(read(content_file))
|
10
10
|
@options = options
|
11
11
|
|
12
12
|
@store = Moneta.new(:HashFile, dir: @options[:db])
|
@@ -40,12 +40,12 @@ module Unofficial
|
|
40
40
|
|
41
41
|
def meta
|
42
42
|
f = File.join(File.dirname(@content_file), 'meta.json')
|
43
|
-
@meta = JSON.parse(
|
43
|
+
@meta = JSON.parse(read(f))
|
44
44
|
end
|
45
45
|
|
46
46
|
def notebook_meta
|
47
47
|
f = File.join(File.dirname(@content_file), '../meta.json')
|
48
|
-
@notebook_meta = JSON.parse(
|
48
|
+
@notebook_meta = JSON.parse(read(f))
|
49
49
|
end
|
50
50
|
|
51
51
|
def output_note_file
|
@@ -53,6 +53,10 @@ module Unofficial
|
|
53
53
|
FileUtils.mkdir_p(File.dirname(f))
|
54
54
|
f
|
55
55
|
end
|
56
|
+
|
57
|
+
def read(path)
|
58
|
+
open(path, 'r:utf-8', &:read)
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unofficial-quiver-export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Norimitsu YAMASHITA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|