PYTHON   95

keyword scraper tool py

Guest on 21st August 2022 08:40:52 AM

  1. import sys
  2. import keyword_scraper
  3.  
  4. '''
  5. Invokes keyword_scraper over command line
  6.        
  7. Example:
  8.  
  9.         $ python keyword_scraper_tool.py geshi_lang_file.php somedir
  10. '''
  11.  
  12. if len(sys.argv) < 2:
  13.         print "Usage: keyword_scraper_tool <inputfile> [directory]"
  14.         exit()
  15. else:
  16.         infile = sys.argv[1]
  17.         outdir = sys.argv[2] if len(sys.argv) >= 3 else None
  18.         keyword_scraper.keywords(infile, outdir)

Raw Paste


Login or Register to edit or fork this paste. It's free.