Lurker News
For my travel site side hustle (beatthatflight.com.au/), I find and publish cheap flights for Australians. Sounds simple, but even if say, someone gave me the flights each day, there's posting the, sometimes to deals sites, as well as then editing it and posting it on my site, and out to social media, and then to specific mailing lists on mailchimp, depending on the source city of the deal, or type of post.

A LOT of that becomes tedious. Mailchimp can auto post to FB/twitter/instagram etc, but even converting the blog post into mailchimp emails gets tiring, as you need to choose a feature photo, the specific mailing list etc.
I'm a selenium guy, so have built some scripts to minimise some of it, but the rush each time of finding a deal still pains me when I think of the tedium ahead of publishing it.
Ideally, my goal would be to submit [to][from][when] to a script and the whole process would be automatic. I can see that selenium could do it, but my goodness, it'd be slow and potentially flaky all via the web UI for those sites.
I'd love suggestions, examples of automation you've done, and tools used?

Comments (229) 59 threads

Show all comments

Showing thread 6 of 59

cpclermont2 replies#
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

YourMatt1 reply#
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.
cpclermont#
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.
klohto1 reply#
Would you be willing to share the code for Tempo automation? I am in market for the same thing.
cpclermont1 reply#
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.

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