richmeta / ti Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sharat87/ti
A simple command line time tracker
Home Page: https://pypi.python.org/pypi/ti
This project forked from sharat87/ti
A simple command line time tracker
Home Page: https://pypi.python.org/pypi/ti
The ti
repo at sharat87/ti links to this fork, as development has moved here. However, all of the links in this fork's readme link back to the inactive repo. Additionally, the main website is still live at ti.sharats.me and links to @sharat87's original repo.
I'm happy to commit these simple changes, but I'm wondering if I can contribute any other housekeeping documentation changes while I'm at it?
Is this project still active?
When running ti l today
, I still see all the logs, not only the ones from today. Looking at the code, it seems like the action_log function doesn't use the period parameter.
I'm using ti 0.1.2, installed from pip, with pipsi.
This link is broken: https://raw.githubusercontent.com/tbekolay/ti/master/bin/ti. Where can one find the executable?
$─► ti l 2>&1 | sed "s|${USER}|<redacted>|g"
Traceback (most recent call last):
File "/Users/<redacted>/local/Darwin/bin/ti", line 11, in <module>
sys.exit(main())
File "/Users/<redacted>/local/Darwin/lib/python3.6/site-packages/ti/__init__.py", line 451, in main
fn(**args)
File "/Users/<redacted>/local/Darwin/lib/python3.6/site-packages/ti/__init__.py", line 265, in action_log
for name, item in sorted(log.items(), key=(lambda x: x[1]), reverse=True):
TypeError: '<' not supported between instances of 'dict' and 'dict'
Not everyone has an environment/machine ready to support this right out of the gate. :)
The idea of "interruptions" is not well documented, and breaks the log when used. Also, it seems odd that it allows you to interrupt a task with the same task. This should probably be an error, since it probably means the user doesn't know what he's doing xD
Here's what I mean:
nathan@spiral ~ % ti on hello
Start working on hello.
nathan@spiral ~ % ti interrupt hello
So you stopped working on hello.
Start working on interrupt: hello.
You are now 1 deep in interrupts.
nathan@spiral ~ % ti interrupt goodbye
So you stopped working on interrupt: hello.
Start working on interrupt: goodbye.
You are now 2 deep in interrupts.
nathan@spiral ~ % ti fin
So you stopped working on interrupt: goodbye.
Start working on interrupt: hello.
You are now 1 deep in interrupts.
nathan@spiral ~ % ti interrupt
Need the name of whatever you are working on.
1 nathan@spiral ~ % ti fin :(
So you stopped working on interrupt: hello.
Start working on hello.
Congrats, you're out of interrupts!
nathan@spiral ~ % ti fin
So you stopped working on hello.
nathan@spiral ~ % ti log
Traceback (most recent call last):
File "/home/nathan/.bin/ti", line 4, in <module>
ti.main()
File "/home/nathan/.local/lib/python3.6/site-packages/ti/__init__.py", line 451, in main
fn(**args)
File "/home/nathan/.local/lib/python3.6/site-packages/ti/__init__.py", line 265, in action_log
for name, item in sorted(log.items(), key=(lambda x: x[1]), reverse=True):
TypeError: '<' not supported between instances of 'dict' and 'dict'
I suspect the cause of the breaking log is that bash color codes are sneaking into the ti-sheet, but haven't attempted to confirm this:
{
"work": [
{
"name": "hello",
"start": "2017-05-05T15:23:14.768415Z",
"end": "2017-05-05T15:23:19.880548Z"
},
{
"name": "interrupt: \u001b[32mhello\u001b[39m",
"start": "2017-05-05T15:23:19.880548Z",
"end": "2017-05-05T15:23:27.263428Z"
},
{
"name": "interrupt: \u001b[32mgoodbye\u001b[39m",
"start": "2017-05-05T15:23:27.263428Z",
"end": "2017-05-05T15:23:31.220007Z"
},
{
"name": "interrupt: \u001b[32mhello\u001b[39m",
"start": "2017-05-05T15:23:31.220007Z",
"end": "2017-05-05T15:23:40.109266Z"
},
{
"name": "hello",
"start": "2017-05-05T15:23:40.109266Z",
"end": "2017-05-05T15:23:44.911772Z"
}
],
"interrupt_stack": []
}
When I do ti status or ti log, I see the total time is somehow always less than 24hrs. I do not know if the logic truncates or circularly overwrites. My workflow is that each task is a subproject and could potentially take more than 24hrs.
Hello,
I'm not finding the JSON file to see the data stored.
I may be misunderstanding some point because I'm just starting to get into Python.
Thanks!
The "interrupt" option is nice if you know that when you interrupt your task you are going to work on it later on, but sometimes this is not the case, and when you finish "ti f" you don't know whether you will come back to the last task or to a new one.
Adding a "restart" command would be nice, so that in case a task has been stopped, it can be resumed (copying tags and description) to the next one, so that there is no need to have to type the task, and repeat the tags and description.
Thank you.
I'm unaware of how these tests are run. I see setup.cfg calling for pytest, but I don't see tests in a unittest/pytest syntax. I tried looking up bash tests, in case these are somehow usable too, but can't figure it out. Any help?
I am asking because sometimes I need to edit by hand the file because I have forgotten to start or stop 'ti'. But it turns out that the time stored in the file is one hour before my current time. Therefore, I would like first to ask what is the format in which ti stores the data, and second whether it can be done so in a way that uses the date the user is "living", to avoid having to make translations when editing the file by hand.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.