Posted on Sun 23 October 2011 in software.
I’m forever forgetting to remove debug statements or to run flake8 on
my source code. Not to panic though, git hooks to the rescue!
You can just put pre-commit into $PROJECT_DIR/.git/hooks, chmod +x
it and be away.
This is the useful part of the file;
ret_code=0
for file in $(git diff --name-only --cached $against); do
if [[ -n "$(grep 'DEBUGS' $file)" ]]; then
echo "DEBUGS in file $file"
ret_code=1
fi
if [[ "${file##*.}" == "py" ]]; then
flake8 $file
if [[ $? != 0 ]]; then
ret_code=1
fi
fi
done
exit $ret_code
$against is the commit to check against (taken from the
pre-commit.sample file).
DEBUGS is the comment tag I use to denote debug statements, which is
used by geany in the Task addons plugin to list any occurrences of it
in the file (along with TODO and FIXME comments)
Posted on Mon 22 August 2011 in software.
I’ve spent most of today trying to get either Anjuta or
Eclipse/PyDev working with my django git repos for
lapwing.os/website. And watching notch work on his LundumDare
48 submission.
I probably missed an easier method, but these were the steps;
- File > Import > Projects from Git
- Next …
Posted on Sun 22 August 2010 in software.
I’ve been working on some mockups for lapwing-web download application.
These are some SVG mockups made using Inkscape and JessyInk.
JessyInk turns SVG files into mini presentations, in this case I’ve used
the effects to fade in the comments about some design decisions.
These aren’t particularly high …
Posted on Thu 05 August 2010 in software.
I’ve been working on peewit recently. I’ve finally got it talking to
telepathy-mission-control, logging in, retrieving a contacts list,
displaying it in the GUI and updating when contacts leave/change status.
The current code is the master branch, but extra work may go on in the
“tmc” branch …
Posted on Sun 11 July 2010 in software.
TechRadar have an article about “Point and click GUIs: why are we still
stuck with them?“, bemoaning the lack of innovation in the software
interfaces we all use daily. Since the 80’s computer GUIs have been
based on files, taskbars, menus and windows, manipulated by a mouse and keyboard …