Comments (6)
It so happens that IDT only provides a date-range interface, and WebService::Idonethis is providing a stripped-down version that sets the start and end dates to the same day.
So, the steps to make this happen are:
- Write a
get_range
method for WS::IDT - Reimplement
get_day
in terms ofget_range
- Update
idone
to provide ranged searches. - Have
idone
display dates when a ranged search is performed. - Figure out what to do if one is trying to add a done on a ranged search. (Probably throw an error.)
Personally I like -r start,end
(and of course these should allow human-readable dates).
from idonethis-perl.
Agree with everything.
On Mar 22, 2013 11:31 AM, "Paul Fenwick" [email protected] wrote:
It so happens that IDT only provides a date-range interface, and
WebService::Idonethis is providing a stripped-down version that sets the
start and end dates to the same day.
So, the steps to make this happen are:
- Write a get_range method for WS::IDT
- Reimplement get_day in terms of get_range
- Update idone to provide ranged searches.
- Have idone display dates when a ranged search is performed.
- Figure out what to do if one is trying to add a done on a ranged
search. (Probably throw an error.)
Personally I like -r start,end (and of course these should allow
human-readable dates).
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/12#issuecomment-15290039
.
from idonethis-perl.
Okay, this is done. :)
$ idone -r '1 week ago, today'
[2013-03-15] Chatted with Emma Jane. Mainly about Klingon.
[2013-03-16] Found $20 on my desk. Now I can't find my wallet.
[2013-03-18] Signed up for HabitRPG. I think this has potential.
[2013-03-19] Coded WebService::HabitRPG
[2013-03-19] Found pianobar sucks when you have a shitty network.
[2013-03-21] Went to swing dancing in Nth Melb.
v0.17 is headed to the CPAN now, or you can use the changes in the git repo if you're impatient. :)
from idonethis-perl.
Oh, and be nice with the range searches. I'm pretty sure idonethis don't actually put any restrictions on date ranges. :)
from idonethis-perl.
And just because I'm exceptionally proud of my command-line right now, I logged this with:
hrpg + issue -l "Added range support to idone"
and gained XP on HabitRPG, added this to my list of completed tasks, and listed all tasks I've done today. :)
from idonethis-perl.
Yep, it's working well, and I can grep for the stuff I want. Thanks!
from idonethis-perl.
Related Issues (14)
- Logins aren't cached. HOT 1
- Skip our freshness ping HOT 1
- Accept configuration via environment variable. HOT 2
- Allow adding[/listing] dones for specific day HOT 1
- Error out cleanly on non-existent switches HOT 1
- Unicode input support HOT 1
- Dies when XDG cache directory not present.
- Allow "the day before yesterday" with -yy (etc) HOT 1
- Allow fuzzy/natural-language dates HOT 2
- idone -[yd] should list tasks, not wait for input HOT 9
- Weird things can happen with email addresses HOT 2
- Make range-querying easier when end date is today (single-argument -r) HOT 2
- Add team support 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 idonethis-perl.