Home > Donne, MP3, python > My m3u to file script

My m3u to file script

October 31st, 2009

My girlfriend (perfect and beautiful, of course) was annoying me because wants to put a banshee playlist on her mp3 player.
But how could i simply move only the mp3 files included in the playlist without do it manually?

http://www.vista.it/upload/support/playlist_popup.jpg

Simply: PYTHON

Here is the script:
import os

f=open('##m3ufile##')
for l in f:
----if l[:1] == "/":
--------os.system( 'cp -av "' + l[:-1] +'" ##mount point of the usb player##')

##m3ufile## could be /tmp/barbara.m3u
##mount point of the usb player## could be /mnt/ipod/

VN:F [1.7.5_995]
Rating: 0.0/10 (0 votes cast)
VN:F [1.7.5_995]
Rating: +1 (from 1 vote)
  • Share/Bookmark

Cagnulein Donne, MP3, python

  1. Cagnulein
    | #1

    @skarn: yeah i know, but, as you’ve said, 4 lines of great code kick mouse & co.’s ass ;)

    UA:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  2. Cagnulein
    | #2

    I know pacbard, but it’s more italianish in this way! :D

    UA:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UA:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  3. | #3

    Hi Cagnulein,
    your English is funny! You missed some verbs :P
    Bye,
    Pacbard

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  4. Skarn
    | #4

    Mmmhhh… I thought that banshee had support for external mp3 player, and allowed drag ‘n’ droppin’ files to the pereipheral…

    Of course this ten times geekier and thus deserves praise…

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  1. No trackbacks yet.
157827 pages viewed, 90 today
86408 visits, 42 today
FireStats iconPowered by FireStats