Comments (3)
Sounds like a good feature; one could keep the default behaviour for days, but add support for stepping months or years.
I agree that the BSD behaviour is more desirable when stepping months. A bit trickier to get that one working, but nothing impossible.
from todo.txt-cli-again-addon.
I'm working on implementing this feature right now. For more efficient testing, I found it useful to move some of the helper functions (adjust_date, determine_date_version, and a couple of others) to a separate file which I named againHelpers.sh. I also created a new unitTests.sh file that sources againHelpers.sh and makes several calls to adjust_date, without having to setup dummy tasks in test\sample.txt. My plan is for again to also source againHelpers.sh. Does this violate a design goal of keeping all of the add-on code in a single file?
If it does, my backup plan was to add a flag in again (something like AGAIN_TEST_IN_PROGRESS) and place most of the execution inside of an if block guarded by this flag. testAgain.sh could set the flag (to disable execution) then source again. If you would like to stick to a single file, what are your thoughts regarding this approach?
from todo.txt-cli-again-addon.
I hate code duplication as much as the next developer, and I most certainly do not have some hidden single-file agenda, so if refactoring things into a utility file makes development and testing easier, I'm all for it.
One alternate solution to all of this would, I guess, be to detect modify again in such a way that it detects if it is sourced or not, and provide different behaviour in that case, but I'm not sure if there exists a portable way to detect that.
from todo.txt-cli-again-addon.
Related Issues (10)
- Spaces added after adjusted due and deferral dates
- Using again as an override for 'do' HOT 6
- Creation and completion dates are not handled correctly HOT 10
- Make again work on rec tags as well HOT 5
- Again detects AGAIN_TAG even when it appears not followed by a colon. HOT 2
- BSD Compatability HOT 3
- Increment due date according to offset from deferral date (for adjustments from today) HOT 4
- Add examples to README.md HOT 1
- Annotate tasks with recurrence period HOT 2
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 todo.txt-cli-again-addon.