Live data from Hacker News

Ask HN: What are the things that you have automated in your personal life?

news.ycombinator.com

391–400 of 749 posts

Re: Ask HN: What are the things that you have automated in your personal life?

#391

Deleting the empty "Email attachments" directory that OneDrive keeps making inside my drive. Systemd timer unit does the trick.

Wouldn't it be better to use inotify than a timer? I forget if systemd supports it or not, but it's simple enough independently: https://superuser.com/questions/181517/how-to-execute-a-comm...

Maybe, but this works. Sometimes that's enough.

Re: Ask HN: What are the things that you have automated in your personal life?

#392
post #362

Earlier quoted context omitted.

Has it ever chopped up a squirrel, or the neighbor's cat?

I'm no expert, but Cats and Squirrels would be pretty good at hearing and seeing danger, even feeling vibrations nearby. I doubt they'd get caught by a lawn mower at walking speed.

[deleted]

Re: Ask HN: What are the things that you have automated in your personal life?

#393

I have a robot lawn mower that is wire guided. Instead of the traditional lawn mowers that basically cut the grass in all directions (making a sloppy cut pattern) my mower knows how to cut in straight lines so you get a traditional cut pattern. It also has the ability to dump the grass cuttings into a composting bin. Basically, I put down wire guide cable into the lawn and into the cement as well. It is all powered b…

Has it ever chopped up a squirrel, or the neighbor's cat?

I would like a tutorial on how to make one that can chop up the neighbor's cat please.

Re: Ask HN: What are the things that you have automated in your personal life?

#394
post #300

Earlier quoted context omitted.

There are no general solutions, unfortunately. Every PDF-generating system will do things differently, so parsing them must be custom for each type. Generated PDFs are usually very systematic, though, and PDF commands are text (compressed). You can uncompress with PDFTK: pdftk input.pdf output output.pdf uncompress Then try grepping or using whatever tools you like (there will be binary parts of the file still, like…

I just tried it on a bank statement and the only text I see is the PDF commands (stuff like "/MediaBox [0 0 612 792]", "/F1 125 Tf", and whatnot). There's no actual PDF content text that I can find, whether it's my name, the bank name, or anything else.

There are a few possibilities. The main PDF commands for text are "Tj" and "TJ", so you can try searching for them. Text commands must also be between "BT" and "ET". Maybe a bit harder to search for are the other two text commands: ' and ".

TJ is "Show text, allowing individual glyph positioning" which means strings are not necessarily in the PDF as the strings themselves, but have glyph positioning info mixed into them. This is the most common issue I've come across.

Another possibility is that the fonts have been combined/compressed/butchered, so that they're not using ASCII/Unicode (this can sometimes save space by combining bits of multiple fonts. Searching for Tj/TJ/'/" should tell you if that's the case. If it is, technically there should be a translation table somewhere in the PDF file (so that clipboard operations work in PDF viewers). Look for CustomEncoding, I think.

Particularly bad PDF creation libraries can put characters in one by one.

Characters (alone or in strings) can also be in there as octal or hex.

Finally, particularly obnoxious libraries can do it without text commands at all, but convert everything to vector drawing commands, or even worse, bitmaps.

I couldn't remember CustomEncoding, and this came up when I searched. Seems helpful: https://stackoverflow.com/questions/29467539/encoding-of-pdf...

Re: Ask HN: What are the things that you have automated in your personal life?

#395
My internet provider Hathway (in Pune, India) used to throw up a login page every now and then throwing all my networked devices out of gear. The captive portal required doing login via browser to start internet again. I wrote automation scripts on Raspberry Pi to figure out when internet access is gone and then to do auto-login. Here is the detailed blog -

http://gopi-kori.blogspot.com/2013/08/auto-login-to-hathway-...

I have also automated all bathroom lights and lights on basin to switch on based on motion sensing using these cheap switches

https://www.aliexpress.com/item/Home-LED-light-PIR-Infrared-...

This saves energy by solving my problem where I used to forget switching off the lights many times.

Re: Ask HN: What are the things that you have automated in your personal life?

#396

I have semi-automated cooking for the week ahead. We recently started cooking meals for the week ahead on Sundays and then freezing them. The aim was to give us more time with the kids and to cut down on housework. To save time on the Sunday cooking session I have cobbled together a very clunky, and I mean VERY clunky semi-automated cooking system. It comprises a Raspberry PI which controls a couple of WiFi mains swi…

A friend is getting such a system to production for Indian recipes with Mechnical Chef [1] The demo looks incredibly cool [2] [1] http://www.mechanicalchef.com/ [2] https://www.youtube.com/watch?v=lBB0ZaN1paE

I'm not able to seek on the video he has embedded (using Chrome on Android here). I'd probably have looked for more than 10 s if I could have.

Re: Ask HN: What are the things that you have automated in your personal life?

#397

Maybe not what anyone was expecting, but we've automated all the cleaning in the house. The clothes get washed, folded, and ironed. The trash gets taken out. All the plants get watered. How? The oldest form of automation. We pay someone to come and do it. We have a cleaning person come twice a week.

When I lived in India, it was cheaper to hire someone to wash clothes and dishes by hand than to buy a washing machine or dish washer (and the place we lived wouldn't have had anywhere to put them anyway). [Though half the time we did these things (by hand) ourselves.]

I mean, of course. It is cheaper to do that anywhere in the world. The trick is to use the washing machine more than once.

Re: Ask HN: What are the things that you have automated in your personal life?

#398
post #12

Earlier quoted context omitted.

So this. I’ve consciously refused to install irrigation so I’ll have to go out to the garden and hang around there.

I've often commented that I'm glad I have to water the garden because it's an excuse to just stand around looking at plants. I don't like watering grass because grass is boring and requires a ton of water, so rather than install irrigation, I ripped out all the grass and planted more interesting plants. (Drought-tolerant xeriscaping is common in my area, so this isn't unusual.)

> just stand around looking at plants.

Hard to overstate how good this is for one's mental health.

Re: Ask HN: What are the things that you have automated in your personal life?

#399

I have semi-automated cooking for the week ahead. We recently started cooking meals for the week ahead on Sundays and then freezing them. The aim was to give us more time with the kids and to cut down on housework. To save time on the Sunday cooking session I have cobbled together a very clunky, and I mean VERY clunky semi-automated cooking system. It comprises a Raspberry PI which controls a couple of WiFi mains swi…

You don't have this pushed to a repo somewhere, do you? It would be great to be able to see how you do some of this.

I'd really like to see a YouTube demonstration & explanation. Seriously, if you can make a Raspberry Pi and Python code cook for you, you will be my hero.

Re: Ask HN: What are the things that you have automated in your personal life?

#400
post #394

Earlier quoted context omitted.

I just tried it on a bank statement and the only text I see is the PDF commands (stuff like "/MediaBox [0 0 612 792]", "/F1 125 Tf", and whatnot). There's no actual PDF content text that I can find, whether it's my name, the bank name, or anything else.

There are a few possibilities. The main PDF commands for text are "Tj" and "TJ", so you can try searching for them. Text commands must also be between "BT" and "ET". Maybe a bit harder to search for are the other two text commands: ' and ". TJ is "Show text, allowing individual glyph positioning" which means strings are not necessarily in the PDF as the strings themselves, but have glyph positioning info mixed into t…

Interesting, thank you for the explanation! I am indeed seeing a lot of Tj's and BT/ET's, but not any TJ's.

Immediately preceding the Tj's are a lot of non-text characters that don't look like anything human-readable. Immediately following them are other other commands (Td, Tf, rg, k, etc.) which are preceded by numbers. There are no CustomEncodings. So I guess this means I can't really grep anything?

Post reply on HN