Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have 141 custom scripts in my $HOME/bin. Most of it is in bash, but there's a couple of node.js scripts as well.

- I mostly automate my bookkeeping with a set of recurring & dependent taskwarrior tasks and scripts as annotations that I run with taskopen[1]. That's creating a bunch of folders, turning some emails in mutt into PDFs, gathering PDFs from emails, fetching bills with selenium, moving files from $DOWNLOADS into the appropriate bookeeping folder, putting a date on some files, turning the whole thing into a zip file, and sending it to the bookkeeper with mailx.

- I automated the email send of my daily summary to my clients with mailx (so I can send it directly from vim)

- I automated turning screen recordings into thumbnails+mp4 link (since GitHub only supports gifs)

- I automated making before/after screen recordings for when I do noticeable performance improvements (page load/animations)

- I automated booting/killing my development servers

- I automated making PRs with `hub pr` (finding the origin/upstream, putting labels, etc.)

- I bound to a key combo switching to the logs of specific development servers

- I turned my client's time tracking (tempo) into a CLI because I got tired of using the UI to say I worked X hours on that ticket and 7.5 - X on the other. Now I only do `tempo log $ticket1 2h $ticket2 3h $supportTicket rest`

[1]: https://github.com/ValiValpas/taskopen



How do you like using Node for CLI? I started playing around with it a couple years ago, and at this point, I don't even consider BASH scripts if they involve the slightest bit of logic. Part of me feels like by going all-in, I'm going to lose touch with my ability to write direct BASH scripts, which are likely to work literally forever. Meanwhile, I expect my Node scripts to have a relatively short lifespan, particularly in that I'm leaning on NPM. It's been so nice though, I've decided it was a worthy tradeoff.


I've been doing pretty much the same thing. If the logic gets crazy, of if I want lots of subcommands, I'd write it with node & commander. There's only so much you can do with `jq` when it comes to processing JSON.


Would you be willing to share the code for Tempo automation? I am in market for the same thing.


Sure! It's in my dotfiles. You can find it here [1].

There's the `excel` subcommand you probably don't need and you'll need to export the JIRA_TEMPO_USER and JIRA_TEMPO_TOKEN variables before running it.

- `JIRA_TEMPO_TOKEN` can be found in the Tempo Settings

- `JIRA_TEMPO_USER` can be found by inspecting the requests sent to tempo from JIRA IIRC.

[1]: https://github.com/charlespwd/dotfiles/blob/master/bin/tempo

EDIT: Confirmed, I found my `JIRA_TEMPO_USER` as the only accountID sent as parameter the POST https://app.tempo.io/rest/tempo-timesheets/5/private/days/se... when booting up the app in JIRA.


Thank you! Gonna tweak it a bit but it’s a great base for what I was just looking for :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: