Category Archives: Command Line

Problems with RecordMyDesktop and a Command Line Alternative

I have been trying to create screencasts using RecordMyDesktop on Ubuntu. While the app itself functioned well I had a serious problem with the image quality: switching windows seemed to lead to massive diagonal pixelation of the captured images rendering the screencast useless. I played around for a while with various RecordMyDesktop settings (frame rate, […]

Also posted in *nix | 1 Response

Datapkg 0.8 Released

A new release (v0.8) of datapkg, the tool for distributing, discovering and installing data is out! Release: http://pypi.python.org/pypi/datapkg Docs: http://packages.python.org/datapkg/ There’s a quick getting started section below (also see the docs). About the release This release brings substantial improvements to the download functionality of datapkg including support for extending the download system via plugins. The […]

Also posted in Code, Open Data, Open Knowledge Foundation, Python, Shuttleworth Fellow, Software | Leave a comment

PyWordPress – Python Library for WordPress

Announcing pywordpress, a python interface to WordPress using the WordPress XML-RPC API. Download: http://pypi.python.org/pypi/pywordpress/ Source code: https://bitbucket.org/rgrp/pywordpress/ Usage Command line Check out the commands:: wordpress.py -h You will need to create a config with the details (url, login) of the wordpress instance you want to work with:: cp config.ini.tmpl config.ini # now edit away … […]

Also posted in Code, Own Work, Python, Software | 1 Response

Counting Words in a Latex File

Much of this was inspired by this blog post. Having tested on my own set of files I would suggest that these methods could be ranked in order of accuracy as: TexCount.pl untex + wc wc pdf file wc $ wc -w file.tex This is very simple but is pretty inaccurate since wc has no […]

Also posted in *nix, Hacks | 1 Response

Running OpenOffice from the Command Line on Mac OSX

This is a simple hack to enable you to start OpenOffice and, more importantly, open documents with it from the command line. I’ve got the standard X port of OpenOffice 2.0 installed, so if you have something different you may need to change the path to soffice given below (to find soffice on your machine […]

Also posted in Hacks | 2 Responses

Merging Subversion Repositories Together

Have repository {start-repo} and want to merge into {old-repo} at {some-dir-name} # if you just wanted trunk replace with this # svndump {start-repo} | svndumpfilter include trunk svnadmin dump {start-repo} > my-dump # copy file to main server and change to web-user svnadmin load –parent-dir {some-dir-name} {old-repo} < my-dump

Also posted in Hacks | Leave a comment

csv2ascii: display csv as ascii tables

Having looked around for a while without success for something that would spit out csv files as ascii tables I decided to hack something together. The result is a small python script csv2ascii.py. It is currently fairly crude, for example it just truncates cell text which is too long, but I hope I’ll have some […]

Also posted in *nix, Hacks, Python, Software | Leave a comment

Find and Replace Across Multiple Files

Archiving for my own benefit the results of yet another 5 minute look for how to do find and replace across multiple files from the command line: Use sed: sed -i ‘s/foo/foo_bar/g’ *.html use the old perl hack: perl -w -pi~ -e ‘s/foo/bar/’ [files] Notes: -p: loop, -i edit files in place (backup with extension […]

Also posted in *nix, Hacks | Leave a comment

Stephenson’s: In the beginning was the command line

Despite its free availability i can’t find one version formatted in a way I actually like. Anyway here’s a link to one of the least bad (it’s plain vanilla html and supposedly a copy of the page Stephenson first posted on his website): http://steak.place.org/dougo/inthebeginning.html Published in 1999 and though now a little dated this is […]

Also posted in Books | Leave a comment

wdiff: compare two files word by word

debian/ubuntu: apt-get install wdiff macosx: fink install wdiff From apt-cache show: wdiff’ is a front-end to GNU diff. It compares two files, finding which words have been deleted or added to the first in order to create the second. It has many output formats and interacts well with terminals and pagers (notably with less’).wdiff’ is […]

Also posted in Software | Leave a comment