From b7746b3122a77043099e5a0094433abb62440745 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Tue, 17 Jan 2012 20:23:53 +0100 Subject: [PATCH] Redesigned and rewrote the website Moved most pages out of the index.cgi and into a POD file while I was at it. --- dat/doc | 35 ++ dat/dump | 63 +++ dat/dump-awshrink | 102 ++++ dat/dump-demo | 28 + dat/dump-grenamr | 53 ++ dat/dump-nccolour | 99 ++++ dat/home | 77 +++ dat/ncdc | 120 +++++ dat/ncdc-man | 710 +++++++++++++------------ dat/ncdc-scr | 21 + dat/ncdu | 98 ++++ dat/ncdu-man | 114 ++-- dat/ncdu-scr | 29 ++ dat/sqlaccess | 4 + dat/tuwf | 64 +++ index.cgi | 1266 +++++++++------------------------------------ 16 files changed, 1460 insertions(+), 1423 deletions(-) create mode 100644 dat/doc create mode 100644 dat/dump create mode 100644 dat/dump-awshrink create mode 100644 dat/dump-demo create mode 100644 dat/dump-grenamr create mode 100644 dat/dump-nccolour create mode 100644 dat/home create mode 100644 dat/ncdc create mode 100644 dat/ncdc-scr create mode 100644 dat/ncdu create mode 100644 dat/ncdu-scr create mode 100644 dat/tuwf diff --git a/dat/doc b/dat/doc new file mode 100644 index 0000000..29a2213 --- /dev/null +++ b/dat/doc @@ -0,0 +1,35 @@ +=pod + +When programming stuff, I often come across a situation where I am not +happy with the documentation or articles available online, and feel the urge to +do something about this situation. Most of the time I resist this urge because +I otherwise won't get any programming done, but sometimes this urge is just too +hard to resist. + +I don't really have a blog - at least not one that I take seriously - so I'll +just use this site to publish my articles. Since I've just started writing +these, this page is still quite empty. I'll add more as soon as my urge to +write an article surprasses my urge to get some programming done again. + +=over + +=item C<2011-11-26 > - L + +So you have a single database and some threads. How do you combine these in a +program? + +=item C<2010-06-02 > - L (PDF) + +This isn't really an article. It's the report for the +final project of my professional (HBO) bachelor of Electrical +Engineering. I was very liberal with some terminology in this report. For +example, "linked lists" aren't what you think they are, and I didn't even +use the term "locality of reference" where I really should have. It was +also written for an audience with little knowledge on the subject, so I +elaborated on a lot of things that should be obvious for most people in +the field. Then there is a lot of uninteresting overhead about the +project itself, which just happened to be mandatory for this report. +Nonetheless, if you can ignore these faults it's not such a bad read, if +I may say so myself. :-) + +=back diff --git a/dat/dump b/dat/dump new file mode 100644 index 0000000..cc55290 --- /dev/null +++ b/dat/dump @@ -0,0 +1,63 @@ +=pod + +Most of the things I write are simple perl/shell scripts or programs that only +serve the purpose of learning something new. This page is a listing of those I +thought might be of interest to others as well. + +=head2 bbcode.c + +January 2006. Simple BBCode to HTML converter written in plain C, for learning +puroses. L + +=head2 echoserv.c + +February 2006. A simple non-blocking single-threaded TCP echo server, +displaying how the select() system call can be used to handle multiple +connections. L + +=head2 yapong.c + +Feburary 2006. Yet Another Pong, and yet another program written just for +testing/ learning purposes. Tested to work with the ncurses or pdcurses +libraries. L (L). + +=head2 Microdc2 log file parser + +June 2007. Simple perl script that parses log files created by +L and outputs a simple and +ugly html file with all uploaded files. It correctly merges chunked +uploads, calculates average upload speed per file and total bandwidth used +for uploads. L + +B for those of you who still use microdc2, please have a look at +L, a modern alternative. + +=head2 vinfo.c + +November 2009. The L was designed to be +easy to use even from low level languages. I wrote this simple program to see +how much work it would be to use the API in C, and as example code for anyone +wishing to use the API for something more useful. Read the comments for more +info. L + +=head2 json.mll + +December 2010. I was writing a client for the L in OCaml and needed a JSON parser/generator. Since I +wasn't happy with the currently available solutions - they try to do too many +things and have too many dependencies - I decided to write a minimal JSON +library myself. L + +=head2 ncdc-transfer-stats + +September 2011. L gained transfer logging +features, and I wrote a quick Perl script to fetch some simple statistics from +it. L + +=head2 ncdc-share-report + +December 2011. Playing around with the Go programming language, I wrote another +transfer log parser and statistics generator for ncdc. +L (L). diff --git a/dat/dump-awshrink b/dat/dump-awshrink new file mode 100644 index 0000000..bb5362c --- /dev/null +++ b/dat/dump-awshrink @@ -0,0 +1,102 @@ +=pod + +People who run AWStats on large log files have most likely noticed: the data +files can grow quite large, resulting in both a waste of disk space and longer +page generation times for the AWStats pages. I wrote a small script that +analyzes these data files and can remove any information you think is +unnecessary. + +B L (copy to +/usr/bin to install). + + +=head2 Important + +Do B use this script on data files that are not completed yet (i.e. data +files of the month you're living in). This will result in inaccurate sorting of +visits, pages, referers and whatever other list you're shrinking. Also, keep +in mind that this is just a fast written perl hack, it is by no means fast and +may hog some memory while shrinking data files. + + +=head2 Usage + + awshrink [-c -s] [-SECTION LINES] [..] datafile + -s Show statistics + -c Overwrite datafile instead of writing to a backupfile (datafile~) + -SECTION LINES + Shrink the selected SECTION to LINES lines. (See example below)|; + + +=head2 Typical command-line usage + +While awshrink is most useful for monthly cron jobs, here's an example of basic +command line usage to demonstrate what the script can do: + + $ wc -c awstats122007.a.txt + 29916817 awstats122007.a.txt + + $ awshrink -s awstats122007.a.txt + Section Size (Bytes) Lines + SCREENSIZE* 74 0 + WORMS 131 0 + EMAILRECEIVER 135 0 + EMAILSENDER 143 0 + CLUSTER* 144 0 + LOGIN 155 0 + ORIGIN* 178 6 + ERRORS* 229 10 + SESSION* 236 7 + FILETYPES* 340 12 + MISC* 341 10 + GENERAL* 362 8 + OS* 414 29 + SEREFERRALS 587 34 + TIME* 1270 24 + DAY* 1293 31 + ROBOT 1644 40 + BROWSER 1992 127 + DOMAIN 2377 131 + UNKNOWNREFERERBROWSER 5439 105 + UNKNOWNREFERER 20585 317 + SIDER_404 74717 2199 + PAGEREFS 130982 2500 + KEYWORDS 288189 27036 + SIDER 1058723 25470 + SEARCHWORDS 5038611 157807 + VISITOR 23285662 416084 + * = not shrinkable + + $ awshrink -s -c -VISITOR 100 -SEARCHWORDS 100 -SIDER 100 awstats122007.a.txt + Section Size (Bytes) Lines + SCREENSIZE* 74 0 + WORMS 131 0 + EMAILRECEIVER 135 0 + EMAILSENDER 143 0 + CLUSTER* 144 0 + LOGIN 155 0 + ORIGIN* 178 6 + ERRORS* 229 10 + SESSION* 236 7 + FILETYPES* 340 12 + MISC* 341 10 + GENERAL* 362 8 + OS* 414 29 + SEREFERRALS 587 34 + TIME* 1270 24 + DAY* 1293 31 + ROBOT 1644 40 + BROWSER 1992 127 + SEARCHWORDS 2289 100 + DOMAIN 2377 131 + SIDER 3984 100 + UNKNOWNREFERERBROWSER 5439 105 + VISITOR 5980 100 + UNKNOWNREFERER 20585 317 + SIDER_404 74717 2199 + PAGEREFS 130982 2500 + KEYWORDS 288189 27036 + * = not shrinkable + + $ wc -c awstats122007.a.txt + 546074 awstats122007.a.txt diff --git a/dat/dump-demo b/dat/dump-demo new file mode 100644 index 0000000..26514eb --- /dev/null +++ b/dat/dump-demo @@ -0,0 +1,28 @@ +=pod + +Yes, I realise that the title is plural, suggesting there's more than one demo. +That is not quite true, unfortunately. The reason I chose to use plural form is +simply in the hopes that I do, in fact, write more demos, and that this page +will actually get more content in the future. I still happen to be a huge fan +of the L, and still wish to contribute to +it... if only I could find the time and self-discipline to do so. In the +meanwhile, here's one demo I did write some time ago: + +=head1 Blue Cubes + +[img right bluecubes.png Blue Cubes.] +August 2006. My first demo - or more exact: intro. Blue Cubes is a 64kB intro +written in OpenGL/SDL with Linux as target OS. I wrote this intro within 10 +days without any prior experience in any of the fields of computer generated +graphics or music. So needlessly to say, it sucks. I am ashamed even of the +thought of releasing it at a respectable demoparty like +L. Still, it didn't feel I was unwelcome, I +did actually receive three prices: 3rd price in the 64k competition (there were +only 3 actual entries, but oh well), best non-windows 64k intro (it was the +only one in the competition), and the Digitale Kultur newcomer award, which +actually is something to be proud of, I guess. + +L - +L +(includes linux binaries, windows port, and sources) - +L. diff --git a/dat/dump-grenamr b/dat/dump-grenamr new file mode 100644 index 0000000..409a4ee --- /dev/null +++ b/dat/dump-grenamr @@ -0,0 +1,53 @@ +=pod + +GRenamR is a GTK+ mass file renamer written in Perl, the functionality is +insipred by the +L command +that comes with a Perl module. + +GRenamR allows multiple file renaming using perl expressions. You can see the +effects of your expression while typing it, and can preview your action before +applying them. The accepted expressions are mostly the same as the rename +command (see above paragrah): your expression will be evaluated with $_ set to +the filename, and any modifications to this variable will result in the +renaming of the file. There's one other variable that the rename command does +not have: $i, which reflects the file number (starting from 0) in the current +list. This allows expressions such as as C<$_=sprintf'%03d.txt',$i>. + +B L +(copy to /usr/bin/ to install) + +Requires the Gtk2 Perl module. Most distributions have a perl-gtk2 package. + + +=head2 Example expressions + + y/A-Z/a-z/ # Convert filenames to lowercase + $_=lc # Same + s/\.txt$/.utf8/ # Change all '.txt' extensions to '.utf8' + s/([0-9]+)/sprintf'%04d',$1/eg # Zero-pad all numbers in filenames + + # Replace each image filename with a zero-padded number starting from 1 + s/^.+\.jpg$/sprintf'%03d.jpg',$i+1/e + + +=head2 Caveats / bugs / TODO + +=over + +=item * Calling functions as 'sleep' or 'exit' in the expression will trash the program + +=item * It's currently not possible to manually order the file list, so $i is +not useful in every situation + +=item * It's currently not possible to manually rename files or exclude items +from being effected by the expression + +=item * The expression isn't executed in the opened directory, so things like +L<-X|http://perldoc.perl.org/functions/-X.html> won't work + +=back + +=head2 Screenshot + +[img scr grenamr.png GRenamR] diff --git a/dat/dump-nccolour b/dat/dump-nccolour new file mode 100644 index 0000000..e28cf93 --- /dev/null +++ b/dat/dump-nccolour @@ -0,0 +1,99 @@ +=pod + +I decided to do some experimentation with how the colours defined in ncurses +are actually displayed in terminals, what the effects are of combining these +colours with other attributes, and how colour schemes of a terminal can affect +the displayed colours. To this end I wrote a small c file and ran it in +different terminals and different configurations. Note that only the 8 basic +NCurses colours are tested, the more flexible init_color() function is not +used. + +B L +(L) + +Some screenshots can be found below, but more screenshots are always welcome! +Please send your (.png) screenshots to projects@yorhel.nl. + + +=head2 Notes / observations + +=over + +=item * The most obvious conclusion: the displayed colours do not have the +exact same colour value in every terminal. Some terminals also allow users to +modify these colours. + +=item * You can not assume that the default foreground or background colour can +be represented by one of the 8 basic colours defined by NCurses. + +=item * Specifying -1 as colour, to indicate the default foreground or +background colour, seems to work fine in any terminal tested so far. + +=item * All tested terminals render the foreground colour in a lighter shade +when the A_BOLD attribute is set. This does not apply to the background colour. +The result of this is that the text becomes visible when using A_BOLD when the +foreground and background colour are set to the same value. + +=item * Unfortunately, not all terminals are configured in such a way that all +possible colours are readable. So as a developer you'll still have to support +configurable colour schemes in your ncurses application. :-( + +=item * On most terminals, setting the foreground and background colour to the +same value without applying the A_BOLD attribute will make the text invisible. +Don't rely on this, however, as this is not the case on OS X. + +=back + + +=head2 Full screenshot + +To avoid wasting unecessary space, the comparison screenshots below only +display the colour table. Here's a screenshot of the full output of the +program, which also explains what each column means. + +[img scr nccol-full.png ] + + +=head2 Screenshots + +=over + +=item Arch Linux, Roxterm, Default color scheme + +[img scr nccol-rox-b.png ] + +=item Arch Linux, Roxterm, GTK color scheme + +[img scr nccol-rox-w.png ] + +=item Arch Linux, Roxterm, Tango color scheme + +[img scr nccol-rox-t.png ] + +=item Arch Linux, Roxterm, Modified Tango color scheme + +[img scr nccol-rox-c.png ] + +=item Arch Linux, xterm (default settings) + +[img scr nccol-xterm.png ] + +=item Ubuntu 11.10, Gnome-terminal + +[img scr nccol-ubuntu.png ] + +=item Debian Squeeze, VT (default settings) + +[img scr nccol-debian.png ] + +=item FreeBSD, VT (default settings) + +[img scr nccol-fbsd.png ] + +=item Mac OS X, Terminal + +[img scr nccol-osx-terminal.png ] + +=item Mac OS X, iTerm2 + +[img scr nccol-osx-iterm2.png ] diff --git a/dat/home b/dat/home new file mode 100644 index 0000000..577b16e --- /dev/null +++ b/dat/home @@ -0,0 +1,77 @@ +=pod + +This site is an attempt to publish and organise my various opensource programs +and libraries on one central location, possibly documented as well as possible +so it might actually be useful to anyone. Some of these projects might end up +to be total crap, and some might not be useful to anyone at all. I'll simply +try to dump most of the things I create here, and leave it up to you whatever +you decide to do with it. + + +=head2 Changes + +=over + +=item C<2012-01-17 > Complete site redesign. + +=item C<2011-12-30 > ncdc 1.7 released! + +=item C<2011-12-07 > ncdc 1.6 released! + +=item C<2011-11-26 > Added article section and the article on SQLite. + +=item C<2011-11-03 > ncdc 1.5 and ncdu 1.8 released! + +=item C<2011-10-26 > ncdc 1.4 released! + +=item C<2011-10-19 > PGP-signed all releases of ncdu, ncdc and TUWF. + +=item C<2011-10-14 > ncdc 1.3 released! + +=item C<2011-09-25 > ncdc 1.1 released - follwed by a 1.2 quickfix. + +=item C<2011-09-16 > ncdc 1.0 released! + +=item C<2011-09-15 > Added some screenshots for ncdu. + +=item C<2011-09-03 > ncdc 0.9 released! + +=item C<2011-08-26 > ncdc 0.8 released! + +=item C<2011-08-17 > ncdc 0.7 released! + +=item C<2011-08-08 > ncdc 0.6 released & user guide updated + +=item C<2011-08-02 > ncdc 0.5 released! + +=item C<2011-07-23 > ncdc 0.4 released! + +=item C<2011-07-15 > ncdc 0.3 released! + +=item C<2011-06-27 > ncdc 0.2 released! + +=item C<2011-06-20 > ncdc 0.1 released! And wrote a user guide for it. + +=item C<2011-06-11 > Added NCurses colour experiment at code dump => nc-colour + +=item C<2011-06-03 > Added my latest project: ncdc + +=item C<2011-02-07 > TUWF 0.1 released and now also available on CPAN + +=item C<2011-01-27 > Documented and uploaded one of my older projects: TUWF + +=item C<2011-01-09 > Added my json.mll OCaml library to code dump + +=item C<2010-08-13 > ncdu 1.7 released! + +=item C<2009-12-22 > Added vinfo.c script to code dump + +=item C<2009-10-23 > ncdu 1.6 released! + +=item C<2009-09-21 > Tiny CSS fix to make this site look good in certain configurations. + +=item C<2009-05-02 > ncdu 1.5 released! + +=item C<2009-04-30 > Site redesign and reorganisation. + +=back diff --git a/dat/ncdc b/dat/ncdc new file mode 100644 index 0000000..8fc4eea --- /dev/null +++ b/dat/ncdc @@ -0,0 +1,120 @@ +=pod + +Ncdc is a modern and lightweight direct connect client with a friendly +ncurses interface. + + +=head2 Get ncdc! + +=over + +=item Latest version + +1.7 ([dllink ncdc-1.7.tar.gz download] +- L +- L) + +=item Development version + +The latest development version is available from git and can be cloned using +C. The repository is available for +L. + +You are also invited to join the development hub at C. + +=item Packages and ports + +Are available for the following systems: +L - +L - +L - +L - +L - +L + +=back + + +=head2 Features + +Common features all modern DC clients (should) have: + +=over + +=item * Connecting to multiple hubs at the same time, + +=item * Support for both ADC and NMDC protocols, + +=item * Chatting and private messaging, + +=item * Browsing the user list of a connected hub, + +=item * Share management and file uploading, + +=item * Connections and download queue management, + +=item * File list browsing, + +=item * Multi-source and TTH-checked file downloading, + +=item * Searching for files, + +=item * Secure hub (adcs:// and nmdcs://) and client connections on both protocols. + +=back + +And special features not commonly found in other clients: + +=over + +=item * Subdirectory refreshing, + +=item * Nick notification and highlighting in chat windows, + +=item * Detecting changes to the TLS certificate of a hub, + +=item * Efficient file uploads using sendfile(), + +=item * Large file lists are opened in a background thread, + +=item * Doesn't trash your OS file cache (with the flush_file_cache option enabled), + +=item * (Relatively...) low memory usage. + +=back + + +=head2 What doesn't ncdc do? + +Since the above list is getting larger and larger every time, it may be more +interesting to list a few features that are (relatively) common in other DC +clients, but which ncdc doesn't do. Yet. + +=over + +=item * Segmented downloading, + +=item * Bandwidth throttling, + +=item * OP features (e.g. client detection, file list scanning and other useful stuff for OPs), + +=item * SOCKS support. + +=back + +Of course, there are many more features that could be implemented or improved. +These will all be addressed in later versions (hopefully :). + + +=head2 Requirements + +The following libraries are required: ncurses, bzip2, sqlite3, glib2 and +libxml2. For TLS support, you will need at least glib2 version 2.28.0 and +glib-networking installed. + +Ncdc has been developed on Arch Linux, but I have received reports from people +who successfully used it on CentOS, Debian, FreeBSD, Gentoo, Mac OS X, +OpenSUSE, Solaris and Ubuntu. It should be fairly trivial to port to other +POSIX-like systems. + +Ncdc is entirely written in C and available under a liberal MIT license. diff --git a/dat/ncdc-man b/dat/ncdc-man index 26ec881..5d5d2d8 100644 --- a/dat/ncdc-man +++ b/dat/ncdc-man @@ -1,4 +1,4 @@ -ncdc(1) ncdc(1) +ncdc(1) ncdc(1) @@ -11,116 +11,120 @@ SYNOPSIS DESCRIPTION - Ncdc is a modern and lightweight direct connect client with a friendly ncurses - interface. + Ncdc is a modern and lightweight direct connect client with a friendly + ncurses interface. GETTING STARTED - This is a basic introduction for those who are new to ncdc. See the chapters - below for a more detailed description of the available functionality. + This is a basic introduction for those who are new to ncdc. See the chap‐ + ters below for a more detailed description of the available functionality. - What you see when starting up ncdc is an input line where you can input commands - and a log window where the results are displayed, much like a regular terminal. - Commands within ncdc start with a slash (e.g. `/help') and have tab completion - to help you. + What you see when starting up ncdc is an input line where you can input + commands and a log window where the results are displayed, much like a reg‐ + ular terminal. Commands within ncdc start with a slash (e.g. `/help') and + have tab completion to help you. - The first thing you will want to do after starting ncdc for the first time is to - setup some basic information and settings: + The first thing you will want to do after starting ncdc for the first time + is to setup some basic information and settings: /set nick MyNick /set description ncdc is awesome! /set connection 10 /share "My Awesome Files" /path/to/files - And if you have a direct connection to the internet or if your router allows - port forwarding, you may also want to enable active mode: + And if you have a direct connection to the internet or if your router + allows port forwarding, you may also want to enable active mode: /set active_ip 13.33.33.7 /set active_port 34194 /set active true - See the help text for each of the commands and settings for more information. - Of course, all of the above settings are saved to the database and will be used - again on the next run. + See the help text for each of the commands and settings for more informa‐ + tion. Of course, all of the above settings are saved to the database and + will be used again on the next run. To connect to a hub, use /open: /open ncdc adc://dc.blicky.net:2780/ - Here `ncdc' is the personal name you give to the hub, and the second argument - the URL. This URL will be saved in the database, so the next time you want to - connect to this hub, you can simply do: + Here `ncdc' is the personal name you give to the hub, and the second argu‐ + ment the URL. This URL will be saved in the database, so the next time you + want to connect to this hub, you can simply do: /open ncdc - See the help text for '/open' and '/connect' for more information. If you want - to automatically connect to a hub when ncdc starts up, use the `autoconnect' - setting. + See the help text for '/open' and '/connect' for more information. If you + want to automatically connect to a hub when ncdc starts up, use the `auto‐ + connect' setting. - Ncdc uses a tabbed interface: every hub opens in a new tab, and there are sev‐ - eral other kinds of tabs available as well. The type of tab is indicated in the - tab list on the bottom of the screen with a character prefix. Hubs, for example, - are prefixed with a `#'. If a tab needs your attention, a colored exclamation - mark is displayed before the tab name, different colors are used for different - types of activity. + Ncdc uses a tabbed interface: every hub opens in a new tab, and there are + several other kinds of tabs available as well. The type of tab is indicated + in the tab list on the bottom of the screen with a character prefix. Hubs, + for example, are prefixed with a `#'. If a tab needs your attention, a col‐ + ored exclamation mark is displayed before the tab name, different colors + are used for different types of activity. - Everything else should be fairly self-explanatory: To search for files, use the - `/search' command. To browse through the user list of a hub, use `/userlist' or - hit Alt+u. To browse someone's file list, use `/browse' or hit the 'b' key in - the user list. And to monitor your upload and download connections, use `/con‐ - nections' or hit Alt+n. + Everything else should be fairly self-explanatory: To search for files, use + the `/search' command. To browse through the user list of a hub, use + `/userlist' or hit Alt+u. To browse someone's file list, use `/browse' or + hit the 'b' key in the user list. And to monitor your upload and download + connections, use `/connections' or hit Alt+n. OPTIONS -c, --session-dir= - Use a different session directory. Defaults to the contents of the envi‐ - ronment variable `$NCDC_DIR' or if this is unset to `$HOME/.ncdc'. + Use a different session directory. Defaults to the contents of the + environment variable `$NCDC_DIR' or if this is unset to + `$HOME/.ncdc'. -h, --help Display summary of options. -n, --no-autoconnect - Don't automatically connect to hubs with the `autoconnect' option set. + Don't automatically connect to hubs with the `autoconnect' option + set. -v, --version Display ncdc version. INTERACTIVE COMMANDS - The following is the list of commands that can be used within ncdc. The /help - command can also be used get a list of available commands and to access this - documentation. + The following is the list of commands that can be used within ncdc. The + /help command can also be used get a list of available commands and to + access this documentation. /accept - Use this command to accept the TLS certificate of a hub. This command is - used only in the case the keyprint of the TLS certificate of a hub does - not match the keyprint stored in the database. + Use this command to accept the TLS certificate of a hub. This com‐ + mand is used only in the case the keyprint of the TLS certificate of + a hub does not match the keyprint stored in the database. /browse [[-f] ] - Without arguments, this opens a new tab where you can browse your own - file list. Note that changes to your list are not immediately visible in - the browser. You need to re-open the tab to get the latest version of - your list. + Without arguments, this opens a new tab where you can browse your + own file list. Note that changes to your list are not immediately + visible in the browser. You need to re-open the tab to get the lat‐ + est version of your list. - With arguments, the file list of the specified user will be downloaded - (if it has not been downloaded already) and the browse tab will open once - it's complete. The `-f' flag can be used to force the file list to be - (re-)downloaded. + With arguments, the file list of the specified user will be down‐ + loaded (if it has not been downloaded already) and the browse tab + will open once it's complete. The `-f' flag can be used to force the + file list to be (re-)downloaded. /clear - Clears the log displayed on the screen. Does not affect the log files in - any way. Ctrl+l is a shortcut for this command. + Clears the log displayed on the screen. Does not affect the log + files in any way. Ctrl+l is a shortcut for this command. /close - Close the current tab. When closing a hub tab, you will be disconnected - from the hub and all related userlist and PM tabs will also be closed. - Alt+c is a shortcut for this command. + Close the current tab. When closing a hub tab, you will be discon‐ + nected from the hub and all related userlist and PM tabs will also + be closed. Alt+c is a shortcut for this command. /connect [
] - Initiate a connection with a hub. If no address is specified, will con‐ - nect to the hub you last used on the current tab. The address should be - in the form of `protocol://host:port/' or `host:port'. The `:port' part - is in both cases optional and defaults to :411. The following protocols - are recognized: dchub, nmdc, nmdcs, adc, adcs. When connecting to an - nmdcs or adcs hub and the SHA256 keyprint is known, you can attach this - to the url as `?kp=SHA256/' + Initiate a connection with a hub. If no address is specified, will + connect to the hub you last used on the current tab. The address + should be in the form of `protocol://host:port/' or `host:port'. The + `:port' part is in both cases optional and defaults to :411. The + following protocols are recognized: dchub, nmdc, nmdcs, adc, adcs. + When connecting to an nmdcs or adcs hub and the SHA256 keyprint is + known, you can attach this to the url as + `?kp=SHA256/' - Note that this command can only be used on hub tabs. If you want to open - a new connection to a hub, you need to use /open first. For example: + Note that this command can only be used on hub tabs. If you want to + open a new connection to a hub, you need to use /open first. For + example: /open testhub /connect dchub://dc.some-test-hub.com/ See the /open command for more information. @@ -132,84 +136,88 @@ INTERACTIVE COMMANDS Disconnect from a hub. /gc - Cleans up unused data and reorganizes existing data to allow more effi‐ - cient storage and usage. Currently, this commands removes unused hash - data, does a VACUUM on db.sqlite3, removes unused files in inc/ and old - files in fl/. + Cleans up unused data and reorganizes existing data to allow more + efficient storage and usage. Currently, this commands removes unused + hash data, does a VACUUM on db.sqlite3, removes unused files in inc/ + and old files in fl/. - This command may take some time to complete, and will fully block ncdc - while it is running. It is recommended to run this command every once in - a while. Every month is a good interval. Note that when ncdc says that it - has completed this command, it's lying to you. Ncdc will still run a few - large queries on the background, which may take up to a minute to com‐ - plete. + This command may take some time to complete, and will fully block + ncdc while it is running. It is recommended to run this command + every once in a while. Every month is a good interval. Note that + when ncdc says that it has completed this command, it's lying to + you. Ncdc will still run a few large queries on the background, + which may take up to a minute to complete. /grant [-list|] - Grant someone a slot. This allows the user to download from you even if - you have no free slots. The slot will be granted for as long as ncdc - stays open or the /ungrant command is used. If you restart ncdc, the user - will have to wait for a regular slot. Unless, of course, you /grant a - slot again. + Grant someone a slot. This allows the user to download from you even + if you have no free slots. The slot will be granted for as long as + ncdc stays open or the /ungrant command is used. If you restart + ncdc, the user will have to wait for a regular slot. Unless, of + course, you /grant a slot again. - To get a list of users whom you have granted a slot, use `/grant' without - arguments or with `-list'. Be warned that using `/grant' without argu‐ - ments on a PM tab will grant the slot to the user you are talking with. - Make sure to use `-all' in that case. + To get a list of users whom you have granted a slot, use `/grant' + without arguments or with `-list'. Be warned that using `/grant' + without arguments on a PM tab will grant the slot to the user you + are talking with. Make sure to use `-list' in that case. - Note that a granted slot is specific to a single hub. If the same user is - also on other hubs, he/she will not be granted a slot on those hubs. + Note that a granted slot is specific to a single hub. If the same + user is also on other hubs, he/she will not be granted a slot on + those hubs. /help [|set |keys [
]] To get a list of available commands, use /help without arguments. To get information on a particular command, use /help . - To get information on a configuration setting, use /help set . + To get information on a configuration setting, use /help set . To get help on key bindings, use /help keys. /hset [ []] - Get or set per-hub configuration variables. Works equivalent to the + Get or set per-hub configuration variables. Works equivalent to the `/set' command, but can only be used on hub tabs. /hunset [] - This command can be used to reset a per-hub configuration variable back - to its global value. + This command can be used to reset a per-hub configuration variable + back to its global value. /kick - Kick a user from the hub. This command only works on NMDC hubs, and you - need to be an OP to be able to use it. + Kick a user from the hub. This command only works on NMDC hubs, and + you need to be an OP to be able to use it. /me - This allows you to talk in third person. Most clients will display your - message as something like: + This allows you to talk in third person. Most clients will display + your message as something like: ** Nick is doing something - Note that this command only works correctly on ADC hubs. The NMDC proto‐ - col does not have this feature, and your message will be sent as-is, - including the /me. + Note that this command only works correctly on ADC hubs. The NMDC + protocol does not have this feature, and your message will be sent + as-is, including the /me. /msg [] - Send a private message to a user on the currently opened hub. If no mes‐ - sage is given, the tab will be opened but no message will be sent. + Send a private message to a user on the currently opened hub. If no + message is given, the tab will be opened but no message will be + sent. /nick [] Alias for `/hset nick' on hub tabs, and `/set nick' otherwise. /open [-n] [
] - Opens a new tab to use for a hub. The name is a (short) personal name you - use to identify the hub, and will be used for storing hub-specific con‐ - figuration. + Opens a new tab to use for a hub. The name is a (short) personal + name you use to identify the hub, and will be used for storing hub- + specific configuration. - If you have specified an address or have previously connected to a hub - from a tab with the same name, /open will automatically connect to the - hub. Use the `-n' flag to disable this behaviour. + If you have specified an address or have previously connected to a + hub from a tab with the same name, /open will automatically connect + to the hub. Use the `-n' flag to disable this behaviour. See /connect for more information on connecting to a hub. /password - This command can be used to send a password to the hub without saving it - to the database. If you wish to login automatically without having to - type /password every time, use '/hset password '. Be warned, - however, that your password will be saved unencrypted in that case. + This command can be used to send a password to the hub without sav‐ + ing it to the database. If you wish to login automatically without + having to type /password every time, use '/hset password '. Be warned, however, that your password will be saved unen‐ + crypted in that case. /pm [] Alias for /msg @@ -221,39 +229,41 @@ INTERACTIVE COMMANDS Quit ncdc. You can also just hit ctrl+c, which is equivalent. /reconnect - Reconnect to the hub. When your nick or the hub encoding have been + Reconnect to the hub. When your nick or the hub encoding have been changed, the new settings will be used after the reconnect. - This command can also be used on the main tab, in which case all con‐ - nected hubs will be reconnected. + This command can also be used on the main tab, in which case all + connected hubs will be reconnected. /refresh [] - Initiates share refresh. If no argument is given, the complete list will - be refreshed. Otherwise only the specified directory will be refreshed. - The path argument can be either an absolute filesystem path or a virtual - path within your share. + Initiates share refresh. If no argument is given, the complete list + will be refreshed. Otherwise only the specified directory will be + refreshed. The path argument can be either an absolute filesystem + path or a virtual path within your share. /say - Sends a chat message to the current hub or user. You normally don't have - to use the /say command explicitly, any command not staring with '/' will - automatically imply `/say '. For example, typing `hello.' in the - command line is equivalent to `/say hello.'. Using the /say command - explicitly may be useful to send message starting with '/' to the chat, - for example `/say /help is what you are looking for'. + Sends a chat message to the current hub or user. You normally don't + have to use the /say command explicitly, any command not staring + with '/' will automatically imply `/say '. For example, + typing `hello.' in the command line is equivalent to `/say hello.'. + Using the /say command explicitly may be useful to send message + starting with '/' to the chat, for example `/say /help is what you + are looking for'. /search [options] Performs a file search, opening a new tab with the results. Available options: -hub Search the current hub only. (default) - -all Search all connected hubs, except those with `chat_only' set. + -all Search all connected hubs, except those with `chat_only' + set. -le Size of the file must be less than . -ge Size of the file must be larger than . -t File must be of type . (see below) -tth TTH root of this file must match . - File sizes ( above) accept the following suffixes: G (GiB), M (MiB) - and K (KiB). + File sizes ( above) accept the following suffixes: G (GiB), M + (MiB) and K (KiB). The following file types can be used with the -t option: 1 any Any file or directory. (default) @@ -264,54 +274,55 @@ INTERACTIVE COMMANDS 6 img Image files. 7 video Video files. 8 dir Directories. - Note that file type matching is done using file extensions, and is not - very reliable. + Note that file type matching is done using file extensions, and is + not very reliable. /set [ []] - Get or set global configuration variables. Use without arguments to get a - list of all global settings and their current value. Glob-style pattern - matching on the settings is also possible. Use, for example, `/set - color*' to list all color-related settings. + Get or set global configuration variables. Use without arguments to + get a list of all global settings and their current value. Glob- + style pattern matching on the settings is also possible. Use, for + example, `/set color*' to list all color-related settings. - See the `/hset' command to manage configuration on a per-hub basis. - Changes to the settings are automatically saved to the database, and will - not be lost after restarting ncdc. + See the `/hset' command to manage configuration on a per-hub basis. + Changes to the settings are automatically saved to the database, and + will not be lost after restarting ncdc. To get information on a particular setting, use `/help set '. /share [ ] Use /share without arguments to get a list of shared directories. - When called with a name and a path, the path will be added to your share. - Note that shell escaping may be used in the name. For example, to add a - directory with the name `Fun Stuff', you could do the following: + When called with a name and a path, the path will be added to your + share. Note that shell escaping may be used in the name. For exam‐ + ple, to add a directory with the name `Fun Stuff', you could do the + following: /share "Fun Stuff" /path/to/fun/stuff Or: /share Fun\ Stuff /path/to/fun/stuff - The full path to the directory will not be visible to others, only the - name you give it will be public. An initial `/refresh' is done automati‐ - cally on the added directory. + The full path to the directory will not be visible to others, only + the name you give it will be public. An initial `/refresh' is done + automatically on the added directory. /ungrant [|] Revoke a granted slot. /unset [] - This command can be used to reset a global configuration variable back to - its default value. + This command can be used to reset a global configuration variable + back to its default value. /unshare [] - To remove a single directory from your share, use `/unshare ', to - remove all directories from your share, use `/unshare /'. + To remove a single directory from your share, use `/unshare ', + to remove all directories from your share, use `/unshare /'. - Note that the hash data associated with the removed files will remain in - the database. This allows you to re-add the files to your share without - needing to re-hash them. The downside is that the database file may grow - fairly large with unneeded information. See the `/gc' command to clean - that up. + Note that the hash data associated with the removed files will + remain in the database. This allows you to re-add the files to your + share without needing to re-hash them. The downside is that the + database file may grow fairly large with unneeded information. See + the `/gc' command to clean that up. /userlist - Opens the user list of the currently selected hub. Can also be accessed - using Alt+u. + Opens the user list of the currently selected hub. Can also be + accessed using Alt+u. /version Display version information. @@ -322,63 +333,66 @@ INTERACTIVE COMMANDS SETTINGS - The following is a list of configuration settings. These settings can be changed - and queried using the `/set' command for global settings and `/hset' for hub- - local settings. All configuration data is stored in the db.sqlite3 file in the - session directory. + The following is a list of configuration settings. These settings can be + changed and queried using the `/set' command for global settings and + `/hset' for hub-local settings. All configuration data is stored in the + db.sqlite3 file in the session directory. active - Enables or disables active mode. Make sure to set `active_ip' and + Enables or disables active mode. Make sure to set `active_ip' and `active_port' before enabling active mode. active_bind - IP address to bind to in active mode. When unset, ncdc will bind to all - interfaces. + IP address to bind to in active mode. When unset, ncdc will bind to + all interfaces. active_ip - Your public IP address for use in active mode. It is important that other - clients can reach you using this IP address. If you connect to a hub on - the internet, this should be your internet (WAN) IP. Likewise, if you - connect to a hub on your LAN, this should be your LAN IP. + Your public IP address for use in active mode. It is important that + other clients can reach you using this IP address. If you connect to + a hub on the internet, this should be your internet (WAN) IP. Like‐ + wise, if you connect to a hub on your LAN, this should be your LAN + IP. - Unlike the other connection-related settings, this can be changed on a - per-hub basis, allowing you to have a different public IP address per - hub. + Unlike the other connection-related settings, this can be changed on + a per-hub basis, allowing you to have a different public IP address + per hub. active_port - The listen port for incoming connections in active mode. Set to `0' to - automatically assign a random port. If TLS support is available, another - TCP port will be opened on the configured port + 1. Ncdc will tell you - exactly on which ports it is listening for incoming packets. If you are - behind a router or firewall, make sure that you have configured it to - forward and allow these ports. + The listen port for incoming connections in active mode. Set to `0' + to automatically assign a random port. If TLS support is available, + another TCP port will be opened on the configured port + 1. Ncdc + will tell you exactly on which ports it is listening for incoming + packets. If you are behind a router or firewall, make sure that you + have configured it to forward and allow these ports. autoconnect - Set to true to automatically connect to the current hub when ncdc starts - up. + Set to true to automatically connect to the current hub when ncdc + starts up. autorefresh - The time between automatic file refreshes. Recognized suffices are 's' - for seconds, 'm' for minutes, 'h' for hours and 'd' for days. Set to 0 to - disable automatically refreshing the file list. This setting also deter‐ - mines whether ncdc will perform a refresh on startup. See the `/refresh' - command to manually refresh your file list. + The time between automatic file refreshes. Recognized suffices are + 's' for seconds, 'm' for minutes, 'h' for hours and 'd' for days. + Set to 0 to disable automatically refreshing the file list. This + setting also determines whether ncdc will perform a refresh on + startup. See the `/refresh' command to manually refresh your file + list. backlog - When opening a hub or PM tab, ncdc can load a certain amount of lines - from the log file into the log window. Setting this to a positive value - enables this feature and configures the number of lines to load. Note - that, while this setting can be set on a per-hub basis, PM windows will - use the global value (global.backlog). + When opening a hub or PM tab, ncdc can load a certain amount of + lines from the log file into the log window. Setting this to a posi‐ + tive value enables this feature and configures the number of lines + to load. Note that, while this setting can be set on a per-hub + basis, PM windows will use the global value (global.backlog). chat_only - Set to true to indicate that this hub is only used for chatting. That is, - you won't or can't download from it. This setting affects the /search - command when it is given the -all option. + Set to true to indicate that this hub is only used for chatting. + That is, you won't or can't download from it. This setting affects + the /search command when it is given the -all option. color_* - The settings starting with the `color_' prefix allow you to change the - interface colors. The following is a list of available color settings: + The settings starting with the `color_' prefix allow you to change + the interface colors. The following is a list of available color + settings: list_default - default item in a list list_header - header of a list list_select - selected item in a list @@ -395,59 +409,61 @@ SETTINGS tabprio_high - high priority tab notification color title - the title bar - The actual color value can be set with a comma-separated list of color - names and/or attributes. The first color in the list is the foreground - color, the second color is used for the background. When the fore- or - background color is not specified, the default colors of your terminal - will be used. - The following color names can be used: black, blue, cyan, default, green, - magenta, red, white and yellow. - The following attributes can be used: bold, blink, reverse and underline. - The actual color values displayed by your terminal may vary. Adding the - `bold' attribute usually makes the foreground color appear brighter as - well. + The actual color value can be set with a comma-separated list of + color names and/or attributes. The first color in the list is the + foreground color, the second color is used for the background. When + the fore- or background color is not specified, the default colors + of your terminal will be used. + The following color names can be used: black, blue, cyan, default, + green, magenta, red, white and yellow. + The following attributes can be used: bold, blink, reverse and + underline. + The actual color values displayed by your terminal may vary. Adding + the `bold' attribute usually makes the foreground color appear + brighter as well. connection - Set your upload speed. This is just an indication for other users in the - hub so that they know what speed they can expect when downloading from - you. The actual format you can use here may vary, but it is recommended - to set it to either a plain number for Mbit/s (e.g. `50' for 50 mbit) or - a number with a `KiB/s' indicator (e.g. `2300 KiB/s'). On ADC hubs you - must use one of the previously mentioned formats, otherwise no upload - speed will be broadcasted. This setting is broadcasted as-is on NMDC - hubs, to allow for using old-style connection values (e.g. `DSL' or - `Cable') on hubs that require this. + Set your upload speed. This is just an indication for other users in + the hub so that they know what speed they can expect when download‐ + ing from you. The actual format you can use here may vary, but it is + recommended to set it to either a plain number for Mbit/s (e.g. `50' + for 50 mbit) or a number with a `KiB/s' indicator (e.g. `2300 + KiB/s'). On ADC hubs you must use one of the previously mentioned + formats, otherwise no upload speed will be broadcasted. This setting + is broadcasted as-is on NMDC hubs, to allow for using old-style con‐ + nection values (e.g. `DSL' or `Cable') on hubs that require this. description - A short public description that will be displayed in the user list of a - hub. + A short public description that will be displayed in the user list + of a hub. download_dir - The directory where finished downloads are moved to. Finished downloads - are by default stored in /dl/. It is possible to set - this to a location that is on a different filesystem than the incoming - directory, but doing so is not recommended: ncdc will block when moving - the completed files to their final destination. + The directory where finished downloads are moved to. Finished down‐ + loads are by default stored in /dl/. It is possi‐ + ble to set this to a location that is on a different filesystem than + the incoming directory, but doing so is not recommended: ncdc will + block when moving the completed files to their final destination. download_exclude - When recursively adding a directory to the download queue - by pressing - `b' on a directory in the file list browser - any item in the selected - directory with a name that matches this regular expression will not be - added to the download queue. + When recursively adding a directory to the download queue - by + pressing `b' on a directory in the file list browser - any item in + the selected directory with a name that matches this regular expres‐ + sion will not be added to the download queue. - This regex is not checked when adding individual files from either the - file list browser or the search results. + This regex is not checked when adding individual files from either + the file list browser or the search results. download_slots Maximum number of simultaneous downloads. email - Your email address. This will be displayed in the user list of the hub, - so only set this if you want it to be public. + Your email address. This will be displayed in the user list of the + hub, so only set this if you want it to be public. encoding - The character set/encoding to use for hub and PM messages. This setting - is only used on NMDC hubs, ADC always uses UTF-8. Some common values are: + The character set/encoding to use for hub and PM messages. This set‐ + ting is only used on NMDC hubs, ADC always uses UTF-8. Some common + values are: CP1250 (Central Europe) CP1251 (Cyrillic) CP1252 (Western Europe) @@ -456,39 +472,40 @@ SETTINGS UTF-8 (International) filelist_maxage - The maximum age of a downloaded file list. If a file list was downloaded - longer ago than the configured interval, it will be removed from the - cache (the fl/ directory) and subsequent requests to open the file list - will result in the list being downloaded from the user again. Recognized - suffices are 's' for seconds, 'm' for minutes, 'h' for hours and 'd' for - days. Set to 0 to disable the cache altogether. + The maximum age of a downloaded file list. If a file list was down‐ + loaded longer ago than the configured interval, it will be removed + from the cache (the fl/ directory) and subsequent requests to open + the file list will result in the list being downloaded from the user + again. Recognized suffices are 's' for seconds, 'm' for minutes, 'h' + for hours and 'd' for days. Set to 0 to disable the cache alto‐ + gether. flush_file_cache [,...] - Tell the OS to flush the file (disk) cache for file contents read while - hashing and/or uploading or written to while downloading. On one hand, - this will avoid trashing your disk cache with large files and thus - improve the overall responsiveness of your system. On the other hand, - ncdc may purge any shared files from the cache, even if they are still - used by other applications. In general, it is a good idea to enable this - if you also use your system for other things besides ncdc, you share - large files (>100MB) and people are not constantly downloading the same - file from you. + Tell the OS to flush the file (disk) cache for file contents read + while hashing and/or uploading or written to while downloading. On + one hand, this will avoid trashing your disk cache with large files + and thus improve the overall responsiveness of your system. On the + other hand, ncdc may purge any shared files from the cache, even if + they are still used by other applications. In general, it is a good + idea to enable this if you also use your system for other things + besides ncdc, you share large files (>100MB) and people are not con‐ + stantly downloading the same file from you. hubname - The name of the currently opened hub tab. This is a user-assigned name, - and is only used within ncdc itself. This is the same name as given to - the `/open' command. + The name of the currently opened hub tab. This is a user-assigned + name, and is only used within ncdc itself. This is the same name as + given to the `/open' command. incoming_dir - The directory where incomplete downloads are stored. This setting can - only be changed when the download queue is empty. Also see the down‐ - load_dir setting. + The directory where incomplete downloads are stored. This setting + can only be changed when the download queue is empty. Also see the + download_dir setting. log_debug - Log debug messages to stderr.log in the session directory. It is highly - recommended to enable this setting if you wish to debug or hack ncdc. Be - warned, however, that this may generate a lot of data if you're connected - to a large hub. + Log debug messages to stderr.log in the session directory. It is + highly recommended to enable this setting if you wish to debug or + hack ncdc. Be warned, however, that this may generate a lot of data + if you're connected to a large hub. log_downloads Log downloaded files to transfers.log. @@ -497,84 +514,87 @@ SETTINGS Log file uploads to transfers.log. minislots - Set the number of available minislots. A `minislot' is a special slot - that is used when all regular upload slots are in use and someone is - requesting your filelist or a small file. In this case, the other client - automatically applies for a minislot, and can still download from you as - long as not all minislots are in use. What constitutes a `small' file can - be changed with the `minislot_size' setting. Also see the `slots' config‐ - uration setting and the `/grant' command. + Set the number of available minislots. A `minislot' is a special + slot that is used when all regular upload slots are in use and some‐ + one is requesting your filelist or a small file. In this case, the + other client automatically applies for a minislot, and can still + download from you as long as not all minislots are in use. What con‐ + stitutes a `small' file can be changed with the `minislot_size' set‐ + ting. Also see the `slots' configuration setting and the `/grant' + command. minislot_size - The maximum size of a file that may be downloaded using a `minislot', in - KiB. See the `minislots' setting for more information. + The maximum size of a file that may be downloaded using a `minis‐ + lot', in KiB. See the `minislots' setting for more information. nick - Your nick. Nick changes are only visible on newly connected hubs, use the - `/reconnect' command to use your new nick immediately. Note that it is - highly discouraged to change your nick on NMDC hubs. This is because - clients downloading from you have no way of knowing that you changed your - nick, and therefore can't immediately continue to download from you. + Your nick. Nick changes are only visible on newly connected hubs, + use the `/reconnect' command to use your new nick immediately. Note + that it is highly discouraged to change your nick on NMDC hubs. This + is because clients downloading from you have no way of knowing that + you changed your nick, and therefore can't immediately continue to + download from you. password - Sets your password for the current hub and enables auto-login on connect. - If you just want to login to a hub without saving your password, use the - `/password' command instead. Passwords are saved unencrypted in the con‐ - fig file. + Sets your password for the current hub and enables auto-login on + connect. If you just want to login to a hub without saving your + password, use the `/password' command instead. Passwords are saved + unencrypted in the config file. sendfile - Whether or not to use the sendfile() system call to upload files, if sup‐ - ported. Using sendfile() allows less resource usage while uploading, but - may not work well on all systems. + Whether or not to use the sendfile() system call to upload files, if + supported. Using sendfile() allows less resource usage while upload‐ + ing, but may not work well on all systems. share_exclude - Any file or directory with a name that matches this regular expression - will not be shared. A file list refresh is required for this setting to - be effective. + Any file or directory with a name that matches this regular expres‐ + sion will not be shared. A file list refresh is required for this + setting to be effective. share_hidden - Whether to share hidden files and directories. A `hidden' file or direc‐ - tory is one of which the file name starts with a dot. (e.g. `.bashrc'). A - file list refresh is required for this setting to be effective. + Whether to share hidden files and directories. A `hidden' file or + directory is one of which the file name starts with a dot. (e.g. + `.bashrc'). A file list refresh is required for this setting to be + effective. show_joinquit Whether to display join/quit messages in the hub chat. slots - The number of upload slots. This determines for the most part how many - people can download from you simultaneously. It is possible that this - limit is exceeded in certain circumstances, see the `minislots' setting - and the `/grant' command. + The number of upload slots. This determines for the most part how + many people can download from you simultaneously. It is possible + that this limit is exceeded in certain circumstances, see the `min‐ + islots' setting and the `/grant' command. tls_policy - Set the policy for secure client-to-client connections. Setting this to - `disabled' disables TLS support for client connections, but still allows - you to connect to TLS-enabled hubs. `allow' will allow the use of TLS if - the other client requests this, but ncdc itself will not request TLS when - connecting to others. Setting this to `prefer' tells ncdc to also request - TLS when connecting to others. + Set the policy for secure client-to-client connections. Setting this + to `disabled' disables TLS support for client connections, but still + allows you to connect to TLS-enabled hubs. `allow' will allow the + use of TLS if the other client requests this, but ncdc itself will + not request TLS when connecting to others. Setting this to `prefer' + tells ncdc to also request TLS when connecting to others. - The use of TLS for client connections usually results in less optimal - performance when uploading and downloading, but is quite effective at - avoiding protocol-specific traffic shaping that some ISPs may do. Also - note that, even if you set this to `prefer', TLS will only be used if the - connecting party also supports it. + The use of TLS for client connections usually results in less opti‐ + mal performance when uploading and downloading, but is quite effec‐ + tive at avoiding protocol-specific traffic shaping that some ISPs + may do. Also note that, even if you set this to `prefer', TLS will + only be used if the connecting party also supports it. ui_time_format - The format of the time displayed in the lower-left of the screen. Set `-' - to not display a time at all. The string is passed to the Glib - g_date_time_format() function, which accepts roughly the same formats as - strftime(). Check out the strftime(3) man page or the Glib documentation - for more information. Note that this setting does not influence the - date/time format used in other places, such as the chat window or log - files. + The format of the time displayed in the lower-left of the screen. + Set `-' to not display a time at all. The string is passed to the + Glib g_date_time_format() function, which accepts roughly the same + formats as strftime(). Check out the strftime(3) man page or the + Glib documentation for more information. Note that this setting does + not influence the date/time format used in other places, such as the + chat window or log files. KEY BINDINGS - On any tab without the text input line, you can press `?' to get the key bind‐ - ings for that tab. The list of key bindings is available through the `/help - keys' command, and is reproduced below. + On any tab without the text input line, you can press `?' to get the key + bindings for that tab. The list of key bindings is available through the + `/help keys' command, and is reproduced below. Global key bindings Alt+j Open previous tab. @@ -646,14 +666,15 @@ KEY BINDINGS +/- Increase/decrease priority. i/Return Toggle user list. r Remove selected user for this file. - R Remove selected user from all files in the download queue. + R Remove selected user from all files in the download + queue. x Clear error state for the selected user for this file. X Clear error state for the selected user for all files. - Note: when an item in the queue has `ERR' indicated in the priority col‐ - umn, you have two choices: You can remove the item from the queue using - `d', or attempt to continue the download by increasing its priority using - `+'. + Note: when an item in the queue has `ERR' indicated in the priority + column, you have two choices: You can remove the item from the queue + using `d', or attempt to continue the download by increasing its + priority using `+'. Search results tab Up/Down Select one item up/down. @@ -661,7 +682,8 @@ KEY BINDINGS PgUp/PgDown Select one page of items up/down. End/Home Select last/first item in the list. f Find user in user list. - b/B Browse the selected users' list, B to force a redownload. + b/B Browse the selected users' list, B to force a redown‐ + load. d Add selected file to the download queue. h Toggle hub column visibility. u Order by username. @@ -689,80 +711,82 @@ KEY BINDINGS i/Return Toggle information box. m Send a PM to the selected user. g Grant a slot to the selected user. - b/B Browse the selected users' list, B to force a redownload. + b/B Browse the selected users' list, B to force a redown‐ + load. ENVIRONMENT - $NCDC_DIR is used to determine the session dir, it is only honoured if -c is not - set on the command line. + $NCDC_DIR is used to determine the session dir, it is only honoured if -c + is not set on the command line. FILES - $NCDC_DIR corresponds to the session dir set via -c, environment variable + $NCDC_DIR corresponds to the session dir set via -c, environment variable $NCDC_DIR or $HOME/.ncdc. $NCDC_DIR/cert/ - Directory where the client certificates are stored. Must contain a pri‐ - vate key file (client.key) and public certificate (client.crt). These - should be generated automatically when ncdc starts up the first time, but - can be generated manually using ncdc-gen-cert(1). + Directory where the client certificates are stored. Must contain a + private key file (client.key) and public certificate (client.crt). + These should be generated automatically when ncdc starts up the + first time, but can be generated manually using ncdc-gen-cert(1). $NCDC_DIR/db.sqlite3 - The database. This stores all configuration variables, hash data of - shared files, download queue information and other state information. - Manually editing this file with the `sqlite3' commandline tool is possi‐ - ble but discouraged. Any changes made to the database while ncdc is run‐ - ning will not be read, and may even get overwritten by ncdc. + The database. This stores all configuration variables, hash data of + shared files, download queue information and other state informa‐ + tion. Manually editing this file with the `sqlite3' commandline tool + is possible but discouraged. Any changes made to the database while + ncdc is running will not be read, and may even get overwritten by + ncdc. $NCDC_DIR/dl/ - Directory where completed downloads are moved to by default. Can be + Directory where completed downloads are moved to by default. Can be changed with the `download_dir' configuration option. $NCDC_DIR/files.xml.bz2 Filelist containing a listing of all shared files. $NCDC_DIR/fl/ - Directory where downloaded file lists from other users are stored. The - names of the files are hex-encoded user IDs that are used internally by - ncdc. Old file lists are deleted automatically after a configurable - interval. See the `filelist_maxage' configuration option. + Directory where downloaded file lists from other users are stored. + The names of the files are hex-encoded user IDs that are used inter‐ + nally by ncdc. Old file lists are deleted automatically after a con‐ + figurable interval. See the `filelist_maxage' configuration option. $NCDC_DIR/history Command history. $NCDC_DIR/inc/ - Default location for incomplete downloads. Can be changed with the - `incoming_dir' setting. The file names in this directory are the + Default location for incomplete downloads. Can be changed with the + `incoming_dir' setting. The file names in this directory are the base32-encoded TTH root of the completed file. $NCDC_DIR/logs/ - Directory where all the log files are stored. File names starting with - `#' are hub logs and `~' are user (PM) logs. Special log files are trans‐ - fers.log and main.log. - ncdc does not have built-in functionality to rotate or compress log files - automatically. When rotating log files manually (e.g. via a cron job), - make sure to send the SIGUSR1 signal afterwards to force ncdc to flush - the old logs and create or open the new log files. + Directory where all the log files are stored. File names starting + with `#' are hub logs and `~' are user (PM) logs. Special log files + are transfers.log and main.log. + ncdc does not have built-in functionality to rotate or compress log + files automatically. When rotating log files manually (e.g. via a + cron job), make sure to send the SIGUSR1 signal afterwards to force + ncdc to flush the old logs and create or open the new log files. $NCDC_DIR/stderr.log Error/debug log. This file is cleared every time ncdc starts up. $NCDC_DIR/version - Version of the data directory. This file locked while an ncdc instance is - running, making sure that no two ncdc instances work with the same ses‐ - sion directory at the same time. + Version of the data directory. This file locked while an ncdc + instance is running, making sure that no two ncdc instances work + with the same session directory at the same time. LICENSE - Copyright (C) 2011 Yoran Heling - ncdc is distributed under the MIT license, please read the COPYING file for more - information. + Copyright (C) 2011-2012 Yoran Heling + ncdc is distributed under the MIT license, please read the COPYING file for + more information. BUGS - Please report bugs or feature requests to projects@yorhel.nl or connect to the - development hub at adc://dc.blicky.net:2780/. + Please report bugs or feature requests to projects@yorhel.nl or connect to + the development hub at adc://dc.blicky.net:2780/. AUTHOR @@ -775,4 +799,4 @@ SEE ALSO -ncdc-1.7 December 2011 ncdc(1) +ncdc-1.7 December 2011 ncdc(1) diff --git a/dat/ncdc-scr b/dat/ncdc-scr new file mode 100644 index 0000000..d50e7f6 --- /dev/null +++ b/dat/ncdc-scr @@ -0,0 +1,21 @@ +=pod + +Note: While these screenshots are from version 1.5, the latest version has only +little visible changes. Let me also apologise for the crappy formatting, I +should take some smaller shots next time... + +=head2 Main chat + +[img scr ncdchub.png Ncdc in the mainchat.] + +=head2 File browser + +[img scr ncdcbrowse.png Simple file list browser.] + +=head2 User list + +[img scr ncdcusers.png Ncdc displaying the userlist of a hub.] + +=head2 Built-in help + +[img scr ncdchelp.png Ncdc built-in help.] diff --git a/dat/ncdu b/dat/ncdu new file mode 100644 index 0000000..50f53e2 --- /dev/null +++ b/dat/ncdu @@ -0,0 +1,98 @@ +=pod + +Not quite happy with the available disk usage analyzers and looking for a fun +project to get used to C programming, I started working on ncdu: A disk usage +analyzer with an ncurses interface, aimed to be run on a remote server where +you don't have an entire gaphical setup, but have to do with a simple SSH +connection. ncdu aims to be fast, simple and easy to use, and should be able +to run in any minimal POSIX-like environment with ncurses installed. + + +=head2 Download + +=over + +=item Latest version + +1.8 ([dllink ncdu-1.8.tar.gz download] + - L + - L) + +=item Development version + +The most recent code is available on a git repository and can be cloned with +C. The repository is also available for +L. + +=back + +Ncdu is entirely written in C and available under a liberal MIT license. + +Subscribe to L to receive +notifications for new releases. + + + +=head2 Packages and ports + +Ncdu has been packaged for quite a few systems already, here's a list of the ones I am aware of: + +L - +L - +L - +L - +L - +L - +L - +L - +L - +L - +L - +L - +L - +L - +Mac OS X (L - L - L) - +L - +L - +Solaris (L - L) - +Slackware (L - L) - +L - +L + +Ncdu is also available on the +L, +which provides packages for a variaty of Linux distributions. + + + +=head2 Similar projects + +=over + +=item L - Quite similar to ncdu, but a different approach. + +=item L - Another small ncurses-based disk usage visualization utility. + +=item L - GTK, using a treeview. + +=item L - GTK, using pie-charts, a treeview and a treemap. Comes with GNOME. + +=item L - GTK, with a treemap display. + +=item L - KDE, using pie-charts. + +=item L - KDE, with a treemap display. + +=item L - Qt, using pie-charts. + +=item L - FLTK, with a treemap display. + +=item L - 3D visualization. + +=item L - Web-based clone of Filelight. + +=item L - Java, using pie-charts and a treeview. + +=back + + diff --git a/dat/ncdu-man b/dat/ncdu-man index c699cd2..ac56f1e 100644 --- a/dat/ncdu-man +++ b/dat/ncdu-man @@ -1,4 +1,4 @@ -ncdu(1) ncdu manual ncdu(1) +ncdu(1) ncdu manual ncdu(1) @@ -11,32 +11,33 @@ SYNOPSIS DESCRIPTION - ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du', and - provides a fast way to see what directories are using your disk space. + ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du', + and provides a fast way to see what directories are using your disk space. OPTIONS -h Print a small help message - -q Quiet mode. While calculating disk space, ncdu will update the screen 10 - times a second by default, this will be decreased to once every 2 seconds - in quiet mode. Use this feature to save bandwidth over remote connec‐ - tions. + -q Quiet mode. While calculating disk space, ncdu will update the + screen 10 times a second by default, this will be decreased to once + every 2 seconds in quiet mode. Use this feature to save bandwidth + over remote connections. - -r Read-only mode. This will disable the built-in file deletion feature. + -r Read-only mode. This will disable the built-in file deletion fea‐ + ture. -v Print version. - -x Only count files and directories on the same filesystem as the specified - dir. + -x Only count files and directories on the same filesystem as the spec‐ + ified dir. --exclude PATTERN - Exclude files that match PATTERN. This argument can be added multiple - times to add more patterns. + Exclude files that match PATTERN. This argument can be added multi‐ + ple times to add more patterns. -X FILE, --exclude-from FILE - Exclude files that match any pattern in FILE. Patterns should be sepa‐ - rated by a newline. + Exclude files that match any pattern in FILE. Patterns should be + separated by a newline. KEYS @@ -57,21 +58,21 @@ KEYS a Toggle between showing disk usage and showing apparent size. - d Delete the selected file or directory. An error message will be shown - when the contents of the directory do not match or do not exist anymore - on the filesystem. + d Delete the selected file or directory. An error message will be + shown when the contents of the directory do not match or do not + exist anymore on the filesystem. t Toggle dirs before files when sorting. - g Toggle between showing percentage, graph, both, or none. Percentage is - relative to the size of the current directory, graph is relative to the - largest item in the current directory. + g Toggle between showing percentage, graph, both, or none. Percentage + is relative to the size of the current directory, graph is relative + to the largest item in the current directory. - e Show/hide 'hidden' or 'excluded' files and directories. Please note that - even though you can't see the hidden files and directories, they are - still there and they are still included in the directory sizes. If you - suspect that the totals shown at the bottom of the screen are not cor‐ - rect, make sure you haven't enabled this option. + e Show/hide 'hidden' or 'excluded' files and directories. Please note + that even though you can't see the hidden files and directories, + they are still there and they are still included in the directory + sizes. If you suspect that the totals shown at the bottom of the + screen are not correct, make sure you haven't enabled this option. i Show information about the current selected item. @@ -81,44 +82,45 @@ KEYS HARD LINKS - Every disk usage analysis utility has its own way of (not) counting hard links. - There does not seem to be any universally agreed method of handling hard links, - and it is even inconsistent among different versions of ncdu. This section - explains what each version of ncdu does. + Every disk usage analysis utility has its own way of (not) counting hard + links. There does not seem to be any universally agreed method of handling + hard links, and it is even inconsistent among different versions of ncdu. + This section explains what each version of ncdu does. - ncdu 1.5 and below does not support any hard link detection at all: each link is - considered a separate inode and its size is counted for every link. This means - that the displayed directory sizes are incorrect when analyzing directories - which contain hard links. + ncdu 1.5 and below does not support any hard link detection at all: each + link is considered a separate inode and its size is counted for every link. + This means that the displayed directory sizes are incorrect when analyzing + directories which contain hard links. - ncdu 1.6 has basic hard link detection: When a link to a previously encountered - inode is detected, the link is considered to have a file size of zero bytes. - Its size is not counted again, and the link is indicated in the browser inter‐ - face with a 'H' mark. The displayed directory sizes are only correct when all - links to an inode reside within that directory. When this is not the case, the - sizes may or may not be correct, depending on which links were considered as - "duplicate" and which as "original". The indicated size of the topmost directory - (that is, the one specified on the command line upon starting ncdu) is always - correct. + ncdu 1.6 has basic hard link detection: When a link to a previously encoun‐ + tered inode is detected, the link is considered to have a file size of zero + bytes. Its size is not counted again, and the link is indicated in the + browser interface with a 'H' mark. The displayed directory sizes are only + correct when all links to an inode reside within that directory. When this + is not the case, the sizes may or may not be correct, depending on which + links were considered as "duplicate" and which as "original". The indicated + size of the topmost directory (that is, the one specified on the command + line upon starting ncdu) is always correct. - ncdu 1.7 has improved hard link detection. Each file that has more than two - links has the "H" mark visible in the browser interface. Each hard link is - counted exactly once for every directory it appears in. The indicated size of - each directory is therefore, correctly, the sum of the sizes of all unique - inodes that can be found in that directory. Note, however, that this may not - always be same as the space that will be reclaimed after deleting the directory, - as some inodes may still be accessible from hard links outside it. + ncdu 1.7 has improved hard link detection. Each file that has more than two + links has the "H" mark visible in the browser interface. Each hard link is + counted exactly once for every directory it appears in. The indicated size + of each directory is therefore, correctly, the sum of the sizes of all + unique inodes that can be found in that directory. Note, however, that this + may not always be same as the space that will be reclaimed after deleting + the directory, as some inodes may still be accessible from hard links out‐ + side it. BUGS - Directory hard links are not supported. They will not be detected as being hard - links, and will thus be scanned and counted multiple times. + Directory hard links are not supported. They will not be detected as being + hard links, and will thus be scanned and counted multiple times. - Some minor glitches may appear when displaying filenames that contain multibyte - or multicolumn characters. + Some minor glitches may appear when displaying filenames that contain + multibyte or multicolumn characters. - Please report any other bugs you may find at the bug tracker, which can be found - on the web site at http://dev.yorhel.nl/ncdu + Please report any other bugs you may find at the bug tracker, which can be + found on the web site at http://dev.yorhel.nl/ncdu AUTHOR @@ -130,4 +132,4 @@ SEE ALSO -ncdu-1.8 Nov 3, 2011 ncdu(1) +ncdu-1.8 Nov 3, 2011 ncdu(1) diff --git a/dat/ncdu-scr b/dat/ncdu-scr new file mode 100644 index 0000000..f22541f --- /dev/null +++ b/dat/ncdu-scr @@ -0,0 +1,29 @@ +=pod + +Note: While these screenshots are from version 1.7, the latest version has only +little visible changes. Let me also apologise for the crappy formatting, I +should take some smaller shots next time... + +=head2 Scanning... + +[img scr ncduscan.png Ncdu scanning a large directory.] + +=head2 Done scanning + +[img scr ncdudone.png Ncdu done scanning a large directory.] + +=head2 Directory information + +[img scr ncduinfo.png Ncdu displaying directory information.] + +=head2 Delete confirmation + +[img scr ncduconfirm.png Ncdu asking for confirmation to delete a file.] + +=head2 Help screen + +[img scr ncduhelp1.png Ncdu help screen.] + +=head2 About screen + +[img scr ncduhelp2.png Ncdu about screen.] diff --git a/dat/sqlaccess b/dat/sqlaccess index 1159862..11f5c2b 100644 --- a/dat/sqlaccess +++ b/dat/sqlaccess @@ -1,5 +1,9 @@ Multi-threaded Access to an SQLite3 Database +=pod + +(Published on B<2011-11-26>. Also available in L.) + =head1 Introduction As I was porting L over to use SQLite3 as diff --git a/dat/tuwf b/dat/tuwf new file mode 100644 index 0000000..3341784 --- /dev/null +++ b/dat/tuwf @@ -0,0 +1,64 @@ +=pod + +TUWF is a very small and lightweight web development framework for Perl. It has +evolved from being a few abstraction layers in two large websites to a separate +set of modules. While initially designed to be used for large and complex +websites, it is also perfectly suited for small single-file websites. + +=head2 Main features + +=over + +=item * Very small, and no extra modules required, + +=item * Easy URI-to-function mapping using regular expressions, + +=item * Handy form validation functions, + +=item * Easy XML/XHTML output generation functions, + +=item * Response buffering and output compression, + +=item * Easy access to GET/POST data and cookies, + +=item * Support for CGI and FastCGI - optimized for FastCGI, + +=item * Uses UTF-8 for all text, + +=item * Convenient SQL execution functions and correct transaction handling, + +=item * Promotes code re-use, + +=item * Open source (duh!) and available under a liberal MIT license. + +=back + +Read the L in the documentation for more +information and details. + + +=head2 Download + +B 0.1 ([dllink TUWF-0.1.tar.gz download] +- L) + +TUWF is also available on a git repository at L. + + +=head2 Websites using TUWF + +(Not a whole lot) + +=over + +=item * L (the site that spawned TUWF - L) + +=item * L (also L) + +=item * L (L) + +=item * The website embedded in the L mixing console. + +=item * L + +=back diff --git a/index.cgi b/index.cgi index b59c295..c0cf81b 100755 --- a/index.cgi +++ b/index.cgi @@ -1,204 +1,69 @@ #!/usr/bin/perl - use strict; use warnings; +use utf8; use TUWF ':html'; use Cwd 'abs_path'; our $ROOT; BEGIN { ($ROOT = abs_path $0) =~ s{index\.cgi$}{}; } + TUWF::register( - qr{} => \&home, - qr{ncdu} => \&ncdu, - qr{ncdu/changes} => \&ncduchangelog, - qr{ncdu/man} => \&ncdumanual, - qr{ncdu/scr} => \&ncduscr, - qr{ncdc} => \&ncdc, - qr{ncdc/faq} => \&ncdcfaq, - qr{ncdc/changes} => \&ncdcchangelog, - qr{ncdc/man} => \&ncdcmanual, - qr{ncdc/scr} => \&ncdcscr, - qr{tuwf} => \&tuwf, - qr{tuwf/man(?:/(db|misc|request|response|xml))?} - => \&tuwfmanual, - qr{doc} => \&docindex, - qr{doc/sqlaccess} => \&docsqlaccess, - qr{dump} => \&dump, - qr{demo} => \&dumpdemo, - qr{dump/awshrink} => \&dumpawshrink, - qr{dump/grenamr} => \&dumpgrenamr, - qr{dump/nccolour} => \&dumpnccolour, + qr{} => sub { podpage(shift, 'home', '', '', "Yorhel's Projects") }, + qr{ncdu} => sub { podpage(shift, 'ncdu', 'ncdu', '', 'NCurses Disk Usage') }, + qr{ncdu/man} => sub { manpage(shift, 'ncdu-man', 'ncdu', 'man', 'Ncdu Manual') }, + qr{ncdu/changes} => sub { changelog(shift, 'ncdu-changelog', 'ncdu', 'changes', 'Ncdu Changelog') }, + qr{ncdu/scr} => sub { podpage(shift, 'ncdu-scr', 'ncdu', 'scr', 'Ncdu Screenshots') }, + qr{ncdc} => sub { podpage(shift, 'ncdc', 'ncdc', '', 'NCurses Direct Connect') }, + qr{ncdc/faq} => sub { podpage(shift, 'ncdc-faq', 'ncdc', 'faq', 'Ncdc Q&A', 1) }, + qr{ncdc/scr} => sub { podpage(shift, 'ncdc-scr', 'ncdc', 'scr', 'Ncdc Screenshots') }, + qr{ncdc/man} => sub { manpage(shift, 'ncdc-man', 'ncdc', 'man', 'Ncdc Manual') }, + qr{ncdc/changes} => sub { changelog(shift, 'ncdc-changelog', 'ncdc', 'changes', 'Ncdc Changelog') }, + qr{tuwf} => sub { podpage(shift, 'tuwf', 'tuwf', '', 'The Ultimate Website Framework') }, + qr{tuwf/man(?:/(db|misc|request|response|xml))?} => \&tuwfmanual, + qr{doc} => sub { podpage(shift, 'doc', 'doc', '', 'Articles') }, + qr{doc/sqlaccess} => sub { podpage(shift, 'sqlaccess', 'doc', '', 'Multi-threaded Access to an SQLite3 Database', 1) }, + qr{dump} => sub { podpage(shift, 'dump', 'dump', '', 'Code dump') }, + qr{demo} => sub { podpage(shift, 'dump-demo', 'dump', 'demo', 'Demos') }, + qr{dump/awshrink} => sub { podpage(shift, 'dump-awshrink', 'dump', 'awshrink', 'AWStats Data File Shrinker') }, + qr{dump/grenamr} => sub { podpage(shift, 'dump-grenamr', 'dump', 'grenamr', 'GTK+ Mass File Renamer') }, + qr{dump/nccolour} => sub { podpage(shift, 'dump-nccolour', 'dump', 'nccolour', 'Colours in NCurses') }, ); + TUWF::set( logfile => '/www/err.log', + #pre_request_handler => sub { $ENV{REQUEST_URI} = $_[0]->reqGet('path')||''; 1 }, error_404_handler => \¬found, ); + TUWF::run(); - - -# H O M E P A G E - -sub home { +sub test { my $s = shift; - $s->htmlHeader(title => 'Yorhel\'s projects'); - p; - lit <<' E;'; - This site is an attempt to publish and organise my various opensource programs - and libraries on one central location, possibly documented as well as possible - so it might actually be useful to anyone. Some of these projects might end up to - be total crap, and some might not be useful to anyone at all. I'll simply try to - dump most of the things I create here, and leave it up to you whatever you decide - to do with it. - E; - end; - h2 'Updates'; - b '2011-12-30'; txt ' ncdc 1.7 released!'; br; - b '2011-12-07'; txt ' ncdc 1.6 released!'; br; - b '2011-11-26'; txt ' Added article section and the article on SQLite.'; br; - b '2011-11-03'; txt ' ncdc 1.5 and ncdu 1.8 released!'; br; - b '2011-10-26'; txt ' ncdc 1.4 released!'; br; - b '2011-10-19'; txt ' PGP-signed all releases of ncdu, ncdc and TUWF.'; br; - b '2011-10-14'; txt ' ncdc 1.3 released!'; br; - b '2011-09-25'; txt ' ncdc 1.1 released - follwed by a 1.2 quickfix.'; br; - b '2011-09-16'; txt ' ncdc 1.0 released!'; br; - b '2011-09-15'; txt ' Added some screenshots for ncdu.'; br; - b '2011-09-03'; txt ' ncdc 0.9 released!'; br; - b '2011-08-26'; txt ' ncdc 0.8 released!'; br; - b '2011-08-17'; txt ' ncdc 0.7 released!'; br; - b '2011-08-08'; txt ' ncdc 0.6 released & user guide updated'; br; - b '2011-08-02'; txt ' ncdc 0.5 released!'; br; - b '2011-07-23'; txt ' ncdc 0.4 released!'; br; - b '2011-07-15'; txt ' ncdc 0.3 released!'; br; - b '2011-06-27'; txt ' ncdc 0.2 released!'; br; - b '2011-06-20'; txt ' ncdc 0.1 released! And wrote a user guide for it.'; br; - b '2011-06-11'; txt ' Added NCurses colour experiment at code dump => nc-colour'; br; - b '2011-06-03'; txt ' Added my latest project: ncdc'; br; - b '2011-02-07'; txt ' TUWF 0.1 released and now also available on CPAN'; br; - b '2011-01-27'; txt ' Documented and uploaded one of my older projects: TUWF'; br; - b '2011-01-09'; txt ' Added my json.mll OCaml library to code dump'; br; - b '2010-08-13'; txt ' ncdu 1.7 released!'; br; - b '2009-12-22'; txt ' Added vinfo.c script to code dump'; br; - b '2009-10-23'; txt ' ncdu 1.6 released!'; br; - b '2009-09-21'; txt ' Tiny CSS fix to make this site look good in certain configurations.'; br; - b '2009-05-02'; txt ' ncdu 1.5 released!'; br; - b '2009-04-30'; txt " Site redesign and reorganisation."; br; + $s->htmlHeader(title => 'Test', page => 'ncdu', sec => 'changes'); + (my $f = $INC{"TUWF.pm"}) =~ s/\.pm$/.pod/; + #$s->htmlPOD($f, 1); + $s->htmlPOD('home'); $s->htmlFooter; } - - -# N C D U - -sub ncdu { - my $s = shift; - $s->htmlHeader(title => 'NCurses Disk Usage', page => 'ncdu'); - img style => 'float: right', src => '/img/ncdu.png', alt => 'ncdu'; - p; - lit <<' E;'; - Not quite happy with the available disk usage analyzers and looking for a fun - project to get used to C programming, I started working on ncdu: A disk usage - analyzer with an ncurses interface, aimed to be run on a remote server where - you don't have an entire gaphical setup, but have to do with a simple SSH - connection. ncdu aims to be fast, simple and easy to use, and should be able - to run in any minimal POSIX-like environment with ncurses installed. - E; - br; br; - b 'Latest version: '; - txt '1.8 ('; - $s->htmlDLLink('ncdu-1.8.tar.gz', 'download'); - txt ' - '; - a href => '/ncdu/changes', 'changes'; - txt ' - '; - a href => 'http://sourceforge.net/project/showfiles.php?group_id=200175', 'mirror'; - txt ")"; br; - b 'Requirements: '; txt 'A POSIX-like system and the ncurses library'; br; - txt 'Entirely written in C and available under a liberal MIT license.'; - end; - - h2 'Packages and ports'; - p 'ncdu has been packaged for various systems already, here\'s a list of the ones I am aware of:'; - a href => 'http://packages.agilialinux.ru/search.php?tag=sys-fs', 'AgiliaLinux';txt ' - '; - a href => 'http://www.perzl.org/aix/index.php?n=Main.Ncdu', 'AIX'; txt ' - '; - a href => 'http://sisyphus.ru/en/srpm/Sisyphus/ncdu', 'ALT Linux'; txt ' - '; - a href => 'http://www.archlinux.org/packages/?q=ncdu', 'Arch Linux'; txt ' - '; - a href => 'http://crux.nu/portdb/?q=ncdu&a=search', 'CRUX'; txt ' - '; - a href => 'http://cygwin.com/packages/ncdu/', 'Cygwin'; txt ' - '; - a href => 'http://packages.debian.org/ncdu', 'Debian'; txt ' - '; - a href => 'https://admin.fedoraproject.org/pkgdb/acls/name/ncdu', 'Fedora'; txt ' - '; - a href => 'http://www.freshports.org/sysutils/ncdu/', 'FreeBSD'; txt ' - '; - a href => 'http://frugalware.org/packages/?op=pkg&srch=ncdu&arch=all&ver=all', 'Frugalware'; txt ' - '; - a href => 'http://packages.gentoo.org/package/sys-fs/ncdu', 'Gentoo'; txt ' - '; - a href => 'http://www.ipadd.de/binary-v2.html', 'IPCop'; txt ' - '; - a href => 'http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/ncdu/', 'OpenBSD'; txt ' - '; - a href => 'http://packman.links2linux.de/package/ncdu/', 'OpenSUSE'; txt ' - '; - txt 'Mac OS X ('; - a href => 'http://pdb.finkproject.org/pdb/package.php/ncdu', 'Fink'; txt '-'; - a href => 'http://mxcl.github.com/homebrew/', 'Homebrew'; txt '-'; - a href => 'http://www.macports.org/ports.php?by=name&substr=ncdu', 'MacPorts'; - txt ') - '; - a href => 'http://packages.pardus.org.tr/info/2011/devel/source/ncdu.html', 'Pardus'; txt ' - '; - a href => 'http://www.murga-linux.com/puppy/viewtopic.php?t=35024', 'Puppy Linux';txt ' - '; - txt 'Solaris ('; - a href => 'http://www.opencsw.org/packages/ncdu', 'CSW'; txt '-'; - a href => 'http://www.sunfreeware.com/', 'sunfreeware'; - txt ') - '; - txt 'Slackware ('; - a href => 'http://slackbuilds.org/repository/13.37/system/ncdu/', 'Slackbuilds'; txt '-'; - a href => 'http://www.slackers.it/repository/ncdu/', 'Slackers.it'; - txt ') - '; - a href => 'http://packages.ubuntu.com/search?searchon=sourcenames&keywords=ncdu', 'Ubuntu'; txt ' - '; - a href => 'http://zur.zenwalk.org/view/package/name/ncdu', 'Zenwalk'; - br; - txt 'ncdu is also available on the '; - a href => 'https://build.opensuse.org/package/show?package=ncdu&project=utilities', 'Open Build Service'; - txt ', which provides packages for a variaty of Linux distributions.'; - - br; br; - txt 'Subscribe to '; - a href => 'http://freecode.com/projects/ncdu', 'freecode'; - txt ' to receive notifications for new releases.'; - - h2 'Development access'; - p; - txt 'The most recent code is available on a git repository and is '; - a href => 'http://g.blicky.net/ncdu.git/', 'available for online browsing'; - txt '.'; - end; - - h2 'Similar projects'; - a href => 'http://gt5.sourceforge.net/', 'gt5'; txt ' - Quite similar to ncdu, but a different approach.'; br; - a href => 'http://webonastick.com/tdu/', 'tdu'; txt ' - Another small ncurses-based disk usage visualization utility.'; br; - a href => 'http://treesize.sourceforge.net/', 'TreeSize'; txt ' - GTK, using a treeview.'; br; - a href => 'http://www.marzocca.net/linux/baobab.html', 'Baobab'; txt ' - GTK, using pie-charts, a treeview and a treemap. Comes with GNOME.'; br; - a href => 'http://gdmap.sourceforge.net/', 'GdMap'; txt ' - GTK, with a treemap display.'; br; - a href => 'http://www.methylblue.com/filelight/', 'Filelight'; txt ' - KDE, using pie-charts.'; br; - a href => 'http://kdirstat.sourceforge.net/', 'KDirStat'; txt ' - KDE, with a treemap display.'; br; - a href => 'http://qt-apps.org/content/show.php/QDiskUsage?content=107012', 'QDiskUsage'; txt ' - Qt, using pie-charts.'; br; - a href => 'http://xdiskusage.sourceforge.net/', 'xdiskusage';txt ' - FLTK, with a treemap display.'; br; - a href => 'http://fsv.sourceforge.net/', 'fsv'; txt ' - 3D visualization.'; br; - a href => 'http://zevv.nl/play/code/philesight/', 'Philesight';txt ' - Web-based clone of Filelight.'; br; - a href => 'http://www.jgoodies.com/freeware/jdiskreport/','JDiskReport';txt ' - Java, using pie-charts and a treeview.'; +sub podpage { + my($s, $f, $p, $se, $t, $toc) = @_; + $s->htmlHeader(title => $t, page => $p, sec => $se); + $s->htmlPOD($f, $toc); $s->htmlFooter; } -sub ncduchangelog { - my $s = shift; - $s->htmlHeader(title => 'Version history', page => 'ncdu', tab => 'changes'); - $s->htmlChangeLog('ncdu'); - $s->htmlFooter; -} - - -sub ncdumanual { - my $s = shift; - $s->htmlHeader(title => 'Manual page', page => 'ncdu', tab => 'man'); - open my $F, '<:utf8', "$ROOT/dat/ncdu-man" or die $!; +# TODO: Convert to POD, or use POD as original source for the man pages +sub manpage { + my($s, $f, $p, $se, $t) = @_; + $s->htmlHeader(title => $t, page => $p, sec => $se); + open my $F, '<:utf8', "$ROOT/dat/$f" or die $!; pre; txt $_ while(<$F>); end; @@ -207,705 +72,47 @@ sub ncdumanual { } -sub ncduscr { - my $s = shift; - $s->htmlHeader(title => 'Screenshots', page => 'ncdu', tab => 'scr'); - p; - txt 'Note: While these screenshots are from version 1.7, the latest version has only little visible changes.'; - br; br; - txt 'Scanning...'; - img src => '/img/ncduscan.png', class => 'scr', alt => 'Ncdu scanning a large directory.'; - br;br; - txt 'Done scanning'; - img src => '/img/ncdudone.png', class => 'scr', alt => 'Ncdu done scanning a large directory.'; - br;br; - txt 'Directory information'; - img src => '/img/ncduinfo.png', class => 'scr', alt => 'Ncdu displaying directory information.'; - br;br; - txt 'Delete confirmation'; - img src => '/img/ncduconfirm.png', class => 'scr', alt => 'Ncdu asking for confirmation to delete a file.'; - br;br; - txt 'Help screen'; - img src => '/img/ncduhelp1.png', class => 'scr', alt => 'Ncdu help screen.'; - br;br; - txt 'About screen'; - img src => '/img/ncduhelp2.png', class => 'scr', alt => 'Ncdu about screen.'; - end; - $s->htmlFooter; -} - - - -# N C D C - -sub ncdc { - my $s = shift; - $s->htmlHeader(title => 'NCurses Direct Connect', page => 'ncdc'); - p style => 'float:right; margin-top: -27px; font-size: 12px; line-height: 11px'; - txt 'Join the development hub! '; b style => 'font-size: 12px', 'adc://dc.blicky.net:2780/'; - end; - p; - lit <<' E;'; - Ncdc is a modern and lightweight direct connect client with a friendly - ncurses interface. - E; - end; - - h2 'Get ncdc!'; - p; - b 'Latest version:'; txt ' 1.7 ('; - $s->htmlDLLink('ncdc-1.7.tar.gz', 'download'); - txt ' - '; a href => '/ncdc/changes', 'changes'; - txt ' - '; a href => 'https://sourceforge.net/projects/ncdc/files/ncdc/', 'mirror'; - txt ')'; br; - txt 'The latest development version can be fetched from the git repository - at '; code 'git://g.blicky.net/ncdc.git'; txt ' and is available for '; - a href => 'http://g.blicky.net/ncdc.git/', 'online browsing'; - txt '. The README includes instructions to build ncdc. Check out the '; - a href => '/ncdc/man', 'manual'; txt ' to get started.'; - br;br; - txt 'Packages/ports are available for the following systems: '; br; - a href => 'http://aur.archlinux.org/packages.php?ID=50949', 'Arch Linux'; txt ' - '; - a href => 'http://www.freshports.org/net-p2p/ncdc/', 'FreeBSD'; txt ' - '; - a href => 'http://frugalware.org/packages/136807', 'Frugalware'; txt ' - '; - a href => 'http://packages.gentoo.org/package/net-p2p/ncdc', 'Gentoo'; txt ' - '; - txt 'Mac OS X ('; - a href => 'http://www.macports.org/ports.php?by=name&substr=ncdc', 'MacPorts'; - txt ') - '; - a href => 'http://packman.links2linux.org/package/ncdc', 'OpenSUSE'; txt '.'; - end; - - h2 'Features'; - p 'Common features that all modern DC clients (should) have:'; +sub changelog { + my($s, $f, $p, $se, $t) = @_; + $s->htmlHeader(title => $t, page => $p, sec => $se); + open my $F, '<', "$ROOT/dat/$f" or die $!; ul; - li 'Connecting to multiple hubs at the same time,'; - li 'Support for both ADC and NMDC protocols,'; - li 'Chatting and private messaging,'; - li 'Browsing the user list of a connected hub,'; - li 'Share management and file uploading,'; - li 'Connections and download queue management,'; - li 'File list browsing,'; - li 'Multi-source and TTH-checked file downloading,'; - li 'Searching for files,'; - li 'Secure hub (adcs:// and nmdcs://) and client connections on both protocols.'; - end; - br; - p 'Special features not commonly found in other clients:'; - ul; - li 'Subdirectory refreshing,'; - li 'Nick notification and highlighting in chat windows,'; - li 'Detecting changes to the TLS certificate of a hub,'; - li 'Efficient file uploads using sendfile(),'; - li 'Large file lists are opened in a background thread,'; - li '(Relatively...) low memory usage.'; - end; - - h2 'What doesn\'t ncdc do?'; - p "Since the above list is getting larger and larger every time, it may be - more interesting to list a few features that are (relatively) common in other - DC clients, but which ncdc doesn\'t do. Yet."; - ul; - li 'Segmented downloading,'; - li 'Bandwidth throttling,'; - li 'OP features (e.g. client detection, file list scanning and other useful stuff for OPs),'; - li 'SOCKS support.'; - end; - p 'Of course, there are many more features that could be implemented or - improved. These will all be addressed in later versions (hopefully :).'; - - h2 'Requirements'; - p; - lit <<' E;'; - The following libraries are required: ncurses, bzip2, sqlite3, glib2 and libxml2.
- For TLS support, you will need at least glib2 version 2.28.0 and - glib-networking installed.
- These dependencies should be easy to satisfy. Depending on your system, you - may have all of these installed already.
- Ncdc has been developed on Arch Linux, but I have received reports from - people who successfully used it on CentOS, Debian, FreeBSD, Gentoo, Mac OS - X, OpenSUSE, Solaris and Ubuntu. It should be fairly trivial to port to - other POSIX-like systems.
- Ncdc is entirely written in C and available under a liberal MIT license. - E; - end; - $s->htmlFooter; -} - - -sub ncdcfaq { - my $s = shift; - $s->htmlHeader(title => 'Ncdc Q&A', page => 'ncdc', tab => 'faq'); - p 'On this page I collect several questions that people may have and try to - answer them. If you have a question that is not covered here, don\'t hesitate - to ask!'; - br; br; - $s->htmlPOD("$ROOT/dat/ncdc-faq"); - $s->htmlFooter; -} - - -sub ncdcmanual { - my $s = shift; - $s->htmlHeader(title => 'Manual page', page => 'ncdc', tab => 'man'); - open my $F, '<:utf8', "$ROOT/dat/ncdc-man" or die $!; - pre; - txt $_ while(<$F>); + for my $v (split /\n\n/, join '', <$F>) { + $v =~ s/^([0-9]+\.[0-9]+)\s+-\s+([0-9]{4}-[0-9]{2}-[0-9]{2})//; + li style => 'list-style-type: none; margin: 0'; + b $1; + txt " - $2 - "; + lit $s->genDLLink("$p-$1.tar.gz"); + br; + ul; + for (split(/\r?\n\s+-\s+/, $v)) { + s/[\r\n\s]{2,50}/ /; + li $_ if $_; + } + end; + br; + end; + } end; close $F; $s->htmlFooter; } -sub ncdcchangelog { - my $s = shift; - $s->htmlHeader(title => 'Version history', page => 'ncdc', tab => 'changes'); - $s->htmlChangeLog('ncdc'); - $s->htmlFooter; -} - - -sub ncdcscr { - my $s = shift; - $s->htmlHeader(title => 'Screenshots', page => 'ncdc', tab => 'scr'); - p; - txt 'Note: While these screenshots are from version 1.5, the latest version has only little visible changes.'; - br; br; - txt 'Main chat'; - img src => '/img/ncdchub.png', class => 'scr', alt => 'Ncdc in the mainchat.'; - br;br; - txt 'File browser'; - img src => '/img/ncdcbrowse.png', class => 'scr', alt => 'Simple file list browser.'; - br;br; - txt 'User list'; - img src => '/img/ncdcusers.png', class => 'scr', alt => 'Ncdc displaying the userlist of a hub.'; - br;br; - txt 'Built-in help'; - img src => '/img/ncdchelp.png', class => 'scr', alt => 'Ncdc built-in help.'; - end; - $s->htmlFooter; -} - - - - -# T U W F - - -sub tuwf { - my $s = shift; - $s->htmlHeader(title => 'The Ultimate Website Framework', page => 'tuwf'); - lit <<' E;'; - TUWF is a very small and lightweight web development framework for Perl. It - has evolved from being a few abstraction layers in two large websites to a - separate set of modules. While initially designed to be used for large and - complex websites, it is also perfectly suited for small single-file - websites. - E; - - h2 'Main features'; - ul; - li 'Very small, and no extra modules required,'; - li 'Easy URI-to-function mapping using regular expressions,'; - li 'Handy form validation functions,'; - li 'Easy XML/XHTML output generation functions,'; - li 'Response buffering and output compression,'; - li 'Easy access to GET/POST data and cookies,'; - li 'Support for CGI and FastCGI - optimized for FastCGI,'; - li 'Uses UTF-8 for all text,'; - li 'Convenient SQL execution functions and correct transaction handling,'; - li 'Promotes code re-use,'; - li 'Open source (duh!) and available under a liberal MIT license.'; - end; - lit <<' E;'; - Read the description in the - documentation for more information and details. - E; - - h2 'Download'; - p; - b 'Latest packaged version:'; - txt '0.1 ('; - $s->htmlDLLink('TUWF-0.1.tar.gz', 'download'); - txt ' - '; - a href => 'http://search.cpan.org/dist/TUWF/', 'CPAN mirror'; - txt ')'; br; - txt 'TUWF is also available on a git repository at '; - a href => 'http://g.blicky.net/tuwf.git/', 'http://g.blicky.net/tuwf.git/'; txt '.'; - end; - - h2 'Websites using TUWF'; - txt '(Not a whole lot)'; - ul; - li; - a href => 'http://vndb.org/', 'VNDB.org'; - txt ' (the site that spawned TUWF - '; - a href => 'http://g.blicky.net/vndb.git/', 'open source'; - txt ')'; - end; - li; - a href => 'http://dev.yorhel.nl/', 'This website'; txt ' (also '; - a href => 'http://g.blicky.net/yorhel-dev.git/tree/index.cgi', 'open source'; txt ')'; - end; - li; - a href => 'http://p.blicky.net/', 'Blicky.net Pastebin'; txt ' ('; - a href => 'http://g.blicky.net/bpaste.git/tree/index.cgi', 'open source'; txt ')'; - end; - li; txt 'The website embedded in the '; a href => 'http://www.d-r.nl/AXUM/AXUM.htm', 'D&R Axum'; txt ' mixing console.'; end; - li; a href => 'http://yorhel.nl/', 'Yorhel.nl'; end; - end; - - $s->htmlFooter; -} - - sub tuwfmanual { my $s = shift; my $man = shift || ''; - $s->htmlHeader(title => 'TUWF Documentation', page => 'tuwf', tab => 'man'); my %mod = (qw|db DB xml XML|); - - for ('', qw|db misc request response xml|) { - my $n = 'TUWF'.($_ ? '::'.(($mod{$_} || ucfirst $_)) : ''); - txt ', ' if $_; - a href => '/tuwf/man'.($_ ? "/$_" : ''), $n - if $_ ne $man; - b $n if $_ eq $man; - } - br; br; - my $mod = 'TUWF'; $mod .= '/'.($mod{$man} || ucfirst $man) if $man; + (my $pm = $mod) =~ s/\//::/; + $s->htmlHeader(title => $pm.' Documentation', page => 'tuwf', sec => 'man', sec2 => $man); (my $f = $INC{"$mod.pm"}) =~ s/\.pm$/.pod/; - $s->htmlPOD($f); - + $s->htmlPOD($f, 1); $s->htmlFooter; } - - -# D O C S T U F F - - -sub docindex { - my $s = shift; - $s->htmlHeader(title => 'Articles', page => 'doc'); - p 'When programming stuff, I sometimes come across a situation where I am not - happy with the documentation or articles available online, and feel the urge - to do something about this situation. Most of the time I resist this urge - because I otherwise won\'t get any programming done, but sometimes this - urge is just too hard to resist.'; - p 'I don\'t really have a blog - at least not one that I take seriously - so - I\'ll just use this site to publish my articles. Since I\'ve just started - writing these, this page is still quite empty. I\'ll add more as soon as my - urge to write an article surprasses my urge to get some programming done - again.'; - br; - p; - txt '2011-11-26 - '; b 'Multi-threaded Access to an SQLite3 Database'; - txt ' ['; a href => '/doc/sqlaccess', 'HTML'; txt ' - '; a href => '/dat/sqlaccess', rel => 'nofollow', 'POD'; txt ']'; - span 'So you have a single database and some threads. How do you combine - these in a program?'; - - txt '2010-06-02 - '; b 'Design and implementation of a compressed linked list library'; - txt ' ['; a href => '/download/doc/compll.pdf', 'PDF'; txt ']'; - span q|This isn't really an article. It's the report for the - final project of my professional (HBO) bachelor of Electrical - Engineering. I was very liberal with some terminology in this report. For - example, "linked lists" aren't what you think they are, and I didn't even - use the term "locality of reference" where I really should have. It was - also written for an audience with little knowledge on the subject, so I - elaborated on a lot of things that should be obvious for most people in - the field. Then there is a lot of uninteresting overhead about the - project itself, which just happened to be mandatory for this report. - Nonetheless, if you can ignore these faults it's not such a bad read, if - I may say so myself. :-)|; - end; - $s->htmlFooter; -} - - -sub docsqlaccess { - my $s = shift; - $s->htmlHeader(title => 'Multi-threaded Access to an SQLite3 Database', page => 'doc', tab => 'sqlaccess'); - p; - lit <<' E;'; - Written on 2011-11-26. Also available in POD format. -
Feedback, questions, comments, additions? Forward those to projects@yorhel.nl. - E; - end; - br;br; - $s->htmlPOD("$ROOT/dat/sqlaccess"); - $s->htmlFooter; - -} - - - - -# C O D E D U M P - - -sub dump { - my $s = shift; - $s->htmlHeader(title => 'Code Dump', page => 'dump'); - p 'Most of the things I write are simple perl/shell scripts or programs that only ' - .'serve the purpose of learning something new. This page is a listing of those I ' - .'thought might be of interest to others as well.'; - - h2 'bbcode.c'; - p; - txt 'January 2006. Simple BBCode to HTML converter written in plain C, for learning ' - .'puroses. '; - a href => '/download/code/bbcode.c', 'source'; - end; - - h2 'echoserv.c'; - p; - txt 'February 2006. A simple non-blocking single-threaded TCP echo server, ' - .'displaying how the select() system call can be used to handle multiple ' - .'connections. '; - a href => '/download/code/echoserv.c', 'source'; - end; - - h2 'yapong.c'; - p; - txt 'Feburary 2006. Yet Another Pong, and yet another program written just for testing/' - .'learning purposes. Tested to work with the ncurses or pdcurses libraries. '; - a href => '/download/code/yapong.c', 'source'; - txt ' ('; - a href => '/download/code/yapong-0.01.c', '0.01'; - txt ')'; - end; - - h2 'Microdc2 log file parser'; - p; - lit <<' E;'; - June 2007. Simple perl script that parses log files created by - microdc2 and outputs a simple and - ugly html file with all uploaded files. It correctly merges chunked uploads, calculates - average upload speed per file and total bandwidth used for uploads. - E; - a href => '/download/code/mdc2-parse.pl', 'source'; - end; - - h2 'vinfo.c'; - p; - lit <<' E;'; - November 2009. The public VNDB API was designed to be - easy to use even from low level languages. I wrote this simple program to see how much - work it would be to use the API in C, and as example code for anyone wishing to use the - API for something more useful. Read the comments for more info. - E; - a href => '/download/code/vinfo.c', 'source'; - end; - - h2 'json.mll'; - p; - lit <<' E;'; - December 2010. I was writing a client for the public VNDB API in OCaml and needed a JSON - parser/generator. Since I wasn't happy with the currently available - solutions - they try to do too many things and have too many dependencies - - I decided to write a minimal JSON library myself. - E; - a href => 'http://g.blicky.net/serika.git/tree/json.mll', 'source'; - end; - - h2 'ncdc-transfer-stats'; - p; - lit <<' E;'; - September 2011. ncdc gained transfer logging features, - and I wrote a quick Perl script to fetch some simple statistics from it. - E; - a href => 'http://p.blicky.net/agolr', 'source'; - end; - - h2 'ncdc-share-report'; - p; - lit <<' E;'; - December 2011. Playing around with the Go programming language, I wrote - another transfer log parser and statistics generator for ncdc. - latest source - (0.1) - E; - end; - $s->htmlFooter; -} - - -sub dumpdemo { - my $s = shift; - $s->htmlHeader(title => 'Demos', page => 'dump', tab => 'demo'); - p; - lit <<' E;'; - Yes, I realise that the title is plural, suggesting there's more than one demo. That is - not quite true, unfortunately. The reason I chose to use plural form is simply in the - hopes that I do, in fact, write more demos, and that this page will actually get more - content in the future. I still happen to be a huge fan of the - demoscene, and still wish to contribute to it... if only I could find the time and - self-discipline to do so. In the meanwhile, here's one demo I did write some time ago: - E; - end; - - h2 'Blue Cubes'; - img src => '/img/bluecubes.png', style => 'float: right', alt => 'Blue Cubes'; - p; - lit <<' E;'; - August 2006. My first demo - or more exact: intro. Blue Cubes is a 64kB intro written in - OpenGL/SDL with Linux as target OS. I wrote this intro within 10 days without any prior - experience in any of the fields of computer generated graphics or music. So needlessly to - say, it sucks. I am ashamed even of the thought of releasing it at a respectable demoparty - like Evoke. Still, it didn't feel I was unwelcome, - I did actually receive three prices: 3rd price in the 64k competition (there were only 3 - actual entries, but oh well), best non-windows 64k intro (it was the only one in the - competition), and the Digitale Kultur newcomer award, which actually is something to be - proud of, I guess. - E; - br; br; - a href => '/download/yorhel~bluecubes.zip', 'download'; - txt ' - '; - a href => 'http://scene.org/file.php?file=/parties/2006/evoke06/in64/yorhel_bluecubes.zip&fileinfo', 'mirror'; - txt " (includes linux binaries, windows port, and sources)"; br; - a href => 'http://pouet.net/prod.php?which=25866', 'pouet'; txt ' - '; - a href => 'http://demoscene.tv/page.php?id=172&lang=uk&vsmaction=view_prod&id_prod=12653', 'demoscene.tv'; txt ' - '; - a href => 'http://demozoo.org/productions/32253', 'demozoo'; - end; - $s->htmlFooter; -} - - -sub dumpawshrink { - my $s = shift; - $s->htmlHeader(title => 'AWStats data file shrinker', page => 'dump', tab => 'awshrink'); - p; - txt 'People who run AWStats on large log files have most likely noticed: the data files can ' - .'grow quite large, resulting in both a waste of disk space and longer page generation ' - .'times for the AWStats pages. I wrote a small script that analyzes these data files and ' - ."can remove any information you think is unnecessary."; - br; br; - b 'Download: '; - a href => '/download/code/awshrink', 'awshrink'; - txt ' (copy to /usr/bin to install)'; - end; - h2 'Important'; - txt 'Do NOT use this script on data files that are not completed yet (i.e. data files of the ' - .'month you\'re living in). This will result in inaccurate sorting of visits, pages, ' - .'referers and whatever other list you\'re shrinking. Also, keep in mind that this is just ' - .'a fast written perl hack, it is by no means fast and may hog some memory while shrinking ' - .'data files.'; - - h2 'Usage'; - pre class => 'code', q|awshrink [-c -s] [-SECTION LINES] [..] datafile - -s Show statistics - -c Overwrite datafile instead of writing to a backupfile (datafile~) - -SECTION LINES - Shrink the selected SECTION to LINES lines. (See example below)|; - - h2 'Typical command-line usage'; - p 'While awshrink is most useful for monthly cron jobs, here\'s an example of basic command line ' - .'usage to demonstrate what the script can do:'; - pre class => 'code', join "\n", grep s/^\s{4}//||1, split /\n/, <<' E;'; - $ wc -c awstats122007.nedtlyrics.txt - 29916817 awstats122007.nedtlyrics.txt - - $ awshrink -s awstats122007.nedtlyrics.txt - Section Size (Bytes) Lines - SCREENSIZE* 74 0 - WORMS 131 0 - EMAILRECEIVER 135 0 - EMAILSENDER 143 0 - CLUSTER* 144 0 - LOGIN 155 0 - ORIGIN* 178 6 - ERRORS* 229 10 - SESSION* 236 7 - FILETYPES* 340 12 - MISC* 341 10 - GENERAL* 362 8 - OS* 414 29 - SEREFERRALS 587 34 - TIME* 1270 24 - DAY* 1293 31 - ROBOT 1644 40 - BROWSER 1992 127 - DOMAIN 2377 131 - UNKNOWNREFERERBROWSER 5439 105 - UNKNOWNREFERER 20585 317 - SIDER_404 74717 2199 - PAGEREFS 130982 2500 - KEYWORDS 288189 27036 - SIDER 1058723 25470 - SEARCHWORDS 5038611 157807 - VISITOR 23285662 416084 - * = not shrinkable - - $ awshrink -s -c -VISITOR 100 -SEARCHWORDS 100 -SIDER 100 awstats122007.nedtlyrics.txt - Section Size (Bytes) Lines - SCREENSIZE* 74 0 - WORMS 131 0 - EMAILRECEIVER 135 0 - EMAILSENDER 143 0 - CLUSTER* 144 0 - LOGIN 155 0 - ORIGIN* 178 6 - ERRORS* 229 10 - SESSION* 236 7 - FILETYPES* 340 12 - MISC* 341 10 - GENERAL* 362 8 - OS* 414 29 - SEREFERRALS 587 34 - TIME* 1270 24 - DAY* 1293 31 - ROBOT 1644 40 - BROWSER 1992 127 - SEARCHWORDS 2289 100 - DOMAIN 2377 131 - SIDER 3984 100 - UNKNOWNREFERERBROWSER 5439 105 - VISITOR 5980 100 - UNKNOWNREFERER 20585 317 - SIDER_404 74717 2199 - PAGEREFS 130982 2500 - KEYWORDS 288189 27036 - * = not shrinkable - - $ wc -c awstats122007.nedtlyrics.txt - 546074 awstats122007.nedtlyrics.txt - E; - $s->htmlFooter; -} - - -sub dumpgrenamr { - my $s = shift; - $s->htmlHeader(title => 'GTK+ Mass File Renamer', page => 'dump', tab => 'grenamr'); - p; - lit <<' E;'; - GRenamR is a GTK+ mass file renamer written in Perl, the functionality is insipred - by the rename - command that comes with a Perl module.
-
- GRenamR allows multiple file renaming using perl expressions. You can see the effects - of your expression while typing it, and can preview your action before applying them. - The accepted expressions are mostly the same as the rename command (see above paragrah): - your expression will be evaluated with $_ set to the filename, and any modifications - to this variable will result in the renaming of the file. There's one other variable - that the rename command does not have: $i, which reflects the file number (starting from - 0) in the current list. This allows expressions such as as $_=sprintf'%03d.txt',$i. - E; - br; br; - b 'Download: '; - a href => '/download/code/grenamr-0.1.pl', 'grenamr'; - txt " (copy to /usr/bin/ to install)"; br; - txt "Requires the Gtk2 Perl module (most distributions have a perl-gtk2 package)"; br; - end; - - h2 'Example expressions'; - table; - Tr; td style => 'width: 40%'; code 'y/A-Z/a-z/'; txt ' or '; code '$_=lc'; end; td 'Convert filenames to lowercase'; end; - Tr; td; code 's/\.txt$/.utf8/'; end; td "Change all '.txt' extensions to '.utf8'"; end; - Tr; td; code q|s/([0-9]+)/sprintf'%04d',$1/eg|; end; td 'Zero-pad all numbers in filenames'; end; - Tr; td; code q|s/^.+\.jpg$/sprintf'%03d.jpg',$i+1/e|; end; td 'Replace each image filename with a zero-padded number starting from 1'; end; - end; - - h2 'Caveats / bugs / TODO'; - ul; - li q|Calling functions as 'sleep' or 'exit' in the expression will trash the program|; - li q|It's currently not possible to manually order the file list, so $i is not useful in every situation|; - li q|It's currently not possible to manually rename files or exclude items from being effected by the expression|; - li; lit q|The expression isn't executed in the opened directory, so things like - -X won't work|; end; - end; - - h2 'Screenshot'; - img src => '/img/grenamr.png', alt => 'GRenamR'; - $s->htmlFooter; -} - -sub dumpnccolour { - my $s = shift; - $s->htmlHeader(title => 'Colours in NCurses', page => 'dump', tab => 'nccolour'); - p; - lit <<' E;'; - I decided to do some experimentation with how the colours defined in - ncurses are actually displayed in terminals, what the effects are of - combining these colours with other attributes, and how colour schemes of a - terminal can affect the displayed colours. To this end I wrote a small c - file and ran it in different terminals and different configurations. Note - that only the 8 basic NCurses colours are tested, the more flexible - init_color() function is not used. - E; - br;br; - b 'Source code: '; - a href => '/download/code/nccolour.c', 'nccolour.c'; - txt " ("; a href => 'http://p.blicky.net/xu35c', 'syntax highlighed version'; txt ')'; - br; - txt 'Some screenshots can be found below, but more screenshots are always - welcome! Please send your (.png) screenshots to projects@yorhel.nl.'; - end; - - h2 'Notes / observations'; - ul; - li 'The most obvious conclusion: the displayed colours do not have the exact - same colour value in every terminal. Some terminals also allow users to - modify these colours.'; - li 'You can not assume that the default foreground or background colour can - be represented by one of the 8 basic colours defined by NCurses.'; - li 'Specifying -1 as colour, to indicate the default foreground or - background colour, seems to work fine in any terminal tested so far.'; - li 'All tested terminals render the foreground colour in a lighter shade - when the A_BOLD attribute is set. This does not apply to the background - colour. The result of this is that the text becomes visible when using - A_BOLD when the foreground and background colour are set to the same - value.'; - li 'Unfortunately, not all terminals are configured in such a way that all - possible colours are readable. So as a developer you\'ll still have to - support configurable colour schemes in your ncurses application. :-('; - li 'On most terminals, setting the foreground and background colour to the - same value without applying the A_BOLD attribute will make the text - invisible. Don\'t rely on this, however, as this is not the case on OS X.'; - end; - - h2 'Full screenshot'; - p; - txt 'To avoid wasting unecessary space, the comparison screenshots below - only display the colour table. Here\'s a screenshot of the full output of - the program, which also explains what each column means.'; - br; - img style => 'margin: 10px 0 0 25px', src => "/img/nccol-full.png"; - end; - - h2 'Screenshots'; - my @img = ( - 'rox-b' => 'Arch Linux, Roxterm, Default color scheme', - 'rox-w' => 'Arch Linux, Roxterm, GTK color scheme', - 'rox-t' => 'Arch Linux, Roxterm, Tango color scheme', - 'rox-c' => 'Arch Linux, Roxterm, Modified Tango color scheme', - xterm => 'Arch Linux, xterm (default settings)', - ubuntu => 'Ubuntu 11.10, Gnome-terminal', - debian => 'Debian Squeeze, VT (default settings)', - fbsd => 'FreeBSD, VT (default settings)', - 'osx-terminal' => 'Mac OS X, Terminal', - 'osx-iterm2' => 'Mac OS X, iTerm2', - ); - while(@img) { - my($n, $t) = (shift(@img), shift(@img)); - txt $t; - br; - img style => 'margin: 5px 0 10px 25px; border: 1px solid #999', src => "/img/nccol-$n.png", alt => "NCurses colours on $t"; - br; - } - - $s->htmlFooter; -} - - - - sub notfound { my $s = shift; my $u = lc $s->reqPath; @@ -923,141 +130,34 @@ sub notfound { ); return $s->resRedirect("/$u", 'perm') if $u =~ s/\/$//; $s->resStatus(404); - $s->htmlHeader(title => 'Page Not Found'); + $s->htmlHeader(title => '404', page => '404'); + txt 'Sorry, there is no page at this URI. Try one of the links from the menu to find the page you are looking for.'; $s->htmlFooter; } - -# U T I L I T Y M E T H O D S - package TUWF::Object; use TUWF ':html'; -sub htmlHeader { - my($self, %o) = @_; - $o{page} ||= ''; - $o{tab} ||= ''; - html; - head; - title $o{title}; - style type => 'text/css'; - lit $self->css; - end; - end; - body; - div id => 'menu'; - a href => '/', !$o{page} ? (class => 'sel') : (), 'home'; txt ' '; - a href => '/ncdu', $o{page} eq 'ncdu' ? (class => 'sel') : (), 'ncdu'; txt ' '; - a href => '/ncdc', $o{page} eq 'ncdc' ? (class => 'sel') : (), 'ncdc'; txt ' '; - a href => '/tuwf', $o{page} eq 'tuwf' ? (class => 'sel') : (), 'tuwf'; txt ' '; - a href => '/doc', $o{page} eq 'doc' ? (class => 'sel') : (), 'articles'; txt ' '; - a href => '/dump', $o{page} eq 'dump' ? (class => 'sel') : (), 'code dump'; - end; - if($o{page} eq 'ncdu') { - div id => 'mtabs'; - a href => '/ncdu', !$o{tab} ? (class => 'sel') : (), 'main'; txt ' '; - a href => '/ncdu/man', $o{tab} eq 'man' ? (class => 'sel') : (), 'manual'; txt ' '; - a href => '/ncdu/changes', $o{tab} eq 'changes' ? (class => 'sel') : (), 'changelog'; txt ' '; - a href => '/ncdu/scr', $o{tab} eq 'scr' ? (class => 'sel') : (), 'screenshots'; txt ' '; - a href => 'http://sourceforge.net/tracker/?group_id=200175', 'bug tracker (sf)'; - end; - } - if($o{page} eq 'ncdc') { - div id => 'mtabs'; - a href => '/ncdc', !$o{tab} ? (class => 'sel') : (), 'main'; txt ' '; - a href => '/ncdc/faq', $o{tab} eq 'faq' ? (class => 'sel') : (), 'Q&A'; txt ' '; - a href => '/ncdc/man', $o{tab} eq 'man' ? (class => 'sel') : (), 'manual'; txt ' '; - a href => '/ncdc/changes', $o{tab} eq 'changes' ? (class => 'sel') : (), 'changelog'; txt ' '; - a href => '/ncdc/scr', $o{tab} eq 'scr' ? (class => 'sel') : (), 'screenshots'; txt ' '; - end; - } - if($o{page} eq 'tuwf') { - div id => 'mtabs'; - a href => '/tuwf', !$o{tab} ? (class => 'sel') : (), 'main'; txt ' '; - a href => '/tuwf/man', $o{tab} eq 'man' ? (class => 'sel') : (), 'manual'; txt ' '; - end; - } - if($o{page} eq 'doc' && $o{tab}) { - use utf8; - div id => 'mtabs', style => 'margin-right: 620px'; - a href => '/doc', '« article index'; - end; - } - if($o{page} eq 'dump') { - div id => 'mtabs'; - a href => '/dump', !$o{tab} ? (class => 'sel') : (), 'misc'; txt ' '; - a href => '/demo', $o{tab} eq 'demo' ? (class => 'sel') : (), 'demos'; txt ' '; - a href => '/dump/awshrink', $o{tab} eq 'awshrink' ? (class => 'sel') : (), 'awshrink'; txt ' '; - a href => '/dump/grenamr', $o{tab} eq 'grenamr' ? (class => 'sel') : (), 'grenamr'; txt ' '; - a href => '/dump/nccolour', $o{tab} eq 'nccolour' ? (class => 'sel') : (), 'nc-colour'; - end; - } - div id => 'main'; - h1 $o{title}; -} - -sub htmlFooter { - end 'div'; - p id => 'footer'; - lit 'feedback » '; - a href => 'mailto:projects@yorhel.nl', 'projects@yorhel.nl'; - br; - a href => 'http://yorhel.nl', 'yh'; - txt ' - '; - a href => 'http://g.blicky.net', 'git'; - txt ' - '; - a href => 'http://svn.blicky.net', 'svn'; - txt ' - '; - a href => 'http://pgp.mit.edu:11371/pks/lookup?search=0x8c2739fa', 'pgp'; - end; - end 'body'; - end 'html'; -} - - -sub htmlDLLink { - my($s, $f, $m) = @_; - a href => "/download/$f", $m||$f; - b class => 'sig'; txt '['; - a href => "/download/$f.asc", 'PGP'; txt '-'; - a href => "/download/$f.sha1", 'SHA1'; txt '-'; - a href => "/download/$f.md5", 'MD5'; txt ']'; - end; -} - - -sub htmlChangeLog { - my ($s, $p) = @_; - - open my $F, '<', "$ROOT/dat/$p-changelog" or die $!; - ul style => 'margin-left: 0'; - for my $v (split /\n\n/, join '', <$F>) { - $v =~ s/^([0-9]+\.[0-9]+)\s+-\s+([0-9]{4}-[0-9]{2}-[0-9]{2})//; - li style => 'list-style-type: none;'; - b $1; - txt " - $2 - "; - $s->htmlDLLink("$p-$1.tar.gz"); - br; - ul; - for (split(/\r?\n\s+-\s+/, $v)) { - s/[\r\n\s]{2,50}/ /; - li $_ if $_; - } - end; - br; - end; - } - end; - close $F; -} - +# Accepts two special formatting codes: +# [dllink $file $title] +# [img $class $file $alt] sub htmlPOD { - my($s, $file) = @_; + my($s, $file, $toc) = @_; require Pod::Simple::HTML; - require Encode; # not really necessary, since the docs are ASCII anyway + + # The usual output escaping function is terribly stupid + { + no warnings 'redefine', 'once'; + *Pod::Simple::HTML::esc = sub { + return map TUWF::XML::html_escape($_), @_ if wantarray; + return TUWF::XML::html_escape($_[0]) if defined wantarray; + $_ = TUWF::XML::html_escape($_) for(@_); + return @_; + }; + } my $p = Pod::Simple::HTML->new(); my $html = ''; @@ -1073,55 +173,173 @@ sub htmlPOD { 'TUWF::Response' => '/tuwf/man/response', 'TUWF::XML' => '/tuwf/man/xml', }; - $p->parse_file($file); - h1 'Table of Contents'; - lit Encode::decode_utf8($p->index_as_html()); - div class => 'pod'; - lit Encode::decode_utf8($html); - end; + open(my $F, '<:utf8', $file =~ /^\// ? $file : "$ROOT/dat/$file") or die $!; + $p->parse_file($F); + close $F; + lit $p->index_as_html() if $toc; + $html =~ s/\[dllink ([^ ]+)(?: ([^>]+))?\]/$s->genDLLink($1, $2)/eg; + $html =~ s/\[img ([^ ]+) ([^ ]+) ([^\]]*)\]/$3/g; + #$html =~ s{\[html\](.*)É}{(my $h = $1) =~ s/\>/>/g; $h =~ s/\</%s' + .'pgp-sha1-md5', + $f, $f||$m; +} + + +sub htmlHeader { + my $s = shift; + my %o = (page => '', sec => '', sec2 => '', @_ ); + html; + head; + style type => 'text/css'; + $s->printCSS; + end; + title $o{title}; + end; + body; + div id => 'body'; + div id => 'uglyhack', ' '; + div id => 'left'; + h1 class => 'title', '~ Menu ~'; + $s->htmlMenu(%o); + div class => 'notes'; + a href => 'mailto:projects@yorhel.nl', 'projects@yorhel.nl'; + br; a href => 'http://yorhel.nl', 'yh'; + txt ' - '; a href => 'http://g.blicky.net', 'git'; + txt ' - '; a href => 'http://svn.blicky.net', 'svn'; + txt ' - '; a href => 'http://pgp.mit.edu:11371/pks/lookup?search=0x8c2739fa', 'pgp'; + end; + end 'div'; + div id => 'main'; + h1 class => 'title', $o{title}; +} + + +sub htmlFooter { + end 'div'; # main + div id => 'anotherhack', ' '; + end 'div'; # body + end 'body'; + end 'html'; +} + + +sub htmlMenu { + my($s, %o) = @_; + my $m = sub { + li; + a href => $_[0], $_[2]?(class=>'menusel'):(), $_[1]; + if($_[2] && $_[3]) { + ul; + $_[3]->(); + end; + } + end; + }; + ul; + $m->('/', 'Home', !$o{page}); + $m->('/ncdu', 'Ncdu', $o{page} eq 'ncdu', sub { + $m->('/ncdu', 'Info', !$o{sec}); + $m->('/ncdu/man', 'Manual', $o{sec} eq 'man'); + $m->('/ncdu/changes', 'Changelog', $o{sec} eq 'changes'); + $m->('/ncdu/scr', 'Screenshots', $o{sec} eq 'scr'); + $m->('http://sourceforge.net/tracker/?group_id=200175', 'Bug tracker (ext)'); # TODO: wikipedia-style extern image or something + }); + $m->('/ncdc', 'Ncdc', $o{page} eq 'ncdc', sub { + $m->('/ncdc', 'Info', !$o{sec}); + $m->('/ncdc/faq', 'Q&A', $o{sec} eq 'faq'); + $m->('/ncdc/man', 'Manual', $o{sec} eq 'man'); + $m->('/ncdc/changes', 'Changelog', $o{sec} eq 'changes'); + $m->('/ncdc/scr', 'Screenshots', $o{sec} eq 'scr'); + }); + $m->('/tuwf', 'TUWF', $o{page} eq 'tuwf', sub { + $m->('/tuwf', 'Info', !$o{sec}); + $m->('/tuwf/man', 'Manual', $o{sec} eq 'man', sub { + $m->('/tuwf/man', 'Main', !$o{sec2}); + $m->('/tuwf/man/db', '::DB', $o{sec2} eq 'db'); + $m->('/tuwf/man/misc', '::Misc', $o{sec2} eq 'misc'); + $m->('/tuwf/man/request', '::Request', $o{sec2} eq 'request'); + $m->('/tuwf/man/response', '::Response', $o{sec2} eq 'response'); + $m->('/tuwf/man/xml', '::XML', $o{sec2} eq 'xml'); + }); + }); + $m->('/doc', 'Articles', $o{page} eq 'doc'); + $m->('/dump', 'Code dump', $o{page} eq 'dump', sub { + $m->('/dump', 'Misc.', !$o{sec}); + $m->('/demo', 'Demos', $o{sec} eq 'demo'); + $m->('/dump/awshrink','AWShrink', $o{sec} eq 'awshrink'); + $m->('/dump/grenamr', 'Grenamr', $o{sec} eq 'grenamr'); + $m->('/dump/nccolour','NC-Colour', $o{sec} eq 'nccolour'); + }); + end; +} + + +sub printCSS { + # font-face code from http://fonts.googleapis.com/css?family=Buenard:700,400 + lit <<' E;'; + @font-face { + font-family: 'Buenard'; + font-style: normal; + font-weight: bold; + src: local('Buenard Bold'), local('Buenard-Bold'), url('http://themes.googleusercontent.com/static/fonts/buenard/v2/8T0adwz_RAtKrxbccQmEFC3USBnSvpkopQaUR-2r7iU.ttf') format('truetype'); + } + @font-face { + font-family: 'Buenard'; + font-style: normal; + font-weight: 400; + src: local('Buenard'), local('Buenard-Regular'), url('http://themes.googleusercontent.com/static/fonts/buenard/v2/UUYHasP8umGDjV-yeZf27Q.ttf') format('truetype'); + } + html,body { background: #ccc; text-align: center; height: 100% } + * { margin: 0; padding: 0; font: 15px 'Buenard',serif; color: #222 } + #body { text-align: left; width: 800px; margin: 0 auto; background: #fff; border-left: 1px solid #aaa; border-right: 1px solid #aaa; min-height: 100% } + #uglyhack { height: 30px } + #anotherhack { clear: left } + #main, #left { float: left; border-top: 0px dashed #aaa, margin-top: 50px } + #left { width: 130px; border-right: 1px dashed #aaa; padding: 20px 10px } + #main { width: 609px; padding: 12px 20px } + #left h1 { font-weight: bold; text-align: center; font-size: 15px } + #left li { margin: 20px 0 0 10px; list-style-type: none } + #left li a { text-decoration: none; display: block; width: 120px; border-bottom: 1px solid #fff } + #left li a:hover { border-bottom: 1px dashed #aaa } + #left li li { margin-top: 10px } + #left li li a { width: 110px } + #left li li li { margin-top: 2px } + #left li li li a { width: 100px } + #left .menusel { color: #03a } + #left .notes { margin-top: 50px; text-align: center } + #left .notes, #left .notes a { font-size: 12px; text-decoration: none } + #left .notes a:hover { text-decoration: underline } + img.right { float: right; margin: 0 0 5px 10px } + .indexgroup { margin: 30px 10px 0px 20px } + .indexgroup li { list-style-type: none; margin-left: 0px } + .indexgroup li li { margin-left: 20px } + .indexgroup + .dummyTopAnchor + p { margin-top: 20px } + b { font-weight: bold } + h1.title { margin-top: 0; font-size: 25px } + h1 { margin-top: 50px; } + h2 { margin-top: 25px; } + h1, h1 a { font-size: 19px; color: #000; margin-bottom: 5px; text-decoration: none } + h2, h2 a { font-size: 16px; color: #000; margin-bottom: 1px; text-decoration: none } + li { margin-left: 35px; margin-right: 15px; text-align: justify } + p { margin: 3px 15px 13px 15px; text-align: justify } + p + ul, p + ol { margin-top: -10px } + pre { padding-left: 0 } pre, code, pre b { font: 11px monospace; } pre b { font-weight: bold } - pre.code, .pod pre { background: #111; border: 1px dotted #666; margin: 5px 10px; display: block; padding: 5px; } - span { display: block; font-size: 12px; margin: 3px 10px 10px 30px } - .indexgroup ul { margin-left: 5px; list-style-type: none } - .indexgroup ul ul { margin-left: 20px } - .pod p { margin: 3px 15px 13px 15px; text-align: justify } - .pod ul, .pod ol { margin-left: 35px } - .pod ul li, .pod ol li { margin-right: 15px; text-align: justify } - .pod pre { padding-left: 0 } - .pod h1 a, .pod h2 a { color: #888; font-weight: bold; font-size: 19px } - .pod h1 { margin-top: 50px } - .pod h2 a { font-size: 16px } - .pod dd { margin-left: 15px } - .pod dt a { color: #888 } - .pod dt { margin-left: 10px } - .pod i { font-style: italic } -__ + pre { background: #f5f5f5; border: 1px dotted #aaa; margin: 5px 10px; display: block; padding: 5px 5px 5px 0; } + dd { margin-left: 15px } + dt a { color: #333 } + dt { margin-left: 10px } + i { font-style: normal } /* TODO */ + .sig { vertical-align: super } + .sig, .sig a { font-size: 12px; color: #333; text-decoration: none } + E; } - -