enwrite 0.2.2 → 0.2.3
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 +19 -6
- data/Rakefile +1 -3
- data/bin/enwrite +0 -1
- data/enwrite.gemspec +4 -4
- data/lib/enml-utils.rb +0 -1
- data/lib/enwrite.rb +11 -3
- data/lib/evernote-utils.rb +0 -1
- data/lib/output.rb +1 -3
- data/lib/output/hugo.rb +0 -1
- data/lib/util.rb +9 -5
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab868ce535c913c7f1bda420ccc50ea9e8c8629a
|
4
|
+
data.tar.gz: a53cf60fcfea16cb3f3aac2816966c507bde662e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b973cf1e94be664f7155636dc3621009f15ef3907727a0541e5f93a0cdc2066eb24a1de997169a35308b631d0ad5ef24a96659870a660b644c47fecbf4e30915
|
7
|
+
data.tar.gz: 1eec8e7fd2222e735878bd3383261a7e42b0f7c71734ab5f3d2aa72a5d8b0ab8372c2f2843179973d3882c34a89f595f1df22e3a857ca553b23a6ef50aeacec7
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Enwrite
|
1
|
+
# Enwrite [](http://badge.fury.io/rb/enwrite)
|
2
2
|
|
3
3
|
> What wild heart-histories seemed to lie enwritten<br/>
|
4
4
|
> Upon those crystalline, celestial spheres!
|
@@ -86,10 +86,6 @@ selected notes:
|
|
86
86
|
- `page`: publish the note as a page instead of a blog post.
|
87
87
|
- `post` (or none): publish the note as a blog post. This is the
|
88
88
|
default.
|
89
|
-
- `_home`: set this page as the default for the site. This is
|
90
|
-
dependent on the Hugo theme being used.
|
91
|
-
- `_mainmenu`: add this page to the top-level navigation menu. This is
|
92
|
-
dependent on the Hugo theme being used.
|
93
89
|
- `markdown`: store the note as Markdown instead of HTML. Markdown
|
94
90
|
notes can still contain images or other formatting, this will be left
|
95
91
|
untouched inside the Markdown file.
|
@@ -109,6 +105,19 @@ default.
|
|
109
105
|
attachments are stored under the Hugo output directory. `.tar.gz`
|
110
106
|
files will be unpacked under that directory, all others will be
|
111
107
|
stored as-is.
|
108
|
+
|
109
|
+
Any of these special tags are removed from the post before publishing
|
110
|
+
(you can configure additional ones with the `--remove-tags`
|
111
|
+
option). All other tags are passed through to the produced posts. Of
|
112
|
+
course, you could have some of those tags also trigger special
|
113
|
+
behavior within the output system. For example, my
|
114
|
+
[custom Hugo theme](https://github.com/zzamboni/new/tree/master/themes/hyde-x-zzamboni)
|
115
|
+
recognizes the following tags:
|
116
|
+
|
117
|
+
- `_home`: set this page as the default for the site. This is
|
118
|
+
dependent on the Hugo theme being used.
|
119
|
+
- `_mainmenu`: add this page to the top-level navigation menu. This is
|
120
|
+
dependent on the Hugo theme being used.
|
112
121
|
|
113
122
|
## Shortcuts
|
114
123
|
|
@@ -125,7 +134,11 @@ Embed gist:
|
|
125
134
|
|
126
135
|
[gist url="https://gist.github.com/zzamboni/843142d3f759e582fe8f"]
|
127
136
|
|
128
|
-
##
|
137
|
+
## Planned features/fixes
|
138
|
+
|
139
|
+
https://github.com/zzamboni/enwrite/labels/enhancement
|
140
|
+
|
141
|
+
## Bugs, feature requests, feedback or other issues?
|
129
142
|
|
130
143
|
Please open a
|
131
144
|
[Github issue](https://github.com/zzamboni/enwrite/issues).
|
data/Rakefile
CHANGED
@@ -19,9 +19,7 @@ Jeweler::Tasks.new do |gem|
|
|
19
19
|
gem.homepage = "http://github.com/zzamboni/enwrite"
|
20
20
|
gem.license = "MIT"
|
21
21
|
gem.summary = %Q{Enwrite: Power a web site using Evernote}
|
22
|
-
gem.description = %Q{Enwrite allows you to generate a website from
|
23
|
-
At the moment only Hugo (http://gohugo.io) is supported as an output format,
|
24
|
-
but others can be added through plugins.}
|
22
|
+
gem.description = %Q{Enwrite allows you to generate a website from content stored in Evernote.}
|
25
23
|
gem.email = "diego@zzamboni.org"
|
26
24
|
gem.authors = ["Diego Zamboni"]
|
27
25
|
# dependencies defined in Gemfile
|
data/bin/enwrite
CHANGED
data/enwrite.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: enwrite 0.2.
|
5
|
+
# stub: enwrite 0.2.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "enwrite"
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Diego Zamboni"]
|
14
|
-
s.date = "2015-
|
15
|
-
s.description = "Enwrite allows you to generate a website from
|
14
|
+
s.date = "2015-05-15"
|
15
|
+
s.description = "Enwrite allows you to generate a website from content stored in Evernote."
|
16
16
|
s.email = "diego@zzamboni.org"
|
17
17
|
s.executables = ["enwrite"]
|
18
18
|
s.extra_rdoc_files = [
|
data/lib/enml-utils.rb
CHANGED
data/lib/enwrite.rb
CHANGED
@@ -4,7 +4,6 @@
|
|
4
4
|
# enwrite - power a web site using Evernote
|
5
5
|
#
|
6
6
|
# Diego Zamboni, March 2015
|
7
|
-
# Time-stamp: <2015-04-30 16:52:56 diego>
|
8
7
|
|
9
8
|
require 'rubygems'
|
10
9
|
|
@@ -23,7 +22,7 @@ class Enwrite
|
|
23
22
|
module Version
|
24
23
|
MAJOR = 0
|
25
24
|
MINOR = 2
|
26
|
-
PATCH =
|
25
|
+
PATCH = 3
|
27
26
|
|
28
27
|
STRING = [MAJOR, MINOR, PATCH].compact.join('.')
|
29
28
|
end
|
@@ -165,7 +164,12 @@ class Enwrite
|
|
165
164
|
verbose "Current update count for the account: #{currentUpdateCount}"
|
166
165
|
|
167
166
|
if (currentUpdateCount > latestUpdateCount)
|
168
|
-
msg "
|
167
|
+
msg "Checking updated Evernote contents..."
|
168
|
+
|
169
|
+
# There are new notes, doesn't necessarily mean any of them are withing the
|
170
|
+
# selected content, so we keep track of whether we actually produce any updates
|
171
|
+
# in the output.
|
172
|
+
something_updated = false
|
169
173
|
|
170
174
|
filter = Evernote::EDAM::NoteStore::NoteFilter.new
|
171
175
|
filter.words = searchexp
|
@@ -259,6 +263,7 @@ class Enwrite
|
|
259
263
|
end
|
260
264
|
end
|
261
265
|
end
|
266
|
+
something_updated = true
|
262
267
|
results.notes.delete(filesnotemd)
|
263
268
|
results.totalNotes -= 1
|
264
269
|
}
|
@@ -277,10 +282,13 @@ class Enwrite
|
|
277
282
|
note.tagNames = note.tagNames - options.removetags
|
278
283
|
# This either creates or deletes posts as appropriate
|
279
284
|
writer.output_note(note)
|
285
|
+
something_updated = true
|
280
286
|
end
|
281
287
|
# Persist the latest updatecount for next time
|
282
288
|
setconfig(updatecount_index, currentUpdateCount)
|
289
|
+
end
|
283
290
|
|
291
|
+
if something_updated
|
284
292
|
exit 0
|
285
293
|
else
|
286
294
|
msg "No updated notes that match #{searchexp}"
|
data/lib/evernote-utils.rb
CHANGED
data/lib/output.rb
CHANGED
data/lib/output/hugo.rb
CHANGED
data/lib/util.rb
CHANGED
@@ -3,24 +3,28 @@ require 'colorize'
|
|
3
3
|
|
4
4
|
# Message output
|
5
5
|
|
6
|
+
def now
|
7
|
+
Time.now.strftime "%Y-%m-%d %H:%M:%S %Z %Y"
|
8
|
+
end
|
9
|
+
|
6
10
|
def verbose(msg)
|
7
|
-
puts ("Enwrite [VERBOSE]: " + msg).blue if $enwrite_verbose
|
11
|
+
puts ("#{now} Enwrite [VERBOSE]: " + msg).blue if $enwrite_verbose
|
8
12
|
end
|
9
13
|
|
10
14
|
def debug(msg)
|
11
|
-
puts ("Enwrite [DEBUG]: " + msg) if $enwrite_debug
|
15
|
+
puts ("#{now} Enwrite [DEBUG]: " + msg) if $enwrite_debug
|
12
16
|
end
|
13
17
|
|
14
18
|
def error(msg)
|
15
|
-
$stderr.puts ("Enwrite [ERROR]: " + msg).red
|
19
|
+
$stderr.puts ("#{now} Enwrite [ERROR]: " + msg).red
|
16
20
|
end
|
17
21
|
|
18
22
|
def msg(msg)
|
19
|
-
puts ("Enwrite [INFO]: " + msg).green
|
23
|
+
puts ("#{now} Enwrite [INFO]: " + msg).green
|
20
24
|
end
|
21
25
|
|
22
26
|
def warn(msg)
|
23
|
-
$stderr.puts ("Enwrite [WARN]: " + msg).light_yellow
|
27
|
+
$stderr.puts ("#{now} Enwrite [WARN]: " + msg).light_yellow
|
24
28
|
end
|
25
29
|
|
26
30
|
# Config file storage
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enwrite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Zamboni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -122,10 +122,7 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.0'
|
125
|
-
description:
|
126
|
-
Enwrite allows you to generate a website from contents stored in Evernote.
|
127
|
-
At the moment only Hugo (http://gohugo.io) is supported as an output format,
|
128
|
-
but others can be added through plugins.
|
125
|
+
description: Enwrite allows you to generate a website from content stored in Evernote.
|
129
126
|
email: diego@zzamboni.org
|
130
127
|
executables:
|
131
128
|
- enwrite
|