1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-20 13:58:33 +00:00
Commit graph

785 commits

Author SHA1 Message Date
David Steele 5d7a742095 Use todo.txt spec for id-ing completed tasks
Topydo was only identifying a task as completed if it included a
completion date (which topydo automatically adds). This affects
compatibility with other todo.txt apps, making archiving unreliable.
2023-08-14 10:14:31 -04:00
David Steele d96572c088 Drop support for Python 3.2
The code had a backport shim for importing shutil get_terminal_size.
For modern versions, the call is in shutil in the standard library.
Starting with 3.9, on Debian, the backport reference causes a FTBFS.

Drop the workaround.

Support for security fixes for Python 3.2 ended in 2016.
2022-12-06 15:03:29 -05:00
David Steele 2a9feba408
Merge pull request #303 from BioBox/del_pri
Add ability to remove priorities.
2022-10-01 15:01:41 -04:00
Daniel J. Perry 7995eed4ba Add ability to remove priorities. 2022-09-30 16:07:13 -04:00
Daniel J. Perry 0c0fb14071 Fix typo on ls format specifiers 2022-09-28 22:51:45 -04:00
niconfus 7206d6c7ed Respect auto_creation_date when advancing recurring tasks 2021-02-06 21:24:21 -05:00
Jacek Sowiński 3d34497576 Highlight title widget of currently focused column
Previously there wasn't any indicator of focus for empty columns. Now
title widget is highlighted then. Color is the same as for TodoWidget
focus and already configured by 'focus_background_color'.
2020-11-23 12:33:44 +01:00
Jacek Sowiński 00d2496e5c Fix focus at the bottom and the top of the column
When scrolling down we need to switch to valign=bottom to properly show
last lines of the TodoWidget at the end of the TodoListWidget. Also
config <Down> key to use 'down' action in default config. Without such
config entry, using <Down> key would not take advantage of valign fix.

Also do not focus dividers when jumping with 'home' shortcut.
2020-11-23 07:35:21 +01:00
Jacek Sowiński 37fcd38d61 Convert timestamp to float before using with arrow
arrow>=0.15.0 doesn't accept timestamps given as `str`. Unfortunately
`json` used in ChangeSet doesn't preserve `float` type in dictionary
keys and always converts it to `str`. This leaded to feeding `arrow`
with unsupported strings.

Read note at: https://docs.python.org/3/library/json.html#json.dumps for
further explanation.

This fixes #271 and #274
2020-11-18 11:42:39 -05:00
Spencer Taylor 60c072eba0 Set default priority of tasks to 'M' level
Previously, unprioritized tasks were set below all other tasks. This
change sets unprioritized tasks directly in the middle of all task
prioritizations.
2020-10-07 22:27:25 -04:00
David Steele 0bf7b8030e Add auto_delete_whitespace config variable
Make the feature that deletes blank lines on load optional.

Defaults to true, to preserve existing behavior.
2020-10-05 21:32:14 -04:00
Kirill Smelkov 09438df104 edit: Don't move modified todo items to the end of file
Before this patch a `t edit ...` will remove todo items selected by
`...` and then do equivalent of `t add` with input from result of
editing. This works, but has the property that whenever a todo item is
edited, it is always moved till the end of todo.txt file.

This property creates noise and makes synchronization harder to implement for
some of us who uses VCS and different machines to maintain todo.txt .

-> Teach edit to preserve todo items in their places. Adjust existing
tests and add a couple more exercising cases where either new todo
items are added in the editor, or vice versa, removed in the editor.

/cc @mruwek
2020-10-05 20:45:38 -04:00
David Steele 767bea58a0 Start documenting the 0.14 release 2020-10-04 20:59:11 -04:00
David Steele 917e60b8e6 isort fix 2020-10-02 21:12:05 -04:00
David Steele e7ffc32168 Some more escape deprecation fixes 2020-03-05 10:31:48 -05:00
Bram Schoenmakers 18056921a3 Don't treat timestamps in HH:MM format as tags
When you enter a todo item: "Call office at 09:00", the 09:00 would be
seen as a tag-value pair. Because of this, the timestamp would be
removed from the todo text: "Call office at ".

Discussed in issue #211.
2017-11-28 13:16:30 +01:00
Bram Schoenmakers e28607b67a Show completed items at the bottom by default 2017-08-15 14:56:30 +02:00
Bram Schoenmakers 0b33791ac7 Version bump 2017-08-13 16:08:15 +02:00
Bram Schoenmakers 91864817aa Some minor grammar fixes to the synopsis 2017-08-13 11:41:31 +02:00
Bram Schoenmakers c6e098e3fc Merge branch 'style-fixes' 2017-08-13 11:13:33 +02:00
Bram Schoenmakers 8ca31100fc Merge remote-tracking branch 'mruwek/revert-subcmds' into style-fixes 2017-08-13 11:12:22 +02:00
Bram Schoenmakers 486aa7be72 Show error when launching column mode in Windows
Related to issue #194.
2017-08-12 21:17:58 +02:00
Jacek Sowiński 2bbe8bb020 List backup points and revert to specific ones
`topydo revert ls` will now show all saved backup points with position
number (starting with 1), date and time of relevant action, and its
label.

`topydo revert 2` will revert to a point **before** the backup point
marked as 2 in `topydo revert ls` (i.e. it will go 2 changes backwards
or phrasing more naturally: revert last 2 changes).

Warning: changes between between current state and desired backup point
are also deleted to avoid false assumption that our backups can be
treated as some sort of atomic "patches".
2017-07-31 22:37:46 +02:00
Jacek Sowiński 6cb00ce038 Don't try to replace archive when archiving is off
When user disabled archive feature after he made some backups, don't try
to restore archive during `topydo revert`, as there is no file to write.
2017-07-31 22:37:46 +02:00
Jacek Sowiński 3062862194 Suggest to use pip3 over pip 2017-07-31 15:15:31 +02:00
Bram Schoenmakers 0ffb686960 Fix launching in column mode by reverting 'unnecessary lambda' fix
self.todolist may not be present; it could be None. This is the case
when the list formatter is instantiated from a TodoWidget in the column
UI, which passes None for the todo list.
2017-07-30 22:36:52 +02:00
Bram Schoenmakers 4f6c010db3 Suppress some pylint issues
The overrides are necessary to make the multicommands/widgets behave
well.
2017-07-30 13:19:53 +02:00
Bram Schoenmakers 66636fbcc4 Don't mask the imported 'date' class with a 'date' variable 2017-07-30 12:48:36 +02:00
Bram Schoenmakers 6111e209f5 Fix pylint errors for variable name and unused """comment""" 2017-07-30 12:48:09 +02:00
Bram Schoenmakers 3a52e9dc90 Sorted import statements 2017-07-30 11:34:33 +02:00
Bram Schoenmakers 751105eaac Fixed pylint errors
Among others, moved methods by turning them into (inline) functions or
static methods.
2017-07-30 11:04:51 +02:00
Bram Schoenmakers b769f4cd69 Extend table and reformat 2017-07-26 14:34:51 +02:00
Bram Schoenmakers f8d4a5af94 Deduplicate alphabet, but preserve order as it appears in the configuration 2017-07-26 14:13:50 +02:00
Bram Schoenmakers 1d33370863 Update docstrings 2017-07-22 22:40:34 +02:00
Bram Schoenmakers e22bfbdee5 Deduplicate characters in alphabet 2017-07-22 22:40:20 +02:00
Bram Schoenmakers 4e0a9ad1b1 Column mode can show IDs longer than 4 characters
The defaults / fallbacks are such that it cannot exceed 6 characters.
2017-07-20 10:39:10 +02:00
Bram Schoenmakers 894edaade1 Make alphabet of the IDs configurable
I don't like typing numbers, and would like to limit the characters to
be those that are easily reachable with a Dvorak keyboard layout.
2017-07-20 10:28:21 +02:00
Bram Schoenmakers 941a8956da Make padding of IDs dependent of todo list length
When using numerical IDs, the ID width is padded to the log10 of the
todo length.

When using textual IDs, todo lists of 466 items or shorter pad to 3
characters, otherwise 4 characters.
2017-07-20 10:02:23 +02:00
Bram Schoenmakers f57bbc0ce6 Introduce alphabetic only text ID types
Typing numbers is less convenient than typing alphabetic characters (at
least if you're a blind typer). So before resorting to numbers, try to
generate IDs with alphabetic characters only. Only when the ID space
runs out, introduce numbers.
2017-07-20 08:56:51 +02:00
Bram Schoenmakers 136cd8be81 Show a grey progress color for completed items 2017-07-19 14:19:12 +02:00
Bram Schoenmakers 19fe7d3442 Always try to convert tag values to a (humanized) date
For other tags containing date values, try to print the relative
humanized date as well. If the tag does not contain a date in YYYY-MM-DD
value, it's normal value is printed.
2017-07-18 08:50:58 +02:00
Bram Schoenmakers a97a9b5398 Take hide tags into account in column mode
Fixes #186.
2017-07-16 18:26:36 +02:00
Jacek Sowiński 6f77ce7e3e Add most basic readline shortcuts in commandline
ctrl-a: move cursor to the beginning
ctrl-e: move cursor to the end
ctrl-u: delete from the cursor back to the beginning
ctrl-k: delete from the cursor to the end
2017-07-13 07:01:35 +02:00
Jacek Sowiński 1fbf62a399 Add completion box and full completion support
- completion box pops out for multiple candidates
- <Tab> and <Shift-Tab> will navigate through the list of candidates
- any other key than <Tab> and <Shift-Tab> will close the box
- completion box is glued to cursor and is trimmed to max 4 lines
- +projects, @contexts, dates and commands (with aliases) are supported
2017-07-10 22:28:16 +02:00
Jacek Sowiński cfd66d5fc5 Reorganize code for completers
1.Rename completers

topydo.ui.prompt.TopydoCompleter is now topydo.ui.prompt.PromptCompleter
topydo.lib.Completer is now topydo.ui.CompleterBase

2. Reuse CompleterBase code in prompt completer.
3. Sort completion suggestions
4. Introduce completion of due: dates in column completer.
5. Store subcommands for completers in cache (via lru_cache).
2017-07-10 21:31:51 +02:00
Jacek Sowiński 0e2bbbb7eb Implement simple completion into the Column UI
Currently it works only with single completion candidate and works for:
contexts, projects, subcommands.
2017-07-10 21:31:51 +02:00
Bram Schoenmakers 8d5f43ba6b Better handling of invalid dates
The postpone subcommand would crash when postponing a todo item with an
invalid due date (e.g. due:2017-06-31).

When postponing, the due date serves as an offset. With an invalid due
date, no proper offset can be found. Instead of (silently) falling back
to today's due date, show an error instead.

Moreover, invalid creation/completion dates are also ignored.
2017-07-10 14:08:52 +02:00
Bram Schoenmakers 6627fb99af Update ls' help text 2017-06-29 07:11:40 +02:00
Bram Schoenmakers dca02e2b7a Add %n, %N, %u and %U in the formatting for identifiers
%n: Line number
%N: Padded line number
%u: Text-based ID
%U: Padded text-based ID

Addresses issue #184.
2017-06-28 09:21:39 +02:00
Bram Schoenmakers dd5bb5c007 Merge branch 'python36' 2017-06-08 14:48:42 +02:00