extract-posts.html
001| '''\
001| Extract Post.
001|
001| Invoke the BAT file to extract post(s).
001|
001| '''
002|
003| from sys import stdin, stdout, stderr, argv
004| from os import path, system
005| from datetime import datetime
006|
007|
008| BatFile = r'C:\CJS\pen\BookOfBOOL\bu\wp-extract-post.bat'
009|
010| XmlFile = r'C:\CJS\www\root\cjs\blog\bob\bookofbool_2016-08-08.xml'
011|
012|
013|
014| PostIds = [
015| 8, 11, 28, 30, 32, 35, 37, 39, 41, 52, 55, 60, 64, 66, 68,
016| 71, 73, 75, 78, 80, 83, 85, 87, 104, 106, 108, 114, 120, 124, 127,
017| 132, 141, 145, 167, 170, 219, 223, 227, 229, 234, 238, 240, 244, 248
018| ]
019|
020|
021|
022|
023|
024| def do_main (cmnd, args=[]):
025| '''Extract Post Pages.'''
026|
027|
028| for pid in PostIds:
029| command = '%s %s %d' % (BatFile, XmlFile, pid)
030| print command
031| system(command)
032|
033|
034|
035| if __name__ == '__main__':
036| print 'autorun: %s' % argv[0]
037| cmd = argv[1] if 1 < len(argv) else ''
038| etc = argv[2:]
039| do_main(cmd, etc)
040|
041| '''eof'''
042|