If[$OperatingSystem=="Windows",
pathsep="\\";SetDirectory["C:\\wamp\\www"],
pathsep="/";SetDirectory["/mnt/windows/wamp/www"]
]

max=ToExpression[Import["max.txt"]]

desc=Table[Import["txt"<>pathsep<>ToString[i]<>".txt"],{i,1,max}];

titles=Import["alltitles.txt","CSV"];

tags=Import["tags"<>pathsep<>"alltags.txt","CSV"];
alltags=Tally[Flatten[tags]][[All,1]];
taglist={};
Do[
poslist=Position[tags,tag][[All,1]];
taglist=Append[taglist,Join[{tag},poslist]];
,{tag,alltags}
]
Export["tags"<>pathsep<>"alltaglists.txt",taglist,"CSV"];

alltags;

dates=Table[{StringCases[desc[[i]],RegularExpression["[0-9]+/[0-9]+/[0-9]+"]][[1]]},{i,1,max}];

dates[[max-146]]

datestrs=Table[DateString[DateList[{dates[[i,1]],{"Month","Day","Year"}}],{"Year","Month","Day"}],{i,1,Length[dates]}];

datestrs[[max]]

Check for duplicate dates

DeleteCases[Tally[datestrs],{a_,b_}/;b<2]

Export["alldates.txt",dates,"CSV"];

Export RSS stuff

curdate=DateString[{"DayNameShort",", ","Day"," ","MonthNameShort"," ","Year"," ","Hour",":","Minute",":","Second"," -0500"}];

lastupdate=DateString[DateList[{dates[[Length[dates],1]],{"Month","Day","Year"}}],{"Day","/","Month","/","Year"}]

Do[
Export["dates\\"<>ToString[i]<>".txt",dates[[i]],"Text"];
Export["dates\\"<>datestrs[[i]]<>".txt",i,"Text"];
,{i,7,max}
];
Export["dates\\lastupdate.txt",lastupdate,"Text"];
Export["dates/curdate.txt",curdate];

curdate

mainpubdate="<pubDate>"<>curdate<>"</pubDate>";builddate="<lastBuildDate>"<>curdate<>"</lastBuildDate>";

header="<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>
<rss xmlns:atom=\"http://www.w3.org/2005/Atom\" version=\"2.0\">
<channel>
   <title>Cesium RSS</title>
   <link>http://cesiumcomics.com</link>
   <description>RSS feed for Cesium Comics</description>
   <language>en</language>
   "<>mainpubdate<>"
   "<>builddate<>"
 <atom:link href=\"http://cesiumcomics.com/cesium.xml\" rel=\"self\" type=\"application/rss+xml\"/>
";

times=Table[If[StringCases[desc[[i]],RegularExpression["[0-9]+:[0-9]+:[0-9]+"]]≠{},StringCases[desc[[i]],RegularExpression["[0-9]+:[0-9]+:[0-9]+"]],{"00:00:00"}],{i,1,max}];

FileNames["1.*","img"]

titstr[num_]:="<title>"<>StringReplace[titles[[num]],{"&ouml;"->"o"}]<>"</title>";
linkstr[num_]:="<link>http://cesiumcomics.com/index.php?number="<>ToString[num]<>"</link>";
imgstr[num_]:="<p><img src=\"http://cesiumcomics.com/img/"<>StringTake[FileNames[ToString[num]<>".*","img"],{5,-1}]<>"\" /></p>";
descstr[num_]:="<description><![CDATA["<>imgstr[num]<>desc[[num]]<>"]]></description>";
pubDate[num_]:="<pubDate>"<>DateString[{dates[[num,1]],{"Month","Day","Year"}},{"DayNameShort",", ","Day"," ","MonthNameShort"," ","Year"}]<>" "<>times[[num,1]]<>" -0500</pubDate>";
guid[num_]:="<guid isPermaLink=\"true\">http://cesiumcomics.com/index.php?number="<>ToString[num]<>"</guid>";

item[num_]:="   <item>
      "<>titstr[num]<>"
      "<>linkstr[num]<>"
      "<>descstr[num]<>"
      "<>pubDate[num]<>"
      "<>guid[num]<>"
   </item>"

mdl=DateList[DateString[{dates[[max,1]],{"Month","Day","Year"}},{"DayNameShort",", ","Day"," ","MonthNameShort"," ","Year"}]<>" "<>times[[max,1]]]

cdl=DateList[StringTake[curdate,{1,StringLength[curdate]-4}]]

If[DateDifference[cdl,mdl]>0, dates[[max]]={DateString[cdl,{"Month","/","Day","/","Year"}]}; times[[max]]={DateString[cdl,{"Hour",":","Minute",":","Second"}]}]

item[max-1]

item[max]

tail="</channel></rss>";

rss=header;
Do[
rss=rss<>item[i];
,{i,max,1,-1}
]
rss=rss<>tail;

(*Export["cesium.xml",rss,"Text"]*)

4 ArcTan[1]

{800,450}*4

800/450.