So I was well on my way in the terminal, listing directories, CHANGING directories (omg CD), viewing files, creating files. So exciting! Fuck you Word and excel, I do everything from the command line now. Your inferior “UI” is useless to me.
But like most things I set out to do, I jumped in head first and tried to solve a very complicated problem.
What I tried to do: Open a list of URLs and save a PDF of the content.
Why this was more challenging than expected: They’re internal encrypted websites requiring a login.
What I tried (found on google) : Bypassing the browser completely and using a HTML to PDF converter called wkhtmltopdf
Now, in theory, I understand the problem and why the solution could work. What I got stuck on was even more retarded. And thus again, the point of this blog.
So what is wkhtmltopdf? It’s an open source LGPL command line tool… k… great. so I type in the code that people are referencing in various forums, no luck. Everntually i figure out you have to like… download something.
So I work out my own somewhat accurate metaphor. Linux (or unix, still unclear on the difference) has basically a dictionary, and to do other cool stuff you need to kinda download other dictionaries. Then you can use the words in those dictionaries. What makes things more confusing to a noob is most people download these dictionaries by first downloading a dictionary called Homebrew. Then you can use the word brew. but not til you download it. a;lskdjf
The instructions on the site are naturally crystal clear:
Instead of googling what a precomipled binary is or try and decipher what they mean by the irritatingly innocuous “source,” decide it would be faster to “ASK AN ENGINEER!” and that’s when the lolz began.
I trek across the office to the land of Hershel backpacks and imported Japanese tea. And attempt to ask my question. it sounded something like this:
“So. I need help… uhm “installing” like a … “tool” maybe? or “client” i’ve seen it called also… or like something about a binary something…. or a kit? Basically i need to make use commands that i can’t use now… uh work.”
After a pause, he proceeded to install homebrew, download the tool/kit/client and dumb it down for me in a very gentle, kind way.
Linux has a list of words, commands are like verbs and i haven’t mapped out the rest of the syntax yet. To use the verb “install” in order to download something, you first need to install homebrew (or a similar program) that’s kind of like an excel add-on.
The epilogue- Apparantly you can’t bypass a browser if you need to login and can’t replicate the cookies (thanks Max for spending an evening helping me try) and I settled for an applescript which did the job just fine.