From dd78f8581e13a78a295320b8b3deef104603d3d0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 10 Apr 2005 22:38:40 +0000 Subject: these are old and tired, but... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6266 a1c6a512-1295-4272-9138-f99709370657 --- www/digest/Makefile | 26 ++++++++ www/digest/digest.t | 4 ++ www/digest/digestfoot.t | 8 +++ www/digest/digesthead.t | 45 ++++++++++++++ www/digest/index.t | 31 ++++++++++ www/digest/log.raw | 159 ++++++++++++++++++++++++++++++++++++++++++++++++ www/digest/mailify.pl | 130 +++++++++++++++++++++++++++++++++++++++ www/digest/rssify.pl | 32 ++++++++++ 8 files changed, 435 insertions(+) create mode 100644 www/digest/Makefile create mode 100644 www/digest/digest.t create mode 100644 www/digest/digestfoot.t create mode 100644 www/digest/digesthead.t create mode 100644 www/digest/index.t create mode 100644 www/digest/log.raw create mode 100755 www/digest/mailify.pl create mode 100755 www/digest/rssify.pl diff --git a/www/digest/Makefile b/www/digest/Makefile new file mode 100644 index 0000000000..4e7b3ea696 --- /dev/null +++ b/www/digest/Makefile @@ -0,0 +1,26 @@ +ACTION=@echo preprocessing $@; rm -f $@; fcpp -WWW -I.. -Uunix -H -C -V -LL >$@ + +SRC := $(wildcard *.t) +OBJS := $(SRC:%.t=%.html) + +all: $(OBJS) digest.rss digest.mail + +%.html : %.t news.t digesthead.t log.t + $(ACTION) $< + +digest.mail: mail.t log.t mailify.pl + echo mailifying $@; + rm -f $@; + fcpp -WWW -DMAKE_MAIL -Uunix -P -H -C -V -LL >digest.temp $< + ./mailify.pl < digest.temp > digest.mail + +digest.rss: digest.t digesthead.t log.raw + @echo rssing $@; + @rm -f $@; + @fcpp -WWW -DMAKE_RSS -Uunix -P -H -C -V -LL >$@ $< + +log.raw: log.t rssify.pl digesthead.t + ./rssify.pl < $< >$@ + + + diff --git a/www/digest/digest.t b/www/digest/digest.t new file mode 100644 index 0000000000..a7b3cc8e3a --- /dev/null +++ b/www/digest/digest.t @@ -0,0 +1,4 @@ +#define DIGESTDATE 2003-april +#include "digesthead.t" +#include "log.raw" +#include "digestfoot.t" diff --git a/www/digest/digestfoot.t b/www/digest/digestfoot.t new file mode 100644 index 0000000000..41bcb1b913 --- /dev/null +++ b/www/digest/digestfoot.t @@ -0,0 +1,8 @@ +#ifndef MAKE_RSS +#ifndef MAKE_MAIL +#include "foot.t" +#endif +#else + + +#endif diff --git a/www/digest/digesthead.t b/www/digest/digesthead.t new file mode 100644 index 0000000000..ec637dfe8c --- /dev/null +++ b/www/digest/digesthead.t @@ -0,0 +1,45 @@ +#ifndef MAKE_RSS +#ifdef MAKE_MAIL +#define ZAGOR Björn Stenberg +#define BAGDER Daniel Stenberg +#define LINUSN Linus Nielsen Feltzing + +#define NEWSDATE(x) Date: x +#define ITEM --- +#define NAME(x) x +#define ENDDATE +#define LINK(url,name) [URL]url[URL] [TEXT]name[TEXT] + +#else +#define _PAGE_ Rockbox Digest +#include "head.t" +#include "news.t" + + +digest front page +· +digest RSS feed + +

+#endif +#else + + + + +Rockbox Digest +http://rockbox.haxx.se/digest/digest.html +Detailing the latest and the most significant subjects about Rockbox. +en + +#define NEWSDATE(x) xhttp://rockbox.haxx.se/digest/digest.html <ol> +#define ENDDATE </ol> +#define ITEM <li> +#define NAME(x) x + +#define ZAGOR Björn Stenberg +#define BAGDER Daniel Stenberg +#define LINUSN Linus Nielsen Feltzing + +#define LINK(url, name) <a href=url>name</a> +#endif diff --git a/www/digest/index.t b/www/digest/index.t new file mode 100644 index 0000000000..f125188877 --- /dev/null +++ b/www/digest/index.t @@ -0,0 +1,31 @@ +#define _PAGE_ Rockbox Digests - News From the Front +#include "head.t" +#include "news.t" + +

BAGDER is the editor of the Rockbox digest section. He tries to keep up + with discussions on IRC, the mailing list, the sourceforge trackers and CVS + commits to sum up what's going on in the project in a slightly digested + manner. Suitable for outsiders who don't care to follow the intense + development mailing list and similar. + +

+The Most Recent Digest + +

You can also access the digest as a RSS feed. + +

You should be able to get a Rockbox sidebar in your Netscape/Mozilla +browser using sidenews.net. + +

The work on this was started on April 15th, 2003. On the day of the + Rockbox 2.0 release. If you found something you think are wrong, anything + I've missed in here or similar, drop me a mail at rockbox-digest at haxx dot + se. If you have ideas or opinions about the actual subjects mentioned, join the mailing list and post about it there. + +

[Valid RSS] + +#include "foot.t" diff --git a/www/digest/log.raw b/www/digest/log.raw new file mode 100644 index 0000000000..ce6a02f83c --- /dev/null +++ b/www/digest/log.raw @@ -0,0 +1,159 @@ +NEWSDATE(28-nov-2003) + + ITEM Rockbox now finally runs on the Recorder V2. + +ENDDATE + +NEWSDATE(03-nov-2003) + + ITEM LINUSN revamped the file split feature so it always splits on MP3 + frame boundaries. As a bonus, the Play key can now be pressed to start a new + file during recording. + + ITEM LINUSN applied a bunch of nice patches, like Line-In activation on + Players, a VU meter plugin, a NIM game for the Player, plus a few bug + fixes. + + ITEM The Chip8 emulator has finally been added to the CVS! + + ITEM Recording with flashed firmware is finally stable + +ENDDATE + +NEWSDATE(28-aug-2003) + + ITEM Can Rockbox be made to + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0784.shtml", + play WAV) files? + +ENDDATE + +NEWSDATE(22-aug-2003) + + ITEM NAME(Jesús Rodríguez Marcial) posted his brand new translation of + Rockbox into + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0576.shtml", + Galego). + + ITEM BAGDER and + LINUSN posted a re-worked + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0584.shtml", + suggestion) previously posted about how to remap the keys of the Recorder + versions of Rockbox. Discussions followed. + + ITEM NAME(idc-dragon) called for + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0596.shtml", + early adopter needed for player flashing). + +ENDDATE + +NEWSDATE(21-aug-2003) + + ITEM NAME(Druzina Dobravec) brought a + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0530.shtml", + Slovenian language file) as + LINK("http://rockbox.haxx.se/lang/", language) number 20. + +ENDDATE + +NEWSDATE(13-aug-2003) + + ITEM NAME(Bernhard) offered a + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0381.shtml", + good advice to windows people using Archos). He says + LINK("http://www.ct.heise.de/ct/03/16/links/208.shtml", DevEject) is a good + thing. + +ENDDATE + +NEWSDATE(11-aug-2003) + + ITEM NAME(Todd Lowe) was searching for + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0345.shtml", + external battery pack options for FMR). + +ENDDATE + +NEWSDATE(9-aug-2003) + + ITEM NAME(Magnus Holmgren) managed to improve the speed of the ROLO quite a + lot with his + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0325.shtml", + descrable in assembler fix). + +ENDDATE + +NEWSDATE(8-aug-2003) + + ITEM NAME(doctor23) brought up the always-hot topic of + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0283.shtml", + Should I Buy a Recorder or FM Recorder?). The same issue was also brought up + by NAME(Brad) five days later in his + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0374.shtml", + JBR vs FMR? Which one is better) mail. + +ENDDATE + +NEWSDATE(6-aug-2003) + + ITEM One of those interesting threads on + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0196.shtml", + should you really buy a JBFMR20?). + +ENDDATE + +NEWSDATE(5-aug-2003) + + ITEM NAME(idc-dragon) posted that he + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0142.shtml", + needs some Player firmware version insight for flashing). There might be a + flashable player in the future if he gets sufficient help! + +ENDDATE + +NEWSDATE(4-aug-2003) + + ITEM NAME(Gadi Cohen) brought a patch that now offers + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0074.shtml", + working hebrew) for Rockbox. + +ENDDATE + +NEWSDATE(3-aug-2003) + + ITEM NAME(CombThins) brought a thought-through suggestion on + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0051.shtml", + how to support nested playlists). + +ENDDATE + +NEWSDATE(1-aug-2003) + + ITEM NAME(idc-dragon) got a bunch of + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0001.shtml", + SST39 flash chips) he offered in case anyone feels like "patching" their + units to become flashable. + + ITEM BAGDER + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0006.shtml", + announced UCL built in regular build process). So if you install 'uclpack' + properly, running make as usual will build you a .ucl file for flashing as + well! + + ITEM NAME(Remo Hofer) + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-08/0013.shtml", + suggested) we move the fonts to .rockbox/fonts/ and the languages to + .rockbox/languages/. The suggestion got some support from various people. + + ITEM BAGDER fixed daily-zips to include full download packages including most + of everything users want, in one single zip archive. + +ENDDATE + +NEWSDATE(31-jul-2003) + + ITEM NAME(David Reis) posted about his new + LINK("http://rockbox.haxx.se/mail/archive/rockbox-archive-2003-07/1520.shtml", + favourites rock). + +ENDDATE diff --git a/www/digest/mailify.pl b/www/digest/mailify.pl new file mode 100755 index 0000000000..4e0c7d60fd --- /dev/null +++ b/www/digest/mailify.pl @@ -0,0 +1,130 @@ +#!/usr/bin/perl + +my $end++; + +my @out; +my $url; + +my $urlnum=1; + +sub showlinks { + my ($date)=@_; + if(scalar(keys %store)) { + print "\n"; + + for(sort {$store{$a} <=> $store{$b} } keys %store) { + my $url=$_; + + $url =~ s/^\"(.*)\"/$1/g; + printf("[%d] = %s\n", $store{$_}, $url); + } + undef %store; + $urlnum=1; # reset to 1 + } +} + +sub showitem { + my @text=@_; + + if(@text) { + my $c=3; + my $width=72; + print " * "; + + my $thelot = join(" ", @text); + + for (split(/[ \t\n]/, $thelot)) { + my $word = $_; + + $word =~ s/[ \t]//g; + + my $len = length($word); + if(!$len) { + next; # skip blanks + } + + if($len + $c + 1> $width) { + print "\n "; + $c = 3; + } + elsif($c != 3) { + print " "; + $c++; + } + print $word; + $c += $len; + } + } + print "\n"; # end of item + + # my @words=split( + +} + +sub date2secs { + my ($date)=@_; + my $secs = `date -d "$date" +"%s"`; + return 0+$secs; +} + +while() { + my $line = $_; + + if($_ =~ /^Date: (.*)/) { + my $date=$1; + my $secs = date2secs($date); + my $tendaysago = time()-(14*24*60*60); + showitem(@out); + undef @out; + chomp; + + showlinks(); + + if($secs < $tendaysago) { + last; + } + + print "\n----------------------------------------------------------------------\n$_"; + next; + } + elsif($line =~ /^ *(---)(.*)/) { + + showitem(@out); + + @out=""; + $line = $2; + } + + if($line =~ s/\[URL\](.*)\[URL\]//) { + $url=$1; + + if(!$store{$url}) { + $footnote = "[$urlnum]"; + $store{$url} = $urlnum; + $urlnum++; + } + else { + $footnote = "[".$store{$url}."]"; + } + # print STDERR "Set $footnote for $url\n"; + } + if($line =~ s/\[TEXT\](.*)\[TEXT\]/$1$footnote/) { + # print STDERR "Output $footnote (full TEXT)\n"; + undef $text; + } + elsif(!$text && ($line =~ s/\[TEXT\](.*)/$1/)) { + # print STDERR "Detected start of TEXT\n"; + $text = $1; + } + elsif($text && ($line =~ s/(.*)\[TEXT\]/$1$footnote/)) { + # print STDERR "Output $footnote (end-TEXT)\n"; + undef $text; + } + + push @out, $line; +} + +if(@out) { + showitem(@out); +} + diff --git a/www/digest/rssify.pl b/www/digest/rssify.pl new file mode 100755 index 0000000000..ba6fca7d8b --- /dev/null +++ b/www/digest/rssify.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +my $fill = "RRREEEPPP"; + +my $end++; + +while() { + my $line = $_; + +# $line =~ s/ZAGOR/Björn Stenberg/g; + + $line =~ s/Ö/\Ö/g; + $line =~ s/ö/\ö/g; + $line =~ s//\>/g; + + if($line =~ s/(LINK\((\"([^\"]*)\"))/$fill/) { + my $url = $2; + $url =~ s/@/\#%40;/g; + $url =~ s/=/\#%3D;/g; + $url =~ s/&/\&/g; + $line =~ s/$fill/LINK\($url/; + } + print $line; + + if($line =~ /^ *ENDDATE/) { + if($end++ == 15) { + last; + } + + } +} -- cgit v1.2.3