mvz-dnote 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/HISTORY.rdoc +5 -0
- data/README.md +119 -0
- data/bin/dnote +11 -2
- data/lib/dnote.rb +2 -0
- data/lib/dnote/core_ext.rb +11 -67
- data/lib/dnote/format.rb +35 -51
- data/lib/dnote/note.rb +17 -42
- data/lib/dnote/notes.rb +60 -101
- data/lib/dnote/rake/dnotetask.rb +22 -38
- data/lib/dnote/session.rb +49 -70
- data/lib/dnote/version.rb +3 -15
- metadata +22 -13
- data/README.rdoc +0 -113
- data/lib/dnote.yml +0 -1
- data/try/sample.bas +0 -7
- data/try/sample.js +0 -11
- data/try/sample.rb +0 -11
data/README.rdoc
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
= DNote
|
2
|
-
|
3
|
-
* {Homepage}[http://rubyworks.github.com/dnote]
|
4
|
-
* {Mailing List}[http://googlegroups.com/group/rubyworks-mailinglist]
|
5
|
-
* {Source Code}[http://github.com/rubyworks/dnote]
|
6
|
-
|
7
|
-
|
8
|
-
== DESCRIPTION
|
9
|
-
|
10
|
-
Extract development notes from source code and generate some nice
|
11
|
-
output formats for them.
|
12
|
-
|
13
|
-
|
14
|
-
== SYNOPSIS
|
15
|
-
|
16
|
-
=== Note Structure
|
17
|
-
|
18
|
-
DNote scans for the common note patterns used by developers of many languages in the form of an
|
19
|
-
all-caps labels followed by a colon. To be more specific, for DNote to recognize a note,
|
20
|
-
it needs to follow this simple set of rules:
|
21
|
-
|
22
|
-
1) Notes start with an all-caps label punctuated with a colon, followed by the note's text.
|
23
|
-
|
24
|
-
# LABEL: description ...
|
25
|
-
|
26
|
-
2) Any note that requires more than one line must remain flush to the left
|
27
|
-
margin (the margin is set by the first line). This is done because RDoc will mistake
|
28
|
-
the note for a <code>pre</code> block if it is indented.
|
29
|
-
|
30
|
-
# LABEL: description ...
|
31
|
-
# continue ...
|
32
|
-
|
33
|
-
3) An alternative to the previous limitation is to indent the whole note, making it
|
34
|
-
a <tt><pre></tt> block when rendered by RDoc. Then the text layout is free-form.
|
35
|
-
|
36
|
-
# This is a description of something...
|
37
|
-
#
|
38
|
-
# LABEL: description ...
|
39
|
-
# continue ...
|
40
|
-
|
41
|
-
That's all there is to it, if I can convince the developers of RDoc to recognize labels,
|
42
|
-
we may eventually be able to relax the flush rule too, which would be very nice.
|
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
|
-
|
48
|
-
|
49
|
-
=== Generating Notes
|
50
|
-
|
51
|
-
As you can see the commandline interface is pretty straight-forward.
|
52
|
-
|
53
|
-
USAGE:
|
54
|
-
|
55
|
-
dnote [OPTIONS] path1 [path2 ...]
|
56
|
-
|
57
|
-
OUTPUT FORMAT: (choose one)
|
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
|
62
|
-
|
63
|
-
OTHER OPTIONS:
|
64
|
-
-l, --label LABEL labels to collect
|
65
|
-
--[no-]colon match labels with/without colon suffix
|
66
|
-
-m, --marker MARK alternative remark marker
|
67
|
-
-u --url TEMPLATE url template for line entries (for HTML)
|
68
|
-
-x, --exclude PATH exclude file or directory
|
69
|
-
-i, --ignore NAME ignore based on any part of the pathname
|
70
|
-
-t, --title TITLE title to use in header
|
71
|
-
-o, --output PATH name of file or directory
|
72
|
-
-n, --dryrun do not actually write to disk
|
73
|
-
--debug debug mode
|
74
|
-
|
75
|
-
COMMAND OPTIONS:
|
76
|
-
-T, --templates list available format templates
|
77
|
-
-h, --help show this help information
|
78
|
-
|
79
|
-
The default path is <tt>**/*.rb</tt> and the default format is <tt>-f rdoc</tt>.
|
80
|
-
Here is an example of DNote's current notes in RDoc format:
|
81
|
-
|
82
|
-
= Development Notes
|
83
|
-
|
84
|
-
== TODO
|
85
|
-
|
86
|
-
=== file://lib/dnote/notes.rb
|
87
|
-
|
88
|
-
* TODO: Add ability to read header notes. They often
|
89
|
-
have a outline format, rather then the single line. (19)
|
90
|
-
* TODO: Need good CSS file. (22)
|
91
|
-
* TODO: Need XSL? (24)
|
92
|
-
|
93
|
-
=== file://plug/syckle/services/dnote.rb
|
94
|
-
|
95
|
-
* TODO: Should this service be part of the +site+ cycle? (18)
|
96
|
-
|
97
|
-
(4 TODOs)
|
98
|
-
|
99
|
-
|
100
|
-
== INSTALLATION
|
101
|
-
|
102
|
-
The usual RubyGem's command will do the trick.
|
103
|
-
|
104
|
-
$ sudo gem install dnote
|
105
|
-
|
106
|
-
|
107
|
-
== COPYRIGHT
|
108
|
-
|
109
|
-
Copyright (c) 2006 Thomas Sawyer, Rubyworks
|
110
|
-
|
111
|
-
DNote is distributable in accordance with the terms of the *FreeBSD* license.
|
112
|
-
|
113
|
-
See COPYING.rdoc for details.
|
data/lib/dnote.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
lib/../.ruby
|
data/try/sample.bas
DELETED
data/try/sample.js
DELETED