Ejemplo n.º 1
0
class ConfigDownload(Config):
    """
    Configure details about the download process
    """
    download_as_collecting = ParamCreator.create_bool(
        help_string="Do you want download while collecting the urls?",
        default=False,
    )
    download = ParamCreator.create_bool(
        help_string="really download or just print the urls?",
        default=True,
    )
    folder = ParamCreator.create_existing_folder(
        help_string="where to save the data to?",
        default=".",
    )
Ejemplo n.º 2
0
class ConfigDebugRequests(Config):
    """
    Configure how to user the requests module
    """
    debug = ParamCreator.create_bool(
        help_string="Do you want to debug the requests module?",
        default=False,
    )
Ejemplo n.º 3
0
class ConfigAll(Config):
    """
    All parameters for the run
    """
    do_ps = ParamCreator.create_bool(default=True,
                                     help_string="do postscript?")
    do_pdf = ParamCreator.create_bool(default=True, help_string="do pdf?")
    do_debug = ParamCreator.create_bool(default=False,
                                        help_string="emit debug info?")
    unlink_ps = ParamCreator.create_bool(
        default=False, help_string="unlink the postscript file at the end?")
    do_qpdf = ParamCreator.create_bool(
        default=True,
        help_string="do you want to linearize the pdf file afterwards?")
    # we should work with warnings and try and solve all of them
    loglevel = ParamCreator.create_enum(
        enum_type=LilypondLogLevels,
        default=LilypondLogLevels.WARNING,
        help_string="what warning level do you want?",
    )
    do_pdfred = ParamCreator.create_bool(
        default=False, help_string="should we reduce the pdf size?")
    # this should be set to True
    stop_on_output = ParamCreator.create_bool(
        default=True,
        help_string="should we stop on any output from the lilypond process?",
    )

    # parameters without defaults (should be supplied by the user on the command line)
    ps = ParamCreator.create_new_file(help_string="postscript to produce")
    pdf = ParamCreator.create_new_file(help_string="pdf to produce")
    out = ParamCreator.create_str(help_string="pdf without suffix")
    ly = ParamCreator.create_existing_file(help_string="lilypond input")
Ejemplo n.º 4
0
class ConfigPornhubSearch(Config):
    """
    Parameters for search
    """
    query = ParamCreator.create_str(help_string="What is the query string?", )
    use_ordering = ParamCreator.create_bool(
        help_string="use ordering in the search operation",
        default=True,
    )
    ordering = ParamCreator.create_choice(
        choice_list=["longest", "featured", "newest", "mostviewed", "rating"],
        help_string="by which ordering to fetch result?",
        default="longest",
    )
    use_period = ParamCreator.create_bool(
        help_string="use period in the search operation",
        default=False,
    )
    period = ParamCreator.create_choice(
        choice_list=["weekly", "monthly", "alltime"],
        help_string="what period to search?",
        default="weekly",
    )
    use_tags = ParamCreator.create_bool(
        help_string="should we use tags in search?",
        default=False,
    )
    tags = ParamCreator.create_list_str(
        help_string="tags to be used in search",
        default=[],
    )
    literal = ParamCreator.create_str(
        help_string="literal for tags (one character)",
        default="f",
    )
    limit = ParamCreator.create_int_or_none(
        help_string="Limit on search results or None for no limit",
        default=100,
    )