Ejemplo n.º 1
0
        input_ = fp.path
        mp = player.identify(fp)
        if not extract.extractClip(clip, output, resolution, mp, cleanup=False):
            continue
        #if not extract.testExtraction(output):
        #    continue
        duration += clip.duration
        print "Done with {} from Clip {} for {} seconds total ({})".format(
            i, clip.id_, duration, datetime.datetime.now() - start)
        success.append(clip)
    return success


parser = argparse.ArgumentParser(
    description='Extract clips from p**n collection',
    parents=[select.getParser(default_tracker='existing'),
             filters.getParser(), project.getParser(), library.getParser()])
parser.add_argument('files', nargs='*', help='files to play; play entire collection if omitted')
parser.add_argument('--output', help='directory for output', default='.')
parser.add_argument('--time', default=5, type=int, help="minutes of clips to extract")
parser.add_argument('--shuffle', default=True, type=util.flexibleBoolean)
parser.add_argument('--extra', default='', help='extra args to pass to player')
parser.add_argument('--resolution')
parser.add_argument('--images', nargs='*', help='images to insert between clips')
parser.add_argument('--only-blanks', action='store_true')
ARGS = parser.parse_args()

try:
    script.standardSetup(copy_db=False, file_handler=False)
    logging.info('****** Starting new script ********')
Ejemplo n.º 2
0
from porntool import movie
from porntool import project
from porntool import rating
from porntool import reviewer
from porntool import script
from porntool import segment
from porntool import select
from porntool import tables as t
from porntool import util
from porntool import widget
from porntool.replay_porn import *


parser = argparse.ArgumentParser(
    description='Play clips for p**n collection',
    parents=[select.getParser(), filters.getParser(), project.getParser(), library.getParser()])

parser.add_argument('--shuffle', default=True, type=util.flexibleBoolean, help='shuffle file list')
parser.add_argument('--no-edit', action='store_true', default=False)
parser.add_argument('--extra', default='')
ARGS = parser.parse_args()

CLIP_PLAYER = None

try:
    script.standardSetup()
    logging.info('****** Starting new script ********')

    filepaths = library.getFilePaths(ARGS)
    logging.debug('filepaths: %s', len(filepaths))
    db.getSession().commit()