dnote 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,19 +23,14 @@ it needs to follow this simple set of rules:
23
23
 
24
24
  # LABEL: description ...
25
25
 
26
- 2) Specially designated notes can omit the colon. By default these are +TODO+,
27
- +FIXME+ and +OPTIMIZE+.
28
-
29
- # TODO description ...
30
-
31
- 3) Any note that requires more than one line must remain flush to the left
26
+ 2) Any note that requires more than one line must remain flush to the left
32
27
  margin (the margin is set by the first line). This is done because RDoc will mistake
33
28
  the note for a <tt>&lt;pre&gt;</tt> block if it is indented.
34
29
 
35
30
  # LABEL: description ...
36
31
  # continue ...
37
32
 
38
- 4) An alternative to the previous limitation is to indent the whole note, making it
33
+ 3) An alternative to the previous limitation is to indent the whole note, making it
39
34
  a <tt>&lt;pre&gt;</tt> block when rendered by RDoc. Then the text layout is free-form.
40
35
 
41
36
  # This is a description of something...
@@ -46,31 +41,40 @@ a <tt>&lt;pre&gt;</tt> block when rendered by RDoc. Then the text layout is free
46
41
  That's all there is to it, if I can convince the developers of RDoc to recognize labels,
47
42
  we may eventually be able to relax the flush rule too, which would be very nice.
48
43
 
44
+ There is also a command-line option, <code>--no-colon</code>, which deactives the need for
45
+ a colon after the note label. However this often produces false positives, so it's use is
46
+ discouraged.
47
+
49
48
 
50
49
  === Generating Notes
51
50
 
52
51
  As you can see the commandline interface is pretty straight-forward.
53
52
 
54
- Usage: dnote [OPTIONS] path1 [path2 ...]
53
+ USAGE:
54
+
55
+ dnote [OPTIONS] path1 [path2 ...]
55
56
 
56
57
  OUTPUT FORMAT: (choose one)
57
- --rdoc RDoc comment format
58
- --markdown Markdown wiki format
59
- --xml XML markup format
60
- --html HTML markup format
61
- --yaml YAML serialization format
62
- --json JSON serialization format
58
+ -f, --format NAME select a format [text]
59
+ -c, --custom FILE use a custom ERB template
60
+ --file shortcut for text/file format
61
+ --list shortcut for text/list format
63
62
 
64
63
  OTHER OPTIONS:
65
- --label labels to collect
66
- -t, --title [TITLE] title to use in headers
67
-
68
- STANDARD OPTIONS:
69
- -v, --verbose extra verbose output
64
+ -l, --label LABEL labels to collect
65
+ --[no-]colon match labels with/without colon suffix
66
+ -x, --exclude PATH exclude file or directory
67
+ -i, --ignore NAME ignore based on any part of the pathname
68
+ -t, --title TITLE title to use in header
69
+ -o, --output PATH name of file or directory
70
+ -n, --dryrun do not actually write to disk
70
71
  --debug debug mode
72
+
73
+ COMMAND OPTIONS:
74
+ -T, --templates list available format templates
71
75
  -h, --help show this help information
72
76
 
73
- The default path is <tt>**/*.rb</tt> and the default format is <tt>--rdoc</tt>.
77
+ The default path is <tt>**/*.rb</tt> and the default format is <tt>-f rdoc</tt>.
74
78
  Here is an example of DNote's current notes in RDoc format:
75
79
 
76
80
  = Development Notes
@@ -1,5 +1,5 @@
1
1
  module DNote
2
- VERSION = "1.2.0" #:till: VERSION = "<%= version %>"
2
+ VERSION = "1.2.1" #:till: VERSION = "<%= version %>"
3
3
 
4
4
  require 'dnote/session'
5
5
 
@@ -16,7 +16,7 @@ module DNote
16
16
 
17
17
  #DEFAULT_OUTPUT_DIR = "log/dnote"
18
18
 
19
- EXTENSIONS = { 'soap'=>'xml', 'xoxo'=>'xml' }
19
+ EXTENSIONS = { 'text'=>'txt', 'soap'=>'xml', 'xoxo'=>'xml' }
20
20
 
21
21
  #
22
22
  attr :notes
@@ -103,7 +103,8 @@ module DNote
103
103
  #
104
104
  def write(result, fname=nil)
105
105
  if output.end_with?('/') || File.directory?(output)
106
- ext = EXTENSIONS[format] || format
106
+ fmt = format.split('/').first
107
+ ext = EXTENSIONS[fmt] || fmt
107
108
  file = File.join(output, fname || "notes.#{ext}")
108
109
  else
109
110
  file = output
@@ -219,7 +219,7 @@ module DNote
219
219
  session.exclude << path
220
220
  end
221
221
 
222
- opt.on("--ignore", "-i NAME", "ignore based on any part of the pathname") do |name|
222
+ opt.on("--ignore", "-i NAME", "ignore file based on any part of pathname") do |name|
223
223
  session.ignore << name
224
224
  end
225
225
 
@@ -227,7 +227,7 @@ module DNote
227
227
  session.title = title
228
228
  end
229
229
 
230
- opt.on("--output", "-o PATH", "name of file or directory") do |path|
230
+ opt.on("--output", "-o PATH", "save to file or directory") do |path|
231
231
  session.output = path
232
232
  end
233
233
 
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 0
9
- version: 1.2.0
8
+ - 1
9
+ version: 1.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Thomas Sawyer
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-02-18 00:00:00 -05:00
17
+ date: 2010-02-20 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies: []
20
20