[Assorted-commits] SF.net SVN: assorted:[948] picard-plugins
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-08-27 22:36:49
|
Revision: 948 http://assorted.svn.sourceforge.net/assorted/?rev=948&view=rev Author: yangzhang Date: 2008-08-27 22:36:58 +0000 (Wed, 27 Aug 2008) Log Message: ----------- added picard plugins! Added Paths: ----------- picard-plugins/ picard-plugins/trunk/ picard-plugins/trunk/README picard-plugins/trunk/setup.bash picard-plugins/trunk/src/ picard-plugins/trunk/src/filetools.py Added: picard-plugins/trunk/README =================================================================== --- picard-plugins/trunk/README (rev 0) +++ picard-plugins/trunk/README 2008-08-27 22:36:58 UTC (rev 948) @@ -0,0 +1,13 @@ +Overview +-------- + +Tools for working with individual files: reloading, deleting, playing, etc. + +Setup +----- + +Requirements: + +- [Picard Tagger] 0.9 + +[Picard Tagger]: http://wiki.musicbrainz.org/PicardTagger Added: picard-plugins/trunk/setup.bash =================================================================== --- picard-plugins/trunk/setup.bash (rev 0) +++ picard-plugins/trunk/setup.bash 2008-08-27 22:36:58 UTC (rev 948) @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +pkg=picard-plugins +. simple-setup.bash || exit 1 +version=0.1 + +install ~/.config/MusicBrainz/Picard/plugins/ src/filetools.py Property changes on: picard-plugins/trunk/setup.bash ___________________________________________________________________ Added: svn:executable + * Added: picard-plugins/trunk/src/filetools.py =================================================================== --- picard-plugins/trunk/src/filetools.py (rev 0) +++ picard-plugins/trunk/src/filetools.py 2008-08-27 22:36:58 UTC (rev 948) @@ -0,0 +1,30 @@ +PLUGIN_NAME = 'File Tools' +PLUGIN_AUTHOR = 'Yang Zhang' +PLUGIN_DESCRIPTION = 'Tools for working with individual files: reloading, deleting, playing, etc.' +PLUGIN_VERSION = "0.1" +PLUGIN_API_VERSIONS = ["0.9.0", "0.10"] + +from os import remove +from subprocess import Popen +from picard.ui.itemviews import BaseAction, register_file_action + +class ReloadFile(BaseAction): + NAME = '&Reload' + def callback(self, objs): + self.tagger.remove(objs) + self.tagger.add_files([o.filename for o in objs]) + +class DeleteFile(BaseAction): + NAME = '&Delete Track From Disk' + def callback(self, objs): + self.tagger.remove(objs) + remove(objs[0].filename) + +class PlayFile(BaseAction): + NAME = '&Play Track (gmplayer)' + def callback(self, objs): + Popen(['gmplayer', objs[0].filename]) + +register_file_action(ReloadFile()) +register_file_action(DeleteFile()) +register_file_action(PlayFile()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |