From 9de7986636fccebc371e099da7e70da5c158ef60 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 14 Sep 2009 01:37:50 +0000 Subject: [PATCH 01/10] Add missing wman search template! Doh. --- apps/wman/search.tpl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 apps/wman/search.tpl diff --git a/apps/wman/search.tpl b/apps/wman/search.tpl new file mode 100644 index 0000000..a6c59e4 --- /dev/null +++ b/apps/wman/search.tpl @@ -0,0 +1,20 @@ +
+
+ + + + +% if(! ~ $"post_arg_wman_search '') { +% if(~ $"wman_search_results '') { + No matches found for '%($post_arg_wman_search%)'. +% } +% if not { +
    +% echo $wman_search_results|awk -F/ '$(NF-1) ~ "^[0-9]+$" {printf "
  • %s(%s)
  • ", $(NF-1),$NF, $NF, $(NF-1)}' +
+% } +% } + +
+
+ From 845fdf1231f2d826bb7550a3e9c7a99c0b003621 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 14 Sep 2009 01:38:29 +0000 Subject: [PATCH 02/10] Update top bar links. --- sites/default.cat-v.org/_werc/lib/top_bar.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sites/default.cat-v.org/_werc/lib/top_bar.inc b/sites/default.cat-v.org/_werc/lib/top_bar.inc index 49116e4..61f09f7 100644 --- a/sites/default.cat-v.org/_werc/lib/top_bar.inc +++ b/sites/default.cat-v.org/_werc/lib/top_bar.inc @@ -1,7 +1,11 @@
gsoc | - doc archive | - software repo | + docs | + repo | + sam | + man | + acme | + Glenda | 9times | harmful | 9P | From 055dc9a9224956ec0ccc4323af84ecc7feaa1414 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 14 Sep 2009 01:38:48 +0000 Subject: [PATCH 03/10] Minor fixes to the werc site. --- sites/werc.cat-v.org/index.md | 4 ++++ sites/werc.cat-v.org/wiki/_werc/config | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sites/werc.cat-v.org/index.md b/sites/werc.cat-v.org/index.md index 24813af..0439d7e 100644 --- a/sites/werc.cat-v.org/index.md +++ b/sites/werc.cat-v.org/index.md @@ -37,6 +37,10 @@ server with CGI support. Werc runs on any Unix-like system where [Plan 9 from User Space](http://plan9.us) is available (this includes Linux, *BSD, OS X and Solaris), and on Plan 9. +If you use Debian you can install the `9base` package that will provide all the +required commands (but at the moment you need to install the version in *sid*, +older versions in stable lack some of the required programs) + Werc can use any HTTP server that can handle CGI, and has been tested with at least Apache, Lighttpd, Cherokee, nhttpd, Hiawatha, and others. diff --git a/sites/werc.cat-v.org/wiki/_werc/config b/sites/werc.cat-v.org/wiki/_werc/config index 49eaf49..74d3067 100644 --- a/sites/werc.cat-v.org/wiki/_werc/config +++ b/sites/werc.cat-v.org/wiki/_werc/config @@ -1 +1 @@ -enable_wiki=yes +conf_enable_wiki From 1cf9178ffbc0ea3e948531238ff0d7ccadfd864f Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 14 Sep 2009 01:50:12 +0000 Subject: [PATCH 04/10] Add header and footer to apps directory. --- sites/werc.cat-v.org/apps/_footer.md | 9 +++++++++ sites/werc.cat-v.org/apps/_header.md | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 sites/werc.cat-v.org/apps/_footer.md create mode 100644 sites/werc.cat-v.org/apps/_header.md diff --git a/sites/werc.cat-v.org/apps/_footer.md b/sites/werc.cat-v.org/apps/_footer.md new file mode 100644 index 0000000..2754eeb --- /dev/null +++ b/sites/werc.cat-v.org/apps/_footer.md @@ -0,0 +1,9 @@ +External Apps +============= + +This are some apps developed by werc users, to install them put them in your werc's `apps/` dir and enable them from any config file as usual. + +* [Xibit](http://xibit.soul9.org/): an image gallery app by written by soul9. +* [SMAK](http://www.anarchyinthetubes.com/hg/smak/): a "very simple" image gallery by yiyus. +* [hgwerc](http://www.anarchyinthetubes.com/hg/hgwebdir.cgi/hgwerc/): a wrapper around the mercurial web interface to integrate it into werc sites, also by yiyus. +* [scrappydog](http://code.google.com/p/scrappydog/): A werc based online scrapbook by maht. diff --git a/sites/werc.cat-v.org/apps/_header.md b/sites/werc.cat-v.org/apps/_header.md new file mode 100644 index 0000000..66c4c01 --- /dev/null +++ b/sites/werc.cat-v.org/apps/_header.md @@ -0,0 +1,5 @@ +Werc Apps +========= + +Werc includes the following 'apps' by default that any site can enable usually by executing a function of the form `conf_enable_myapp` in any given `_werc/config` file. + From b0196918eaf729359460f757070c22e36c89ad93 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 17 Sep 2009 08:36:25 +0000 Subject: [PATCH 05/10] Minor changes to the werc main page. --- sites/werc.cat-v.org/index.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sites/werc.cat-v.org/index.md b/sites/werc.cat-v.org/index.md index 0439d7e..c242c25 100644 --- a/sites/werc.cat-v.org/index.md +++ b/sites/werc.cat-v.org/index.md @@ -76,13 +76,17 @@ Links * [werc project at freshmeat](http://freshmeat.net/projects/werc/) - You can get new release notifications there. * [werc project at ohloh](https://www.ohloh.net/p/werc/) + License ------- -Public domain, [because so called 'intellectual property' is an oxymoron](http://harmful.cat-v.org/economics/intellectual_property/). +Public domain, [because so called 'intellectual property' is an +oxymoron](http://harmful.cat-v.org/economics/intellectual_property/). + +Alternatively if your prefer it or your country's brain dead copyright law +doesn't recognize the public domain werc is made available under the terms of +the MIT and ISC licenses. -(By default includes markdown.pl which has a different license, but this can be -replaced). Credits ------- From 13a020e80541e9aa5a5a5b2c91a29ec6ac9b2951 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 17 Sep 2009 21:13:50 +0200 Subject: [PATCH 06/10] New release From ff80d017bcbf857829b66ad1c1b125438ab9ce5c Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 17 Sep 2009 21:13:51 +0200 Subject: [PATCH 07/10] Added tag LATEST-RELEASE for changeset ee3f62e35784 From f217f4a5172d5db2664cbeadc8469246b2a10626 Mon Sep 17 00:00:00 2001 From: Uriel Date: Wed, 30 Sep 2009 21:31:39 +0000 Subject: [PATCH 08/10] Documentation and cat-v.org top bar changes. --- sites/default.cat-v.org/_werc/lib/top_bar.inc | 2 +- sites/werc.cat-v.org/apps/_footer.md | 1 + sites/werc.cat-v.org/apps/dirdir/index.md | 14 +++++++++++--- .../docs/web_server_setup/_header.md | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 sites/werc.cat-v.org/docs/web_server_setup/_header.md diff --git a/sites/default.cat-v.org/_werc/lib/top_bar.inc b/sites/default.cat-v.org/_werc/lib/top_bar.inc index 61f09f7..e25fdbe 100644 --- a/sites/default.cat-v.org/_werc/lib/top_bar.inc +++ b/sites/default.cat-v.org/_werc/lib/top_bar.inc @@ -1,5 +1,5 @@
- gsoc | + quotes | docs | repo | sam | diff --git a/sites/werc.cat-v.org/apps/_footer.md b/sites/werc.cat-v.org/apps/_footer.md index 2754eeb..f442c56 100644 --- a/sites/werc.cat-v.org/apps/_footer.md +++ b/sites/werc.cat-v.org/apps/_footer.md @@ -7,3 +7,4 @@ This are some apps developed by werc users, to install them put them in your wer * [SMAK](http://www.anarchyinthetubes.com/hg/smak/): a "very simple" image gallery by yiyus. * [hgwerc](http://www.anarchyinthetubes.com/hg/hgwebdir.cgi/hgwerc/): a wrapper around the mercurial web interface to integrate it into werc sites, also by yiyus. * [scrappydog](http://code.google.com/p/scrappydog/): A werc based online scrapbook by maht. +* [flip](http://www.anarchyinthetubes.com/hg/flip/): A web interface to view PDFs, by yiyus. diff --git a/sites/werc.cat-v.org/apps/dirdir/index.md b/sites/werc.cat-v.org/apps/dirdir/index.md index ad0f823..226ba6c 100644 --- a/sites/werc.cat-v.org/apps/dirdir/index.md +++ b/sites/werc.cat-v.org/apps/dirdir/index.md @@ -6,7 +6,7 @@ taking advantage of its user, site management frameworks and other infrastructure. Features -======== +-------- DirDir is still somewhat experimental, but already all features diri had, plus some extras thanks to werc's power: @@ -20,14 +20,22 @@ DirDir is still somewhat experimental, but already all features diri had, plus s * Implemented in about two dozen lines of rc scripts. +Documentation +------------- + +Just login, go to any page, and click the `Edit` button. + +To create a new page, go to the address where you want to create the new page, click `Edit`, enter the initial contents, `Save`, and you are done. + + Status -====== +------ Mostly usable, all basic features already implemented in the latest werc source tree. About the name -============== +-------------- DirDir is a pun on its predecessor diri and WikiWiki, and [Dirdir is also the title of a novel](http://www.amazon.com/gp/product/0879974788?ie=UTF8&tag=catv-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0879974788) by science fiction and literature grand master [Jack Vance](http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26redirect%3Dtrue%26search-type%3Dss%26index%3Dbooks%26ref%3Dntt%255Fathr%255Fdp%255Fsr%255F1%26field-author%3DJack%2520Vance&tag=catv-20&linkCode=ur2&camp=1789&creative=39095). diff --git a/sites/werc.cat-v.org/docs/web_server_setup/_header.md b/sites/werc.cat-v.org/docs/web_server_setup/_header.md new file mode 100644 index 0000000..df20e66 --- /dev/null +++ b/sites/werc.cat-v.org/docs/web_server_setup/_header.md @@ -0,0 +1,16 @@ +Setting Up Your HTTP Server to Run Werc +======================================= + + +Werc should work with any web server that supports the CGI interface, and a few +that don't. Here are collected instructions and sample configurations for some +of the most popular HTTP servers that people has used with werc. + +In general setup consists of mapping all paths for a virtual host to the +werc.rc script, usually in practice this means that the `document root` (or +similar concept) for a virtual host is mapped to +`/path/to/werc/sites/domain.name.com/`, and if no static file matches the +request, control is handed to werc.rc, this allows the HTTP server to handle +static files and werc to handle everything else (note that such a setup will +expose your `_werc/config` files, which usually should not be a security +issue). From 703e06893366e2c01ad0243ecb477a6a13d77d94 Mon Sep 17 00:00:00 2001 From: Uriel Date: Wed, 30 Sep 2009 21:44:16 +0000 Subject: [PATCH 09/10] Document dir listing optinos and _header.md and _footer.md --- sites/werc.cat-v.org/docs/dir_listings.md | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sites/werc.cat-v.org/docs/dir_listings.md diff --git a/sites/werc.cat-v.org/docs/dir_listings.md b/sites/werc.cat-v.org/docs/dir_listings.md new file mode 100644 index 0000000..9cd642c --- /dev/null +++ b/sites/werc.cat-v.org/docs/dir_listings.md @@ -0,0 +1,29 @@ +Autogenerated Directory Listings +================================ + +If a directory has no `index.md`, `index.html` or `index.txt` and has no other +*main handler* set up by a [werc app](/apps/), the default directory listing +handler is used. + +The default directory handler simply displays the path to the directory, and a +list of links to all files and dirs located at this path. + + +Header and footer +----------------- + +If a `_header.md` or `_footer.md` files are found in the directory, their +contents will be displayed in the corresponding sections before and after +the directory contents. + + +Tuning the item's order +------------------------ + +You can set the `dir_listing_ls_opts` config variable in the dir's corresponding _werc/config to change the way items will be ordered. + +For example to list items in reverse chronological order simply add: + + dir_listing_ls_opts=( -t ) + +The options taken are [the standard Plan 9 ls(1) flags](http://man.cat-v.org/plan_9/1/ls). From 1c7b095bab8bb7d5d6d2f68411d97464e6b4e0e7 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 19 Oct 2009 23:49:11 +0000 Subject: [PATCH 10/10] Cat-v.org updates: Style and default headers/tracker code update. --- sites/default.cat-v.org/_werc/lib/footer.inc | 7 +++++-- sites/default.cat-v.org/_werc/lib/headers.inc | 4 ++++ sites/werc.cat-v.org/docs/rc_template_lang.md | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sites/default.cat-v.org/_werc/lib/footer.inc b/sites/default.cat-v.org/_werc/lib/footer.inc index 7035f3c..d12f271 100644 --- a/sites/default.cat-v.org/_werc/lib/footer.inc +++ b/sites/default.cat-v.org/_werc/lib/footer.inc @@ -19,8 +19,11 @@ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "htt document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); + +var pageTracker2 = _gat._getTracker("UA-1220719-12"); +pageTracker2._trackPageview(); +} catch(err) {} diff --git a/sites/default.cat-v.org/_werc/lib/headers.inc b/sites/default.cat-v.org/_werc/lib/headers.inc index 2301cce..35dc69b 100644 --- a/sites/default.cat-v.org/_werc/lib/headers.inc +++ b/sites/default.cat-v.org/_werc/lib/headers.inc @@ -1,3 +1,7 @@ + + diff --git a/sites/werc.cat-v.org/docs/rc_template_lang.md b/sites/werc.cat-v.org/docs/rc_template_lang.md index 703e1e0..56d8209 100644 --- a/sites/werc.cat-v.org/docs/rc_template_lang.md +++ b/sites/werc.cat-v.org/docs/rc_template_lang.md @@ -11,6 +11,11 @@ Basic syntax: That is basically it! +For further documentation on rc see: + +* [The rc(1) man page for Plan 9](http://man.cat-v.org/plan_9/1/rc). +* [The rc shell paper by Tom Duff](http://rc.cat-v.org). + Examples --------