extract-pages.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-page.bat'
009| 
010| XmlFile = r'C:\CJS\www\root\cjs\blog\bob\bookofbool_2016-08-08.xml'
011| 
012| 
013| ##------------------------------------------------------------------------------------------------##
014| PostIds = [
015|     1, 6, 13, 15, 158, 160, 162, 195, 200, 204, 209
016| ]
017| 
018| 
019| ####################################################################################################
020| # For each PID, extract the Post into an HTML file...
021| #
022| def do_main (cmnd, args=[]):
023|     '''Extract Post Pages.'''
024| 
025|     # For each PID, generate an HTML Post Page...
026|     for pid in PostIds:
027|         command = '%s %s %d' % (BatFile, XmlFile, pid)
028|         print command
029|         system(command)
030| 
031| 
032| ####################################################################################################
033| if __name__ == '__main__':
034|     print 'autorun: %s' % argv[0]
035|     cmd = argv[1] if 1 < len(argv) else ''
036|     etc = argv[2:]
037|     do_main(cmd, etc)
038| ####################################################################################################
039| '''eof'''
040|