Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Misc improvements.

  • Loading branch information...
commit d7e125a841f0715cd00705f5d20eae20cdc37b9d 1 parent 041ae26
Craig Muth authored
17 etc/command/copy_xiki_command_to.rb
View
@@ -1,6 +1,17 @@
-dest = ARGV[0]
+#
+# Used to "install" the 'xiki' shell command (copy it to
+# /usr/local/bin/) when installing Xiki manually from source
+# rather than as a gem.
+#
+dest = ARGV[0] || "/usr/local/bin/xiki"
puts "Putting the 'xiki' shell command at:
- #{dest}"
+
+ #{dest}
+
+You can pass a different path if you prefer...
+
+ $ xiki /bin/xiki
+"
source = "etc/command/xiki_wrapper"
@@ -12,3 +23,5 @@
txt.sub! /\(xiki_dir\)/, xiki_dir
File.open(dest, "w", 0755) { |f| f << txt }
+
+puts "Finished."
85 etc/xiki.org/xiki_bootstrap_source.notes
View
@@ -32,14 +32,14 @@ bootstrap/
- p/Xiki does what shell consoles do, but lets you edit everything at any time. It's trivial to make your own commands and menus to access other tools.
- row/
- span6/
- - h1/
+ - h2/
- icon/023_cogwheels
Type and double-click
- p/
Type a word, any word. Then double click on it or type control-return (or command-return).
For example type: git, bootstrap, mysql, mongo, rails, node, coffee, js, dom, jquery, svg, ruby code, file paths, url's, shell commands, etc.
- span6/
- - h1/
+ - h2/
- icon/110_align_left
Wiki inspired
- p/
@@ -49,7 +49,7 @@ bootstrap/
- container/
- row/
- span4/
- - h1/
+ - h2/
- icon/051_eye_open
- Screencasts
- p/
@@ -57,7 +57,7 @@ bootstrap/
<a href="screencasts/">screencast</a>
to see Xiki in action.
- span4/
- - h1/
+ - h2/
+ icon/
- 154_show_big_thumbnails
- Other Tools
@@ -65,7 +65,7 @@ bootstrap/
| Create menus to access other tools just by typing.
| If the menu doesn't exist, xiki guides you through creating it.
- span4/
- - h1/
+ - h2/
- icon/160_imac
Shell + GUI
- p/
@@ -73,7 +73,7 @@ bootstrap/
Commands can have nested menus. Menus are just text indented by 2 spaces. Use the mouse or keyboard, whichever you prefer.
- row/
- span4/
- - h1/
+ - h2/
- icon/012_heart
- Code
- p/
@@ -81,7 +81,7 @@ bootstrap/
<a href="http://github.com/trogdoro/xiki">github.com/trogdoro/xiki</a>
to check out the code and install Xiki.
- span4/
- - h1/
+ - h2/
- icon/043_group
- Mailing list
- p/
@@ -89,7 +89,7 @@ bootstrap/
<a href="http://groups.google.com/group/xiki">group page</a>
for help getting Xiki installed, or to ask other questions or share ideas.
- span4/
- - h1/
+ - h2/
- icon/108_left_indent
Twitter
- <p style="min-height:300px;">
@@ -148,7 +148,7 @@ bootstrap/
- p/In Xiki, text is always editable. Command output is inserted underneath the command, nested two spaces.
-> Screencasts
+> Screencasts: index
bootstrap/
- project name/Xiki
- navbar/
@@ -187,3 +187,70 @@ bootstrap/
+> Screencasts: index
+bootstrap/
+ - project name/Xiki
+ - navbar/
+ | <img src="http://xiki.org/images/bootstrap_icon.png">
+
+ - style/
+ .section {
+ padding: 30px 0 60px
+ }
+
+ - h1/Screencasts
+
+ - p/
+ | Most recent screencast:
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/bUR_eUVcABg&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/bUR_eUVcABg&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ - p/
+ | Past screencasts:
+ - p/
+ | <a href='face.html'>Face menu in browser</a>
+ - p/
+ | <a href='another.html'>Another</a>
+ - p/
+ | <a href='#'>Yet Another</a>
+
+
+
+> Screencasts: what if?
+bootstrap/
+ - project name/Xiki
+ - navbar/
+ | <img src="http://xiki.org/images/bootstrap_icon.png">
+
+ - style/
+ .section {
+ padding: 30px 0 60px
+ }
+
+ - h1/Screencasts
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/bUR_eUVcABg&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/bUR_eUVcABg&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/LA-lViZ8vls&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/LA-lViZ8vls&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/lfgLAgLorn8&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lfgLAgLorn8&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/mumcFOk4PF4&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/mumcFOk4PF4&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/OWG_88s5YA8&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OWG_88s5YA8&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ <h3 class="section" style="margin:130px 0 0">
+ Older screencasts from before the Xiki re-write...
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/6aIsQ71tDpg&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/6aIsQ71tDpg&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
+ <div class="section">
+ <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/ixtXTnypxg0&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ixtXTnypxg0&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
+
2  lib/xiki.rb
View
@@ -258,7 +258,7 @@ def self.tests clazz=nil, describe=nil, test=nil, quote=nil
txt = File.read path
return "- all/\n" + txt.scan(/^ *describe .*"(.+)"/).map{|o|
- "- #{o}/"
+ "- #{o.first}/"
}.join("\n")
end
6 lib/xiki/console.rb
View
@@ -349,7 +349,7 @@ def self.launch options={}
return Remote.command path
end
if FileTree.handles?(path)
- while(path.last =~ /^\$/) do # Remove all !foo lines from path
+ while(path.last =~ /^\$ /) do # Remove all $ foo lines from path
path.pop
end
dir = path.join('')
@@ -357,6 +357,8 @@ def self.launch options={}
# If starts with ./, replace with current dir
dir.sub! /^\.\//, "#{View.dir}/"
+ dir = Bookmarks[dir]
+
end
View.to orig
end
@@ -364,7 +366,7 @@ def self.launch options={}
dir ||= $1 unless $1.empty?
command = $2
- return Tree.<<("- Directory doesn't exist) #{dir}") if dir && ! File.exists?(dir)
+ return Tree.<<("- Directory doesn't exist) #{dir}", :no_slash=>1) if dir && ! File.exists?(dir)
if options[:sync]
output = Console.run command, :dir=>dir, :sync=>true
2  lib/xiki/files.rb
View
@@ -266,6 +266,8 @@ def self.open_in_window file=nil
file ||= FileTree.tree_path_or_this_file
+ file = File.expand_path file
+
# Else, reveal current file
command = "open --reveal \"#{file}\""
$el.shell_command(command)
10 lib/xiki/launcher.rb
View
@@ -210,7 +210,7 @@ def self.launch options={}
if line =~ /^ *@$/
matches = Launcher.menu_keys
- Tree.<< matches.sort.map{|o| "<< #{o.sub '_', ' '}/"}.join("\n"), :no_slash=>1
+ Tree.<< matches.sort.map{|o| "<< #{o.gsub '_', ' '}/"}.join("\n"), :no_slash=>1
return
end
@@ -323,7 +323,7 @@ def self.launch options={}
Line.sub! /\b$/, "..."
- View.under matches.sort.map{|o| "<< #{o.sub '_', ' '}/"}.join("\n")
+ View.under matches.sort.map{|o| "<< #{o.gsub '_', ' '}/"}.join("\n")
return
end
end
@@ -1086,7 +1086,9 @@ def self.wrapper path
# TODO: make generic
# TODO: load all the adapters and construct the "rb|js" part of the regex
- match = path.match(/(.+\/)(\w+)\.(rb|js|coffee|py|notes|menu|haml)\/(.*)/)
+
+ # Don't match if it's quoted (after a pipe)
+ match = path.match(/^([^|]+\/)(\w+)\.(rb|js|coffee|py|notes|menu|haml)\/(.*)/)
if match
dir, file, extension, path = match[1..4]
# TODO: instead, call Launcher.invoke JsAdapter(dir, path), path
@@ -1095,7 +1097,7 @@ def self.wrapper path
end
# For matches to filename instead of extensions?
- match = path.match(/(.+\/)(Rakefile)\/(.*)/)
+ match = path.match(/^([^|]+\/)(Rakefile)\/(.*)/)
if match
dir, file, path = match[1..4]
# TODO: instead, call Launcher.invoke JsAdapter(dir, path), path
2  lib/xiki/search.rb
View
@@ -1112,7 +1112,7 @@ def self.xiki
char = Keys.input(:chars=>1, :prompt=>"Enter one char: ")
if char == "m"
- Launcher.open("- #{Xiki.dir}/\n - ##\\bdef /")
+ Launcher.open("- #{Xiki.dir}\n - ##\\bdef /")
elsif char == "k"
Launcher.open("- $x/key_bindings.rb\n - ##\\bKeys\\./")
elsif char == "l"
12 lib/xiki/tree.rb
View
@@ -1024,6 +1024,12 @@ def self.siblings options={}
siblings
end
+ #
+ # Gets position before and after sibling bounds.
+ #
+ # Tree.sibling_bounds # Returns: start, current line start, current line end, end
+ # Tree.sibling_bounds :cross_blank_lines=>1 # Returns: top, bottom
+ #
def self.sibling_bounds options={}
if options[:cross_blank_lines] # If :cross_blank_lines, just jump to parent, then use .after_children
orig = Location.new
@@ -1108,7 +1114,7 @@ def self.traverse tree, options={}, &block
last_indent = line_indent
line_indent = tree[i+1] # Use indent of following line
line_indent = line_indent ? (line_indent[/^ */].length / 2) : 0
- raise "Blank lines in trees between parents and children aren't allowed." if line_indent > 0 && line_indent > last_indent
+ raise "Blank lines in trees between parents and children aren't allowed. Also 2 consecutive blank lines isn't allowed." if line_indent > 0 && line_indent > last_indent
else
line_indent = line[/^ */].length / 2
line.strip!
@@ -1466,6 +1472,10 @@ def self.slashless txt
# Tree.children "a\n b\n c", "a"
#
def self.children tree=nil, target=nil, options={}
+
+ # Read in file, if tree looks like a file path
+ tree = File.read(File.expand_path tree) if tree !~ /\n/ && tree =~ /^~/
+
include_subitems = options[:include_subitems] # Include sub-items for all children
return self.children_at_cursor(tree) if tree.nil? || tree.is_a?(Hash) # tree is actually options
6 lib/xiki/trouble_shooting.rb
View
@@ -2,7 +2,7 @@ class TroubleShooting
def self.keys
return if ! $el
- $el.el4r_lisp_eval '
+ $el.el4r_lisp_eval %`
(progn
(global-set-key (kbd "M-l") (lambda () (interactive)
"Load .emacs (reloading EmacsRuby)"
@@ -17,11 +17,11 @@ def self.keys
(setq truncate-lines nil)
(end-of-buffer)
(re-search-backward "^ from ")
- (re-search-backward "^[A-Z]")
+ (re-search-backward "^\\\\S-")
(recenter 0)
))
)
- '
+ `
end
end
TroubleShooting.keys
2  menu/firefox.rb
View
@@ -244,7 +244,7 @@ def self.exec txt, options={}
# If brawser wasn't running, ask if they want to open it
- raise "> Looks like the browser isn\'t open. Open it?\n@app/Firefox/"
+ raise "> Looks like Firefox isn\'t open. Open it?\n@app/Firefox/\n\nOr, maybe the MozRepl Firefox extension isn't installed and on."
end
2  menu/piano.rb
View
@@ -42,7 +42,7 @@ class Piano
def self.menu
%`
- > Pass in notes
+ > Pass in notes (start GarageBand first)
| g cdefg c c
- .setup/
- .instrument/
21 menu/foo.rb → menu/sammiches.rb
View
@@ -1,10 +1,15 @@
-class Foo
+class Sammiches
def self.menu
"
- - sammiches/
+ - meat/
- ham/
- .buy/
- - tofu/
+ - philly/
+ - .buy/
+ - veggie/
+ - cucumber/
+ - .buy/
+ - bark/
- .buy/
- .checkout/
- cash/
@@ -12,19 +17,11 @@ def self.menu
"
end
def self.buy category, item
- "- buying #{item} #{category}"
+ "- adding to cart #{item} #{category}"
end
def self.checkout kind
"- checking out as #{kind}..."
end
- def self.admin
- "
- - reports/
- - .profit/
- - .loss/
- - .restart_server/
- "
- end
end
4 xiki.gemspec
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "xiki"
- s.version = "0.6.4"
+ s.version = "0.6.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Craig Muth"]
- s.date = "2012-09-22"
+ s.date = "2012-09-23"
s.executables = ["xiki"]
s.summary = "A shell console with GUI features."
s.description = "Xiki does what shell consoles do, but lets you edit everything at any time. It's trivial to make your own commands and menus to access other tools."
Please sign in to comment.
Something went wrong with that request. Please try again.