[Solved] Simple way to edit id3v2 comment tag in python?

I'm working on a project right now that is going to read the id3v2 comment tag from an MP3 file, parse some things from it, and then append some text to the end.
Right now I'm using id3v2 from extra to do this:
comm = commands.getoutput( "id3info '%s' | grep '(Comments): ()'" % fileName )
Then I use this to put it back:
os.system( "id3tag -c \"%s\" '%s'" % (commNew, fileName) )
I really don't want to rely on this package to insert this comment. I've been looking at eyeD3 and mutagen for a better way to do this, but I'm having trouble figuring it out.
I know there has to be a more elegant solution out there. Any ideas?
Last edited by ltpl4y3r (2009-04-05 05:00:52)

Thanks Zariel, I had looked at mutagen before, but had never been able to edit the COMM tag properly. After toying with it and dissecting mid3v2. I was able to come up with the following:
import mutagen.id3
filename = 'File.mp3'
id3 = mutagen.id3.ID3(filename)
frame = mutagen.id3.COMM(encoding=3, lang='XXX', desc=u'', text=[u'Great comment!'])
id3.add(frame)
id3.save()
Adding [Solved] tag...

Similar Messages

  • After duplicating a page, how do I prevent changes to both pages (without having to rename EVERY box for every duplicated page). I need a simple way to edit pages independently after I have duplicated one page several times. Thanks.

    Its a form with 3 work history sections on it. I need to duplicate the page to include my entire work history, however, when I duplicate the page and then edit the new page to put my next 3 jobs in my work history, it edits the previous page as well.
    THERE HAS TO BE  A SIMPLE WAY TO DO THIS!!!!!

    The way to do that is to make a Template object from the first page, which
    allows you to spawn copies of it and to have the fields in those copies
    automatically renamed.
    On Wed, Sep 3, 2014 at 2:40 AM, adobeuser1987 <[email protected]>

  • [SOLVED] Simple way to make files available for download on my site?

    It is my intention to keep the previous version of the kernel available on my website.  Every now & then it will be very helpful to someone, when they need it & can't get it anywhere.
    Could someone please give me instructions on how you do this?
    I have set up FileZilla, & can access my space, I have made the simplest of pages, & I have permission from my ISP, so long as I don't make money out of it, I don't have to pay for the bandwidth.
    Thanks in advance.
    [Edit:]
    I found out for myself that it is as easy as making a link to them.
    [Edit:2]
    Having asked some questions I got answers that make my keeping kernels on a server redundant.  See Post_#2 in the following link:
    http://bbs.archlinux.org/viewtopic.php?id=57455
    Last edited by handy (2008-12-18 07:50:25)

    I have it up, it currently has two copies of the tiny  app' backlight which gives screen brightness control to Mac users with LCD screens, the 2nd copy is just filling in for the kernel.
    Could someone tell me how to handle the permissions on the files that I put up, & should I when available also make the source available?
    Here is the address:
    www.users.on.net/~thehands/

  • CSS Comment Tags in Menu Tab?

    Is there a way to add CSS comment tags to my FAVORITES menu
    tab? Whenever I want to add comments to an external CSS document, I
    have to manually type /*...*/. It would be great if there was a
    comment button for CSS, like there is for HTML, so I could just
    select the text I want to comment out, click a button, and it
    automatically wraps the CSS in comment tags.

    There is. It's on the Code toolbar.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "shockbyte" <[email protected]> wrote in
    message
    news:gff1k2$q6p$[email protected]..
    > Is there a way to add CSS comment tags to my FAVORITES
    menu tab? Whenever
    > I
    > want to add comments to an external CSS document, I have
    to manually type
    > /*...*/. It would be great if there was a comment button
    for CSS, like
    > there is
    > for HTML, so I could just select the text I want to
    comment out, click a
    > button, and it automatically wraps the CSS in comment
    tags.
    >

  • [SOLVED] I need a simple way to start/stop a virtualbox vm

    Hi,
      I need a very simple way to start a headless virtualbox vm on login, and cleanly save its state on system shutdown/reboot. I can't use solutions like vboxtool because my home directory is encrypted and only available after I login.
      I have written a simple script to do what I need:
    #!/bin/bash
    if VBoxManage startvm --type headless archdev > /dev/null 2>&1; then
    trap "VBoxManage controlvm archdev savestate > /dev/null 2>&1; exit" SIGINT SIGTERM
    while true;
    do
    sleep 10h
    done
    fi
      When I run this script in a interactive shell, all works as expected: It will successfully start the vm(archdev), and when I send SIGINT (using CTRL+C)  it will cleanly save the vm state. The problem I'm facing is that when I start this script as a background process(sufix it with a '&') it will successfully start, but it will fail to cleanly save state on shutdown, since it seems to  ignore signals send using 'kill' command(unless it is a SIGKILL). I highly appreciate an solution to this problem, by either explaining to me what is happening, or by providing an alternate one(as long it doesn't involve starting the vm with the system).
      Thanks in advance.
    Last edited by thiago (2011-09-04 14:54:44)

    cybertorture wrote:
    vboxmanage startvm --type headless VMNAME
    put this to start at login
    su -c 'vboxmanage controlvm VMNAME savestate' USERNAME
    put this to /etc/rc.local.shutdown
    Worked like a charm, thanks.

  • How to Edit Comment Tag in DW CS3?

    I would like to customize the HTML comment tag for my own
    preferences. I know how to edit the colors and font under
    Preferences, but I would like to change the whole tag and add some
    more spaces and dashes. How do I edit this in DW CS3?
    Thanks..

    That's invalid, I believe. You cannot have more than two
    dashes on either
    side, as I recall.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Macronutz" <[email protected]> wrote in
    message
    news:f63tkh$222$[email protected]..
    > For example, DW currently write the HTML comment tag as:
    <!--comment goes
    > here-->
    >
    > But I want to change it so that comments tags appear
    differently, with
    > more
    > dashes and spaces, for example:
    >
    > <!------------ comment goes here
    ------------------>
    >
    >

  • Simple way to use the Photo Gallery Module and flexslider to create an editable image slider?

    I want to offer an image slider that my clients can easily update themselves through the Admin. Ive researched it alot and I know it can be done using web apps but does my cliently seriously need to pay over $400 a year for the webcommerce option just to have an updatable image slider?? I find that unrealistic. Does anyone know how to set this up using the photo gallery module and "flexslider" so clients on the business marketing plan can have access to a simple and clean editable image slider?
    Any BC experts that can help would be greatly appreicated!
    Thankyou

    Not an expert, but I think what you're looking for is a slider that can get its list of photos from an XML file.  The Photo Gallery module can produce an XML file.

  • Do you know of a simple way of sorting and deleting duplicate photos on  aperture

    Hi , Do you know of a simple way of sorting and then deleting duplicate photos on Apeture.
    Thanks Phil

    There is no simple way. The best strategy really is to take care not to import duplicates.
    What is your Aperture 3 version?
    What kind of duplicates are you asking about? 
    If you imported exactly the same file multiple times, sorting your images in the Finder by filename or creation date will display them side by side.
    If you have diferently sized versions of the same image, edited versions, or versions converted to a different format, then sorting by creation date will not help; you might try to sort by capture date, but that may fail, if there were different imezone settings when you imported the images.
    You could also sort be filename, if you did not rename the images on import.
    If you renamed your versions, adjusted the date, modified the file properties by writing to the original files, try to sort by other tages - faces, location, keywords.
    There are some helper applications to scan your Aperture library and tag duplicates: (I have not really tested any of them)
    Duplicate Annihilator (Mac) - Download  good to detect accidentally imported thumbnails
    http://photosweeper.en.softonic.com/mac  : This app can actually detect edited duplicates based on statistic measures and histogram similarity.
    Duplicate Cleaner for iPhoto - free

  • Editing Multiple .AVI Tags

    Please excuse my noob behavior, as this is my first post! I would like to know if it is possible to edit multiple .AVI tags simultaneously. There are several programs out there that do this for Windows. Thus far I have been unable to locate equitable software for Mac OSX. Am I missing something here, is this easier than I think? Thanks for your guidance!

    ID3 tags are contained in a file, so to change them, you will have to reupload.
    The iTunes U web services API does let you change a lot about the way things are displayed within the iTunes Store ... but using them may not seem simple unless you have a web services/XML guru handy. If you are such a guru, then you want to check out Chapter 6 of the iTunes U admin guide.

  • Simple way to store old photos on external drive?

    I've got 12,000 or so old photos that seem to gum up iPhoto whenever I launch it.  I want to save the pics and keep them available but don't need them to be accessable each and every time I launch iPhoto.  Is there a simple way to store the bulk of these on an external drive?

    You could create a new, "holding" library on the EHD and use  iPhoto Library Manager to transfer the photos from your working library to the holding library.  Then when you've verified that the holding library has the photos safe and sound you can delete them from your working library.  This way you can keep the keyword, titles and comments and edited versions ready to view and use by open the library with iPhoto or transfer those you need back to the working library.
    OT

  • Is there an easier/simpler way of obtaining this result ?

    Good morning (afternoon to you, BluShadow),
    I obtained the following correct, as desired, output (derived from the EMP table):
    D10     D20     D30     PREZ    MGRS    ANALS   SALESM  CLERKS
    CLARK   JONES   WARD    KING    BLAKE   FORD    ALLEN   ADAMS
    KING    FORD    TURNER          CLARK   SCOTT   MARTIN  JAMES
    MILLER  ADAMS   ALLEN           JONES           TURNER  MILLER
            SMITH   JAMES                           WARD    SMITH
            SCOTT   BLAKE
                    MARTINusing the following query:
    with
       -- pivoted departments  (haven't studied the Oracle PIVOT clause yet)
       depts as
        select max(case deptno
                     when 10 then ename
                   end)                                 as d10,
               max(case deptno
                     when 20 then ename
                   end)                                 as d20,
               max(case deptno
                     when 30 then ename
                   end)                                 as d30,
               rnd
          from (
                select deptno,
                       ename,
                       row_number() over (partition by deptno
                                              order by deptno)  rnd
                  from emp
         group by rnd
         order by rnd
       -- pivoted jobs
       jobs as
        select max(case job
                     when 'CLERK'         then ename
                   end)                                 as Clerks,
               max(case job
                     when 'PRESIDENT'     then ename
                   end)                                 as Prez,
               max(case job
                     when 'MANAGER'       then ename
                   end)                                 as Mgrs,
               max(case job
                     when 'ANALYST'       then ename
                   end)                                 as Anals,
               max(case job
                     when 'SALESMAN'      then ename
                   end)                                 as SalesM,
               rnj
          from (
                select job,
                       ename,
                       row_number() over (partition by job
                                              order by ename)   as rnj
                  from emp
         group by rnj
         order by rnj
    select d10,
           d20,
           d30,
           Prez,
           Mgrs,
           Anals,
           SalesM,
           Clerks
      from depts a full outer join jobs b
                                on a.rnd = b.rnj
    order by rnj, rnd;which takes a total of 5 selects to get there.
    I was trying to find a query that would be, hopefully simpler, easier and didn't require as many selects. My last attempt is the following (which is close to the desired result but doesn't get a cigar yet):
    select case deptno
             when 10 then ename
           end                                 as d10,
           case deptno
             when 20 then ename
           end                                 as d20,
           case deptno
             when 30 then ename
           end                                 as d30,
           case job
             when 'CLERK'         then ename
           end                                 as Clerks,
           case job
             when 'PRESIDENT'     then ename
           end                                 as Prez,
           case job
             when 'MANAGER'       then ename
           end                                 as Mgrs,
           case job
             when 'ANALYST'       then ename
           end                                 as Anals,
           case job
             when 'SALESMAN'      then ename
           end                                 as SalesM,
           row_number() over (partition by deptno
                                  order by deptno)  as rnd,
           row_number() over (partition by job
                                  order by ename)   as rnj
      from emp
    order by rnj;The above query gets me to this result which is encouraging but... short of the mark:
    D10     D20     D30     CLERKS  PREZ    MGRS    ANALS   SALESM   RND  RNJ
                    ALLEN                                   ALLEN      3    1
            ADAMS           ADAMS                                      2    1
                    BLAKE                   BLAKE                      6    1
    KING                            KING                               2    1
            FORD                                    FORD               1    1
            SCOTT                                   SCOTT              5    2
                    JAMES   JAMES                                      5    2
    CLARK                                   CLARK                      3    2
                    MARTIN                                  MARTIN     2    2
                    TURNER                                  TURNER     1    3
    MILLER                  MILLER                                     1    3
    D10     D20     D30     CLERKS  PREZ    MGRS    ANALS   SALESM   RND  RNJ
            JONES                           JONES                      3    3
                    WARD                                    WARD       4    4
            SMITH           SMITH                                      4    4It uses only one SELECT statement and has all the data that needs to be displayed but, I cannot find a way of eliminating the nulls without losing either some jobs or some depts.
    Your help is welcome and appreciated,
    John.
    PS: I'll be perfectly happy learning that there is no easier/simpler way. In other words, if the answer is simply "No, there is no simpler/easier way", please do let me know that is the case. (I ask that you be fairly sure of that though, thank you)
    Edited by: 440bx - 11gR2 on Jul 25, 2010 7:19 AM - Added PS.

    Hi, John,
    You had part of the solution in each of your attempts.
    Do a FULL OUTER JOIN, as in your first query, on two copies of the result set of your second query.
    Using Oracle 9 features only:
    WITH     got_row_numbers     AS
         select     case WHEN deptno = 10 then ename end               as d10,
                     case WHEN deptno = 20 then ename end                    as d20,
                     case WHEN deptno = 30 then ename end                    as d30,
                     case WHEN job = 'CLERK'     then ename       end        as Clerks,
                     case WHEN job = 'PRESIDENT' then ename       end        as Prez,
                     case WHEN job = 'MANAGER'   then ename       end        as Mgrs,
                     case WHEN job = 'ANALYST'   then ename       end        as Anals,
                     case WHEN job = 'SALESMAN'  then ename       end        as SalesM,
                     row_number () over ( partition by      deptno
                                            order by           NULL
                           )                           as rnd,
                     row_number () over ( partition by      job
                                            order by           ename
                           )                            as rnj
      from      emp
    SELECT       MIN (d.d10)          AS d10
    ,        MIN (d.d20)          AS d20
    ,       MIN (d.d30)          AS d30
    ,       MIN (j.clerks)     AS clerks
    ,       MIN (j.prez)          AS prez
    ,       MIN (j.mgrs)          AS mgrs
    ,       MIN (j.anals)          AS anals
    -- ,        MIN (j.salesm)     AS salesm
    FROM            got_row_numbers     d
    FULL OUTER JOIN     got_row_numbers     j     ON     d.rnd     = j.rnj
    GROUP BY  NVL (d.rnd, j.rnj)
    ORDER BY  NVL (d.rnd, j.rnj)
    ;I've been trying to think of a good name for this kind of query where the items one the n-th row have nothing in common except that they are on the n-th row. For lack of anything better, I call it a Prix Fixe Query , because it resembles the menus where, for a fixed price, yuu can choose different options for each course:
    Appetizer     Soup          Main Course     Desert
    Pakora          Coconut          Aloo Gobi     Galabjamun
    Salad          Lentil          Bharta          Halwa
    Samosa                    Dhosa          Kulfi
                        Saag PaneerAbove, each column is sorted alphabeticlly. There is nothing but pure coincidence linking 'Pakora' with 'Coconut' or "Aloo Ghobi' with 'Galabjamun': they just happen the be the first items, in alphabetic order, in their respective columns.
    You may notice that I used
    "PARTITION BY deptno ORDER BY NULL " where you used
    "PARTITION BY deptno ORDER BY deptno "
    It never makes sense to ORDER BY anything in the PARTITION BY list. Each distinct item in the PARTITION BY list is a world of its own. You will only sort things that are identical with respect to the PARTITION BY list. That is, if the system has to decide whether to give 'CLARK' or 'KING' the lower ROW_NUMBER in deptno=10, deptno itself will not help the decision: the deptno for both will necessarily be the same. There's no syntax error, it just doesn't do any good, and the order of the output will be arbitrary.
    There would be a syntax error if you omitted the ORDER BY clause: ROW_NUMBER must be done in the context of some ordering. If you really want the order to be arbitrary, then be clear about it. ORDER BY a constant (such as NULL) so that nobody reading the query quickly is fooled into thinking you really are ordering by something. (A comment would be helpful in that case, also.)
    You probably want to "ORDER BY ename", or something meaningful, in this case.
    Edited by: Frank Kulash on Jul 25, 2010 2:41 PM
    Added digression of "PARTITION BY x ORDER BY x"

  • Is there a way to edit song titles on an iPad?

    I don't use the Music part of "iTunes in the cloud" for one simple reason: Some times the iTunes Store gets the song titles wrong - poor punctuation, misspelled words, that type of thing. If I had the 'automatically download music' turned on, I assume my iPad would receive the songs directly from the iTunes Store, with any such incorrect punctuation. So if I turned that option on, would there be any way to edit the song titles directly from my iPad?
    For example: I buy an album from the iTunes Store on my computer. It has song titles that have misspellings. Those misspellings would also end up on my iPad once the songs were pushed to it. So would there be any way to fix them? If so, how?
    Would I have to edit the song titles in iTunes and then sync it with the iPad? That would defeat the purpose of music in the cloud, wouldn't it?

    Babaganoosh wrote:
    Would I have to edit the song titles in iTunes and then sync it with the iPad?
    Yes.

  • Is there a way to edit vector data within a placed Ai file?

    When I place aa Ai file in InDesign it its seems to be one group and I want to take advantage of the vector content within that group. Group and Ungroup are greyed out.
    I'm using cs5.5.
    I've only been using it for 2 days and am new to InDesign.
    Any suggestions?
    Thanks.

    The way to edit an AI file is to right-click the image and select "Edit original"
    If it's just some simple objects, I find Bob's suggestion of copying them into InDesign worth the effort. Then again, if you have to edit them at a regular base, InDesign's vector editing tools are slightly less advanced than Illustrator's (admittedly, by a narrow margin; but some things are just a bit easier to do in Illustrator).

  • Is there any simple way to close a group of PO's?

    Hello All,
    I was looking an answer for my question on forum but didn't found anything which could help me to solve my issue.
    I would like to close a group of PO's in some period of dates. Is there any simple way to do this? I mean transaction for example, which will let me to choose company number, period of dates  or range of PO numbers and close them by one tick (one action).
    Thank you in advance for any support from your site.
    Regards,
    Kamil

    Kamil,
    Though I have not used this functionality, can you check whether you can use this functionality for mass change?
    Upload and Download of Purchasing Documents
    http://help.sap.com/saphelp_srm70/helpdata/en/09/1f42188473402a890183fd1b7c6082/frameset.htm
    Using this function, you can download purchasing documents as a file to your PC, process them locally, and then upload the changed documents to the SAP Supplier Relationship Management (SAP SRM) system. You can download the following purchasing documents :
    Features:
    The upload/download supports the following functions and possible uses:
    - Cross-Document File Structure
    You can display and process the data in a standard tabular file structure for the documents named above. The file structure assigns a unique technical ID to each data field in a metadata area.
    - Process Document Data Offline and Retain
    You can change or delete existing data, add new data, and transfer all document data, for example, customer fields.
    - Process Large Documents
    This function simplifies the creation of documents with numerous items, and simplifies mass changes to large documents; for example, you can download a document with only one item, and add multiple items to it offline.
    Background processing occurs in the case of very large documents.
    Regards,
    Sandeep

  • Simple way to insert data from one table

    Hi,
    I need to know a simple way on how to transfer the data from one table to another....
    First table xx_inv_tab1 has three columns col1, col2, col3 and where as second table xx_inv_tab2 has five columns col1, col2, col3, col4, col5.
    Here col2, col3, col4 are the same columns as in table1 xx_inv_tab1...
    Now I want to transfer first table data in to second table .... first column of second table holds a sequence, followed by the first table three columns data and followed with col4 and col5 which will hold NULL values....
    In my scenario, I have 70 - 75 columns in my first table which I want to move to second table which three new columns (one is sequence and other two has null values)...
    Any ideas if we make it in a simplest way rather saying insert into xx_inv_tab2 (col1, col2, col3 ............................................. col75) values (seq, col1, col2..........................col75, null, null)
    Help Appreciated..
    Thanks

    Easy
    untested
    insert into xx_inv_tab2 t2 (col1,col2,col3,col4)
    select yourSequence.nextval, t1.col1, t1.col2, t1.col3
    from xx_inv_tab1 t1
    ;Note that col5 does not need to be used, since you want to fill it with NULL.
    USe excel or sql developer to write you a list of column names, if you are to lazy to write all 75 columns by yourself.
    What might also work:
    untested
    insert into xx_inv_tab2 t2
    select yourSequence.nextval, t1.*, null
    from xx_inv_tab1 t1
    ;Edited by: Sven W. on Aug 31, 2012 4:41 PM

Maybe you are looking for

  • Private nullref symbol in 5.6 but not with 5.5 C++ compiler

    We try to use the libmtmalloc.so library with our project using LD_PRELOAD_32 environment variable: export LD_PRELOAD_32=/usr/lib/libmtmalloc.so.1This library provides advanced memory management and memory debugging features. We have two Solaris mach

  • Iphone 5 and itunes problems

    hi, Everytime I plug my iphone 5 into my computer to sync my itunes libary to my phone, my phone is not detected by itunes. Although, when I do plug in my phone my laptop does recognise my iphone and my phone does ask me if I want to trust the comput

  • Anchored Frames and Inserted Tables

    Something has happened..... It used to be that I could insert a table (there is an anchor at the insertion point) and follow that with an anchored frame for a graphic and they would display according this order. Now, when I do the same sequence, the

  • JavaFX and RTSP

    Hello, i have written an small JavaFX application, which should play Video via RTSP. But where the video should be played, there is only a black area. can someone help?

  • Detecting the server url dynamically

    I am finding it difficult to get url of the server dynamically I am getting it through java script using window.location.host is it possible using java