Skip to content

Markdown export feature. Report sorted. - #21

Merged
danibram merged 6 commits into
danibram:masterfrom
MarAvFe:master
Feb 26, 2018
Merged

Markdown export feature. Report sorted.#21
danibram merged 6 commits into
danibram:masterfrom
MarAvFe:master

Conversation

@MarAvFe

@MarAvFe MarAvFe commented Feb 25, 2018

Copy link
Copy Markdown
Contributor

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 --format option to select markdown format like

timer e --format markdown
timer e -f md # shorter version

Then by redirecting you can create a file and with another npm tool, create a .pdf from the .md

timer e -f md > report.md

Date Filtering

You can filter the date range for report with --start and --end options.

timer e -f md -s 2018/02/23 # from feb23 to today
timer e -f md -s -e 2018/02/02 # from today to feb02
timer e -f md -s 2018/02/23 -e 2018/03/02 # from feb23 to mar02

Report

  • The report table includes the name of the task
  • The report option has a max width for name and description values to allow long names to be displayed correctly.
  • The report listing is sorted by name.

mlndz28 and others added 6 commits December 5, 2017 14:28
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.
@danibram
danibram merged commit 74fbd8f into danibram:master Feb 26, 2018
@danibram

Copy link
Copy Markdown
Owner

Thanks for the contribution!

@danibram

Copy link
Copy Markdown
Owner

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?

@MarAvFe

MarAvFe commented Feb 26, 2018

Copy link
Copy Markdown
Contributor Author

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.

@danibram

Copy link
Copy Markdown
Owner

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.
Because, for me, its usefull when i manage multiple proyects to find by [name of the proyect].[general task].[minor task], for example if i work for company acme, in the bomb proyect, and making some thing, i usually takes the name as acme.bomb[doing some thing], this allow me in an easy way to report only by key acme and it returns me all hours of this especific proyect, also finds in an easy way all the tasks etc.

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?
Do you think is easy to use?
Can you give me an idea of how you are using the time-tracker? multiple proyects?one? multiple subproyects?
Do you think will be usefull to develop an app, to manage that? (im considering the idea)
What is missing, if there is something in the time-tracker?
Maybe, is better to create a new issue?

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!
Thank you again!

@danibram

Copy link
Copy Markdown
Owner

Wow! sorry for the book i wrote ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants