The five items on this blog were posted using a simple command line interface. Items were sourced using CultureGrid via the simplified CultureGridNE API. XHTML results were further simplified using sed and posted using googlcl.
The full script is shown below.
@echo off rem ==================================== rem CGblogScript.bat v0.7 rem blogger command line script rem Mike Hirst rem 12:06 18 November 2011 rem ==================================== set CGNEurl=http://api.culturegridne.com/XHTML/index.php set sedstr=/\x3ch2/,/\x3cp/!d;s/[ \t]\+class=\x22[^\x22]\+\x22// call:CGblogPost "10 Leeds Pubs" pub Leodis call:CGblogPost "Badger Hunt" badger%%%%20hunt PictureThePast call:CGblogPost "10 Naked People" naked KirkleesImageArchive call:CGblogPost "10 Human Skulls" skull Hunterian-Items call:CGblogPost "10 Toilets in Leeds" toilet Leodis for %%a in (CGNEurl,sedstr) do set %%a= goto:eof :CGblogPost echo. echo ==================================== echo CGblogPost %~1 echo ==================================== curl "%CGNEurl%?q=%2&c=%3"|sed "%sedstr%"|tr -d "\n" > #.tmp echo. echo. google blogger post #.tmp --title=%1 del #.tmp goto:eof
No comments:
Post a Comment