IPB

Welcome Guest ( Log In | Register )

AMG script, python script and frozen exe
2E7AH
post Apr 6 2010, 03:45
Post #1





Group: Validating
Posts: 2424
Joined: 21-May 08
Member No.: 53675



below is little script/program that can automatically fetch data from AMG and write it in files tags (with foobar and foo_comserver2) or in tab delimetered csv files stored in passed files folder

2 usage scenarios:

1. foobar and foo_comserver2 installed:
- make playlist, name it "amg" and add some tracks
- double click script/program or run it with some arguments
- it will try to fetch data from AMG, including album cover (200x200px amg_%album%.jpg) and Song reviews (not many releases include song reviews of course)

2. from command line:
CODE
AMG file_path artist album [-track tracknumber title]

additional arguments that can be add as last arguments (if any) are:
_noc_ (don't download cover)
_nosr_ (don't fetch Song Review)
_nofoo_ (don't use foobar as tagger, just write csv files)

It uses just one request per release (on last release basis) so all data is cached then reused if needed without requesting for every track
This fields can be fetched: Mood, Style, Artist_URL, Release_URL, Release_Date, Release_Rating, Theme, Label, Genre, Review, Composer, Performer, Song_Review and album cover

example: "python amg.pyc" (or double click on amg.exe) will process all files in playlist named "AMG" and add this tags:
- composer/performer/song_review in corresponding tags
- all other tags will be written to multivalue %amg% tag with each value following this rule - "%AMG_tag_name%: tag_value"

i.e. if I want to map Review, Rating, Genre and Style from %amg% tag, it can be done with properties dialog > automatically fill values (or more easily with masstagger):



another example: "amg.exe _noc_nofoo_" won't write tags to files nor download covers but will make 2 csv files: "%album%.amg_release.csv" and "%album%.amg_tracks.csv" in tracks folder

In any case for automatically processing "amg" playlist foo_comserver2 is needed, or path, artist and album arguments must be passed to script/program + optionally for composer/performer/song_review, "-track %tracknumber% %title%" needs to be provided, so using it without foobar or comserver2 will be hard then harder wink.gif

Compiled with Python 2.6 + Python Win32 Extensions (for com server)
[attachment=5840:amg_script.7z]
Frozen stand alone bundle (2.57 MB):
[attachment=5841:amg.7z]
known limitation (other than design) is no unicode support i.e. if filename is in unicode it will just be skipped smile.gif

source script by sending email by PM
Go to the top of the page
+Quote Post

Posts in this topic
- 2E7AH   AMG script   Apr 6 2010, 03:45
- - lo-fi   awesome!! thank you very much. is it posi...   Apr 6 2010, 06:01
- - 2E7AH   Good point, I totally forgot about custum_db I...   Apr 6 2010, 11:09
- - dscmn   It doesn't work for me. I don't know why....   Apr 22 2010, 00:16
|- - 2E7AH   Add _dbg_ as argument and see what command line pr...   Apr 22 2010, 04:35
- - dscmn   QUOTE Add _dbg_ as argument and see what command l...   Apr 22 2010, 08:23
|- - 2E7AH   It's not clear what could it be. I guess it...   Apr 22 2010, 09:00
|- - simpleton   Thanks 2E7AH for this, it is great. QUOTE (2E7...   May 12 2010, 07:21
|- - 2E7AH   QUOTE (simpleton @ May 12 2010, 08:21) Wi...   May 12 2010, 15:26
- - dscmn   You're right, it is command line length proble...   Apr 22 2010, 09:42
- - 2E7AH   Hm, it doesn't seem to me that "Blue Trai...   Apr 22 2010, 09:56
- - isosceles294   I can't get this script to work with columns_u...   Apr 24 2010, 01:02
- - isosceles294   I also can't figure out the masstagger script ...   Apr 24 2010, 03:48
- - 2E7AH   do you use CODE$meta_sep(amg,;) as so...   Apr 24 2010, 03:59
- - eradumvelhinho   First: many thanks for this script!It helped m...   Jun 22 2010, 14:17
|- - 2E7AH   Good to hear and yes, there will be new version, ...   Jun 22 2010, 15:48
- - eradumvelhinho   Okay. Great to hear it.   Jun 22 2010, 18:10
- - anselm13   I'm pretty new to foobar. I thought I'd a...   Jul 1 2010, 02:34
- - 2E7AH   OP should be readable I think, in case you are hav...   Jul 1 2010, 09:25
|- - anselm13   QUOTE (2E7AH @ Jul 1 2010, 03:25) OP shou...   Jul 8 2010, 13:43
- - hitko   Seems that links in 1st post are broken, where els...   Aug 10 2010, 15:10
|- - hitko   QUOTE (hitko @ Aug 10 2010, 15:10) Seems ...   Aug 10 2010, 18:04
- - Benji99   QUOTE (2E7AH @ Jul 1 2010, 04:25) OP shou...   Aug 23 2010, 00:25
- - SilverSB   Is there any place where the amg script can be dow...   Sep 18 2010, 11:11
- - 1sarap1sigara   please help avout script.i hope we can all use   Sep 20 2010, 00:12
- - Beta4Me   Is this script still available? It says the attach...   Oct 6 2010, 09:21
- - dingdong   copy here: http://pastebin.com/bV3GzkiJ   Oct 10 2010, 01:25
|- - tberman333   QUOTE (dingdong @ Oct 9 2010, 20:25) copy...   Nov 24 2010, 03:55
|- - Decalicatan_Decalicatan   QUOTE (tberman333 @ Nov 24 2010, 04:55) Q...   Nov 24 2010, 09:54
|- - TiPunK   QUOTE (Decalicatan_Decalicatan @ Nov 24 2010,...   Dec 3 2010, 14:50
- - sigrun   Is there someone who could update this to work?...   Oct 17 2011, 15:59


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 1st October 2014 - 18:32