HACK Add option for today entry in file
This commit is contained in:
parent
08e73398e9
commit
38984a1688
2 changed files with 10 additions and 1 deletions
|
@ -62,7 +62,7 @@ def process_file(options):
|
||||||
if lines_to_delete:
|
if lines_to_delete:
|
||||||
delete_lines_from_file(fname, lines_to_delete, options.dryrun)
|
delete_lines_from_file(fname, lines_to_delete, options.dryrun)
|
||||||
|
|
||||||
if not today_exists:
|
if not today_exists and options.taskwarrior_fill_today:
|
||||||
add_today(fname, options)
|
add_today(fname, options)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ class Options:
|
||||||
dryrun: bool = False
|
dryrun: bool = False
|
||||||
taskwarrior_log_completed: bool = True
|
taskwarrior_log_completed: bool = True
|
||||||
taskwarrior_add_incomplete: bool = True
|
taskwarrior_add_incomplete: bool = True
|
||||||
|
taskwarrior_fill_today: bool = True
|
||||||
|
|
||||||
# can not yet be changed
|
# can not yet be changed
|
||||||
taskwarrior_overrides: List = field(
|
taskwarrior_overrides: List = field(
|
||||||
|
@ -56,6 +57,12 @@ def parse_cmdline_args(options):
|
||||||
help="don't add incomplete todo items to taskwarrior",
|
help="don't add incomplete todo items to taskwarrior",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-T",
|
||||||
|
"--nofilltoday",
|
||||||
|
help="don't add today's todo items as entry to file",
|
||||||
|
action="store_true",
|
||||||
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.dryrun:
|
if args.dryrun:
|
||||||
|
@ -64,6 +71,8 @@ def parse_cmdline_args(options):
|
||||||
options.taskwarrior_log_completed = False
|
options.taskwarrior_log_completed = False
|
||||||
if args.noincomplete:
|
if args.noincomplete:
|
||||||
options.taskwarrior_add_incomplete = False
|
options.taskwarrior_add_incomplete = False
|
||||||
|
if args.nofilltoday:
|
||||||
|
options.taskwarrior_fill_today = False
|
||||||
if args.file:
|
if args.file:
|
||||||
options.jrnl_fname = args.file
|
options.jrnl_fname = args.file
|
||||||
if args.blocktitle:
|
if args.blocktitle:
|
||||||
|
|
Loading…
Reference in a new issue