Adding templates for customizing Qwandry.

This commit is contained in:
Adam Sanderson 2010-11-14 13:39:28 -08:00
parent ea8c0c0b4a
commit a341390510
3 changed files with 62 additions and 2 deletions

9
bin/qw
View File

@ -22,9 +22,9 @@ opts = OptionParser.new do |opts|
opts.separator "Additional Commands" opts.separator "Additional Commands"
opts.on("--paths", "Prints all repositories and their paths") do |editor| opts.on("--paths", "Prints all repositories and their paths") do
@qwandry.repositories.each do |label, entries| @qwandry.repositories.each do |label, entries|
puts label puts "#{label} #{"[default]" if @qwandry.active.include? label}"
entries.each do |repo| entries.each do |repo|
puts "\t#{repo.path} (#{repo.class.to_s.split('::').last})" puts "\t#{repo.path} (#{repo.class.to_s.split('::').last})"
end end
@ -33,6 +33,11 @@ opts = OptionParser.new do |opts|
exit(0) exit(0)
end end
opts.on("--customize", "Create files for customizing Qwandry") do
exit(0)
end
opts.on_tail("-h", "--help", "Show this message") do opts.on_tail("-h", "--help", "Show this message") do
puts opts puts opts
exit exit

6
templates/README Normal file
View File

@ -0,0 +1,6 @@
These files will let you customize Qwandry to your heart's desire.
Take a look at `init.rb`, there are examples for a variety of common
languages and package systems.
Qwandry will also run just fine without these files, so feel free to delete
them.

49
templates/init.rb Normal file
View File

@ -0,0 +1,49 @@
# ~/.qwandry/init.rb
#
# This file lets you configure where and how Qwandry looks for packages to open.
#
# To learn more about Qwandry, take a look at the source with qwandry!
# qw qwandry
#
# You can uncomment the indented code to try it out.
# == Adding Projects
#
# If you keep all your projects in the home directory under projects,
# you can tell Qwandry to search there.
#
# add :projects, "~/Projects/"
# == Setting Defaults
# To make `projects` a default search path, activate `projects`:
#
# activate :projects
#
# If you don't use ruby, you can de-activate it:
#
# deactivate :ruby
# == Common Repositories
# Below are some common configurations you might find useful, these may vary
# from system to system.
# = Haskel
# Open Cabal packages:
# add :ghc, "~/.cabal/lib"
# Open Haskel system libraries:
# add :ghc, "/usr/local/lib/ghc/"
# = Python
# Open python standard libraries:
# add :python, "/usr/lib/python2.6/", Qwandry::LibraryRepository
# = Ruby
# Qwandry comes set up for ruby by default, however you may want to be able to
# quickly access the ruby sources.
#
# If you installed ruby with `rvm`, your path might be something like this:
# add :cruby, "~/.rvm/src/ruby-1.9.1-p378/"
# = Javascript / Node
# Edit node.js and npm managed libraries:
# add :node, "/usr/local/lib/node/"