HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
test_pubdate.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 
3 
4 '''
5 HCE project, Python bindings, Distributed Crawler application.
6 Application level constants and enumerations.
7 
8 @package: dc
9 @author bgv bgv.hce@gmail.com
10 @link: http://hierarchical-cluster-engine.com/
11 @copyright: Copyright © 2013-2014 IOIX Ukraine
12 @license: http://hierarchical-cluster-engine.com/license/
13 @since: 0.1
14 '''
15 
16 
17 import ppath
18 from ppath import sys
19 
20 import logging
21 
22 from dc_processor.Scraper import Scraper # pylint: disable-all
23 import app.Consts as APP_CONSTS # pylint: disable-all
24 
25 
26 if __name__ == "__main__":
27  input_date = sys.stdin.read()
28  # input_date = unicode(input_date, errors='replace')
29  # input_date = unicode(input_date, errors='ignore')
30  input_date = input_date.decode("utf-8")
31  scraper = Scraper()
32  # print scraper.logger
33  logging.config.fileConfig("../ini/scraper_log.ini")
34  scraper.logger = logging.getLogger(APP_CONSTS.LOGGER_NAME)
35  # print scraper.logger
36 
37  # scraper.setup()
38  print scraper.convertPubDateToRFC2822(input_date)