Posts for: #Utilities

PNG(s) to PDF, the command line way

A quick tip for command line users: if you want to convert .png files to .pdf:

convert *.png filename.pdf

Simple! If you want to keep control of page sequence or specific files to convert:

convert page1.png page2.png page3.png filename.pdf

Needless to say, but I’ll say it anyways, the .pdf won’t be in vector graphics, so not scalable but that is because .png is not a vector graphics format.

[Read more]

Diff with vimdiff

For those who are vim fans, a quick tip on how to run a diff/merge  task:

Open the files with:

vimdiff file1 file2 file3   –> Vertical split is default

vimdiff -o file1 file2 file3  –> If you’d like horizontal split of files

To jump between files:

Ctrl-W w

To jump places where differences are found:

]c    –> to see next part of a change

[c   –> to go back to the start of a previous part of a change

[Read more]

Encrypt files with GnuPG

Here is a simple and quick way for you to encrypt files in Linux:

gpg –output doc.gpg –encrypt –recipient [email protected] original_file.doc

Further explained:

  • –output (or -o) is the name of the encrypted file
  • –recipient (or -r) is the person who will be decrypting the file. If the file is for yourself only, use the email address of your GPG key.

To decrypt:

gpg --output output_file.doc --decrypt doc.gpg

I recently used this to encrypt a sensitive file before placing it on my Dropbox account. Nice safe way to place a private document in the cloud.

[Read more]

Gwibber microblogging app now 2.0 [Linux]

Gwibber, an open source microblogging app for Gnome has now reached version 2.0!

Although at 2.0, the developers are not considering this a stable release yet and not making it available on the stable distribution channels. What I could notice first from the upgrade was the UI from:

to

Gwibber 2.0

Which means:

  • it is now easier to jump between different accounts (Gwibber supports Identi.ca, Twitter, Facebook, Digg, StatusNet, Flickr and more).
  • You can easily post to only one account.
  • Easy “re-dent” / “re-tweet”.

I’m sure there are more behind the scenes improvements but so far I haven’t seen any list. For now, the upgrade was worthwhile.

[Read more]

Recover deleted files with Magic Rescue

If you’re trying to recover deleted files or files in a corrupted partition, you might want to give Magic Rescue a try. With this command-line tool you will basically be looking for specific file types (searching by their extension). So, for a massive file recovery task, it will not be a good approach.

The program uses what it calls “recipes” as the instruction of which files to look for and how to do so. On a standard installation of Magic Rescue on my Ubuntu 9.04 distro, I got the following recipes (located at /usr/share/magicrescue/recipes) :

[Read more]

Compare files in Linux

Not long ago I was working with some .po files and needed a nice and simple diff program to merge 2 files. First I tried the multi-purposed text editor vim.

Using vim as a diff and merge tool:

with Andrej’s article I found some nice tips & tricks and the Vim manual for diff tasks. Some useful commands,

  • vim -o one.txt two.txt three.txt” (for horizontal split), “vim -O one.txt two.txt three.txt ” (for vertical split)
  • go to the next diff point   ” ]c “; go to previous diff point “ [c
  • merge to original “do“, merge from original “dp“.

The window you’ll be looking at will look something like this:

[Read more]

Gnash supports YouTube [linux]

Gnash, the freedom alternative to Adobe Flash Player now supports displaying YouTube movies!

The to-do list for Gnash is still pretty large until we’re all freely able to browse the web without the Adobe plug-in. But, at least this is some major good news I found out today.

Now let’s hope html5 gives us more goodies and web developer adopters to make Adboe Flash Player even less needed.

Update: I was hoping I could use Gnash completely now but unfortunately a lot of websites are still not functioning well with it (such as Google Analytics) so I had to remove it.

[Read more]

Emacs – text editor on steroids

Although it has been a round for quite some time, I’m not a coder so my experience with text editors and IDEs is very limited. To give you an example, I’ve been using on the command line the good-ol’ simple nano. But, since I’m starting to need a bit more powerful features, my search began for a more powerful program.

Emacs was my first try since it has been highly rated and praised. For me, there was a bit of a learning curve for the simple operations of navigating through a file (keyboard shortcuts are awesome) but nothing overly complicated and there is a nice tour accessible when you open the program.

[Read more]

Ebook reader and manager

For those who like ebooks, Calibre is a great program that was created to manage pretty much any aspect of your reading files.

calibre

The list of features is pretty extensive:

  • convert files from and to epub, mobi, LRF and supports input of several other formats including PDF, html, odt, rtf amongst others;
  • syncs to mobile reader devices (seems to work well with the iPhone/Stanza and the Kindle);
  • convert a news feed to an ebook;
  • scans your computer to check for all supported ebook formats so you can keep them organized, download cover art and meta data;
  • runs on Windows, Linux and MacOS X.

At the present moment the app is on version 0.5.3 and seems to be under heavy development. For me, file conversion from PDF to epub format went without any hitches and I was finally able to organize my ebook library under one program.

[Read more]