((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/eggdoc-svnwiki" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "eggs")) (section 2 "eggdoc-svnwiki" (p "Render eggdoc source to an svnwiki page.") (toc) (section 3 "Overview" (p (i "eggdoc-svnwiki") " produces svnwiki output for Chicken eggs from eggdoc SXML source.")) (section 3 "Your eggdoc and you" (def (sig (procedure "(eggdoc->svnwiki DOC [STYLESHEET])" (id eggdoc->svnwiki))) (p "Transform the SXML document " (tt "DOC") " into svnwiki format using the optional SXSLT stylesheet " (tt "STYLESHEET") ".  If not specified, the built-in stylesheet will be used, which is also accessible with " (tt "eggdoc:make-svnwiki-stylesheet") ".")) (def (sig (procedure "(eggdoc:make-svnwiki-stylesheet DOC)" (id eggdoc:make-svnwiki-stylesheet))) (p "Returns the default SXSLT stylesheet, which transforms eggdoc input to svnwiki output.  This is a procedure because the stylesheet is built dynamically using the contents of the SXML document " (tt "DOC") ".") (p "You can append to or modify this stylesheet and then pass it to " (tt "eggdoc->svnwiki") ".")) (def (sig (procedure "(eggdoc:svnwiki-override!)" (id eggdoc:svnwiki-override!))) (p "Sets eggdoc's default transformer and stylesheet maker to the svnwiki versions, like so:") (pre "(define (eggdoc:svnwiki-override!)\n  (eggdoc:default-stylesheet-maker eggdoc:make-svnwiki-stylesheet)\n  (eggdoc:default-transformer eggdoc->svnwiki))") (p "Subsequently, calls to " (tt "eggdoc:transform") " or " (tt "eggdoc->html") " will generate svnwiki output."))) (section 3 "Batch conversion" (p "Inside the egg under " (tt "extras/") " there is a simple script to help with conversion of one or more eggdoc sources to svnwiki format.") (dl (dt (tt "eggdoc-html-to-svnwiki.sh")) (dd "Converts one or more eggdoc source files to svnwiki plain text.")) (p "Just download the egg source:") (pre "$ chicken-install -r eggdoc-svnwiki\n$ cd eggdoc-svnwiki") (p "then run the conversion against the source " (tt "eggdoc.scm") ".  Your output will be placed in " (tt "./output/eggdoc.scm.svnwiki") ".") (pre "$ sh extras/eggdoc-html-to-svnwiki.sh ~/scheme/chicken-eggs4/mpi/trunk/mpi-eggdoc.scm\n$ cat output/mpi-eggdoc.scm.svnwiki")) (section 3 "Examples" (p "For the direct, tedious approach to converting an existing eggdoc to svnwiki, edit the source and change the " (tt "eggdoc->html") " call to " (tt "eggdoc->svnwiki") ", and " (tt "(use eggdoc)") " to " (tt "(use eggdoc-svnwiki)") ", then just run the eggdoc source script.") (p "For a better approach, just call " (tt "(eggdoc:svnwiki-override!)") " before parsing the document.  That is exactly what " (tt "eggdoc-html-to-svnwiki.sh") " does:") (pre "csi -script -e '(eggdoc:svnwiki-override!)' -script eggdoc.scm") (p "For batch conversion and addition to svnwiki I did something silly like") (pre "cd output\nfor i in *; do perl -e '$_ = $ARGV[0]; \n  $f = $_; s/eggdoc-//; s/\\.scm\\.svnwiki//; \n  print \"mv $f ~/scheme/chicken-eggs/wiki/$_\\n\"; \n  print \"(cd ~/scheme/chicken-eggs/wiki && svn add $_)\\n\" ' $i;\ndone") (p "resulting in script output which you can later direct to a shell:") (pre "mv eggdoc-args.scm.svnwiki ~/scheme/chicken-eggs/wiki/args\n(cd ~/scheme/chicken-eggs/wiki && svn add args)\nmv eggdoc-doctype.scm.svnwiki ~/scheme/chicken-eggs/wiki/doctype\n(cd ~/scheme/chicken-eggs/wiki && svn add doctype)\nmv eggdoc-eggdoc.scm.svnwiki ~/scheme/chicken-eggs/wiki/eggdoc\n(cd ~/scheme/chicken-eggs/wiki && svn add eggdoc)\nmv eggdoc-hostinfo.scm.svnwiki ~/scheme/chicken-eggs/wiki/hostinfo\n(cd ~/scheme/chicken-eggs/wiki && svn add hostinfo)\nmv eggdoc-sxml-tools.scm.svnwiki ~/scheme/chicken-eggs/wiki/sxml-tools\n(cd ~/scheme/chicken-eggs/wiki && svn add sxml-tools)") (p "Ugly but effective.")) (section 3 "Limitations" (ul (li "Nested lists are not handled") (li "Nested definition lists won't render correctly (limitation of svnwiki)") (li "#" "xxx at beginning of line or within " "<" "td> is rendered as list (svnwiki bug)") (li "Certain eggdocs may contain extraneous whitespace; if at beginning of line, may result in inadvertent PRE.") (li "Escaping of command characters is not really bothered with.") (li "Table attributes are ignored (limitation of svnwiki)") (li "All other attributes are ignored except for " (tt "href")) (li "Etc."))) (section 3 "About this egg" (section 4 "Author" (p (link "http://3e8.org/" "Jim Ursetto"))) (section 4 "Version history" (dl (dt "0.3") (dd "depend on regex for newer Chicken") (dt "0.2") (dd "Rendering fixes; update to new " (int-link "eggdoc") " transformer override API") (dt "0.1") (dd "Initial release"))) (section 4 "Requirements" (ul (li (int-link "sxml-transforms") ", " (int-link "sxml-tools")))) (section 4 "License" (p "BSD.")))))