Quantcast
Viewing all articles
Browse latest Browse all 183

Mundane Tasks — Perl to the Rescue Part 2

If a thing is worth doing, it’s worth doing well — unless doing it well takes so long that it isn’t worth doing any more. Then you just do it ‘good enough’. “Programming perl” by Wall and Schwartz I had stored a lot of ideas as text files in DEVONthink. Given the amount of files (a few thousand), I wanted to sort them and put them grouped by topic in OmniOutliner files. Sorting was quite easy by tagging the ideas (took a few days), but how to get them into OmniOutliner files? I thought about simply adding them all into a TextWrangler window. Depending on the text editor — and TextWrangler is capable of doing so — the text files simply become added to a single text file. However, I also wanted to have the current file name (usually the title of the idea) and have the text of the file indented. Removing empty lines would be nice to. So, using the usual suspects like perlmaven.com and the like, and akin to my other posting on using perl, I hacked together a script that did the work. The script is pretty basic, it just takes all the text file in [...]

Viewing all articles
Browse latest Browse all 183

Trending Articles