Skip to content

Instantly share code, notes, and snippets.

@mativs
mativs / alternate-clean-ide3tag-v1.py
Last active December 26, 2015 10:28
Clean Id3 v1 Wrong Tag. Must run it on music root folder, and must run it at least two times. http://savvyadmin.com/rhythmbox-id3-tag-issues/
#!/usr/bin/env python
# truncates a file after a TAG pattern is found
# use at your own risk!
#
# for a bunch of files, you may want to:
# find somewhere/ -iname "*.mp3" -exec tag-wipe.py {} \;
#
# ulysses - ulysses@naosei.net
@mativs
mativs / users_extras.py
Created May 24, 2012 13:43
Template tag filters to call an instance method with 'user' parameter
from django import template
register = template.Library()
@register.filter
def with_user(instance, user):
"""
stores the user in the instance attribute '_onuser' wether exists or not.
"""
setattr(instance, "_onuser", user)