Shtaggle 1.2.1

February 10th, 2009

With the encouragement of a large German following, and news of the inclusion of Shtaggle on the next MACup magazine cover CD, I present version 1.2.1…

WITH POWER PC SUPPORT!

It isn’t as functional as the Intel version (the transport progress bar doesn’t work properly.) but it does the task it is required to do - tag sh..music.

For those that don’t know, Shtaggle is a music tagging app for OS X, with help from the last.fm community. It also gets lyrics (from lyricwiki.org).

In this version there is also support for Spotify, though limited, and better integration with Last.FM’s web services - including syncronising your tags from last.fm back to your library, so they match up in both places (no tags are deleted, only appended).

Download it here (or Direct link)

Oh, and, if you can, please do blog this or mention it in a post sometime - I’d appreciate the exposure!

-Steve

Pinax prettiness

January 25th, 2009

Update on gardening: there is a *lot* of mint root in that little patch… all went well though, and Chris and I fashioned a compost heap out of rubble from the building of our wall. Its very homebrew.

Got some seeds and pots yesterday, so growage should soon commence.

Pinax Prettiness you ask? Well yes, yes indeed. Pinax is a sort of package I guess that is built on the Django project. Its a collection of Django apps which together make an ‘out of the box’ social site. Its what I built http://badlist.co.uk on (but was sorta bodged a little bit because I was finding my way around it) and it is now what I have built the new-look http://synfinity.net on.

It was far too easy.

My thought process went “Hm I could do with a repo for coursework PDFs (for comparative analysis with coursemates) and a place to sort of ’show off’ some bits (CV etc)…”

Django went “How would you like to do that really fast? Here’s a framework for you to store things and manipulate them. Files? Yeah we can do that. Files in different subjects? Yeah, no worries.”

Pinax went “Wanna be able to manage all that really quickly and not worry about the user-login-maintainence cruft? Oh I got some nice apps here if you wanna feed in all your media feeds too..? Oh your coursemates want to upload their work too? Yeah thats cool, I got some funky user profile things built in. Don’t worry about templating too much, I’ve got a nice standard styled template that looks pretty awesome. Change the logo if you like.”

jQuery went “Doc viewers? Don’t do it statically! Here, bosh a bit of AJAX in this page… yeah, then a little nav bar (oi Django, give us a hand!). Sweet, there we go. Oh, I got some rounded edges if you’d like that?”

Steve went “HOLY FUNK! It is done.”

2 to 3 days… could have been done quicker but for interruptions and hosting woes. Pinax is perfect.
Not to mention the creator and co-conspirator (’jtauber’ (James Tauber) and ‘brosner’ (Brian Rosner) respectively) are awesome, dedicated, bright, friendly, helpful… thats 5 characteristics you dont usually find together in the geek world… This project will go far and fast.

-S

PS - if anyone would like a demo/explore of Pinax I would be happy to acquaint you with it.
PPS - if anyone wants a project doing FOR them, and has a little cash to throw at me, I’ll do it for them!

This blog post was brought to you by Welti Productions.

Gardening!

January 16th, 2009

So, it seems its that time of year when gardening starts to look like a good idea (why? Cos I have absolutely no money, mostly. Also, its fun :)

Me, Ellen and Chris have decided to get involved and sort out the mess that is the vegetable patch - sadly a mess of weeds since last year’s failure.

So the plan:
Sunday, Ellen and I are going to the garden centre in Mumbles (while Chris is ‘revising’ :-P) to fetch some bits - namely seeds, but probably some sort of slug-devastator… nematode worms perhaps? I don’t want to use chemicals. Also, Sue (landlady) has said we can borrow a garden fork, so clearing / digging will be done.

One idea we had was to dig a trench around the outside of the soil patch and fill it all the way round with sand. Apparently slugs don’t like that. Not sure how bad it would be for the garden… or soil?

We are also going to construct a small ‘poly tunnel’, using some polyethene dust sheet from B&Q - pretty cheap - £4!

Hopefully these precautions will mean this year’s efforts are a bit more productive than last year’s. Fully expecting cat-shit to deal with, but thats extra nutrients, right?!

Plan:
- Clear up garden on Sunday (any help welcome!)
- Dig trench around outside.
- Grow seedling beans in jars and other veg in plug pots.
- Get sand from beach (illegal… i think… :-/)
- Erect (ha!) poly-tunnel
- PLANT STUFF!!
- wait….
- EAT STUFF!! :-D

This post was brought to you by the Welti-blog-competition foundation.
-S

Meat-free Meat

January 11th, 2009

I’ve been doing some thinking about ’synthetic’ meat…

I think that those of us who consider ourselves conservationists or environmentalists should be working out where we stand on this issue, and if in favour, seeding the idea positively in other people’s minds - this is going to be important in the future when populations have reached stupid levels (unless bird flu really hits).

Pros:

  • Shorter trophic pathway from raw nutrients to meat
  • No harm to animals
  • Can take on extra (or increased) nutrients that real meat may not normally have
  • Less *emissions* (or, easily capturable emissions)!!!
  • Can feed the masses
  • Reduce land needed for grazing (and therefore increase for wildlife, or, yes, houses)

Cons:

  • Texture and flavour are a hurdle.
  • Efficiency is questionable (it would be more efficient to eat the nutrients - but then thats not really the point)
  • …? (have I missed any?)

Some interesting links:
http://www.new-harvest.org/
Nice tech summary (published):
http://www.new-harvest.org/img/files/edelman_et_al_2005.pdf

more of that:
http://www.new-harvest.org/resources.htm

PETA are nuts in my humble opinion but this is good:
http://www.peta.org/pdfs/In_Vitro_Contest_Rules.pdf

New Scientist:
http://www.newscientist.com/article/mg19926731.700-what-is-your-dinner-doing-to-the-climate.html
(esp. page 3)

and

http://www.newscientist.com/data/images/archive/2673/26731701.jpg

Personally I welcome this tech-fix for meat products, though it should be in conjunction with a reduction in animal meat - otherwise the benefits are all lost (bar extra nutrients).
It is true that we eat far too much meat but it is harder to get the masses to realise this than it is to feed them a substitute - a lot of cheap meat is comparably ’shocking’ to in-vitro meat as it is - think “mechanically recovered” (those words send a shiver down my spine)…

Thoughts?

[Django / Pinax] How to send notices when objects are updated (etc.) using django-notification

December 29th, 2008

django-notification includes a class called ObservedItem, currently used in django-wiki to alert a user about an entry that they are watching, when it has been updated.

It is quite simple to re-use this in your own applications (I needed it for BadList [an ethical purchase informer]) like so:

Step 1: define some notices
So, if you don’t have one, create a management.py in your app and put something like the following in it:

from django.db.models import signals

from django.utils.translation import ugettext_noop as _

try:
    from notification import models as notification

    def create_notice_types(app, created_models, verbosity, **kwargs):
        notification.create_notice_type("watched_ingredient_updated",
                                        _("Watched Ingredient Updated"),
                                        _("an ingredient you are watching has been updated"))

    signals.post_syncdb.connect(create_notice_types,
                                sender=notification)
except ImportError:
    print "Skipping creation of NoticeTypes as notification app not found"

This adds a notice to the notifications database (when you next call python manage.py syncdb)

Step 2: let users ‘observe’ things
Basically you want to create a url-view pair that can retrieve an object (the one you want notifications about).

NB: you need to import notification into your views:

from notification import models as notification

lets say you have this in some a view intended for the URL /ingredients/observe/something/:

@login_required
def ing_watch(request, ingredient):
    """
    Observe an Ingredient
    """
    if request.user.is_authenticated:
        i = get_object_or_404(Ingredient,name=ingredient)

This code should get the requested ingredient. The next line to add is:

        notification.observe(i, request.user,'watched_ingredient_updated',signal='observe')


This makes a new ObservedItem object with the object instance set to ‘i’, attached to the user who requested the page, with the notice that we defined in management.py.
The signal is important: we override the default (which is ‘post_save’ if you dig around in the code) so that we can use different notifications for different things. The *normal* use for this is when an object is updated (in which case the ‘post_save’ makes sense). Indeed, that is pretty much all this example will do, but I show that it can be changed so that you may reuse it for other tasks (the reason I needed it to do this was when an object was related to by another object using a ForeignKey, in which case it is not the observed object which is updated, but another that only references it.)

Anyway…
Step 3: actually make a call to send out notices

So, in the case I describe above (where you only want this to happen after the object itsself has been updated) you can hook in the post_save signal to do the dirty work (assuming you leave ’signal’ as the default ‘post_save’):

At the end of your models.py (containing Ingredient):

if notification is not None:
    signals.post_save.connect(notification.handle_observations, sender=Ingredient)

Otherwise, to use our custom signal ‘observe’, you can use the following code wherever you want to send the notice (e.g. after some form has been validated and saved):

     notification.send_observation_notices_for(i, signal='observe')


where i is the Ingredient instance that you want to notify about (so you could get this from the ForeignKey field of some object you just saved that refers to it, or if you are using a form which updates/adds some Ingredient, then use the object returned from that)

Et Voila, how to quickly add in on-site and email notifications using ‘ObservedItem’ class of django-notification :-)

Thanks to Brian Rosner for the help figuring this out.

Shtaggle, Music tagging for Mac OS X - iTunes and Play.app

July 14th, 2008

Shtaggle is a little app I wrote, after a few conversations with James and others about how cool it would be to be able to tag your music in iTunes from last.fm’s tags. It started off as a Django standalone project on my Mac, but after encouragement from various peeps it has progressed to an App (via py-cocoa).

So Shtaggle has reached a point where I have let it loose in the world…
It is now on versiontracker and the hoards of other sites that read versiontracker’s RSS feeds.

Shtaggle gets music tags from last.fm, and then allows you to tag the tracks in iTunes using either the tags from last.fm or your own.
You can choose tags by record label, mood and instrument too.
Shtaggle will then send any tags back to your last.fm profile (if you have one) that you haven’t already added to it for a given track.
Shtaggle will also let you auto-tag your music, using the top tags from last.fm, if you don’t have time to do it manually.

I’ve had some good feedback from it, and will be making it even slicker soon I hope… (the windowing is pretty odd).

Anyway, if you are using OS X 10.5 then please do check it out, and blog about it as you like ;-) (yeah I need some advertising to beat off Moody and QuickTag, both of which look a lot slicker, but do less :-P)

http://shtaggle.co.uk

Greenwashing

June 7th, 2008

Sadly as it is now seen to be cool and good to be green, this has negative consequences.
Big companies use a token green/ethical front to give themselves credibility where they are still blatantly rinsing the planet/people.

e.g.
- Starbucks have fairtrade coffe, but they still use other coffee too and they still open up shop every 100 metres down a street, knocking out the little local cafes
- MacDonalds spend money on researching ‘green’ things, donate veg oil for use in vehicles and try and make their packaging degradeable/recyclable. Do they still cut down acres of rainforest to graze cattle though? Thats open for debate i guess (I don’t know all the facts) but its true that what they do as a company is get kids hooked on shit food, causing health problems and a support a culture of greed and corporate reliance.
- take any power company; investing in green tech is good, and these companies have the money to do good stuff in this sector - so why arent they pushing it harder and faster? Cos they still make a load of money from oil… and they will only make more and more as the demand/supply ratio changes… green tech will provide dirt cheap power - and there’s the problem, there’s no money to be made.

Stu just posted this which is another example of companies ‘greenwashing’ their customers into thinking they are all wonderful… from Marks and Spencer though, is slightly upsetting (although, they still use far to much packaging for their food too, so perhaps not surprising.)

How its going to work…

June 4th, 2008

I decided how its going to work from now on.

I’m not going to do any more falling in love.

Love is going to happen of its own accord.

It will find me through good friendship, not affection.

I’ll know because she will be the one who takes the risk.

No more risks.

This is like one of those new years resolutions… give it a month.

Shtaggers

June 1st, 2008

So Shtaggle has come on a bit since the last post.

Now, not only does it get tags from last.fm but it will also push your tags back to last.fm (so if you tag a track, or have tagged it before, but hadn’t tagged it on last.fm, the tags will get sent!)

Also, you can now register an account on shtaggle.co.uk and then you can have your tagging stats online (soon to become RSS feedable) - so, you get to see what you have listened to most per day/week/month according to tags!

Fixed a few bugs too, so its a bit nicer to use.

Here is the latest zip

PS- Sorry its still a zip and annoying to install… I can’t work out how to package appscript into it (there is a way, but I’m not so good at the build scripts to make this happen) and also, I can’t make a mpkg that works to copy the Shtaggle directory into your /Library/Application Support/ so I guess for now you will have to just copy/install things manually :-/
Sorry!
Chances are I’m the only one that is gonna use it anyway, so nevermind!

Special report from MacManMacmanaman

May 26th, 2008

http://www.dothegreenthing.com/videos/101

:-)

Shtaggle.co.uk

May 23rd, 2008


I thought I’d see a project through to completion for once, so I bought shtaggle.co.uk in order to keep all the updates for Shtaggle in one place and so forth!

Also, released a new version now that will check for updates and a couple of other bug fixes…
See downloads

Feature list:
- Direct interface to iTunes via AppScript
o Skip tracks
o Play/pause
o Rate track
o Tag track (the whole point!)
- Tags pulled from Last.FM
- Tags pulled from artist’s previous taggings
- Predefined customisable tags, including:
o Moods (or whatever, but most sensibly used for moods)
o Record labels
o Instruments
- Custom tags (type whatever word you want) with auto-suggest
- Lyrics pulled from LyricWiki.org
- Alert sound when tracks aren’t tagged

Apologies to ROBERT Pointon for calling him Richard on shtaggle.co.uk! Wups!

Enjoy. :-)

Shtaggle!

May 20th, 2008

Apparently web based desktop apps aren’t particularly sensible.

Here’s a first-draft remake of Tagginator, which is more grounded in reality…

Shtaggle

Again, Python-Cocoa, using appscript (included, but you will need to tweak install.sh to install it).

More limited than Tagginator at present (but I’m working on it…)

Features:
- Tag from Last.FM
- Tag ‘by hand’
- Tag from artist’s previous tags
- Tag by predefined ‘moods’ (with images — placed in /Library/Application Support/Shtaggle/mood/)
- Fancy looking tag clouds thanks to … ??? (Dave?!)
- Basic iTunes transport
- Track rating
- Lyric pull from LyricWiki.org

Enjoy :)

Leave bug reports below or mail me :)

For music lovers…

May 17th, 2008

I’m really anal about organising my music (which is strange cos I’m not anal about organising anything else in my life) so I wrote a little django site a while ago that uses appscript to interact with iTunes and set tags.

I have now ported this (fairly hackily, in true Steve-style) to an app.
It’s still a bit premature but feedback is welcomed…

Basically it presents you with tags, labels and instruments and you drag the ones you want to a box and this tags them in iTunes using the comment field.
It gets tags from last.fm for the current track, it gets tags from your library from the artist (so where you have already tagged the artist), and it uses pre-defined tags of your choosing for you to select from. you can of course just type your own too, but thereafter they get added to the suggested tags which you can then drag too! lovely.

Tech stuff:
It uses the django base to run a server on localhost:8001 which then serves up webpages, which get shown in a WebView. You can of course just hit up localhost:8001 in a webbrowser once the app is running. This is pretty nasty cos it means you need django and so forth, but it works.
Uses scriptaculous/prototype for ajax and pretty UI things (draggables/droppables)

… there are lots of loose ends, but do have a look!

more explained in the README!

http://synfinity.net/code/Tagginator/Tagginator.zip

enjoy.

UPDATE (2008/05/18 @0030):
I put some prefs in so you can easily change the port and the moods/instruments/labels.
same URL as above for download.

iPod Rip

April 16th, 2008

I just remembered this…
When I was skiing I wanted some of Nicki’s music from his iPod (which he didn’t have on his lappy).
iPodRip (the App) failed, so I was a bit stuck…

COMMAND LINE TO THE RESCUE!

Horrid, but it works:

cd /Volumes/Some\ iPod/
for f in `grep -R -H -a -m1 -o THING . | egrep -o “.*m[p|4][a|3]“`; do b=`basename $f`; echo cp $f /Some/Path/On/Computer/$b; done;

Where THING is some string that will exist somewhere in the ID3 tags of the files you want!

Slooowwww too. But it works. :-)

Idea: Litter…

April 3rd, 2008

People pay the government taxes
Taxes are used to pay companies/contractors to collect litter from the kerb and public bins
Therefore… people’s responsibility for their litter is handed to the government.
If there is litter in the street it is simply not our problem, right?

What if: people could claim small amounts of tax back for taking litter to the dump… or by putting it in public bins.
So, this doesnt work if the gain is too high that EVERYONE drives to the dump, but if the incentive is enough- say just to give pennies back per kilo of litter, then people will take responsibility for litter more seriously.

Imagine streets with no litter on, fuelled by the teenage desire to buy lots of stuff - to get money ‘for free’ they either pick up other peoples litter for profit, or take their litter to a designated ‘exchange’.
This exchange could even be a sort of auto-bin, where you load it with rubbish and it spits out some coins based on the weight or constitution of the rubbish…
Not sure how this might work as poeple might end up loading it with liquids or soil…

Hmm..

Stuff

March 31st, 2008

- If one doesn’t push oneself, one never gets better at anything
- Pushing oneself requires risk
- Risk requires confidence, testosterone, non-analysis, or ‘fuck-it’
- Fear is the mind killer.
- Bass is surely the masseuse of the brain
- Twinkles, therefore, must be the acupuncturists.
- Physical pain hurts less than mental pain.

Idea: Reconfigure sales

March 7th, 2008

This is really what the previous post was supposed to turn into…

So, currently producers want to make new stuff so they stay in business (cos, if their products are too good or too long-lasting, they will eventually go bust when demand is met).
The problem here is that people dont want old stuff so producers get away with churning out new stuff.
The other problem here is that producers dont get anything if something they made is second-handed.

If stuff that was sold on as second hand could somehow reclaim some money from the gov’t and feed it back to the producer company, then their incentive to make new stuff would diminish, their incentive to make their product re-sellable, and long lasting would increase…

This would also help suppress consumerism - stuff would go cyclic so people could feel like they are getting new stuff but really its just recycled, and the companies stay happy.

This would only work for a set period with tech stuff, and fashion, but these things can be modularised.
Modularising tech could be useful so companies CAN bring out upgrades but are inclined to do so in a modular way (becuase now, they are gettign revenue when the old stuff gets re-sold, so they dont really want to sell the entire unit (unless they are very greedy, which is likely, so this probably fails…))

Again, a not-fully-thought-through post but needed to write it down to reflect on later….

Thoughts/ideas about how the second-revenue system could work are welcome.

Idea: Reconfigure society

March 7th, 2008

I was chatting with Chris the other day about where our society goes wrong - mostly with regard to closed mindedness coming through poor education techniques, and the problem with homogenising practices of education, and apply them in a blanket fashion to all children.

We discussed how it could work if those that wish to be educated ARE educated and those who wish to be creative are allowed to do so…
Basically, the premise is that kids don’t really get enough choice or flexibility and our society demands very similar things from very different people. This probably doesn’t make a lot of sense without an example:

Chris is an engineer, he likes making things, tangible things. He is creative. He plays & listens to music. He likes coursework projects.
I don’t really know what I am at the moment, but lets say I’m a computer scientist, I write software but not very well; a less creative process and less tangible. I’m reflective. I listen to music. I like exams.

The distinction here is that Chris is better at doing tangible things and I am better at doing theoretical things (NB: thats not to say I enjoy it…)

Society demands that everyone eventually get a job; which is fine if you can find your niche and fit in- no doubt Chris will end up making things and will enjoy his job, because he’s bright; which is great. However, this doesn’t always work - some people who are creative in the same way may not get the opportunity to follow their career path because of exams - some people totally suck at exams - because its not the same as making something tangible. This is noted, and worked around, to some degree by getting students to do coursework.

Sadly this isn’t enough, because the weightings are often mis-matched.

We thought a character-trait test could be conducted early in academic career, whereupon a student is allowed to choose a more creative path or a more theoretical path - make stuff or read stuff… There are bound to be psych. tests that can determine this sort of thing, and with the consent of parents and a change in the education system (perhaps a more dyadic one), kids can:
- Play to their strengths
- Feel more empowered by their choices
This may even have secondary benefits - if kids are happy and are encouraged to do the things they enjoy then they might not go round spitting at things and breaking cars.

Ok so this is a bit blazé.

Anyway.

The original point i was going to make in this was that if society could be reconfigured it might not go down the pan… not sure how and these are more random fireworks of thought than a concrete argument for change….
- A dyadic society where some members are allowed to be wholly creative and receive a sort of support fund until they get to a point where they can support themselves (because art takes time, and you gotta live while you create your art)

Wow i went off tangent in this one…

ToDo: Destruct The Thoughts of Children

March 7th, 2008

Children’s thoughts go something like this:

ME ME ME I WANT THIS NOW GIVE ME THAT SUGAR YUM YUM MORE I WANT SOME OF THAT NO I DONT WANT TO GO TO BED NO I DONT WANT TO GET OUT OF BED I WANT THAT ME ME ME.

According to Dylan Moran, anyway. He’s probably not far off.

Fortunately children are also like sponges that can not only absorb large quantities of whatever ’substances’ you throw at them, but have the ability to grow the substances, and cross-contaminate the sponges of their peers. This is how marketing works. Make one over-sugared up kid want something and eventually the parents will cave to shut them up, cos its easier than looking bad in front of other parents (nobody wants a screaming kid anchored to them). This sugared up child will likely go and show off their exciting new thing, whatever it may be, to a host of other equally sugared up kids. They too then want it cos its ‘cool’, shiny or possibly just contains more sugar.

Explosive purchasing follows.

Good news for the producers and banks (and, I concede, the economy), bad news for the parents and the environment.
Why? Because it will be in landfill within a year.

Marketing folk (or ‘evil geniuses’ as I shall now refer to them) use these sponges so very effectively. However, kids tend to care about something else as much as themselves - fluffy animals. They also are pretty adverse to (although also morbidly attracted to) gruesome imagery (this being the reason why films have those certificates that people ignore). This is fantastic news if you want to make them do that isn’t about them.

So, a (somewhat twisted) proposal:
- Take a marketing campaign (such as … I dunno, Nike trainers…)
- Find out what it is that destroys the credibility of cool (the DoCoC) for this product (there will always be something)
- Find out how to make a short video (kids like things that move and flash and make annoying noises, thats why they are constantly glued to TVs) about the DoCoC, and make it suitably terrifying (pictures of child slave labour in the case of Nike, for example)
- Deliver this content to the children via a mobile phone (all kids have mobile phones these days, cos they want to be old… idiots)
- Wait for them to become horrified by it, and share it with their buddies (because of the morbid curiosity thing, everyone will want to see it as soon as one goes ‘URGH! GROSS’)
- Watch kids grow up respecting their peers in other nations or whatever fluffy animal was killed previously.

Not sure how effective that would be, but it strikes me that it is vitally important to raise awareness of just how bad some companies are… there is always the undertone that is carried by some companies, which gets ignored because it is not made visible enough. It seems kids, being one of the biggest market forces on the planet, are a good target because it will instill some sense of social/environmental conscience before they become corrupted by consumerism, and then grow up and instill those morals into their own progeny.

It is too late to affect people past the age of about 16 I’d imagine as they have already fallen prey to peer pressure, consumerism, wealth, and the X-Factor (or Pop Idol, or whatever get-rich-quick shit happens to be on the TV when they are growing up).

Planting seeds of caring when they are a bit younger should prove fruitful later in life when they become independent even if they suffer a period of hibernation during adolescence…

…just a thought.

OOH! We could do this with digital stories………… uh…. somehow…. right?

Protected: Thought process

February 5th, 2008

This post is password protected. To view it please enter your password below: