Markdown export feature. Report sorted. - #21
Conversation
A table is created with the times object from the export json.
'report' wasn't working when any of the tasks had an empty task.timings (caused by deleting or substracting time). Also the task name wasn't showing when there was no description and the column titles were placed wrong.
Descriptions added to markdown export, as well as an option to filter the results by dates.
|
Thanks for the contribution! |
|
Im solving issues with the filter by dates, because for me the tasks have more than 1 start stop, so i will release a new version tomorrow. I wanted to be sure that this changes works for you and for other kinds of uses, what do you think? |
|
What happens if you have multiple start-stop in a task? I just tried it. Had a 40min task on feb22, so started and stopped it for 20sec. Then filtered by before and after the 23rd and it showed correctly the 40min or the 22sec respectively. |
|
Yes, its true, sorry i wrote in the morning without checking it, im reorganizing and moving some of your functions from the manager to a utils file, and i created a method getEndDate to follow the main idea of the time tracker, and rewrite some lines to use the search method when you pass an incomplete key. Also in the report i dont know how to manage a multiple days task, so right now it takes start time and endTime from the last timing inside. Another thing to consider, if the task pass for example 2 or 3 days and you put the filter in the middle i want to consider in the report the period of the task till the filter end, i think is the best way. So basivally instead to take all the tasks in the manager, i take all tasks from the search function, now if you pass nothing it takes all tasks, i used moment so i want to keep it using it, maybe we can discuss about to remove that dependancy, will be awesome! I tell you this because i want to understand what people wants to do when use this time tracker, for me i use to manage multiple proyects for multiple companies and also need to manage subproyects and etc. But also i want to have a compromise between my needs and the needs of everyone that want to use time-tracker, i want to add some tests also so please Can you give me a feedback about? And of course! I´m really happy to see your pull request and thanks for your time, im really proud that someone finds that this utility fit your needs! |
|
Wow! sorry for the book i wrote ... |
Not everybody reads CLI output comfortably, so the markdown export can help a administrative dept. person to understand the hour work report.
Export
Format
When exporting, you can add a
--formatoption to select markdown format liketimer e --format markdown timer e -f md # shorter versionThen by redirecting you can create a file and with another npm tool, create a .pdf from the .md
timer e -f md > report.mdDate Filtering
You can filter the date range for report with
--startand--endoptions.Report