dob.facts package

Submodules

dob.facts.add_fact module

dob.facts.add_fact.add_fact(controller, factoid, time_hint, use_carousel=False, edit_text=False, edit_meta=False, yes=False, dry=False)[source]

Start or add a fact.

Parameters:
  • factoid (str) – factoid detailing Fact to be added. See elsewhere for the factoid format.
  • time_hint (str, optional) – One of: | ‘verify_none’: Do not expect to find any time encoded in factoid. | ‘verify_both’: Expect to find both start and end times. | ‘verify_start’: Expect to find just one time, which is the start. | ‘verify_end’: Expect to find just one time, which is the end. | ‘verify_then’: Optional time is new start; and either extend ongoing fact to new start, or back-fill interval gap. | ‘verify_still’: Optional time is new start; copy prev meta to new Fact; either extend ongoing fact, or back-fill interval gap. | ‘verify_after’: No time spec. Start new Fact at time of previous end.
  • yes (bool, optional) – If True, update other Facts changed by the new fact being added (affects other Facts’ start/end/deleted attrs). If False, prompt user (i.e., using fancy interface built with python-prompt-toolkit) for each conflict.
  • edit_meta (bool, optional) – If True, prompt user for activity and/or category, if not indicated; and prompt user for tags. Shows MRU lists to try to make it easy for user to specify commonly used items.
Returns:

If everything went alright. (Otherwise, will have exited.)

Return type:

Nothing

dob.facts.cancel_fact module

dob.facts.cancel_fact.cancel_fact(controller, purge=False)[source]

Cancel current Fact, either marking it deleted, or really removing it.

Returns:If success.
Return type:None
Raises:KeyErŕor – No active Fact can be found.

dob.facts.echo_fact module

dob.facts.echo_fact.echo_fact(fact)[source]
dob.facts.echo_fact.echo_latest_ended(controller)[source]
dob.facts.echo_fact.echo_ongoing_fact(controller)[source]

Return current active Fact.

Returns:If everything went alright.
Return type:None
Raises:click.ClickException – If we fail to fetch any active Fact.
dob.facts.echo_fact.echo_ongoing_or_ended(controller)[source]

dob.facts.edit_fact module

dob.facts.edit_fact.edit_fact_by_pk(controller, key, use_carousel=True, edit_text=False, edit_meta=False)[source]

dob.facts.import_facts module

A time tracker for the command line. Utilizing the power of nark.

dob.facts.import_facts.import_facts(controller, file_in=None, file_out=None, rule='', backup=True, leave_backup=False, use_carousel=False, dry=False, **kwargs)[source]

Import Facts from STDIN or a file.

dob.facts.save_backedup module

dob.facts.save_backedup.prompt_and_save_backedup(controller, backup=True, leave_backup=False, rule='', dry=False, **kwargs)[source]

dob.facts.save_confirmed module

dob.facts.save_confirmed.prompt_and_save_confirmed(controller, edit_facts=None, orig_facts=None, use_carousel=False, backup_callback=None, file_out=None, rule='', yes=False, dry=False, progress=None, **kwargs)[source]

dob.facts.save_confirmer module

dob.facts.save_confirmer.prompt_and_save_confirmer(controller, edit_facts=None, orig_facts=None, backup_callback=None, file_out=None, rule='', yes=False, dry=False, progress=None, **kwargs)[source]

dob.facts.simple_prompts module

dob.facts.simple_prompts.mend_facts_confirm_and_save_maybe(controller, fact, time_hint, other_edits, yes, dry)[source]

Module contents

dob commands that deal with creating/editing/exporting/importing facts.