enwrite 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84b71866afef9239a017c444e398ebe0e2acd268
4
- data.tar.gz: cb21d883e86e7da744457f5b295fb59a46ce79ad
3
+ metadata.gz: 76e561f6fecc0e5374becc2555e60f9c19a2edff
4
+ data.tar.gz: 110b88c65b25e095ba62156e61fc110e58da43ce
5
5
  SHA512:
6
- metadata.gz: 9daf05c05f6dc14745da17d4fd56730daeada35c87880f96438416fc10e96da5cfc8b470d76b1dbfad2142ca5667f4bd019cb28e6fc63a9830467c80ab4f0be1
7
- data.tar.gz: bc41ef24bf04385a31c652b3b48468e2f42efa6fc2862ff45bcd9354ac022c598f9b5408f88c8f9f1d88718170c39e3db85b2450acd3c11d101b212408eb780b
6
+ metadata.gz: 7d18acb5bb0a196020a17dc04fcb44b15303cb68a8daac2dab423d51cfb96bf1b39387aa81f02d453fbc23a5b0ff6af07f576b73f4708602d5bf1675899d71b3
7
+ data.tar.gz: 86739fbafadc94d1494663b3af5afdb325e9911333fad9adaf4e07cf22a4a34dfd1ebfb89bab6d5308312643f6d10325e13d455978483dfcd49940d1f7be9fa9
data/README.md CHANGED
@@ -60,7 +60,9 @@ Populate it with contents from Evernote:
60
60
  -v, --debug Debug output mode
61
61
  --version Show version
62
62
  -h, --help Shows this help message
63
-
63
+
64
+ ## Sample usage
65
+
64
66
  Generate posts from all notes tagged `published` in notebook
65
67
  `my_notebook`:
66
68
 
@@ -76,6 +78,40 @@ Images, audio and video are embedded in the generated posts (audio
76
78
  and video are done using HTML5 `<audio>` and `<video>` tags). Other
77
79
  file types are stored and linked to with their filename.
78
80
 
81
+ ## Special tags
82
+
83
+ The following tags trigger special behavior if found within the
84
+ selected notes:
85
+
86
+ - `page`: publish the note as a page instead of a blog post.
87
+ - `post` (or none): publish the note as a blog post. This is the
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
+ - `markdown`: store the note as Markdown instead of HTML. Markdown
94
+ notes can still contain images or other formatting, this will be left
95
+ untouched inside the Markdown file.
96
+ - `_enwrite_config`: the contents of the note must be in YAML format
97
+ and contain configuration parameters to Enwrite (more documentation
98
+ about this will be written soon). For example, if you wanted blog
99
+ posts to be stored in the Hugo `blog` category instead of `post`,
100
+ you could include this:
101
+ ```
102
+ hugo:
103
+ tag_to_type:
104
+ default: blog/
105
+ post: blog/
106
+ page:
107
+ ```
108
+ - `_enwrite_files_hugo`: text in these notes is ignored, but any
109
+ attachments are stored under the Hugo output directory. `.tar.gz`
110
+ files will be unpacked under that directory, all others will be
111
+ stored as-is.
112
+
113
+ ## Shortcuts
114
+
79
115
  The following shortcuts are recognized:
80
116
 
81
117
  Embed Youtube video by URL or ID. You can optionally specify `width`
@@ -88,3 +124,8 @@ and `height`. All arguments must be enclosed in double quotes.
88
124
  Embed gist:
89
125
 
90
126
  [gist url="https://gist.github.com/zzamboni/843142d3f759e582fe8f"]
127
+
128
+ ## Bugs, feedback or other issues?
129
+
130
+ Please open a
131
+ [Github issue](https://github.com/zzamboni/enwrite/issues).
@@ -2,11 +2,11 @@
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.1 ruby lib
5
+ # stub: enwrite 0.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "enwrite"
9
- s.version = "0.2.1"
9
+ s.version = "0.2.2"
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"]
@@ -4,7 +4,7 @@
4
4
  # enwrite - power a web site using Evernote
5
5
  #
6
6
  # Diego Zamboni, March 2015
7
- # Time-stamp: <2015-04-30 16:21:01 diego>
7
+ # Time-stamp: <2015-04-30 16:52:56 diego>
8
8
 
9
9
  require 'rubygems'
10
10
 
@@ -16,13 +16,14 @@ require "ostruct"
16
16
  require 'util'
17
17
  require 'yaml'
18
18
  require 'deep_merge'
19
+ require 'tempfile'
19
20
 
20
21
  class Enwrite
21
22
  PLUGINS = %w[hugo]
22
23
  module Version
23
24
  MAJOR = 0
24
25
  MINOR = 2
25
- PATCH = 1
26
+ PATCH = 2
26
27
 
27
28
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
28
29
  end
@@ -2,7 +2,7 @@
2
2
  # Evernote access utilities
3
3
  #
4
4
  # Diego Zamboni, March 2015
5
- # Time-stamp: <2015-04-16 23:09:37 diego>
5
+ # Time-stamp: <2015-04-30 16:30:27 diego>
6
6
 
7
7
  # Load libraries required by the Evernote OAuth
8
8
  require 'oauth'
@@ -59,7 +59,7 @@ then enwrite will use it automatically in the future.
59
59
  print "Would you like me to do that for you now (Y/n)? "
60
60
  $stdout.flush
61
61
  yesno = gets.chomp
62
- if yesno =~ /^[yY]/
62
+ if yesno =~ /^([yY].*|)$/
63
63
  setconfig(:evernote_auth_token, access_token.token)
64
64
  puts "Token stored."
65
65
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Zamboni