From 94ae88d4b9402f2b0e0a9c31d27c8dce95d5acf2 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 20 Feb 2013 11:22:52 +0100 Subject: [PATCH] Misc. minor fixes, improvements and updates --- dat/globster | 43 +++++++++++++++++++++++++++++++------------ dat/globster-ctl | 1 + dat/globster-daemon | 1 + dat/globster-launch | 1 + dat/ncdc | 4 ++-- dat/ncdc-faq | 26 +++++++++++++++++--------- dat/ncdu-jsonfmt | 5 ++--- dat/sqlaccess | 6 +++--- index.cgi | 32 ++++++++++++++++++++++++++++---- style.css | 4 +++- 10 files changed, 89 insertions(+), 34 deletions(-) create mode 120000 dat/globster-ctl create mode 120000 dat/globster-daemon create mode 120000 dat/globster-launch diff --git a/dat/globster b/dat/globster index 449b7a5..974b57b 100644 --- a/dat/globster +++ b/dat/globster @@ -22,25 +22,33 @@ There are no tarballs at the moment. You'll have to get it from the git repo: autoreconf -i ./configure make + sudo make install + +When doing a C to update your version later on, make sure to follow +up with a C to get the right dependencies, too. The git repo is available for L and can also be L. -(Note: If you have a git version before 1.6.5, the C<--recursive> argument -isn't going to work. You'll have to type C and C after checking out the repo. But chances are that your GnuTLS -is waaay too old as well and Globster won't currently build, anyway.) - =head2 Requirements Globster can be compiled with a (moderately recent) GCC or clang. You'll need the following libraries: L and -L 3.0+. +L. If your GnuTLS is too old (<= 2.12), you also need +libgcrypt. The globsterctl script requires Perl and the Net::DBus module. + +On Debian and Ubuntu, that boils down to the following: + + apt-get install git make gcc libc-dev automake autoconf\ + pkg-config libdbus-1-dev libgnutls-dev libnet-dbus-perl + +And for Arch Linux: + + pacman -S base-devel perl-net-dbus I've only tested things on Linux (glibc and L), but I intent to support more kinda-sane POSIX systems in the future as well. -The requirement of GnuTLS 3.0+ will be relaxed later on. On the other hand, Globster will no doubt require some more libraries as more basic features are being implemented. And, yes, I we will get static binaries! @@ -71,10 +79,22 @@ to join the development hub and bug me for help: C. I did already write some L. -There are at this point no scripts or interfaces for Globster available. I'd -love to have at least a simple console client (a weechat or irssi plugin?) and -perhaps a web-based interface. But other solutions are nice, too. Who's going -to write all that, you ask? Erm... well... You, perhaps? :-) +There are at this point not many scripts or interfaces available for Globster: + +=over + +=item * L - A control script for the daemon, included in the git repo. + +=item * L - An RSS / Atom notification script. + +=item * L - A hub chat link script. More useful as an example than anything else. + +=back + +There's more to come. I'd love to have at least a convenient console client (a +weechat or irssi plugin? An ncdc fork?) and perhaps a web-based interface. But +other stuff is welcome, too. Who's going to write all that, you ask? Erm... +well... You, perhaps? :-) =head2 Final notes @@ -83,7 +103,6 @@ and available under a liberal MIT license. Globster incorporates code from L, -L, L, L and L. diff --git a/dat/globster-ctl b/dat/globster-ctl new file mode 120000 index 0000000..ad906b4 --- /dev/null +++ b/dat/globster-ctl @@ -0,0 +1 @@ +../../globster/doc/globsterctl.pod \ No newline at end of file diff --git a/dat/globster-daemon b/dat/globster-daemon new file mode 120000 index 0000000..99648ed --- /dev/null +++ b/dat/globster-daemon @@ -0,0 +1 @@ +../../globster/doc/globster.pod \ No newline at end of file diff --git a/dat/globster-launch b/dat/globster-launch new file mode 120000 index 0000000..3421842 --- /dev/null +++ b/dat/globster-launch @@ -0,0 +1 @@ +../../globster/doc/globster-launch.pod \ No newline at end of file diff --git a/dat/ncdc b/dat/ncdc index 3ee184d..af4dabe 100644 --- a/dat/ncdc +++ b/dat/ncdc @@ -80,7 +80,7 @@ Common features all modern DC clients (should) have: =item * File list browsing, -=item * Multi-source and TTH-checked file downloading, +=item * TTH-checked file downloading, =item * Searching for files, @@ -125,7 +125,7 @@ clients, but which ncdc doesn't do. Yet. =over -=item * Segmented downloading, +=item * Segmented/parallel downloading, =item * IPv6, diff --git a/dat/ncdc-faq b/dat/ncdc-faq index 5b1ea60..4c1ab54 100644 --- a/dat/ncdc-faq +++ b/dat/ncdc-faq @@ -71,6 +71,14 @@ The user list has three boolean flags: Bperator, B

assive, and whether the =head1 Troubleshooting +=head2 The Alt- keys don't work! + +The ncdc manual refers to the "meta" key as Alt-something, but the actual key +to use tends to differ depending on your setup. In almost every setup, you can +press and release the 'Esc' key as a replacement for Alt-something. If you're +on OS X, L +may be helpful. + =head2 This "Generating certificates..." is taking ages! When starting up ncdc for the first time, it will need to generate a TLS @@ -138,15 +146,6 @@ monthly cron job. =head1 Can ncdc... -=head2 Can ncdc use the hash data or configuration from an existing DC++ installation? - -No, ncdc uses its own configuration and hash storage directory. However, on -popular demand I could write a conversion utility to transfer the hash data -from other clients to ncdc's format. (Contrary to my expectations, there hasn't -been much interest in such a tool ever since I wrote this FAQ entry a year ago. -So I guess this isn't really a FAQ). - - =head2 Can ncdc run in the background / as a daemon? As with most ncurses applications: no. At least, it does not have this @@ -170,3 +169,12 @@ Nothing like that is included in the release yet, but there is a simple Perl script available: L, and a short Go program: L. + +=head2 Can ncdc use the hash data or configuration from an existing DC++ installation? + +No, ncdc uses its own configuration and hash storage directory. However, on +popular demand I could write a conversion utility to transfer the hash data +from other clients to ncdc's format. (Contrary to my expectations, there hasn't +been much interest in such a tool ever since I wrote this FAQ entry two years +ago. So I guess this isn't really a FAQ). + diff --git a/dat/ncdu-jsonfmt b/dat/ncdu-jsonfmt index 880b2b7..26ce662 100644 --- a/dat/ncdu-jsonfmt +++ b/dat/ncdu-jsonfmt @@ -7,7 +7,7 @@ feature. =head2 Top-level object -Ncdu used L notation as its data format. The top-level +Ncdu uses L notation as its data format. The top-level object is an array: [ @@ -80,8 +80,7 @@ the full absolute filesystem path, e.g. C<"/media/harddrive">. For any items below the top-level directory, the name should be just the name of the item. The name will be in the same encoding as reported by the filesystem (i.e. -L). The name may may not exceed 32768 -bytes. +L). The name may not exceed 32768 bytes. =item asize diff --git a/dat/sqlaccess b/dat/sqlaccess index b8ad6f1..f448803 100644 --- a/dat/sqlaccess +++ b/dat/sqlaccess @@ -49,9 +49,9 @@ Since SQLite 3.3.1, which was released in early 2006, it is possible to move a single database connection along multiple threads. Doing this with older versions is not advisable, as explained in L. But even with 3.3.1 and later there is -an annoying restriction: A connection can only if be passed to another thread -when any outstanding statements are closed and finalized. In practice this -means that it is not possible to keep a prepared statement in memory for later +an annoying restriction: A connection can only be passed to another thread when +any outstanding statements are closed and finalized. In practice this means +that it is not possible to keep a prepared statement in memory for later executions. Since SQLite 3.5.0, released in 2007, a single SQLite connection can be used diff --git a/index.cgi b/index.cgi index fc4eb02..34e125f 100755 --- a/index.cgi +++ b/index.cgi @@ -82,6 +82,9 @@ TUWF::register( qr{ncdc/changes} => sub { changelog(shift, 'ncdc-changelog', 'ncdc', 'ncdc', 'changes', 'Ncdc Changelog') }, qr{globster} => sub { podpage(shift, 'globster', 'globster', '', 'The Globster Direct Connect Client') }, qr{globster/api} => sub { podpage(shift, 'globster-api', 'globster', 'api', 'The Globster D-Bus API', 1) }, + qr{globster/daemon} => sub { podpage(shift, 'globster-daemon', 'globster', 'daemon', 'The globster(1) Man Page', 1) }, + qr{globster/launch} => sub { podpage(shift, 'globster-launch', 'globster', 'launch', 'The globster-launch(1) Man Page', 1) }, + qr{globster/ctl} => sub { podpage(shift, 'globster-ctl', 'globster', 'ctl', 'The globsterctl(1) Man Page', 1) }, qr{tuwf} => sub { podpage(shift, 'tuwf', 'tuwf', '', 'The Ultimate Website Framework') }, qr{tuwf/man(?:/(db|misc|request|response|xml))?} => \&tuwfmanual, qr{tuwf/changes} => sub { changelog(shift, 'tuwf-changelog', 'TUWF', 'tuwf', 'changes', 'TUWF Changelog') }, @@ -301,7 +304,7 @@ sub bug_item { $s->htmlHeader(title => "\u$p: $last->{summary}", page => $p, sec => 'bug'); br; a href => "/$p/bug", 'Back to the bug index'; br; br; $is->htmlItem($item); - $is->htmlForm($last, "/$p/bug/post") if !$last->{closed}; + $is->htmlForm($last, "/$p/bug/post"); br; a href => "/$p/bug", 'Back to the bug index'; br; br; $s->htmlFooter; } @@ -322,8 +325,8 @@ sub htmlPOD { my($s, $file, $toc) = @_; require Pod::Simple::HTML; - # The usual output escaping function is terribly stupid { + # 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; @@ -331,6 +334,18 @@ sub htmlPOD { $_ = TUWF::XML::html_escape($_) for(@_); return @_; }; + + # Let's override the manual page links + *Pod::Simple::HTML::do_man_link = sub { + my $l = $_[1]->attr('to'); + my %l = qw| + globsterctl(1) /globster/ctl + globster-launch(1) /globster/launch + globster(1) /globster/daemon + globster-api(7) /globster/api + |; + return $l{$l} || ($l =~ /(.+)\((.)\)/ and "http://manned.org/$1.$2"); + }; } my $p = Pod::Simple::HTML->new(); @@ -355,6 +370,9 @@ sub htmlPOD { $html =~ s/\[img ([^ ]+) ([^ ]+) ([^\]]*)\]/$3/g; $html =~ s{\[html\](.*)É}{(my $h = $1) =~ s/\>/>/g; $h =~ s/\</genChanges()/e; + $html =~ s/

( +(?:method|signal|property)) /
$1 /g;
+  #$html =~ s/  (method|signal|property [a-z]) ([a-zA-Z0-9]+)/  $1 $2<\/b>/g;
+  #$html =~ s/  (method|signal|property) /  $1<\/b> /g;
   lit $html;
 }
 
@@ -440,7 +458,8 @@ sub htmlMenu {
   my $m = sub {
     li;
      my $s = $_[0] =~ m{^/([^/]+)} && $o{spec}{$1} && $o{page} ne $1;
-     a href => $_[0], $s?(class=>'special'):$_[2]?(class=>'menusel'):(), $_[1];
+     my @c = ($s?'special':(), $_[2]?'menusel':(), $_[4]?'tiny':());
+     a href => $_[0], @c?(class => join ' ',@c):(), $_[1];
      if($_[3]) {
        ul;
         $_[3]->();
@@ -467,7 +486,12 @@ sub htmlMenu {
     $m->('/ncdc/bug',     'Bug tracker', $o{sec} eq 'bug');
   } elsif($o{page} eq 'globster') {
     $m->('/globster',     'Info',        !$o{sec});
-    $m->('/globster/api', 'API Docs',    $o{sec} eq 'api');
+    $m->('/globster/daemon', 'Commands', (scalar $o{sec} =~ /(daemon|ctl|launch)/), sub {
+      $m->('/globster/daemon', 'globster',        $o{sec} eq 'daemon', undef, 1);
+      $m->('/globster/ctl',    'globsterctl',     $o{sec} eq 'ctl',    undef, 1);
+      $m->('/globster/launch', 'globster-launch', $o{sec} eq 'launch', undef, 1);
+    });
+    $m->('/globster/api', 'API Doc',     $o{sec} eq 'api');
   } elsif($o{page} eq 'tuwf') {
      $m->('/tuwf',         'Info',        !$o{sec});
      $m->('/tuwf/man',     'Manual',      $o{sec} eq 'man', sub {
diff --git a/style.css b/style.css
index 49fd304..43deb22 100644
--- a/style.css
+++ b/style.css
@@ -15,6 +15,7 @@ html,body { background: #ccc; text-align: center; height: 100% }
 #left li a:hover { border-bottom: 1px dashed #aaa }
 #left li li { margin-top: 10px; margin-bottom: 0 }
 #left li li a { width: 90px }
+#left li a.tiny { font-size: 11px }
 #left li a.small { font-size: 10px }
 #left .menusel { color: #03a }
 #left .notes { margin-top: 50px; text-align: center }
@@ -42,9 +43,10 @@ pre { padding-left: 0 }
 pre, code, pre b { font: 11px monospace; }
 pre b { font-weight: bold }
 pre { margin: 0 0 10px 18px; display: block; padding: 0; border-left: 1px dotted #999 }
+pre.interface { border-left: 3px solid #03a; font-size: 12px }
 dd { margin-left: 15px }
 dt a { color: #333 }
-dt { margin-left: 10px }
+dt { margin-left: 15px }
 i { font-style: italic }
 .sig { vertical-align: super }
 .sig, .sig a { font-size: 9px; color: #333; text-decoration: none }