xiki 0.5.3a → 0.6.0a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. data/etc/command/xiki_command.rb +6 -5
  2. data/etc/presentations/face.deck +9 -9
  3. data/etc/presentations/menu_directories.deck +6 -6
  4. data/etc/presentations/potential/intro.deck +1 -1
  5. data/etc/presentations/potential/intro1.deck +1 -1
  6. data/etc/presentations/potential/make_mysql_menu.deck +1 -1
  7. data/etc/www/sinatra_server.rb +2 -2
  8. data/lib/xiki.rb +2 -2
  9. data/lib/xiki/code.rb +2 -2
  10. data/lib/xiki/console.rb +0 -3
  11. data/lib/xiki/file_tree.rb +2 -2
  12. data/lib/xiki/image.rb +3 -1
  13. data/lib/xiki/launcher.rb +5 -5
  14. data/lib/xiki/menu.rb +19 -19
  15. data/lib/xiki/notes.rb +2 -4
  16. data/lib/xiki/projects.rb +1 -1
  17. data/lib/xiki/requirer.rb +1 -1
  18. data/lib/xiki/window.rb +1 -1
  19. data/{menus → menu}/accounts.rb +0 -0
  20. data/{menus → menu}/address_book.rb +0 -0
  21. data/{menus → menu}/agenda.rb +0 -0
  22. data/{menus → menu}/all.rb +0 -0
  23. data/{menus → menu}/amazon.rb +0 -0
  24. data/menu/apache.rb +21 -0
  25. data/{menus → menu}/app.rb +0 -0
  26. data/{menus → menu}/applescript.rb +0 -0
  27. data/menu/aquamacs.menu +10 -0
  28. data/{menus → menu}/as.rb +0 -0
  29. data/menu/ascii.menu +131 -0
  30. data/{menus → menu}/black.menu +0 -0
  31. data/{menus → menu}/bookmarklet.rb +0 -0
  32. data/{menus → menu}/bootstrap.rb +0 -0
  33. data/menu/brew.menu +12 -0
  34. data/{menus → menu}/browser.rb +2 -3
  35. data/menu/calendar.rb +42 -0
  36. data/{menus → menu}/cassandra_db.rb +0 -0
  37. data/menu/chgrp.menu +1 -0
  38. data/{menus → menu}/chmod.rb +0 -0
  39. data/menu/chown.rb +32 -0
  40. data/menu/cla.rb +19 -0
  41. data/{menus → menu}/classes.rb +0 -0
  42. data/{menus → menu}/coffee_script.rb +0 -0
  43. data/menu/colors.menu +2 -0
  44. data/menu/computer.menu +4 -0
  45. data/{menus → menu}/conf.rb +0 -0
  46. data/{menus → menu}/contacts.rb +0 -0
  47. data/{menus → menu}/cookies.rb +0 -0
  48. data/{menus → menu}/couch.rb +0 -0
  49. data/menu/count.menu +4 -0
  50. data/menu/cpu.menu +2 -0
  51. data/{menus → menu}/create.rb +1 -1
  52. data/{menus → menu}/crop.rb +0 -0
  53. data/{menus → menu}/css.rb +0 -0
  54. data/menu/curl.menu +8 -0
  55. data/{menus → menu}/current.rb +0 -0
  56. data/menu/databases.menu +6 -0
  57. data/{menus → menu}/db.rb +0 -0
  58. data/{menus → menu}/deck.rb +0 -0
  59. data/menu/def.rb +17 -0
  60. data/{menus → menu}/dictionary.rb +0 -0
  61. data/menu/diffs.menu +2 -0
  62. data/menu/dimensions_config.menu +8 -0
  63. data/{menus → menu}/dimensions_config.rb +0 -0
  64. data/{menus → menu}/disk.rb +0 -0
  65. data/{menus → menu}/do.rb +0 -0
  66. data/menu/docs.menu +74 -0
  67. data/menu/dom.rb +252 -0
  68. data/{menus → menu}/dotsies.rb +0 -0
  69. data/{menus → menu}/edited.rb +0 -0
  70. data/menu/edits.rb +5 -0
  71. data/{menus → menu}/emacs.rb +0 -0
  72. data/menu/encoding.rb +32 -0
  73. data/{menus → menu}/enter.rb +0 -0
  74. data/{menus → menu}/executable.rb +0 -0
  75. data/{menus → menu}/filter.rb +0 -0
  76. data/{menus → menu}/firefox.rb +0 -0
  77. data/menu/font.menu +1 -0
  78. data/{menus → menu}/foo.rb +0 -0
  79. data/menu/frameworks.menu +3 -0
  80. data/{menus → menu}/french.rb +0 -0
  81. data/menu/gems.rb +77 -0
  82. data/{menus → menu}/git.rb +1 -1
  83. data/{menus → menu}/gito.rb +0 -0
  84. data/{menus → menu}/google.rb +0 -0
  85. data/{menus → menu}/google_images.rb +0 -0
  86. data/{menus → menu}/google_patents.rb +0 -0
  87. data/menu/grep.menu +14 -0
  88. data/{menus → menu}/gutenberg.rb +0 -0
  89. data/{menus → menu}/head.rb +0 -0
  90. data/{menus → menu}/headings.rb +0 -0
  91. data/menu/hosts.menu +5 -0
  92. data/{menus → menu}/html.rb +0 -0
  93. data/menu/html5.menu +164 -0
  94. data/{menus → menu}/http.rb +0 -0
  95. data/menu/httpd.menu +1 -0
  96. data/{menus → menu}/icon.rb +0 -0
  97. data/{menus → menu}/images.menu +0 -0
  98. data/{menus → menu}/img.rb +0 -0
  99. data/{menus → menu}/info.rb +0 -0
  100. data/{menus → menu}/ip.rb +0 -0
  101. data/{menus → menu}/iterm.rb +0 -0
  102. data/{menus → menu}/itunes.rb +0 -0
  103. data/{menus → menu}/javascript.rb +0 -0
  104. data/{menus → menu}/layout.rb +0 -0
  105. data/menu/lighttp.menu +30 -0
  106. data/menu/linebreaks.menu +1 -0
  107. data/menu/list.menu +1 -0
  108. data/menu/ln.menu +2 -0
  109. data/{menus → menu}/local_storage.rb +0 -0
  110. data/{menus → menu}/ls.rb +0 -0
  111. data/{menus → menu}/mac.rb +0 -0
  112. data/{menus → menu}/maps.rb +0 -0
  113. data/menu/markdown.rb +52 -0
  114. data/{menus → menu}/matches.rb +0 -0
  115. data/{menus → menu}/memcache.rb +0 -0
  116. data/{menus → menu}/mkdir.rb +0 -0
  117. data/{menus → menu}/models.rb +0 -0
  118. data/{menus → menu}/mongo.rb +0 -0
  119. data/menu/music.menu +1 -0
  120. data/{menus → menu}/mysql.rb +2 -2
  121. data/{menus → menu}/node.rb +0 -0
  122. data/menu/opacity.menu +1 -0
  123. data/{menus → menu}/open.rb +0 -0
  124. data/{menus → menu}/outline.rb +0 -0
  125. data/menu/permissions.menu +2 -0
  126. data/{menus → menu}/piano.rb +0 -0
  127. data/{menus → menu}/postgres.rb +0 -0
  128. data/{menus → menu}/pre.rb +0 -0
  129. data/menu/processes.menu +8 -0
  130. data/menu/ps.menu +1 -0
  131. data/{menus → menu}/python.rb +0 -0
  132. data/menu/qri.rb +11 -0
  133. data/{menus → menu}/r.rb +0 -0
  134. data/{menus → menu}/rails.rb +0 -0
  135. data/{menus → menu}/rake.rb +0 -0
  136. data/menu/random.menu +1 -0
  137. data/menu/redis.menu +10 -0
  138. data/{menus → menu}/redmine.rb +0 -0
  139. data/{menus → menu}/riak_tree.rb +0 -0
  140. data/{menus → menu}/rss.rb +0 -0
  141. data/menu/rsync.menu +8 -0
  142. data/menu/rvm.menu +6 -0
  143. data/{menus → menu}/safari.rb +0 -0
  144. data/{menus → menu}/sass.rb +0 -0
  145. data/{menus → menu}/say.rb +0 -0
  146. data/{menus → menu}/scale.rb +0 -0
  147. data/menu/scroll_bars.menu +1 -0
  148. data/{menus → menu}/serve.rb +1 -1
  149. data/{menus → menu}/settings.menu +0 -0
  150. data/menu/shell_commands.menu +1 -0
  151. data/{menus → menu}/shuffle.rb +0 -0
  152. data/menu/sinatra.menu +19 -0
  153. data/menu/size.menu +1 -0
  154. data/menu/source.menu +2 -0
  155. data/{menus → menu}/spanish.rb +0 -0
  156. data/menu/specials.rb +7 -0
  157. data/{menus → menu}/standalone.rb +1 -1
  158. data/menu/svg.rb +139 -0
  159. data/menu/synonyms.menu +1 -0
  160. data/menu/tabs.rb +20 -0
  161. data/{menus → menu}/tail.rb +0 -0
  162. data/{menus → menu}/technologies.rb +0 -0
  163. data/menu/tests.menu +2 -0
  164. data/menu/textile.rb +44 -0
  165. data/menu/themes.rb +56 -0
  166. data/{menus → menu}/thesaurus.rb +0 -4
  167. data/{menus → menu}/to.rb +0 -0
  168. data/{menus → menu}/twitter.rb +0 -0
  169. data/{menus → menu}/urls.menu +0 -0
  170. data/menu/web_development.menu +24 -0
  171. data/{menus → menu}/web_interface.rb +0 -4
  172. data/{menus → menu}/welcome.menu +3 -3
  173. data/{menus → menu}/white.menu +0 -0
  174. data/menu/wiki.menu +9 -0
  175. data/menu/wiki_syntax.menu +19 -0
  176. data/{menus → menu}/wikipedia.rb +0 -0
  177. data/{menus → menu}/words.rb +0 -0
  178. data/{menus → menu}/youtube.rb +0 -0
  179. data/xiki.gemspec +2 -2
  180. metadata +406 -340
  181. data/menus/browse.rb +0 -13
  182. data/menus/computer.rb +0 -24
  183. data/menus/dimensions_config.menu +0 -30
  184. data/menus/docs.rb +0 -57
  185. data/menus/eval.rb +0 -17
  186. data/menus/themes.rb +0 -32
@@ -138,7 +138,7 @@ class XikiCommand
138
138
  txt = %`
139
139
  > Summary
140
140
  The 'xiki' shell command is mostly meant to be called by programs
141
- that want to interface with xiki. But it is sometimes useful for
141
+ that want to interface with Xiki. But it is sometimes useful for
142
142
  people to call it directly. Example usages:
143
143
 
144
144
  $ xiki ip
@@ -156,7 +156,7 @@ class XikiCommand
156
156
 
157
157
  > Service
158
158
  The 'xiki' shell command automatically runs a service in the
159
- backgroundto keep things fast.
159
+ background to keep things fast.
160
160
 
161
161
  % xiki status
162
162
  % xiki stop
@@ -172,11 +172,12 @@ class XikiCommand
172
172
 
173
173
  $ xiki docs
174
174
 
175
- > Google Group
176
- Join the google group for help with installing, or just to chat or
177
- share your ideas:
175
+ > Google Group and Twitter
176
+ Join the google group or follow @xiki on twitter for help with
177
+ installing and using, or just to chat or share your ideas:
178
178
 
179
179
  http://groups.google.com/group/xiki/
180
+ http://twitter.com/xiki
180
181
 
181
182
  > Troubleshooting
182
183
  Be sure to run this command to install required gems:
@@ -31,13 +31,13 @@ face/
31
31
 
32
32
  > Code
33
33
 
34
- - ~/menus/
34
+ - ~/menu/
35
35
  + face.menu
36
36
 
37
37
 
38
38
  > Code
39
39
 
40
- - ~/menus/
40
+ - ~/menu/
41
41
  + face.menu
42
42
  + face.rb
43
43
 
@@ -96,7 +96,7 @@ Browser.html ":)"
96
96
 
97
97
  - dumbed-down version
98
98
 
99
- - ~/menus/
99
+ - ~/menu/
100
100
  + mood.menu
101
101
 
102
102
 
@@ -104,7 +104,7 @@ Browser.html ":)"
104
104
 
105
105
  - dumbed-down version
106
106
 
107
- - ~/menus/
107
+ - ~/menu/
108
108
  + mood.menu
109
109
  + mood.rb
110
110
 
@@ -113,7 +113,7 @@ Browser.html ":)"
113
113
 
114
114
  - dumbed-down version
115
115
 
116
- - ~/menus/
116
+ - ~/menu/
117
117
  - mood.menu
118
118
  | happy/
119
119
  | sad/
@@ -124,7 +124,7 @@ Browser.html ":)"
124
124
 
125
125
  - dumbed-down version
126
126
 
127
- - ~/menus/
127
+ - ~/menu/
128
128
  - mood.menu
129
129
  | happy/
130
130
  | sad/
@@ -151,7 +151,7 @@ mood/
151
151
  + happy/
152
152
  + sad/
153
153
 
154
- - /Users/craig/menus/
154
+ - /Users/craig/menu/
155
155
  - mood.menu
156
156
  | - happy/
157
157
  | - sad/
@@ -171,7 +171,7 @@ mood/
171
171
 
172
172
  > Other ways to make menus
173
173
 
174
- - /Users/craig/menus/
174
+ - /Users/craig/menu/
175
175
  + mood.menu
176
176
  + mood.rb
177
177
 
@@ -194,7 +194,7 @@ sleep/
194
194
 
195
195
  > Other ways to make menus
196
196
 
197
- - /Users/craig/menus/
197
+ - /Users/craig/menu/
198
198
  + mood.menu
199
199
  + mood.rb
200
200
 
@@ -1,21 +1,21 @@
1
1
  > Dirs
2
2
 
3
- ~/menus/
4
- /projects/xiki/menus/
3
+ ~/menu/
4
+ /projects/xiki/menu/
5
5
 
6
6
 
7
7
  > Dirs
8
8
 
9
- ~/menus/
10
- /projects/xiki/menus/
9
+ ~/menu/
10
+ /projects/xiki/menu/
11
11
 
12
12
  - Home directory over-rides
13
13
 
14
14
 
15
15
  > Dirs
16
16
 
17
- ~/menus/
18
- /projects/xiki/menus/
17
+ ~/menu/
18
+ /projects/xiki/menu/
19
19
 
20
20
  - Home directory over-rides
21
21
  - so you can customize
@@ -413,7 +413,7 @@ sharks/
413
413
 
414
414
  > UI framework
415
415
 
416
- ~/menus/
416
+ ~/menu/
417
417
  - sharks.menu
418
418
  | start/
419
419
  | url/
@@ -413,7 +413,7 @@ sharks/
413
413
 
414
414
  > UI framework
415
415
 
416
- ~/menus/
416
+ ~/menu/
417
417
  - sharks.menu
418
418
  | start/
419
419
  | url/
@@ -25,7 +25,7 @@
25
25
  >> List tables
26
26
  tably
27
27
 
28
- /Users/craig/menus/
28
+ /Users/craig/menu/
29
29
  - tably.rb
30
30
  | class Tably
31
31
  | def self.menu name=nil
@@ -27,7 +27,7 @@ def htmlify txt, options={}
27
27
  xiki_dir = File.expand_path "#{File.dirname(__FILE__)}/../.."
28
28
 
29
29
  $:.unshift "#{xiki_dir}/lib"
30
- ["xiki/ol", "xiki/core_ext", "xiki/line", "xiki/tree", "../../menus/bootstrap"].each{|o| require o}
30
+ ["xiki/ol", "xiki/core_ext", "xiki/line", "xiki/tree", "../../menu/bootstrap"].each{|o| require o}
31
31
 
32
32
  txt.slice! /.+\n/
33
33
  txt = txt.unindent
@@ -238,7 +238,7 @@ end
238
238
  def usage
239
239
  htmlify "
240
240
  > Summary
241
- This url displays xiki menus, which come from simple files found in ~/menus/.
241
+ This url displays xiki menus, which come from simple files found in ~/menu/.
242
242
 
243
243
  > Show all menus
244
244
  all/
data/lib/xiki.rb CHANGED
@@ -432,7 +432,7 @@ class Xiki
432
432
 
433
433
  if $el
434
434
  # If the first time we've loaded
435
- if ! $el.elvar.xiki_loaded_once && ! Menu.line_exists?("misc config", /^- dont show welcome$/) && ! View.buffer_visible?("Issues Loading Xiki")
435
+ if ! $el.elvar.xiki_loaded_once && ! Menu.line_exists?("misc config", /^- don't show welcome$/) && ! View.buffer_visible?("Issues Loading Xiki")
436
436
  Launcher.open("welcome/", :no_search=>1)
437
437
  end
438
438
 
@@ -463,7 +463,7 @@ class Xiki
463
463
  end
464
464
 
465
465
  def self.dont_show_welcome
466
- Menu.append_line "misc config", "- dont show welcome"
466
+ Menu.append_line "misc config", "- don't show welcome"
467
467
  end
468
468
 
469
469
  def self.finished_loading?
data/lib/xiki/code.rb CHANGED
@@ -705,8 +705,8 @@ class Code
705
705
  def self.open_related_file
706
706
  file = View.file
707
707
 
708
- return View.open(file.sub /\.menu$/, '.rb') if file =~ /\/menus\/\w+\.menu$/
709
- return View.open(file.sub /\.rb$/, '.menu') if file =~ /\/menus\/\w+\.rb$/
708
+ return View.open(file.sub /\.menu$/, '.rb') if file =~ /\/menu\/\w+\.menu$/
709
+ return View.open(file.sub /\.rb$/, '.menu') if file =~ /\/menu\/\w+\.rb$/
710
710
 
711
711
  View.flash "No matching file known."
712
712
 
data/lib/xiki/console.rb CHANGED
@@ -371,9 +371,6 @@ class Console
371
371
  output.sub!(/\A\z/, "\n") # Add linebreak if blank
372
372
  Keys.prefix == 1 ? output.gsub!(/^/, '|') : output.gsub!(/^/, '| ').gsub!(/^\| +$/, '|')
373
373
 
374
- # Expose "!" and "- label: !" lines as commands
375
- output.gsub!(/^\| \$/, '$')
376
- output.gsub!(/^\| (- [\w ,-]+: \$)/, "\\1")
377
374
  output.sub! /\n*\z/, "\n" # Guarantee exactly 1 linebreak at end
378
375
  Tree.indent(output)
379
376
 
@@ -1327,7 +1327,7 @@ class FileTree
1327
1327
 
1328
1328
  def self.file_not_found_from_template path
1329
1329
 
1330
- if path =~ /\/menus\/(.+)\.rb$/ # "
1330
+ if path =~ /\/menu\/(.+)\.rb$/ # "
1331
1331
  name = $1
1332
1332
  View.flash "- File doesn't exist, start with this...", :times=>4
1333
1333
  Xiki.dont_search
@@ -1335,7 +1335,7 @@ class FileTree
1335
1335
  txt.gsub!(/\{\{(.+?)\}\}/) { eval $1 } # Expand {{these}}
1336
1336
  return Tree.<< txt, :escape=>"| ", :no_slash=>1
1337
1337
 
1338
- elsif path =~ /^#{File.expand_path("~/menus")}\/(.+)\.menu$/ # "
1338
+ elsif path =~ /^#{File.expand_path("~/menu")}\/(.+)\.menu$/ # "
1339
1339
  View.flash "- File doesn't exist, start with this...", :times=>4
1340
1340
  Xiki.dont_search
1341
1341
  txt = File.read "#{Xiki.dir}/etc/templates/menu_template.menu"
data/lib/xiki/image.rb CHANGED
@@ -1,4 +1,6 @@
1
- require 'ftools'
1
+ begin
2
+ require 'ftools'
3
+ rescue Exception=>e; end
2
4
 
3
5
  class Image
4
6
  def self.menu_before *args
data/lib/xiki/launcher.rb CHANGED
@@ -20,8 +20,8 @@ class Launcher
20
20
  ]
21
21
 
22
22
  MENU_DIRS = [
23
- "#{Xiki.dir}menus",
24
- File.expand_path("~/menus"),
23
+ "#{Xiki.dir}menu",
24
+ File.expand_path("~/menu"),
25
25
  ]
26
26
 
27
27
  @@log = File.expand_path("~/.emacs.d/menu_log.notes")
@@ -338,7 +338,7 @@ class Launcher
338
338
  root = $1
339
339
  root.gsub!(/[ -]/, '_') if root
340
340
 
341
- ["~/menus", Bookmarks["$x/menus"]].each do |dir|
341
+ ["~/menu", Bookmarks["$x/menu"]].each do |dir|
342
342
 
343
343
  matches = Dir[File.expand_path("#{dir}/#{root}*")]
344
344
 
@@ -423,7 +423,7 @@ class Launcher
423
423
  # If .menu file matched but had no output, and no other block to delegate to, say we handled it so it will stop looking
424
424
 
425
425
  if ! out
426
- require_menu File.expand_path("~/menus/#{root}.rb"), :ok_if_not_found=>1
426
+ require_menu File.expand_path("~/menu/#{root}.rb"), :ok_if_not_found=>1
427
427
  if ! @@menus[1][root]
428
428
  Tree << "
429
429
  | This menu item does nothing yet. You can update the .menu file to
@@ -816,7 +816,7 @@ class Launcher
816
816
  raise "No class '#{clazz || camel}' found in launcher" if clazz.nil?
817
817
 
818
818
  # reload 'path_to_class'
819
- Menu.load_if_changed File.expand_path("~/menus/#{snake}.rb")
819
+ Menu.load_if_changed File.expand_path("~/menu/#{snake}.rb")
820
820
 
821
821
  args = path.is_a?(Array) ?
822
822
  path : Menu.split(path, :rootless=>1)
data/lib/xiki/menu.rb CHANGED
@@ -12,7 +12,7 @@ class Menu
12
12
  - .install/
13
13
  - gem/
14
14
  - .setup/
15
- - @~/menus/
15
+ - @~/menu/
16
16
  - .reload_menus/
17
17
  - .api/
18
18
  > Summary
@@ -139,7 +139,7 @@ class Menu
139
139
 
140
140
  Tree << "
141
141
  | Supply a few items here. Then do as+menu (type Ctrl-a Ctrl-m) to create
142
- | the '#{menu}' menu. Or, just create '~/menus/#{snake}.menu' yourself.
142
+ | the '#{menu}' menu. Or, just create '~/menu/#{snake}.menu' yourself.
143
143
  - example item/
144
144
  - another/
145
145
  - and another/
@@ -163,11 +163,11 @@ class Menu
163
163
  Tree << %`
164
164
  | Update this sample class to your liking. Then do as+update (type
165
165
  | Ctrl-a, Ctrl-u) to create the '#{menu}' class file.
166
- - @~/menus/
166
+ - @~/menu/
167
167
  - #{menu}.rb
168
168
  | class #{TextUtil.camel_case(menu)}
169
169
  | def self.menu *args
170
- | "- Args Passed: \#{args.inspect}\\n- Customize me in) @ ~/menus/#{menu}.rb"
170
+ | "- Args Passed: \#{args.inspect}\\n- Customize me in) @ ~/menu/#{menu}.rb"
171
171
  | end
172
172
  | end
173
173
  - more examples) @menu/api/classes/
@@ -181,11 +181,11 @@ class Menu
181
181
  root = TextUtil.snake_case(trunk[-2][/^[\w -]+/]) if trunk.length > 1 # If nested path (due to @), grab root of parent
182
182
 
183
183
  %`
184
- - @~/menus/
184
+ - @~/menu/
185
185
  - #{root}.rb
186
186
  | class #{TextUtil.camel_case(root)}
187
187
  | def self.menu *args
188
- | "- args passed: \#{args.inspect}\n- Customize me in) @ ~/menus/#{menu}.rb"
188
+ | "- args passed: \#{args.inspect}\n- Customize me in) @ ~/menu/#{menu}.rb"
189
189
  | end
190
190
  | end
191
191
  `
@@ -197,7 +197,7 @@ class Menu
197
197
  root = TextUtil.snake_case(trunk[-2][/^[\w -]+/]) if trunk.length > 1 # If nested path (due to @), grab root of parent
198
198
 
199
199
  %`
200
- - @~/menus/
200
+ - @~/menu/
201
201
  - #{root}.rb
202
202
  | class #{TextUtil.camel_case(root)}
203
203
  | def self.menu
@@ -221,7 +221,7 @@ class Menu
221
221
  root = TextUtil.snake_case(trunk[-2][/^[\w -]+/]) if trunk.length > 1 # If nested path (due to @), grab root of parent
222
222
 
223
223
  %`
224
- - @~/menus/
224
+ - @~/menu/
225
225
  - #{root}.rb
226
226
  | class #{TextUtil.camel_case(root)}
227
227
  | def self.menu
@@ -306,7 +306,7 @@ class Menu
306
306
  | "- sammiches/..." etc:
307
307
  |
308
308
  - TODO: get these to expand out somehow! - maybe pass another arg to Tree.children below? - probably bad idea
309
- - ~/menus/
309
+ - ~/menu/
310
310
  - foo.menu
311
311
  | - sammiches/
312
312
  | - ham/
@@ -319,7 +319,7 @@ class Menu
319
319
  | don't run code themselves, they can delegate to other menus or run code,
320
320
  | like:
321
321
  |
322
- - ~/menus/
322
+ - ~/menu/
323
323
  - foo.menu
324
324
  | - @mymenu/
325
325
  | - @MyClass.my_method
@@ -373,7 +373,7 @@ class Menu
373
373
  # Take best guess, by looking through dirs for root
374
374
  trunk = Xiki.trunk
375
375
 
376
- return View.<<("- You weren't on a menu\n | To jump to a menu's implementation, put your cursor on it\n | (or type it on a blank line) and then do as+menu (ctrl-a ctrl-m)\n | Or, look in one of these dirs:\n - ~/menus/\n - $xiki/menus/") if trunk[-1].blank?
376
+ return View.<<("- You weren't on a menu\n | To jump to a menu's implementation, put your cursor on it\n | (or type it on a blank line) and then do as+menu (ctrl-a ctrl-m)\n | Or, look in one of these dirs:\n - ~/menu/\n - $xiki/menu/") if trunk[-1].blank?
377
377
 
378
378
  root = trunk[0][/^[\w _-]+/]
379
379
 
@@ -393,8 +393,8 @@ class Menu
393
393
  # message = "
394
394
  # - No menu found:
395
395
  # | No \"#{root}\" menu or class file found in these dirs:
396
- # @ ~/menus/
397
- # @ $x/menus/
396
+ # @ ~/menu/
397
+ # @ $x/menu/
398
398
  # ".unindent
399
399
 
400
400
  # Should be able to get it right from proc
@@ -461,7 +461,7 @@ Ol << "location: #{location.inspect}"
461
461
 
462
462
  return Tree << "| You must supply something to put under the '#{root}' menu.\n| First, add some lines here, such as these:\n- line/\n- another line/\n" if txt.empty?
463
463
 
464
- path = File.expand_path "~/menus/#{root}.menu"
464
+ path = File.expand_path "~/menu/#{root}.menu"
465
465
 
466
466
  file_existed = File.exists? path
467
467
 
@@ -478,7 +478,7 @@ Ol << "location: #{location.inspect}"
478
478
 
479
479
  require_menu path
480
480
 
481
- View.flash "- #{file_existed ? 'Updated' : 'Created'} ~/menus/#{root}.menu", :times=>3
481
+ View.flash "- #{file_existed ? 'Updated' : 'Created'} ~/menu/#{root}.menu", :times=>3
482
482
  nil
483
483
  end
484
484
 
@@ -717,7 +717,7 @@ Ol << "location: #{location.inspect}"
717
717
  #
718
718
  def self.line_exists? name, pattern #, options={}
719
719
  name.gsub! /\W/, '_'
720
- dir = File.expand_path "~/menus"
720
+ dir = File.expand_path "~/menu"
721
721
  file = File.expand_path "#{dir}/#{name}.menu"
722
722
  txt = File.read(file) rescue ""
723
723
  txt =~ pattern ? ($1 || $&) : nil # Return whole string or group
@@ -732,11 +732,11 @@ Ol << "location: #{location.inspect}"
732
732
 
733
733
  name.gsub! /\W/, '_'
734
734
 
735
- # Default to ~/menus
735
+ # Default to ~/menu
736
736
  # If menu there, create, otherwise append
737
737
 
738
738
  # Get existing
739
- dir = File.expand_path "~/menus"
739
+ dir = File.expand_path "~/menu"
740
740
  Dir.mkdir dir if ! File.exists? dir
741
741
 
742
742
  file = File.expand_path "#{dir}/#{name}.menu"
@@ -753,7 +753,7 @@ Ol << "location: #{location.inspect}"
753
753
  # Save
754
754
  File.open(file, "w") { |f| f << txt }
755
755
 
756
- ".flash - updated!"
756
+ "- saved setting!"
757
757
  end
758
758
  end
759
759
 
data/lib/xiki/notes.rb CHANGED
@@ -237,12 +237,10 @@ class Notes
237
237
  return if ! $el
238
238
 
239
239
  # - foo (r): <here>
240
- Styles.define :notes_light_gray,
241
- :fg => "bbb"
240
+ Styles.define :notes_light_gray, :fg => "bbb"
242
241
 
243
242
  # - foo (r): <here>
244
- Styles.define :variable,
245
- :face => 'verdana' #, :size => "+2"
243
+ Styles.define :variable, :face => 'verdana'
246
244
 
247
245
  # - foo (r): <here>
248
246
  Styles.define :notes_label_parens,