Comments (11)
An option to skip weekends sounds nice, yes! But even the basic ability to increase/decrease due dates would be a big step forward for me.
It would also be great to have a binding to clear the due date as well as to add one -- which could default to, say, tomorrow (or any relative date syntax understood by pter -- the user could just set the right string in the config).
from pter.
Uh, nice idea! I like that! Maybe even a mode/option that skips weekends? 🤔
from pter.
I started putting the changes into the codeberg repo even though they're not released yet. Increase and decrease has been added as well as the skip-weekend.
from pter.
clear-due
is implemented, too.
from pter.
Awesome!
I'm testing this and will report any issues. Here's one: calling dec-due
on a task with no due date results in a crash:
[CRITICAL] Pter crashed with exception: list index out of range
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/curses.py", line 3025, in run_cursesui
window.run()
File "/usr/local/lib/python3.11/dist-packages/cursedspace-1.5.2-py3.11.egg/cursedspace/application.py", line 59, in run
raise exception
File "/usr/local/lib/python3.11/dist-packages/cursedspace-1.5.2-py3.11.egg/cursedspace/application.py", line 52, in run
self.main()
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/curses.py", line 1753, in main
self.functions[fnc]()
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/curses.py", line 2739, in do_decrease_due
due = utils.task_parse_due(task.task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/utils.py", line 81, in task_parse_due
return datetime.datetime.strptime(task.attr_due[0], Task.DATE_FMT).date()
~~~~~~~~~~~~~^^^
Calling inc-due
on a task with no due date also crashes pter ("list index out of range") -- but I would expect it to add 1d
.
Same problem with calling clear-due
on a task with no due.
from pter.
Yeah, when the except
catches ValueError
s but ignores the KeyError
🤦 I'll fix it later today.
Meanwhile I was wondering; should inc-due
/dec-due
create a due date in case there isn't one yet? Since it's very easy to remove a due date it might be convenient to create one, too?
from pter.
I would love to have the ability to quickly create one, yes! But I'm not sure about the defaults.
With inc-due
it seems intuitive -- pter could default to today
and then increment per the config setting. Perhaps dec-due
should default to today
too? Defaulting to something like yesterday
doesn't make much sense to me :) What are your thoughts?
from pter.
That's kinda what I had in mind, too. Adding a due date in the past for an existing task seems a bit stress-inviting. And if the user really wants that level of stress, they can keep hitting the same key to set the due date as far in the past as they need 🤷
from pter.
Sounds good to me!
from pter.
Alright, crash is fixed and due date creation is added!
from pter.
Seems to work fine, already using it! Thank you!
from pter.
Related Issues (20)
- Distraction-free task editing/creation HOT 3
- Patch for help screen HOT 5
- Mouse-wheel scrolling broken after editing a task externally HOT 38
- Patch to fix caret key issues HOT 1
- Patch to improve line editing some more HOT 6
- Patch: UI proofreading/minor editing HOT 7
- Patch to invert completion highlighting HOT 2
- Helpbar improvements (configurable hints and key sorting) HOT 23
- Regression: pter crashes when choosing a filename to save the task to HOT 1
- Distraction-free mode should show task list on "jump-to" action HOT 6
- Bug: chained keybindings do not seem to work on the Help screen HOT 20
- What does "N" (edit note) do? HOT 6
- Request: Add filename in task format? HOT 13
- Add file name completion when searching HOT 8
- Bug: Editor keybindings not dumped? HOT 2
- Centralised archive with multiple todo.txt file HOT 1
- Support for different sources of tasks
- qpter not finding PyQt5 under python3 (No longer easily available under pip install) HOT 4
- new qpter issue (at least on my end!) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pter.