The fwiki is a one-file Ruby wiki powered by Sinatra, Datamapper, pwnsauce, and RDiscount. I'm going to use it as my GTD wiki.
- 218 lines of code
- 42% test coverage (I made this up; I have no idea)
- 1/2 assed
- 100% reliable 99% of the time
- Download
fwiki.rb
- Edit the configuration section inside
fwiki.rb
ruby fwiki.rb
- sinatra
- haml
- datamapper (and dm-migrations)
- rdiscount
Go to http://localhost:4567/
to see all the pages you have in your fwiki. Since you don't have any pages yet, there will be nothing there.
Click the home link at the top of the page. You will get a 404 page with a form that will let you create it.
There are two ways to create a new page:
- Use your browser to go to a page that doesn't exist, like
http://localhost:4567/asdfasdf
- Type a fwikilink in a page that does exist, and click on it (like [[asdfasdf]])
(Okay, #2 is actually just a different way to do #1.)
If you want to use something other than Markdown, just change this method in fwiki.rb
:
# render page contents as html
#
# for something besides markdown, process as you like
def htmlify(text)
RDiscount.new(text).to_html
end
Change it to something like this:
def htmlify(text)
RedCloth.new(text).to_html
end
Also, change require 'rdiscount'
to require 'redcloth'
at the top of fwiki.rb
.
You can search your fwiki by using either of these two paths:
/search/foo
or
/search?term=foo
Full Ruby regular expressions are supported. This provides fwiki an awesome denial-of-service vulnerability (HIGH FIVE!), and it even makes it possible to do stuff like:
/search?term=\bfoo\b
...which will find "foo" without matching "food" or "buffoon".
First, download import_instiki.rb
from this repository. Then, export your Instiki wiki as a zip file (using a link in Instiki), unzip it, and point import_instiki.rb
at the unzipped directory. Full instructions are in the comments at the top of the script.