Re: [Chicken-users] Browsing the Chicken wiki offline
On Dec 13, 2012, at 11:12 AM, Jim Ursetto wrote: > On Dec 13, 2012, at 1:47 AM, John Magolske wrote: > >> - 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? > > It might be useful to make this change to the main repository, i.e. > sub [[http://wiki.call-cc.org/ => [[/. Anybody see a problem with this? I've made this change and performed some related fixups. Let me know if this works for you. Jim ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Browsing the Chicken wiki offline
On Dec 13, 2012, at 1:47 AM, John Magolske wrote: > 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. I think this would be a nice candidate for inclusion in the wiki, maybe in /qwiki-installation, or something. > 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? Yes, that is the most efficient way and it's also the way to keep chicken-doc 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? They should not need to be absolute URLs, in that the hostname is not required, but they may need to be absolute paths. As you might expect, links without a leading slash refer to pages at the same level. That's the case for many inter-wiki links as they are interlinked toplevel pages or interlinked eggs. However, you need an absolute path when linking between egg, user, and toplevel pages. If using a script, it's definitely easiest and safest to change [[http://wiki.call-cc.org/path/to/foo|foo]] into [[/path/to/foo|foo]], rather than figuring out the relative URL, even if the relative one is nicer like [[foo]]. This should be enough for your purposes. Optionally, another script can go back and change absolute paths to relative ones, which will catch existing things like eggs which redundantly link to [[/eggref/4/foo]] instead of [[foo]]. It might be useful to make this change to the main repository, i.e. sub [[http://wiki.call-cc.org/ => [[/. Anybody see a problem with this? > 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. Thank *you* for contributing. Jim ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Browsing the Chicken wiki offline
* Jim Ursetto [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 ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Browsing the Chicken wiki offline
On Nov 20, 2012, at 11:24 AM, John Magolske wrote: > Hi, > > I installed the chickadee, chicken-doc & chicken-doc-admin eggs on > my laptop and am now enjoying being able to browse the documentation > while not connected to the internet. The svn repository downloaded in > the process: > > % cd /home/john/.chicken/doc > % svn co --username anonymous --password "" > http://code.call-cc.org/svn/chicken-eggs/wiki > > has info in it that I'm not seeing with chickadee. For example, > I can find the source of http://wiki.call-cc.org/vim here: > /home/john/.chicken/doc/wiki/vim , but can't find that page with > chickadee. 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". # Parse all top-level pages in wiki dir and place them under chicken-doc node "wiki". # Massage the node names a bit. cd wiki# this is the top-level of your checkout find . -depth 1 -type f | cut -c3- | while read file; do chicken-doc-admin -E "$file" wiki \ "$(echo $file | tr ' ' '-' | tr -d ',' | tr '[:upper:]' '[:lower:]')" done # Create a dummy wiki node page merely so we can navigate to it in chickadee # and see the contents: echo '== wiki pages' > /tmp/wiki chicken-doc-admin -M /tmp/wiki wiki # Examples chicken-doc -c wiki # list wiki contents at command line chicken-doc wiki vim # view /vim page open http://localhost:8080/chickadee/wiki# show wiki contents in chickadee open http://localhost:8080/chickadee/wiki/vim# show vim page This is kind of silly and definitely unsupported, and has major problems such as busted intra-wiki links. On the plus side, it's formatted a little nicer than plain text. Jim ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users