# # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import os import glob from e3pipe.__logging__ import logger from e3pipe.misc.E3FileCrawlerBase import E3FileCrawlerBase from e3pipe.misc.E3RawFileCrawler import E3RawFileCrawler from e3pipe.misc.E3DstFileCrawler import E3DstFileCrawler from e3pipe.misc.E3LockFileCrawler import E3LockFileCrawler from e3pipe.dst.__time__ import str2date, date2str END_DATE = str2date('2014-11-14') DAYS_SPANNED = 19 STATIONS = [ 'ALTA-01', 'BARI-01', 'BOLO-03', 'CAGL-01', 'CAGL-02', 'CAGL-03', 'CATA-02', 'CATZ-01', 'FRAS-02', 'GROS-01', 'LAQU-01', 'LAQU-02', 'LECC-01', 'LECC-02', 'LODI-01', 'PISA-01', 'SAVO-01', 'SAVO-02', 'TORI-04', 'TRAP-01', 'TRIN-01', 'VIAR-01', 'VIAR-02' ] class E3RawFileCrawlerStat(E3RawFileCrawler): """ """ def __init__(self): """ Constructor. """
# with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import os import glob from e3pipe.__logging__ import logger from e3pipe.misc.E3FileCrawlerBase import E3FileCrawlerBase from e3pipe.misc.E3RawFileCrawler import E3RawFileCrawler from e3pipe.misc.E3DstFileCrawler import E3DstFileCrawler from e3pipe.misc.E3LockFileCrawler import E3LockFileCrawler from e3pipe.dst.__time__ import str2date, date2str END_DATE = str2date('2014-11-14') DAYS_SPANNED = 19 STATIONS = [ 'ALTA-01', 'BARI-01', 'BOLO-03', 'CAGL-01', 'CAGL-02', 'CAGL-03', 'CATA-02', 'CATZ-01', 'FRAS-02', 'GROS-01', 'LAQU-01', 'LAQU-02', 'LECC-01',
parser.add_option('-d', '--dry-run', action='store_true', default=False, dest='dry', help='do not process (only populate the file list)') (opts, args) = parser.parse_args() # Make sure we are passing some argument. if len(args): parser.print_help() parser.error('This app only takes options.') # Print the start message. from e3pipe.__logging__ import startmsg startmsg() # Import the necessary stuff. from e3pipe.tasks.e3jointCrawl import e3jointCrawl # And now we are ready to go. end = opts.end if end is None: import datetime end = datetime.date.today() else: from e3pipe.dst.__time__ import str2date end = str2date(end) e3jointCrawl(end, opts.span, opts.minsize, opts.blacklist, opts.overwrite, opts.maxruns, opts.dry)
help = 'the maximum number of runs to be merged') parser.add_option('-s', '--station', type = str, default = None, dest = 'station', help = 'the station to be processed') parser.add_option('-o', '--output-folder', type = str, default = None, dest = 'out', help = 'path to the output folder') (opts, args) = parser.parse_args() # Print the start message. from e3pipe.__logging__ import startmsg startmsg() # Import the necessary stuff. from e3pipe.tasks.e3report import e3report if len(args): parser.error('This apps only takes options.') if opts.station is None: parser.error('Please select the station (e3report.py -s station)') # And now we are ready to go. if opts.end is None: import datetime end = datetime.date.today() else: from e3pipe.dst.__time__ import str2date end = str2date(opts.end) e3report(opts.station, end, opts.span, opts.out)
parser.add_option('-f', '--force-overwrite', action = 'store_true', default = False, dest = 'overwrite', help = 'overwrite runs that are already processed') parser.add_option('-d', '--dry-run', action = 'store_true', default = False, dest = 'dry', help = 'do not process (only populate the file list)') (opts, args) = parser.parse_args() # Make sure we are passing some argument. if len(args): parser.print_help() parser.error('This app only takes options.') # Print the start message. from e3pipe.__logging__ import startmsg startmsg() # Import the necessary stuff. from e3pipe.tasks.e3jointCrawl import e3jointCrawl # And now we are ready to go. end = opts.end if end is None: import datetime end = datetime.date.today() else: from e3pipe.dst.__time__ import str2date end = str2date(end) e3jointCrawl(end, opts.span, opts.minsize, opts.blacklist, opts.overwrite, opts.maxruns, opts.dry)
# Import the necessary stuff. from e3pipe.tasks.e3report import e3report if len(args): parser.error('This app only takes options.') if opts.statfile is None: parser.error('Please select an input file (e3report.py -F file)') # And now we are ready to go. if opts.end is None: import datetime end = datetime.date.today() else: from e3pipe.dst.__time__ import str2date end = str2date(opts.end) import os if not os.path.isfile(opts.statfile): abort('Could not find input file %s' % opts.statfile) stations = [line.split()[0] for line in open(opts.statfile)] import e3pipe.__utils__ as __utils__ for station in stations: logger.info('Creating report for %s...' % station) _cmd = 'e3report.py -s %s -E %s -N %d -o %s' %\ (station, end, opts.span, opts.out) exitCode = __utils__.cmd(_cmd)