diff --git a/data.xml b/data.xml index cc1560b..96a33c6 100644 --- a/data.xml +++ b/data.xml @@ -20,20 +20,6 @@ ]> - - Fri, 15 Sep 2019 00:00 UT covers/ds099.jpg @@ -57,559 +43,477 @@ Zudem gibt es einen neuen Redaktions-PGP-Key, erhältlich auf allen Keyservern o Lange war es ruhig um die Datenschleuder. Fast schon zu lange. Daher freuen wir uns umso mehr, dass die Ausgabe 97 fertig gedruckt und auf dem Weg zu den Mitgliedern und Abonnenten ist. Wie üblich können Abonnements und Einzelausgaben direkt beim CCC erworben werden. + Sun, 18 Dec 2011 00:00 UT covers/ds96.jpg /pdfs/ds096.pdf 9558786 - Sun, 18 Dec 2011 00:00 UT Passend zum 28. Chaos Communication Congress ist die 96. Datenschleuder erschienen und befindet sich ATM auf dem Weg zu den Abonnenten. Wie immer gibt es zur Überbrückung der Wartezeit das Editorial online zum Selberausdrucken. Es gibt einen neuen Redaktions-PGP-Key, erhältlich auf allen Keyservern oder hier. + Sun, 04 Sep 2011 00:00 UT covers/ds95.jpg /pdfs/ds095.pdf 1633452 - Sun, 04 Sep 2011 00:00 UT Nach längerer Wartezeit ist jetzt die 95. Ausgabe der Datenschleuder erschienen und auf dem Weg zu den Abonnenten. Sie ist wie immer im gut sortierten Buchhandel oder direkt vom CCC auch als Einzelexemplar zu beziehen. Während Ihr auf Euer Exemplar wartet, lest doch solange das Editorial. Aufgrund eines kleinen «Fuckups» wird die Datenschleuder bei den Abonnenten voraussichtlich. fünf. bis zehn Minu... äh, Tage später eintreffen. Wir bitten um Verständnis. + Mon, 27 Sep 2010 00:00 UT covers/ds94.jpg /pdfs/ds094.pdf 9366127 - Mon, 27 Sep 2010 00:00 UT + Wed, 17 Dec 2008 00:00 UT covers/ds93.jpg /pdfs/ds093.pdf 8651240 - Wed, 17 Dec 2008 00:00 UT Pünktlich zum 25. Chaos Communication Congress sollten die inzwischen fast 2800 Mitglieder und Abonnenten ihre Datenschleuder im Briefkasten vorfinden. Schwerpunkte sind in dieser Ausgabe der dilettantische Umgang des BNDs mit ihren achsogeheimen Netzen und eine Analyse des XMPP-Protokolls nach kryptografischen Gesichtspunkten. Wie immer gibt es zum Schmökern neben der bereits veröffentlichten Vorabmeldung auch das Editorial zum Internetausdrucken und vorm Kamin lesen. Der Vorstand des CCC hat die Wiedereinführung der beliebten 8-Ausgaben Miniabos beschlossen. Details gibt es hier. + Sat, 29 Mar 2008 00:00 UT covers/ds92.jpg /pdfs/ds092.pdf 5805592 - Sat, 29 Mar 2008 00:00 UT Die 92. Ausgabe der Datenschleuder ist erschienen und auf dem Weg zu den Abonnenten. Als besonderes Gimmick liegt ihr dieses Mal eine Fingerattrappe nach dem Bild unseres geliebten Innenministers bei. Sie ist wie immer im gut sortierten Buchhandel oder direkt vom CCC auch als Einzelexemplar zu beziehen. Während ihr auf Eure Ausgabe wartet, lest doch solange das Editorial. + Thu, 19 Jul 2007 00:00 UT covers/ds91.jpg /pdfs/ds091.pdf 8523204 - Thu, 19 Jul 2007 00:00 UT + Tue, 03 Oct 2006 00:00 UT covers/ds90.jpg /pdfs/ds090.pdf 2249622 - Tue, 03 Oct 2006 00:00 UT Das Experiment ist beendet. Die Datenschleuder ist dank dem Einsatz hochmoderner Technologien (HTML) auf dem besten Wege, den dreijährigen Rückstand wieder aufzuholen. Redaktionssysteme sind im Prinzip in Ordnung. In der Praxis rockt jedoch vi. covers/ds89.jpg /pdfs/ds089.pdf 3860454 - covers/ds88.jpg /pdfs/ds088.pdf 1262835 - covers/ds87.jpg /pdfs/ds087.pdf 2331105 - covers/ds86.jpg /pdfs/ds086.pdf 1807977 - covers/ds85.jpg /pdfs/ds085.pdf 1635260 - covers/ds84.jpg /pdfs/ds084.pdf 890339 - covers/ds83.jpg /pdfs/ds083.pdf 1114051 - covers/ds82.jpg /pdfs/ds082.pdf 1692019 - covers/ds81.jpg /pdfs/ds081.pdf 659054 - covers/ds80.jpg /pdfs/ds080.pdf 563840 - covers/ds79.jpg /pdfs/ds079.pdf 5295970 - covers/ds78.jpg /pdfs/ds078.pdf 3068721 - covers/ds77.jpg /pdfs/ds077.pdf 7138473 - covers/ds76.jpg /pdfs/ds076.pdf 8175112 - covers/ds75.jpg /pdfs/ds075.pdf 8351323 - covers/ds74.jpg /pdfs/ds074.pdf 2064807 - covers/ds73.jpg /pdfs/ds073.pdf 5497703 - covers/ds72.jpg /pdfs/ds072.pdf 278270 - covers/ds71.jpg /pdfs/ds071.pdf 499707 - covers/ds70.jpg /pdfs/ds070.pdf 4904429 - covers/ds68.jpg /pdfs/ds068.pdf 8750789 - covers/ds67.jpg /pdfs/ds067.pdf 685776 - covers/ds66.jpg /pdfs/ds066.pdf 381865 - covers/ds65.jpg /pdfs/ds065.pdf 191921 - covers/ds64.jpg /pdfs/ds064.pdf 683107 - covers/ds63.jpg /pdfs/ds063.pdf 402940 - covers/ds62.jpg /pdfs/ds062.pdf 645827 - covers/ds61.jpg /pdfs/ds061.pdf 2218050 - covers/ds60.jpg /pdfs/ds060.pdf 525227 - covers/ds59.jpg /pdfs/ds059.pdf 441467 - covers/ds58.jpg /pdfs/ds058.pdf 287742 - covers/ds57.jpg /pdfs/ds057.pdf 761897 - covers/ds56.jpg /pdfs/ds056.pdf 467698 - covers/ds55.jpg /pdfs/ds055.pdf 2922086 - covers/ds54.jpg /pdfs/ds054.pdf 7974465 - covers/ds53.jpg /pdfs/ds053.pdf 817544 - covers/ds52.jpg /pdfs/ds052.pdf 1152589 - covers/ds51.jpg /pdfs/ds051.pdf 1887242 - covers/ds50.jpg /pdfs/ds050.pdf 1275237 - covers/ds49.jpg /pdfs/ds049.pdf 943611 - covers/ds48.jpg /pdfs/ds048.pdf 841492 - covers/ds47.jpg /pdfs/ds047.pdf 1369065 - covers/ds46.jpg /pdfs/ds046.pdf 1432054 - covers/ds45.jpg /pdfs/ds045.pdf 959569 - covers/ds44,5.jpg /pdfs/ds044,5.pdf 2245359 - covers/ds44.jpg /pdfs/ds044.pdf 934477 - covers/ds43.jpg /pdfs/ds043.pdf 1511021 - covers/ds42.jpg /pdfs/ds042.pdf 1008532 - covers/ds41.jpg /pdfs/ds041.pdf 1772903 - covers/ds40.jpg /pdfs/ds040.pdf 724630 - covers/ds39.jpg /pdfs/ds039.pdf 5660515 - covers/ds38.jpg /pdfs/ds038.pdf 9309080 - covers/ds37.jpg /pdfs/ds037.pdf 5955897 - covers/ds36.jpg /pdfs/ds036.pdf 3988877 - covers/ds35.jpg /pdfs/ds035.pdf 1132711 - covers/ds34.jpg /pdfs/ds034.pdf 2377237 - covers/ds33.jpg /pdfs/ds033.pdf 3594296 - covers/ds32.jpg /pdfs/ds032.pdf 1007002 - covers/ds31.jpg /pdfs/ds031.pdf 1686370 - covers/ds30.jpg /pdfs/ds030.pdf 793690 - covers/ds28-29.jpg https://www.offiziere.ch/trust-us/ds/28/index.html - covers/ds26-27.jpg /pdfs/ds2627.pdf 11978057 - covers/ds25.jpg /pdfs/ds025.pdf 7984192 - covers/ds24.jpg /pdfs/ds024.pdf 3317604 - covers/ds23.jpg /pdfs/ds023.pdf 4669143 - covers/ds22.jpg https://www.offiziere.ch/trust-us/ds/22/index.html - covers/ds21.jpg /pdfs/ds021.pdf 8305087 - covers/ds20.jpg /pdfs/ds020.pdf 8998068 - covers/ds19.jpg /pdfs/ds019.pdf 8295587 - covers/ds18.jpg /pdfs/ds018.pdf 10486554 - covers/ds17.jpg /pdfs/ds017.pdf 5632452 - + Thu, 11 Sep 1986 00:00 UT covers/ds16.jpg /pdfs/ds016.pdf 1177879 - Thu, 11 Sep 1986 00:00 UT covers/ds15.jpg /pdfs/ds015.pdf 1116319 - covers/ds14.jpg /pdfs/ds014.pdf 629409 - covers/ds13.jpg /pdfs/ds013.pdf 1400728 - covers/ds11-12.jpg /pdfs/ds1112.pdf 652112 - covers/ds9-10.jpg /pdfs/ds0910.pdf 604829 - covers/ds8,5.jpg /alteszeug.html - covers/ds8.jpg /pdfs/ds008.pdf 520716 - covers/ds7.jpg /pdfs/ds007.pdf 159023 - covers/ds5-6.jpg /pdfs/ds0506.pdf 995187 - + Sun, 12 Aug 1984 00:00 UT covers/ds4.jpg /pdfs/ds004.pdf 3338710 - Sun, 12 Aug 1984 00:00 UT + Tue, 12 Jun 1984 00:00 covers/ds3.jpg /pdfs/ds003.pdf 2638305 - Tue, 12 Jun 1984 00:00 covers/ds02.jpg /pdfs/ds002.pdf 748189 - covers/ds1.jpg https://www.offiziere.ch/trust-us/ds/01/index.html - diff --git a/gen.sh b/gen.sh index 06bae6b..98d57ff 100755 --- a/gen.sh +++ b/gen.sh @@ -1,24 +1,44 @@ #!/usr/bin/env sh + +#~ set -x assert_tools () { err=0 while test $# -gt 0; do which $1 >/dev/null 2>/dev/null || { - >&2 echo "tool missing: "$1 + >&2 printf "tool missing: $1\n" err=$(( $err + 1 )) } shift done test $err -eq 0 || exit $err } -test $# -eq 0 && { +assert_source () { + dependencies="test printf" + assert_tools ${dependencies} + test $# -gt 0 && { + datafn="$1"; + } || { + >&2 printf "option for data source missing.\n"; + datafn="data.xml"; + >&2 printf "assuming fallback '${datafn}'.\n"; + } + test -f "$datafn" && { >&2 printf "from ${datafn} …\n"; exit 0; } || { >&2 printf "failed.\nfile '${datafn}' does not exist.\n"; exit 1; } + printf "$datafn" +} +build () { + datafn="$1" dependencies="xsltproc" assert_tools ${dependencies} - xsltproc --encoding utf-8 -o ds-feed.xml rss.xsl data.xml - xsltproc --encoding iso-8859-1 -o download.html download.xsl data.xml - xsltproc --encoding utf-8 -o index.html index.xsl data.xml + >&2 printf "building ds-feed.xml … " + xsltproc --encoding utf-8 -o ds-feed.xml rss.xsl $datafn && { >&2 printf "done.\n"; } || { >&2 printf "failed on rss.xsl.\n"; exit 1; } + >&2 printf "building download.html … " + xsltproc --encoding iso-8859-1 -o download.html download.xsl $datafn && { >&2 printf "done.\n"; } || { >&2 printf "failed on download.xsl.\n"; exit 1; } + >&2 printf "building index.html … " + xsltproc --encoding utf-8 -o index.html index.xsl $datafn && { >&2 printf "done.\n"; } || { >&2 printf "failed on index.xsl.\n"; exit 1; } exit 0 } -test "$1" = "sort" && { +sortxml () { +#~ test "$1" = "sortxml" && { dependencies="xsltproc" assert_tools ${dependencies} xsltproc --encoding utf-8 -o sorted.xml sort.xsl data.xml @@ -27,12 +47,12 @@ test "$1" = "sort" && { linkcheck () { dependencies="curl uuid" assert_tools ${dependencies} - tmpfile="/tmp/"$(uuid); curl https://ds.ccc.de/download.html > $tmpfile - for f in $(echo "download.html "$tmpfile); do + tmpfile="/tmp/"$(uuid); curl -k https://ds.ccc.de/download.html > $tmpfile + for f in download.html ${tmpfile} ; do test -e $f || continue for e in $(cat ${f}|sed 's/&2 echo ${e}" – "${status}" OK" || >&2 echo ${e}" – "${status}" FAILED" + status=$(curl -k --max-time 1 --head --silent --output /dev/null --write-out "%{http_code}" $e ) + test $status -eq 200 && >&2 printf ${e}" – "${status}" OK\n" || >&2 printf ${e}" – "${status}" FAILED\n" done done } @@ -42,6 +62,7 @@ mirror_website () { local url=$@ local domain=`expr "$url" : '^http[s]*://\([^/?]*\)'` wget \ + --no-check-certificate \ --recursive \ --no-clobber \ --page-requisites \ @@ -53,128 +74,164 @@ mirror_website () { $url } newdataentry () { - dependencies="cat grep head cut date printf" + dependencies="cat grep head cut rev date printf" assert_tools ${dependencies} + + #~ datafn=$(assert_source $1) && { shift; } || { >&2 printf "file '${datafn}' not found."; err=1; exit 1; } + datafn="data.xml" + err=0 customdir=$(pwd) fl="" - test $# -eq 0 && { - >&2 echo "determining issue number based on data.xml.\n" - lastentry=$(cat data.xml |grep -i "&2 echo "custom base directory for files such as jpg, pdf, epub: "${customdir}".\n" - } - test "$1" = "help" && { - echo "prints a new data entry for a release of datenschleuder\n" - echo "release [options]\n" - echo "option\tdescription\n" - echo "directory\tcustom data directory for availability test and filesize, default pwd" - echo "number\tprint entry for release with custom number, default is the increment of the top entry in data.xml\n" - echo "date\tuse a unix timestamp for a custom date\n" - echo "teaser\tinclude teaser xml-message as last argument(s)\n" - echo "full example: `./gen.sh release 99 1568505600 Die Ausgabe 99 ist fertig.`" - exit 1 - } - test $(( $1 * 1 )) -eq $1 && { - >&2 echo "custom entry for data.xml.\n" - newentry=$1; shift; - } || { echo "argument not a number."; exit 1; } - test $(( $1 * 1 )) -eq $1 && { - >&2 echo "custom datetime.\n" - datetime=$1; shift; - } || { datetime=0; } # remaining arguments should be teaser xml-message. + + >&2 printf "determining issue number based on '${datafn}'.\n" + lastentry=$(grep -i "&2 printf "custom base directory for files such as jpg, pdf, epub: "${customdir}".\n\n" } - echo "" - test "${datetime}" = "" || test $datetime -eq 0 && { - #~ datetime=$(LANG=en_US.utf8 date -u +"%a %d %b %Y %H:%M") # manual copy of known entries - datetime=$(LANG=en_US.utf8 date -u -R |rev|cut -d":" -f2-|rev) # RFC-5322-Format without seconds and TZ - } || { - datetime=$(LANG=en_US.utf8 date -d @${datetime} -u -R|rev|cut -d":" -f2-|rev) + test "$1" = "help" && { + printf "prints a new data entry for a release of datenschleuder\n\n" + printf "release [options]\n\n" + printf "option\tdescription\n\n" + printf "directory\tcustom data directory for availability test and filesize, default pwd\n\n" + printf "number\tprint entry for release with custom number, default is the increment of the top entry in ${datafn}\n\n" + printf "date\tuse a unix timestamp for a custom date\n\n" + printf "teaser\tinclude teaser xml-message as last argument(s)\n\n" + printf "full example: './gen.sh release 99 1568505600 Die Ausgabe 99 ist fertig.'\n" + exit 1 } - echo "\t"${datetime}" UT" # custom format universal time + 2>/dev/null test $(( $1 * 1 )) -eq $1 && { + newentry=$1; shift; + >&2 printf "custom issue number '${newentry}' for '${datafn}'.\n" + } || { + printf "next argument not a number. assuming issue based on top entry.\n" + } + 2>/dev/null test $(( $1 * 1 )) -eq $1 && { + >&2 printf "custom datetime.\n\n" + datetime="$1"; shift; + } || { printf "next argument not a number. using actual system time.\n"; datetime=0; } # remaining arguments should be teaser xml-message. + + printf "\nschleuder id=\"$newentry\">\n" + # todo: switch for dtg, integrate custom datetime input early + # or simply implement xslt for handling ISO and nothing else for input + # RFC-5322-Format without seconds and TZ + dtg="TZ=:UTC LANG=en_US.utf8 date -u -R |rev|cut -d\":\" -f2-|rev"; tz=" UT" + # ISO dtg as issues may provide datetime-data on months but mostly not on days … + #~ dtg="TZ=:UTC LANG=en_US.utf8 date +%Y-%m-%d %H:%M %Z"; tz="" + test $datetime -eq 0 && { + datetime=$(TZ=:UTC LANG=en_US.utf8 date -u -R |rev|cut -d":" -f2-|rev) # + } || { + #~ dtg="TZ=:UTC LANG=en_US.utf8 date -d @${datetime} +\"%Y-%m-%d %H:%M %Z\""; tz="" + dtg="TZ=:UTC LANG=en_US.utf8 date -d @${datetime} -u -R |rev|cut -d\":\" -f2-|rev"; tz=" UT" + #~ datetime="$(TZ=:UTC LANG=en_US.utf8 date -d @${datetime} -u -R|rev|cut -d":" -f2-|rev)" + # TZ=:UTC LANG=en_US.utf8 date -d @${datetime} +"%Y-%m-%d %H:%M %Z" + } + datetime="$(sh -c "${dtg}")" + printf "\t${datetime}${tz}\n" # custom format universal time fn="ds"$(printf "%03d" $newentry) - for d in $(echo "covers pdfs epubs"); do + for d in covers pdfs epubs ; do case "$d" in covers) ffn=${d}"/"${fn}".jpg"; cover=$ffn ;; pdfs) ffn=${d}"/"${fn}".pdf" ;; epubs) ffn=${d}"/"${fn}".epub" ;; - #~ *) echo "file "${ffn}" not found, in "${d}"." ;; + #~ *) printf "file "${ffn}" not found, in "${d}".\n" ;; esac - #~ echo $ffn + #~ printf "$ffn\n" test -e ${customdir}"/"${ffn} && { test "$d" = "covers" && { - echo "\t"${cover}"" + printf "\t"${cover}"\n" } || { fs=$(stat -c %s ${customdir}"/"${ffn}) - echo "\t"${ffn}"" + printf "\t"${ffn}"\n" } } || { mfl=${mfl}" "${ffn}"\n" - #~ echo "file "${ffn}" not found." + #~ printf "file "${ffn}" not found.\n" err=3 } done - #~ echo "\t" # not used on server yet + #~ printf "\t\n" # not used on server yet test $# -eq 0 && { teaser="" ; } || { - teaser=$@ ; - echo "\t"${teaser}"" + teaser="$@"; + printf "\t"${teaser}"\n" } - echo "" - test "$teaser" = "" && { >&2 echo "\nmissing teaser message."; } - test -e ${customdir}"/"$cover || { >&2 echo "\nmissing cover file: "${cover}; } - test $err -gt 0 && { >&2 echo "\nmissing files:\n"${mfl}; } + printf "\n" + test "$teaser" = "" && { >&2 printf "\nmissing teaser message.\n"; } + test -e ${customdir}"/"$cover || { >&2 printf "\nmissing cover file: "${cover}"\n"; } + test $err -gt 0 && { >&2 printf "\nmissing files:\n"${mfl}"\n"; } } newinfoentry () { - echo "not implemented yet.\n\nwill be similar to `release`." -} -# a mirror is useful for local testing with files -test "$1" = "mirror" && { - shift - >&2 echo "downloading the website may take quite some time." - mirror_website http://ds.ccc.de/ - -} -test "$1" = "linkcheck" && { - shift - linkcheck http://ds.ccc.de/ -} -test "$1" = "release" && { - shift - newdataentry $@ -} -test "$1" = "info" && { - shift - newinfoentry $@ + >&2 printf "not implemented yet.\n\nwill be similar to 'release'.\n" } + +echo $# $@ + +if test $# -lt 1 ; then + printf "missing parameter.\n" + exit 1 +else + # a mirror is useful for local testing with files + case "$1" in + build) + f=$(assert_source $@) && { shift; } || { exit 1; } + build "${f}" + ;; + #~ sortxml) + #~ f=$(assert_source $@) && { shift; } || { exit 1; } + #~ sortxml "${f}" + #~ ;; + mirror) + >&2 printf "downloading the website may take quite some time.\n" + mirror_website http://ds.ccc.de/ + ;; + linkcheck) + linkcheck http://ds.ccc.de/ + ;; + release) + shift + newdataentry $@ + ;; + info) + shift + newinfoentry $@ + ;; + *) + printf "this is not implemented yet.\n" + ;; + esac +fi + +# generate small size version of pdf, might help e.g. for email attachments #gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -q -o ds100-smaller.pdf ds100.pdf