API reference¶
-
cmdline_provenance.get_current_entry(code_url=None)¶ Create a record of the current command line entry.
- Kwargs:
- code_url (str): Where to find the code online
- (e.g. https://github.com/… or https://doi.org/…)
- Returns:
- str. Latest command line record
-
cmdline_provenance.new_log(infile_logs=None, extra_notes=None, code_url=None)¶ Create a new command log/history.
- Kwargs:
- infile_logs (dict): Keys are input file names
- Values are the logs for those files
- extra_notes (list): Extra information to include in new log
- (output is one list item per line)
- code_url (str): Where to find the code online
- (e.g. https://github.com/… or https://doi.org/…)
- Returns:
- str. Command log
-
cmdline_provenance.read_log(fname)¶ Read a log file.
- Args:
- fname (str): Name of log file
- Returns:
- str. Command log
-
cmdline_provenance.write_log(fname, cmd_log)¶ Write an updated command log/history to a text file.
- Args:
- fname (str): Name of output file cmd_log (str): Command line log produced by new_log()