News for hackers. Stuff that matters.
Re:WTF – A personal information dashboard for your terminal by shay_ker on Wednesday August 28, 2019 @12:18PM (#20821193)
what's an example of a workflow you've automated on a terminal?
Re:WTF – A personal information dashboard for your terminal by inetknght on Wednesday August 28, 2019 @12:53PM (#20821562)
-> download 1000 files using curl, then validate their checksum, then build stuff

-> take an almost-CSV report generated by one piece of software, remove a bunch of extra garbage at the top to turn it into an actual CSV file, then send the CSV file to data analysis pipeline.

-> join two CSV files selecting columns 2,3 from one file and 4,5 from the other file, keyed on column 1 from both files. like excel but for CSV files sized in hundreds of megabytes

-> take a bunch of CSV files and pump them into a rabbitmq queue

-> query whether a queue is empty. if so, start a new analysis job. if not, sleep another hour

-> grep for data in a directory to find specific files containing that data, then point those paths to another service

I can go on all day. CLI tools are far more wieldy than GUI tools IMO. CLI tools give me a generally-stable interface (or at the very least, a straightforward method of parsing and adapting to changes) and usually have _way_ better documentation than GUIs.

Re:WTF – A personal information dashboard for your terminal by shay_ker on Wednesday August 28, 2019 @01:12PM (#20821773)
Many of these actions seem like something you'd just never do in GUI though? Except maybe some of the CSV stuff.
Re:WTF – A personal information dashboard for your terminal by m_mueller on Wednesday August 28, 2019 @01:42PM (#20822102)
See, there is a reason don't do this in a GUI. For a short while it looked like Apple's Automator would get there. Maybe Microsoft can crack this in a couple of years if they go nuts with python as a GUI scripting language with native OLE support.
Re:WTF – A personal information dashboard for your terminal by jankiehodgpodge on Friday August 30, 2019 @04:15AM (#20836722)
Powershell is already there.
Re:WTF – A personal information dashboard for your terminal by inetknght on Wednesday August 28, 2019 @01:56PM (#20822260)
All of these actions are things which can be done in a GUI, just definitely not at the scale mentioned... certainly not at the scale mentioned and in a time-efficient manner
Re:WTF – A personal information dashboard for your terminal by shay_ker on Wednesday August 28, 2019 @02:38PM (#20822656)
Right exactly, they'd just be unreasonable to do in a GUI. But what about Google Docs? Admin tasks? Emails? Slack? Code review? Calendar meetings?
Re:WTF – A personal information dashboard for your terminal by ponyous on Wednesday August 28, 2019 @04:20PM (#20823607)
I work with React Native:

1st I setup a script to start an emulator (iOS and Android), build and deploy an app to emus, start development JS server, open vim and split the window to have a terminal ready for anything else.

2nd I automated asset creation when I receive SVG from design - it automatically generates 3 different asset sizes (as required by iOS), compresses them, moves them and names them correctly.

That's just the beginning...

Re:WTF – A personal information dashboard for your terminal by dredmorbius on Saturday August 31, 2019 @01:05PM (#20847491)
Virtually anything you need (or want) to do more than a small handful of times.

Key elements of a decent shell tool are varables, pipes, loops, logic, and parameters.

This ranges from the bog-simple (an xmessage "tea timer" that pops up a reminder after a few minutes to tell me my tea is steeped), to complex scripts.

Things I've run from a shell include downloading and analysing 50,000 G+ profiles for most recent activity, literally a "bash on-liner", as described here:

https://ello.co/dredmorbius/post/naya9wqdemiovuvwvoyquq

Resizing or modifying images via Imagemagick (scales to however much time and disk space you have), converting files from one format to another, generating lists of stuff for further analysis or conversion, updating a whole slew of documents in one fell swoop, creating and listening to playlists of local or remote content with mpv.

You've got a ton of small, simple tools which can be combined flexibly in virtually any way you want. That's a lot of power.