[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Browsing the Chicken wiki offline
From: |
John Magolske |
Subject: |
Re: [Chicken-users] Browsing the Chicken wiki offline |
Date: |
Wed, 12 Dec 2012 23:47:14 -0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
* Jim Ursetto <address@hidden> [121127 13:00]:
> chickadee is an egg and man page browser, not a full wiki replacement;
> it takes the wiki pages from eggref/4 and man/4 and maps them into
> its own node space. So you can't really browse the entire wiki with
> chickadee.
>
> However, chicken-doc-admin does let you insert arbitrary svnwiki
> documents anywhere in the node tree. Or at least it was designed to
> originally, but this is rarely used now. But we can still abuse this
> functionality to put the top-level wiki documents under node "wiki".
> [...]
Thanks for writing up these explanations & options, Jim. I was going
to give your suggestions a try, but wanting to keep intra-wiki links
working and also wanting to learn how to use qwiki for other purposes,
I finally set aside some time and figured out how to set up qwiki.
Below are notes on how I got things running on my laptop. This is on
Debian Sid, with Chicken 4.8.0 installed from call-cc.org.
% sudo aptitude install libsvn-dev
% sudo aptitude install libapr1-dev
% sudo aptitude install hyperestraier
% sudo aptitude install libestraier-dev
Not installing qwiki as root, found I had to set CHICKEN_INCLUDE_PATH:
% export CHICKEN_INCLUDE_PATH="${CHICKEN_INSTALL_PREFIX}/lib/chicken/6"
% chicken-install qwiki
% cd ~/.chicken/doc
% svn co --username anonymous --password ""
http://code.call-cc.org/svn/chicken-eggs/wiki
% mkdir -p /tmp/qwiki-html
% mkdir -p ~/.chicken/doc/db
% cd ~/.chicken/doc/db
% estmaster init estraierdb
% estmaster start -bg ~/.chicken/doc/db/estraierdb
Per qwiki's docs, put together this script, calling it "qwiki-spiffy":
#! /usr/local/bin/csi -s
(use spiffy qwiki qwiki-search qwiki-menu qwiki-svn)
(search-install!)
(menu-install!)
(qwiki-repos-uri "file:///tmp/qwiki")
(root-path "/tmp/qwiki-html")
(vhost-map `((".*" . ,(lambda (continue)
(parameterize ((handle-not-found qwiki-handler)
(handle-directory qwiki-handler)
(index-files '()))
(continue))))))
(start-server port: 8082)
When browsing to http://localhost:8082/ after running this script,
(with qwiki-repos-uri set to file:///home/john/.chicken/doc/wiki/),
got this message:
Checkout not found. Expected it in /tmp/qwiki. To fix this, please
run qwiki-install or change the value of qwiki-source-path.
Tried running the qwiki-install script recommended in qwiki's
documentation, but got the error:
Error: (add-node) Client error: 400 Bad Request (maybe, the node already
exists)
[...]
estraier-client.scm:58: make-composite-condition
estraier-client.scm:75: signal <--
So did this:
% ln -s /home/jm/.chicken/doc/wiki /tmp/qwiki
And could then browse the Chicken Wiki offline. To automate it all I
wrote a shell script to launch the Chicken wiki in an ELinks browser:
#!/bin/sh
# Last edit: 2012/12/06 Thu 13:13 PST
[ ! -e /tmp/qwiki-html ] && mkdir -p /tmp/qwiki-html
[ ! -e /tmp/qwiki ] && ln -s $HOME/.chicken/doc/wiki /tmp/qwiki
[ `ps aux | grep "estmaster start -bg $HOME/.chicken/doc/db/estraierdb" | wc
-l` -lt 2 ]\
&& estmaster start -bg $HOME/.chicken/doc/db/estraierdb
# start spiffy
[ `ps aux | grep "qwiki-spiffy" | wc -l` -lt 2 ] && qwiki-spiffy &
# Open qwiki in the ELinks browser
elinks http://localhost:8082
# shut down spiffy & estraier on exiting last qwiki-ELinks instance
[ `ps aux | grep "elinks http://localhost:8082" | wc -l` -lt 2 ]\
&& pkill qwiki-spiffy && pkill estmaster || :
*
A few questions:
- I'm not so familiar with subversion... will `svn update wiki`
provide a relatively bandwidth-efficient / server-friendly way of
keeping my local version of the repository up-to-date?
- Some intra-wiki links are absolute, for example under /wiki/menu
there's [[http://wiki.call-cc.org/eggs|Eggs]] which I changed to
[[eggs|Eggs]] so as to be able to navigate to it offline. I'm thinking
of writing a script to go through my local repository and convert all
absolute wiki.call.cc.org urls to relative. Is there a reason they
were input as absolute?
Anyhow, now between being able to run Chickadee and the Chicken wiki
offline plus having the mailing list archived locally & searchable
with mairix, I have access to a ton of great Chicken resources without
needing to remain tethered to the net all the time. A big thanks
to everyone who contributes to making Chicken and all its great
documentation.
John
--
John Magolske
http://B79.net/contact
- Re: [Chicken-users] Browsing the Chicken wiki offline,
John Magolske <=