timetrap_formatters icon indicating copy to clipboard operation
timetrap_formatters copied to clipboard

html formatter

Open bitboxer opened this issue 12 years ago • 2 comments

I am currently thinking of writing a nice little html formatter that also display a few nice graphics on that page using charts.js and pure.css .

The only problem: it would just output the html on the console. Would it be okay if a formatter would store the output in a temporary file and opened a browser instead? The output would be the location of the file and a description on how to configure the browser in the timetrap config file.

bitboxer avatar Jul 13 '13 07:07 bitboxer

That sounds awesome. You might look at the tempfile library (http://www.ruby-doc.org/stdlib-1.9.3/libdoc/tempfile/rdoc/Tempfile.html) for writing the file though it might make sense to put it in a more predictable location. The file location could be configurable using the t configure command.

samg avatar Jul 15 '13 01:07 samg

I can't use the build in tempfile lib because that one will delete the created file when the interpreter shuts down.

bitboxer avatar Jul 15 '13 05:07 bitboxer