Live data from Hacker News

Ask HN: What automation tools have you used to replace mundane activities?

news.ycombinator.com

221–230 of 234 posts

Re: Ask HN: What automation tools have you used to replace mundane activities?

#221
post #179

Earlier quoted context omitted.

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…

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

Re: Ask HN: What automation tools have you used to replace mundane activities?

#222
I work at a local college and was recently tasked with collecting and aggregating instructor workload requests. We are in the planning stages of which courses each instructor will teach in the fall 2020 semester and my department wanted an easy way for instructors to submit their requests as well as be able to see what courses other teachers have requested and which are available.

Manually, if have to receive each spreadsheet or email of choices from each instructor and then add it to an Excel spreadsheet of some sort. This wouldn't have been live at all.

So I came up with a system.

I made an excel proposal template each instructor fills out with their name, school ID and the courses they want to teach as well as the hours they'd have available for each course. They then send it to my email which has a rule on it to send excel attachments to a Gmail account I own. This is because I can't access the API of outlook so I need to get outlook to send this stuff to my Gmail account. My Gmail account has a watch on it so whenever an email comes in to it, I get a push request on my server. My server reads the contents of the excel file and sends it to a database.

From the user side, if a teacher wants to access the full list of what courses each instructor has chosen, I've made a website in react with an excel like row and column layout where the columns are each teacher and the rows are the courses. Where the two meet we have the hours the teacher wants to teach for that course. When this page is visited, it pulls from my database and populates the whole thing with the latest data. The site can also export all the data to an Excel file to be implemented once all the teachers have made their choices.

I learned a lot with this project. Learned react, setting up https, basic authentication, postgres, running a server and routing, and a while lotta other stuff. Super valuable to me in my learning even if I could have spent less time doing it manually!

Re: Ask HN: What automation tools have you used to replace mundane activities?

#223

>>my goodness, it'd be slow and potentially flaky all via the web UI for those sites Generally, I've had better luck using undocumented APIs for this kind of stuff. I was a heavy user of Selenium to automate many a task (I work in wholesale construction goods, tons of automations needed everywhere). But then discovered that using internal APIs (which surprisingly don't change much) is far easier than trying to except…

Ha ha, yep. I do this kind of thing all the time.

Re: Ask HN: What automation tools have you used to replace mundane activities?

#224

Playwright is a new alternative to Selenium, and besides being cross-browser, is focused on performance, developer ergonomics and reliability (death to flakiness!). Might be worth checking out? https://github.com/microsoft/playwright . Disclaimer: I work with the Playwright team at Microsoft.

Keen to check it out; the flakiness of Webdriver/Selenium I often wonder is more pain than it brings. So many sites I see disabling tests based on it because they sometimes work/sometimes don't, the hours that get plowed into it. Edit: Missed the Microsoft ref. Not so keen.

Check out https://www.cypress.io Been super happy with it!

Re: Ask HN: What automation tools have you used to replace mundane activities?

#225
post #103

>>my goodness, it'd be slow and potentially flaky all via the web UI for those sites Generally, I've had better luck using undocumented APIs for this kind of stuff. I was a heavy user of Selenium to automate many a task (I work in wholesale construction goods, tons of automations needed everywhere). But then discovered that using internal APIs (which surprisingly don't change much) is far easier than trying to except…

Yup. I did this with a local Android app, that tells you the gps location of a public bus. I sniffed the http packets, found the requests i needed and made a python script that pinged me at slack when my bus was 5 minutes from my bus stop. Useful when I worked at night.

I'm familiar with the web dev tools, but no clue about mobile. Can you point me in the right direction on how to do the same?

Were you using an android emulator on desktop or there's some way to easily do this on android?

Re: Ask HN: What automation tools have you used to replace mundane activities?

#226

Earlier quoted context omitted.

(Facepalm) I read your post. Paused. Opened up debugger on the site I'm currently selenium-ising. reloaded. boom. there it is. The request, and beautiful json response. So...so..so much simpler. Thank you, my evening is sorted ;)

Haha.. love it, I'm so glad it helped. I had the same experience a couple years ago after spending months selenium-ing our ERP software.

finally got to it last evening. 20 minutes of playing with json libraries, and I've got a ~10 line script that runs in under a second and produces output that would have taken probably a minute to run in selenium and occasionally been flaky too.

/starts looking at other APIs to use!

Thanks!

Re: Ask HN: What automation tools have you used to replace mundane activities?

#227

I threw together a quick python script which scrapes listings from cinemas local to me, along with each movie's IMDB score, and compiles the results into a weekly Friday-morning email which I send to myself and my SO. It's nice to know what movies are out, and when we can book, without having to remember to check or wait for pushy emails from the cinemas themselves. I'm planning on doing the same to email us the late…

Would love to see this turned into a website that does recommendations based on zip code.

Re: Ask HN: What automation tools have you used to replace mundane activities?

#228

Earlier quoted context omitted.

It does, but it also keeps YNAB more in sync with your bank account, since transactions will typically take a couple days to show up in the statement.

Sure, but a database? Isn’t that part of what YNAB provides?

Yeah it could probably do without it, but initially made this for a hackathon so it’s by no means perfect

Re: Ask HN: What automation tools have you used to replace mundane activities?

#229

I use YNAB ( https://youneedabudget.com/ ), which requires inputting every one of your transactions by hand or importing them from your bank. The downside of the import is it takes a few days for the transaction to show up and you need to give YNAB your bank username/password, which I'm not comfortable with. I wrote this https://github.com/buzzlawless/ynab-live-import to import credit card transactions instantly with…

It's an amazing job what you have done here. I've been tinkering with exactly the same idea (and same implementation) but haven't had the time to go ahead. Your work will instantly jumpstart my own use case (VISA and Beancount) and I thank you for that. Kudos!

Thank you! Appreciate the kind words

Re: Ask HN: What automation tools have you used to replace mundane activities?

#230

I threw together a quick python script which scrapes listings from cinemas local to me, along with each movie's IMDB score, and compiles the results into a weekly Friday-morning email which I send to myself and my SO. It's nice to know what movies are out, and when we can book, without having to remember to check or wait for pushy emails from the cinemas themselves. I'm planning on doing the same to email us the late…

I've done various versions of this myself, would you mind sharing your code?
Post reply on HN