pygetpapers module
- class pygetpapers.pygetpapers.ApiPlugger(query_namespace)
Bases:
object
- add_terms_from_file()
Builds query from terms mentioned in a text file described in the argparse namespace object. See (https://pygetpapers.readthedocs.io/en/latest/index.html?highlight=terms#querying-using-a-term-list) Edits the namespace object’s query flag. :param query_namespace: namespace object from argparse (using –terms and –notterms)
- check_query_logic_and_run()
Checks the logic in query_namespace and runs pygetpapers for the given query
- setup_api_support_variables(config, api)
Reads in the configuration file namespace object and sets up class variable for the given api :param config: Configparser configured configuration file :type config: configparser object :param api: the repository to get the variables for :type api: string
- class pygetpapers.pygetpapers.Pygetpapers
Bases:
object
[summary]
- create_argparser()
Creates the cli
- generate_logger(query_namespace)
Creates logger for the given loglevel :param query_namespace: pygetpaper’s name space object :type query_namespace: dict
- static makes_output_directory(query_namespace)
Makes the output directory for the given output in query_namespace :param query_namespace: pygetpaper’s name space object :type query_namespace: dict
- run_command(output=None, query=None, save_query=False, xml=False, pdf=False, supp=False, zip=False, references=False, noexecute=False, citations=False, limit=100, restart=False, update=False, onlyquery=False, makecsv=False, makehtml=False, synonym=False, startdate=False, enddate=False, terms=False, notterms=False, api='europe_pmc', filter=None, loglevel='info', logfile=False, version=False)
Runs pygetpapers for the given parameters
- runs_pygetpapers_for_given_args(query_namespace)
Runs pygetpapers for flags described in a dictionary :param query_namespace: pygetpaper’s namespace object :type query_namespace: dict
- static write_configuration_file(query_namespace)
Writes the argparse namespace to SAVED_CONFIG_INI :param query_namespace: argparse namespace object
- write_logfile(query_namespace, level)
This functions stores logs to a logfile :param query_namespace: argparse namespace object :param level: level of logger (See https://docs.python.org/3/library/logging.html#logging-levels)
- pygetpapers.pygetpapers.main()
Runs the CLI