Misc. minor fixes, improvements and updates

This commit is contained in:
Yorhel 2013-02-20 11:22:52 +01:00
parent 2e29709225
commit 94ae88d4b9
10 changed files with 89 additions and 34 deletions

View file

@ -22,25 +22,33 @@ There are no tarballs at the moment. You'll have to get it from the git repo:
autoreconf -i autoreconf -i
./configure ./configure
make make
sudo make install
When doing a C<git pull> to update your version later on, make sure to follow
up with a C<git submodule update> to get the right dependencies, too.
The git repo is available for The git repo is available for
L<online browsing|http://g.blicky.net/globster.git/> and can also be L<online browsing|http://g.blicky.net/globster.git/> and can also be
L<found on github|https://github.com/yorhel/globster>. L<found on github|https://github.com/yorhel/globster>.
(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<git submodule init> and C<git
submodule update> 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 =head2 Requirements
Globster can be compiled with a (moderately recent) GCC or clang. You'll need Globster can be compiled with a (moderately recent) GCC or clang. You'll need
the following libraries: L<libdbus|http://dbus.freedesktop.org/> and the following libraries: L<libdbus|http://dbus.freedesktop.org/> and
L<GnuTLS|http://gnutls.org> 3.0+. L<GnuTLS|http://gnutls.org>. 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<musl|http://www.musl-libc.org>), I've only tested things on Linux (glibc and L<musl|http://www.musl-libc.org>),
but I intent to support more kinda-sane POSIX systems in the future as well. 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 Globster will no doubt require some more libraries as more basic features are
being implemented. And, yes, I<of course> we will get static binaries! being implemented. And, yes, I<of course> we will get static binaries!
@ -71,10 +79,22 @@ to join the development hub and bug me for help: C<adc://dc.blicky.net:2780/>.
I did already write some I did already write some
L<API documentation|http://dev.yorhel.nl/globster/api>. L<API documentation|http://dev.yorhel.nl/globster/api>.
There are at this point no scripts or interfaces for Globster available. I'd There are at this point not many scripts or interfaces available for Globster:
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 =over
to write all that, you ask? Erm... well... You, perhaps? :-)
=item * L<globsterctl|http://dev.yorhel.nl/globster/ctl> - A control script for the daemon, included in the git repo.
=item * L<globster-feedspam.pl|http://p.blicky.net/wpaaf> - An RSS / Atom notification script.
=item * L<globster-mhc.pl|http://p.blicky.net/8y8mv> - 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 =head2 Final notes
@ -83,7 +103,6 @@ and available under a liberal MIT license.
Globster incorporates code from Globster incorporates code from
L<libev|http://software.schmorp.de/pkg/libev.html>, L<libev|http://software.schmorp.de/pkg/libev.html>,
L<libeio|http://software.schmorp.de/pkg/libeio.html>,
L<freetiger|http://klondike.es/freetiger/>, L<freetiger|http://klondike.es/freetiger/>,
L<klib|https://github.com/attractivechaos/klib> and L<klib|https://github.com/attractivechaos/klib> and
L<ylib|https://github.com/yorhel/ylib>. L<ylib|https://github.com/yorhel/ylib>.

1
dat/globster-ctl Symbolic link
View file

@ -0,0 +1 @@
../../globster/doc/globsterctl.pod

1
dat/globster-daemon Symbolic link
View file

@ -0,0 +1 @@
../../globster/doc/globster.pod

1
dat/globster-launch Symbolic link
View file

@ -0,0 +1 @@
../../globster/doc/globster-launch.pod

View file

@ -80,7 +80,7 @@ Common features all modern DC clients (should) have:
=item * File list browsing, =item * File list browsing,
=item * Multi-source and TTH-checked file downloading, =item * TTH-checked file downloading,
=item * Searching for files, =item * Searching for files,
@ -125,7 +125,7 @@ clients, but which ncdc doesn't do. Yet.
=over =over
=item * Segmented downloading, =item * Segmented/parallel downloading,
=item * IPv6, =item * IPv6,

View file

@ -71,6 +71,14 @@ The user list has three boolean flags: B<O>perator, B<P>assive, and whether the
=head1 Troubleshooting =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<this stackoverflow answer|http://stackoverflow.com/a/438892>
may be helpful.
=head2 This "Generating certificates..." is taking ages! =head2 This "Generating certificates..." is taking ages!
When starting up ncdc for the first time, it will need to generate a TLS 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... =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? =head2 Can ncdc run in the background / as a daemon?
As with most ncurses applications: no. At least, it does not have this 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<ncdc-transfer-stats|http://p.blicky.net/agolr>, and a short script available: L<ncdc-transfer-stats|http://p.blicky.net/agolr>, and a short
Go program: L<ncdc-share-report|http://p.blicky.net/h25z8>. Go program: L<ncdc-share-report|http://p.blicky.net/h25z8>.
=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).

View file

@ -7,7 +7,7 @@ feature.
=head2 Top-level object =head2 Top-level object
Ncdu used L<JSON|http://json.org/> notation as its data format. The top-level Ncdu uses L<JSON|http://json.org/> notation as its data format. The top-level
object is an array: 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. 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. The name will be in the same encoding as reported by the filesystem (i.e.
L<readdir()|http://manned.org/readdir.3>). The name may may not exceed 32768 L<readdir()|http://manned.org/readdir.3>). The name may not exceed 32768 bytes.
bytes.
=item asize =item asize

View file

@ -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 single database connection along multiple threads. Doing this with older
versions is not advisable, as explained in L<the SQLite versions is not advisable, as explained in L<the SQLite
FAQ|http://www.sqlite.org/faq.html#q6>. But even with 3.3.1 and later there is FAQ|http://www.sqlite.org/faq.html#q6>. But even with 3.3.1 and later there is
an annoying restriction: A connection can only if be passed to another thread an annoying restriction: A connection can only be passed to another thread when
when any outstanding statements are closed and finalized. In practice this any outstanding statements are closed and finalized. In practice this means
means that it is not possible to keep a prepared statement in memory for later that it is not possible to keep a prepared statement in memory for later
executions. executions.
Since SQLite 3.5.0, released in 2007, a single SQLite connection can be used Since SQLite 3.5.0, released in 2007, a single SQLite connection can be used

View file

@ -82,6 +82,9 @@ TUWF::register(
qr{ncdc/changes} => sub { changelog(shift, 'ncdc-changelog', 'ncdc', 'ncdc', 'changes', 'Ncdc Changelog') }, 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} => 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/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} => sub { podpage(shift, 'tuwf', 'tuwf', '', 'The Ultimate Website Framework') },
qr{tuwf/man(?:/(db|misc|request|response|xml))?} => \&tuwfmanual, qr{tuwf/man(?:/(db|misc|request|response|xml))?} => \&tuwfmanual,
qr{tuwf/changes} => sub { changelog(shift, 'tuwf-changelog', 'TUWF', 'tuwf', 'changes', 'TUWF Changelog') }, 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'); $s->htmlHeader(title => "\u$p: $last->{summary}", page => $p, sec => 'bug');
br; a href => "/$p/bug", 'Back to the bug index'; br; br; br; a href => "/$p/bug", 'Back to the bug index'; br; br;
$is->htmlItem($item); $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; br; a href => "/$p/bug", 'Back to the bug index'; br; br;
$s->htmlFooter; $s->htmlFooter;
} }
@ -322,8 +325,8 @@ sub htmlPOD {
my($s, $file, $toc) = @_; my($s, $file, $toc) = @_;
require Pod::Simple::HTML; require Pod::Simple::HTML;
# The usual output escaping function is terribly stupid
{ {
# The usual output escaping function is terribly stupid
no warnings 'redefine', 'once'; no warnings 'redefine', 'once';
*Pod::Simple::HTML::esc = sub { *Pod::Simple::HTML::esc = sub {
return map TUWF::XML::html_escape($_), @_ if wantarray; return map TUWF::XML::html_escape($_), @_ if wantarray;
@ -331,6 +334,18 @@ sub htmlPOD {
$_ = TUWF::XML::html_escape($_) for(@_); $_ = TUWF::XML::html_escape($_) for(@_);
return @_; 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(); my $p = Pod::Simple::HTML->new();
@ -355,6 +370,9 @@ sub htmlPOD {
$html =~ s/\[img ([^ ]+) ([^ ]+) ([^\]]*)\]/<img src="\/img\/$2" class="$1" alt="$3" \/>/g; $html =~ s/\[img ([^ ]+) ([^ ]+) ([^\]]*)\]/<img src="\/img\/$2" class="$1" alt="$3" \/>/g;
$html =~ s{\[html\](.*)É}{(my $h = $1) =~ s/\&gt;/>/g; $h =~ s/\&lt;/</g; $h =~ s/\&amp;/\&/g; $h =~ s/\&quot;/"/g; $h}egs; $html =~ s{\[html\](.*)É}{(my $h = $1) =~ s/\&gt;/>/g; $h =~ s/\&lt;/</g; $h =~ s/\&amp;/\&/g; $h =~ s/\&quot;/"/g; $h}egs;
$html =~ s/\[yh-changes\]/$s->genChanges()/e; $html =~ s/\[yh-changes\]/$s->genChanges()/e;
$html =~ s/<pre>( +(?:method|signal|property)) /<pre class="interface">$1 /g;
#$html =~ s/ (method|signal|property [a-z]) ([a-zA-Z0-9]+)/ $1 <b>$2<\/b>/g;
#$html =~ s/ (method|signal|property) / <b>$1<\/b> /g;
lit $html; lit $html;
} }
@ -440,7 +458,8 @@ sub htmlMenu {
my $m = sub { my $m = sub {
li; li;
my $s = $_[0] =~ m{^/([^/]+)} && $o{spec}{$1} && $o{page} ne $1; 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]) { if($_[3]) {
ul; ul;
$_[3]->(); $_[3]->();
@ -467,7 +486,12 @@ sub htmlMenu {
$m->('/ncdc/bug', 'Bug tracker', $o{sec} eq 'bug'); $m->('/ncdc/bug', 'Bug tracker', $o{sec} eq 'bug');
} elsif($o{page} eq 'globster') { } elsif($o{page} eq 'globster') {
$m->('/globster', 'Info', !$o{sec}); $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') { } elsif($o{page} eq 'tuwf') {
$m->('/tuwf', 'Info', !$o{sec}); $m->('/tuwf', 'Info', !$o{sec});
$m->('/tuwf/man', 'Manual', $o{sec} eq 'man', sub { $m->('/tuwf/man', 'Manual', $o{sec} eq 'man', sub {

View file

@ -15,6 +15,7 @@ html,body { background: #ccc; text-align: center; height: 100% }
#left li a:hover { border-bottom: 1px dashed #aaa } #left li a:hover { border-bottom: 1px dashed #aaa }
#left li li { margin-top: 10px; margin-bottom: 0 } #left li li { margin-top: 10px; margin-bottom: 0 }
#left li li a { width: 90px } #left li li a { width: 90px }
#left li a.tiny { font-size: 11px }
#left li a.small { font-size: 10px } #left li a.small { font-size: 10px }
#left .menusel { color: #03a } #left .menusel { color: #03a }
#left .notes { margin-top: 50px; text-align: center } #left .notes { margin-top: 50px; text-align: center }
@ -42,9 +43,10 @@ pre { padding-left: 0 }
pre, code, pre b { font: 11px monospace; } pre, code, pre b { font: 11px monospace; }
pre b { font-weight: bold } pre b { font-weight: bold }
pre { margin: 0 0 10px 18px; display: block; padding: 0; border-left: 1px dotted #999 } 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 } dd { margin-left: 15px }
dt a { color: #333 } dt a { color: #333 }
dt { margin-left: 10px } dt { margin-left: 15px }
i { font-style: italic } i { font-style: italic }
.sig { vertical-align: super } .sig { vertical-align: super }
.sig, .sig a { font-size: 9px; color: #333; text-decoration: none } .sig, .sig a { font-size: 9px; color: #333; text-decoration: none }