repology_history_atom.sh - randomcrap - random crap programs of varying quality
 (HTM) git clone git://git.codemadness.org/randomcrap
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       repology_history_atom.sh (563B)
       ---
            1 #!/bin/sh
            2 # uses webdump to convert a table from TSV to Atom.
            3 # can be used with sfeed to convert it to other formats.
            4 #
            5 # usage: $0 projectname
            6 
            7 name="$1"
            8 curl -s "https://repology.org/project/${name}/history" | \
            9 webdump -s table -u 'tr th' | \
           10 LC_ALL=C awk '
           11 BEGIN {
           12         FS = OFS = "\t";
           13         print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
           14         print "<feed xmlns=\"http://www.w3.org/2005/Atom\" xml:lang=\"en\">";
           15 }
           16 {
           17         print "<entry>";
           18         print "<title><![CDATA[" $2 "]]></title>";
           19         print "<updated>" $1 "</updated>";
           20         print "</entry>";
           21 }
           22 END {
           23         print "</feed>";
           24 }
           25 '