class ConfigTsvReader(Config): """ Parameters to configure a TSV reader object """ check_non_ascii = ParamCreator.create_bool( help_string="check non ascii", default=CHECK_NON_ASCII, ) validate_all_lines_same_number_of_fields = ParamCreator.create_bool( help_string="validate all lines same number of fields", default=VALIDATE_ALL_LINES_SAME_NUMBER_OF_FIELDS, )
class ConfigOutput(Config): """ Parameters to control output """ verbose = ParamCreator.create_bool( help_string="be verbose?", default=False, ) suppress_warnings = ParamCreator.create_bool( help_string="suppress warnings?", default=False, )
class ConfigSubprocess(Config): """ Parameters to configure how we run subprocess """ print_command = ParamCreator.create_bool( help_string="print out commands", default=True, ) quiet = ParamCreator.create_bool( help_string="Suppress output?", default=False, )
class ConfigOutput(Config): """ Parameters to configure the output of pydmt """ verbose = ParamCreator.create_bool( help_string="Should output be verbose?", default=True, ) print_not = ParamCreator.create_bool( help_string="print out what we are not doing", default=False, )
class ConfigDebug(Config): """ Parameters for debug """ debug_verbose = ParamCreator.create_bool( help_string="be verbose?", default=False, ) git_verbose = ParamCreator.create_bool( help_string="add --verbose when running git?", default=False, ) git_quiet = ParamCreator.create_bool( help_string="add --quiet when running git?", default=False, )
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=".", )
class ConfigCheckUnique(Config): """ Configure whether or not to check a column for uniqueness """ check_unique = ParamCreator.create_bool( help_string="check that the value_column has unique values?", default=True, )
class ConfigCsvToTsv(Config): """ Parameters to control the CSV to TSV conversion process """ set_max = ParamCreator.create_bool( help_string= "do you want to unset the limit on csv fields (good for large fielded csv files)", default=True, ) replace_tabs_with_spaces = ParamCreator.create_bool( help_string="do you want to replace tabs with spaces?", default=True, ) check_num_fields = ParamCreator.create_bool( help_string="check that all lines have the same number of fields?", default=CHECK_NUM_FIELDS, )
class ConfigStart(Config): """ Parameters for the start command """ force = ParamCreator.create_bool( help_string="remove target files if they are links?", default=True, )
class ConfigApt(Config): """ Parameters to configure how we run apt """ apt_quiet = ParamCreator.create_bool( help_string="pass -q=2 to apt", default=False, )
class ConfigSudo(Config): """ Parameters to control whether we use 'sudo' or not """ sudo = ParamCreator.create_bool( help_string="use sudo?", default=True, )
class ConfigFilter(Config): """ Parameters to select if the use the filter or not """ filter = ParamCreator.create_bool( default=True, help_string="use filter for the instances", )
class ConfigFlow(Config): """ Parameters to configure the flow of pydmt """ stop_after_error = ParamCreator.create_bool( help_string="Should pydmt stop after first error?", default=True, )
class ConfigProgress(Config): """ Parameters to control progress reporting """ progress = ParamCreator.create_bool( help_string="do you want progress report", default=True, )
class ConfigDebugUrls(Config): """ Configure how to debug urls """ save = ParamCreator.create_bool( help_string="Do you want to save urls?", default=False, )
class ConfigDummy(Config): """ Parameters for nothing """ doit = ParamCreator.create_bool( help_string="actually perform the actions?", default=True, )
class ConfigTarget(Config): """ Parameters to configure what is the target of the build """ dev = ParamCreator.create_bool( help_string="Is the target to build a dev environment?", default=True, )
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, )
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")
class ConfigFloatingPoint(Config): """ Parameters to select whether to work with floating point or not """ floating_point = ParamCreator.create_bool( help_string="work with floating point?", default=True, )
class ConfigPull(Config): """ Parameters for the pull command """ pull_quiet = ParamCreator.create_bool( help_string="add --quiet when running git?", default=True, )
class ConfigOutput(Config): """ Parameters to control output """ terse = ParamCreator.create_bool( help_string="be terse?", default=False, ) stats = ParamCreator.create_bool( help_string="show statistics are the end?", default=False, ) output = ParamCreator.create_bool( help_string="show projects?", default=True, ) print_not = ParamCreator.create_bool( help_string="print what the project is not", default=False, )
class ConfigMain(Config): """ Main parameters """ sort = ParamCreator.create_bool( help_string="sort results by project name?", default=True, ) glob = ParamCreator.create_str( help_string="what glob to use?", default="*/*.git" ) use_glob = ParamCreator.create_bool( help_string="Should I use glob or list of folders?", default=True, ) folders = ParamCreator.create_list_str( help_string="what list of folders to use?", default=[], )
class ConfigFixTypes(Config): """ Parameters to control which fixes to apply to a TSV file. """ clean_edges = ParamCreator.create_bool( help_string="remove space before and after", default=CLEAN_EDGES, ) sub_trailing = ParamCreator.create_bool( help_string="substitute consecutive white spaces with one single space", default=SUB_TRAILING, ) remove_non_ascii = ParamCreator.create_bool( help_string="remove non ascii characters", default=REMOVE_NON_ASCII, ) lower_case = ParamCreator.create_bool( help_string="lower case the field", default=LOWER_CASE, )
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, )
class ConfigParallel(Config): """ Parameters to configure how thing should run in parallel """ parallel = ParamCreator.create_bool( help_string="do things in parallel?", default=False, ) jobs = ParamCreator.create_int( help_string="how many jobs to run in parallel", default=multiprocessing.cpu_count(), )
class ConfigLMDB(Config): """ Parameters that control working with LMDB (experts only) """ map_size = ParamCreator.create_int( help_string="Which size of mmap to use?", default=1000000000000, ) buffers = ParamCreator.create_bool( help_string="Should we use buffers? (lmdb default is False)", default=False, )
class ConfigYoutubeDl(Config): """ Configuration for youtube downloads """ use_archive = ParamCreator.create_bool( help_string="Should we use an archive?", default=True, ) archive_file = ParamCreator.create_existing_file( help_string="What file to use as archive?", default=os.path.expanduser('~/.config/youtube-dl-archive'), )
class ConfigSymlinkInstall(Config): """ Parameters for the symlink install tool """ source_folder = ParamCreator.create_existing_folder( help_string="Which folder to install from?", ) target_folder = ParamCreator.create_existing_folder( help_string="Which folder to install to?", ) recurse = ParamCreator.create_bool( help_string="should I recurse?", default=True, ) doit = ParamCreator.create_bool( help_string="actually perform the actions?", default=True, ) debug = ParamCreator.create_bool( help_string="print what we are doing?", default=True, ) force = ParamCreator.create_bool( help_string="remove target files if they are links?", default=True, )
class ConfigRequests(Config): """ Parameters to config the requests module """ connect_timeout = ParamCreator.create_int_or_none( help_string="Timeout for connections in seconds (none means endless)", default=5, ) read_timeout = ParamCreator.create_int_or_none( help_string="Timeout for reading in seconds (none means endless)", default=5, ) debug = ParamCreator.create_bool( help_string="Do you want to debug the requests module?", default=False, )