Ejemplo n.º 1
0
def main():
    parser = argparse.ArgumentParser(
        description='Photo file name replacer with timestamp')
    parser.add_argument('-e',
                        '--extension',
                        help='File extension to be used',
                        required=True)
    parser.add_argument('-o',
                        '--output',
                        help='You need to provide the output folder.',
                        required=True)
    parser.add_argument(
        '-m',
        '--mode',
        help=
        'Operation Mode. Choose between "move" or "copy". Use move AT YOUR OWN RISK!',
        required=True)
    parser.add_argument(
        "--chicken",
        help=
        "Chicken mode. Only shows what to do. Does NOT CHANGE anything. You can send this output to a text file, edit it and run it by yourself.",
        action="store_true")
    # parser.add_argument(
    #    "--exif", help="Prefer EXIF information. If not found, use file timestamp.", action="store_true")

    args = parser.parse_args()
    if args.chicken:
        print("#"),
    print color(yellow, 1) + "UPhO - Ultra Photo Organizer" + color(
        white,
        0) + " v" + get_version() + " by Marco Lovato ([email protected])"
    process_folder(args.extension, args.chicken, args.mode, args.output)
Ejemplo n.º 2
0
    def __init__(self, target_os, packaging_server=False, appstore=False):
        self.components_dir = None
        self.version = __init__.get_version()
        self.excludes = [".pdb", ".exp", ".ilk", ".lib", ".svn", ".git", ".gitignore", ".cvsignore"]

        # Do not include WebKit for app store builds.
        if appstore:
            self.excludes.extend(["WebKit.framework", "WebCore.framework", "JavaScriptCore.framework"])

        self.target_os = target_os

        script_dir = p.abspath(p.dirname(sys._getframe(0).f_code.co_filename))
        if packaging_server:
            self.init_packaging_server_dirs(script_dir)
        else:
            self.init_normal_dirs(script_dir)
Ejemplo n.º 3
0
    def __init__(self, target_os, packaging_server=False, appstore=False):
        self.components_dir = None
        self.version = __init__.get_version()
        self.excludes = ['.pdb', '.exp', '.ilk', '.lib', '.svn',
            '.git', '.gitignore', '.cvsignore']
            
        # Do not include WebKit for app store builds.
        if appstore:
            self.excludes.extend([
                'WebKit.framework',
                'WebCore.framework',
                'JavaScriptCore.framework'])

        self.target_os = target_os

        script_dir = p.abspath(p.dirname(sys._getframe(0).f_code.co_filename))
        if packaging_server:
            self.init_packaging_server_dirs(script_dir)
        else:
            self.init_normal_dirs(script_dir)
Ejemplo n.º 4
0
def main():
    parser = argparse.ArgumentParser(
        description='Photo file name replacer with timestamp')
    parser.add_argument(
        '-e', '--extension', help='File extension to be used', required=True)
    parser.add_argument(
        '-o', '--output', help='You need to provide the output folder.', required=True)
    parser.add_argument(
        '-m', '--mode', help='Operation Mode. Choose between "move" or "copy". Use move AT YOUR OWN RISK!', required=True)
    parser.add_argument(
        "--chicken", help="Chicken mode. Only shows what to do. Does NOT CHANGE anything. You can send this output to a text file, edit it and run it by yourself.", action="store_true")
    # parser.add_argument(
    #    "--exif", help="Prefer EXIF information. If not found, use file timestamp.", action="store_true")

    args = parser.parse_args()
    if args.chicken:
        print("#"),
    print color(yellow, 1) + "UPhO - Ultra Photo Organizer" + color(white, 0) + " v" + get_version() + " by Marco Lovato ([email protected])"
    process_folder(args.extension, args.chicken, args.mode, args.output)
Ejemplo n.º 5
0
import logging
import os
import sys

from __init__ import get_version
from config import Config
from episode import Episode
from errors import *
from logs import start_logging
from main import TvRenamr
from options import OptionParser

log = logging.getLogger("Core")

parser = OptionParser(usage="tvr [options] <file/folder>", version="Tv Renamr %s" % get_version())
options, args = parser.parse_args()


class FrontEnd:
    def __init__(self, path):
        # start logging
        if options.debug:
            options.log_level = 10
        start_logging(options.log_file, options.log_level, options.quiet)

        possible_config = (
            options.config,
            os.path.expanduser("~/.tvrenamr/config.yml"),
            os.path.join(sys.path[0], "config.yml"),
        )