3 ms·
That is a very nice example of playing to Emacs' strengths to solve a specific problem. As a non-Emacs user I do something similar with a bit of Bash scripting
by nickjj 8y ago
That is a very nice example of playing to Emacs' strengths to solve a specific problem.
As a non-Emacs user I do something similar with a bit of Bash scripting. It doesn't go as far as generating a ready to send invoice, but it will sum up the hours worked and provide a $ amount as output so I know how much to invoice someone.
It parses a log.md file I keep for each client.
The file looks like this, and the first number after the # is the hours worked.
---
# 4 2019/01/28
- Made something cool
- Helped XYZ do ABC
# 1 2019/02/11
- Foobar
- Yada yada yada
# 8.5 2019/02/12
- Lots of good stuff!
---
From here it's just a couple of piped Unix commands to generate the output I'm interested in.
You got me to thinking though. I wonder if I can generate a 100% ready to go PDF invoice. That would save a lot of tedious and error prone steps where I manually create each invoice based off a template in Google docs.
- TeMPOraL 8y agoThanks for providing an example! I wonder how many custom solutions there are :). > I wonder if I can generate a 100% ready to go PDF invoice. That would save a lot of tedious and error prone steps where I manually create each invoice based off a template in Google docs. This is my goal too. In parallel comment, I pasted an example table with line items. I wrote the code making that table some 9 months ago, and I've been retyping values into a LaTeX invoice ever since. I finally decided this is too annoying and error-prone to continue, and for the past couple weeks I've been slowly building up an end-to-end system, but with an explicit review step (I don't trust my own code that much). As for time tracking format, the standard org-mode clocking feature appends a block under your TODO tasks that looks like this: :LOGBOOK: CLOCK: [2019-02-07 Thu 10:44]--[2019-02-07 Thu 13:37] => 2:53 CLOCK: [2019-02-06 Wed 14:27]--[2019-02-06 Wed 15:00] => 0:33 :END: This block (called a "drawer") is automatically folded, so it doesn't clutter your org file as you work with it, but it's there in the plaintext. As I work, I mark a given TODO item as "active", either directly or via org-mode agenda, and when I'm done, I "clock out"; Emacs populates the :LOGBOOK: entries automatically.