Command Line Erico

This is where I post things, from command line

On History and VIM

January 24, 2017 — Erico Porto

The command line is an effective way of getting things done. One of the things I like the most is how obvious are the tasks that deserves being automated by just running the history command and checking what you do most.

I did some adjustments in my history, like making it twice as big as default settings in Ubuntu. I operate the history a lot, mostly with ctrl+r in bash, and then I can use my brain to remember other things. When I am lazy I throw some history | grep command I don't remember parameters, pandoc and tar are good examples. Some git magic I usually anotate as a gist in github since I have a haystack of git commands in my history.

The thing about history is that once you deal with a lot, you eventually will fall into having carefully written bash scripts that make your work easier - like publishing a python lib to Python Package Index.

And while you are at the command line, I really recommend you to learn vim, it's an awesome text editor that can be extended with many plugins. My favorite right now is ZenRoom2, that can be called by typing :Goyo, it will give you a confortable place to write texts distraction free.

Tags: VIM, command-line-tools

Using Pandoc as a Markdown to Docx converter

March 03, 2016 — Erico Porto

So, I don't really like Word. But it's nearly unavoidable, especially in office environment (see what I did here?).

Word has some good things, it can be read and edited by most people and can be easily converted to Kindle format.

So the command line:

pandoc -o output.docx -f markdown -t docx input.md

Tadah! And if you are in Windows right now, one good thing is that you can run pandoc without installing - doesn't require being admin! Also I've made a .bat for making this easier in Windows. The bat in action below:

drag and drop

If you need help writing markdown, here is a cheatsheet!

Tags: command-line-tools

Cool Command Line Tools

March 01, 2016 — Erico Porto

So today I want to talk about the cool command line tools available today to make your life living in the terminal easier!

Nano

This is old, but if you need a fast and quick text editor for not too long texts, this is what you want. For short texts, this is it!

Slap Editor

If you need to edit code, this is the closest to Sublime Text / Atom you will get on terminal.

It requires nodejs and npm installed. But having then and a internet connection will lead us to the next one in this list...

how2

How2 is Google+Stackoverflow without needing to leave the confy place that is the terminal. It's really good for finding help using intuitive commands.

And that's it for today!

Tags: command-line-tools

Downloading subtitles by the command line

March 17, 2016 — Erico Porto

Today I want to show you guys the awesome tool that's Subliminal, by Diaoul. Subliminal allow you to download a subtitle for a downloaded series or movie by using the command line (did you bought Angry Video Game Nerd or PHD Movie and was surprised it had no subtitles in your language?).

First you have to install it. Assuming you have pip and python on your system:

sudo pip install -U subliminal

After the instalation, you can use the follow command from command line to download a subtitle (I'm going to use brazilian portuguese):

subliminal download -l pt-BR movie-filename.extension

And that's it! Use -l en for english subtitles. The software also has a Nautilus extension that gives cool right click subtitle download for movie files - you can check on the project's webpage on github.

I just use the command line, right now trying to bake a script to automate subtitle downloading.

Tags: command-line-tools