4 votes

Utilisation d'un simple copier-coller pour obtenir la liste des chansons dans le nouvel itunes 11.

Avant iTunes 11, il me suffisait de sélectionner mes options d'affichage pour la liste de lecture, de mettre en surbrillance mes chansons, de cliquer sur copier et de les coller dans un article de blog.

Maintenant, avec iTunes 11, il semble que je sois incapable de faire quelque chose d'aussi simple. J'ai trouvé une solution de contournement pour le moment, en imprimant la liste de lecture au format pdf et en copiant le contenu dans un billet de blog. Cela m'irrite, car j'ai besoin de quelque chose de plus rapide et de plus efficace.

Quelqu'un sait-il comment récupérer la simple fonctionnalité de copier-coller ? Ou existe-t-il un moyen simple similaire à celui-ci ? Je ne veux pas exporter vers un fichier Excel ou exporter l'ensemble de la bibliothèque, je veux juste les options d'affichage que j'ai sélectionnées, à savoir l'artiste, la piste et l'album, et non l'intégralité des informations de chaque chanson.

1voto

kraymer Points 2642

Hmm, je n'ai pas ce problème. Est-ce que le Édition/Copie l'entrée est activée pour vous ? Parce que si je clique sur copier, puis coller dans un fichier texte, pour une capture d'écran donnée j'obtiens :

2 de 12 Aquele plano para me esquecer Adriana Calcanhotto O micróbio do samba Brasileira 6 60 3:01
6 Suavemente Elvis Crespo 5* / Top40 Latin 2 100 4:24
12 La Camisa Negra Juanes 5*/Top40 Pop 100 3:35
1 I Need A Dollar Aloe Blacc 5* / / Top40 Soul 4 100 4:04

enter image description here

Est-ce que c'est ce que vous essayez d'atteindre ?

1voto

Christopher Scott Points 665

Pour plus de simplicité, assurez-vous que vous êtes dans une vue de liste simple, soit Songs ou Playlist comme @kraymer le montre également. Vous ne pouvez pas effectuer cette opération à partir des grandes vues de pochettes.

Plus précisément, je vous suggère de créer une liste de lecture dans laquelle vos options d'affichage sont activées, d'y ajouter des chansons et de l'effacer lorsque vous avez terminé.

Il est toujours possible de copier/coller ces entrées comme vous pouviez le faire auparavant :

Rocket Man  3:27    Aethernaut  6 of 11 Steam Fist Island II
Obstacle Course 4:00    Aethernaut  8 of 11 Steam Fist Island II
Unpause the Heat    3:19    Aethernaut  1 of 5  Super Mega Ultra
The Moon    3:23    Aethernaut  1 of 1  The Moon
2011-2010=1 2:19    Aethernaut  1 of 6  2011-2003=8
2011-2009=2 3:41    Aethernaut  2 of 6  2011-2003=8
2011-2008=3 3:15    Aethernaut  3 of 6  2011-2003=8
2011-2007=4 3:28    Aethernaut  4 of 6  2011-2003=8
2011-2006=5 4:17    Aethernaut  5 of 6  2011-2003=8
2011-2005=6 4:04    Aethernaut  6 of 6  2011-2003=8

iTunes Playlist Screenshot

1voto

Guy Moore Points 11

Ok, je viens de rencontrer le même problème. Je fais une émission de radio et j'avais l'habitude de copier une liste de lecture iTunes, puis d'aller dans Excel et de la coller dans un modèle de feuille de calcul préformaté pour l'imprimer. Cela ne fonctionne plus. Les résultats étaient dans les commentaires ci-dessus. Voici les étapes que j'ai dû suivre :

  1. Sélectionnez et copiez la liste de lecture dans iTunes.
  2. Ouvrez un nouveau document dans Textedit et choisissez "Make Plain Text" dans le menu "Format". 3. Collez dans le nouveau document en texte brut dans Textedit(ceci fait le texte que vous voulez au lieu de coller les chansons.
  3. Maintenant, alors que vous êtes toujours dans le document de texte brut, sélectionnez tout et copiez.
  4. Allez dans le document où vous voulez coller les données (dans mon cas, je le fais dans un document Excel).
  5. Maintenant, il suffit de coller les données dans

Ce que je fais, c'est utiliser un document en texte brut pour transformer les données que j'ai copiées d'iTunes i en texte brut, puis copier cette version en texte brut et la coller là où je veux qu'elle soit.

1voto

konqui Points 876

Voici donc le script :

(*
"Export As HTML Table" for iTunes
written by Doug Adams
dougadams@mac.com

v1.5 mar 15 '04
-- includes composer, rating, and grouping options
(this script had not been updated since December of 2001!)

Get more free AppleScripts and info on writing your own
at Doug's AppleScripts for iTunes
http://www.malcolmadams.com/itunes/
*)
-------------------------------------------------------
-------------------------------------------------------
-- U S E R - C U S T O M I Z A B L E    O P T I O N S 
-- maintain quotes!
-- M A K E   C H A N G E S   A N D   S A V E  (command-s)
-------------------------------------------------------
-- initial HTML options
property myBackgroundColor : "white" -- background color, can also use "#ffffff", etc
property myTextColor : "black" -- text color, can also use "#000000", etc

-- table attributes
property mycellpadding : "1" -- padding inside cells
property mycellspacing : "0" -- padding outside between cells
property myborder : "1" -- thickness of table border, 0 is no border

-- Title line attributes
property myTitleJustification : "center" -- (left, center, or right) justification in main title cell 

-- TH attributes
property myTHJustification : "left" -- (left, center, or right) justification in column headers

-- TD attributes
property myTDJustification : "left" -- (left, center, or right) justification in data cells

-- face & size 
-- size can be relative (-1,-2,+1,+2, etcetera) or 1,2,3,4,5 -- smaller IS better!
-- font can be set to any installed font

-- top line where name of playlist, number of songs, time, and length appear
property myTitleFont : "Geneva" -- font for title line
property myTitlesize : "-2" -- font size for title line

-- column headers
property myTHFont : "Geneva" -- font for headers
property myTHsize : "-2" -- font size for headers

-- text in cells
property myTDFont : "Geneva" -- font for data
property myTDsize : "-2" -- font size for data
-------------------------------------------------------
-------------------------------------------------------
-- DON'T CHANGE ANYTHING BELOW UNLESS
-- YOU KNOW WHAT YOU'RE DOING ;)
-------------------------------------------------------
property myChoices : {"Artist", "Album"} -- remember last batch or always default to these
property myOptions : {"Play Order", "Artist", "Album", "Composer", "Genre", "Grouping", "Rating", "Size", "Time", "Track Number", ¬
    "Track Count", "Year", "Date", "Date Added", "Bit rate", "Sample rate", ¬
    "Volume", "Kind", "EQ", "Comment", "Location"}
global html_contents, thePlaylist, file_name, TDopen, TDclose, THopen, THclose, do_number

property okflag : false
-------------------------------------------------------
-- OKAY, LET'S GO!
-- check if iTunes is running 
tell application "System Events"
    if (get name of every process) contains "iTunes" then set okflag to true
end tell
if okflag then -- iTunes is running, let's go
    tell application "iTunes"
        -- ask user
        set myNewChoices to (choose from list myOptions with prompt ¬
            "Include table cells for which selected items below?" & return & "(\"Title\" is always included.)" default items myChoices OK button name ¬
            "Choose" cancel button name "Cancel" with multiple selections allowed and empty selection allowed)
        if myNewChoices is false then error number -128 -- cancel was clicked

        copy myNewChoices to myChoices
        --initial iTunes variables
        set thePlaylist to the front window's view
        my get_the_file_name()

        -- which tracks to use?
        if selection is {} then
            set allTracks to every track of thePlaylist
            set tableTitle to "Playlist: "
        else
            set allTracks to a reference to selection
            set tableTitle to "Selected in Playlist: "
        end if

        -- fig total tracks time, size, and number even if selection
        set totalSeconds to 0
        set totalSize to 0
        repeat with this_track in allTracks
            set totalSeconds to totalSeconds + (this_track's duration)
            set totalSize to totalSize + (this_track's size)
        end repeat
        set myTotalTrackTime to (my calc_total_time(totalSeconds))
        set myTotalTrackSize to (my calc_size(totalSize))

        set num_of_tracks to (count of allTracks)
        set s to "s"
        if num_of_tracks is 1 then set s to ""

        -- initialize some elements
        -- open and close for all TD & TH cells
        set TDopen to "<td align=" & myTDJustification & "><p><font face=" & myTDFont & " size=" & myTDsize & ">"
        set TDclose to "</font></p></td>"
        set THopen to "<th align=" & myTHJustification & "><font face=" & myTHFont & " size=" & myTHsize & ">"
        set THclose to "</font></th>"
        -- removed <p> tags from <TH> 'cause Netscape doesn't like correct HTML spec

        -- how many columns in table
        set myColspan to ((count of myChoices) + 1) -- number of cells across = number of all myChoices plus Title always chosen
        --  end then begin new table row
        set startNewRow to "</tr>" & return & "<tr>"
        --begin page
        set startHTML to ((("<html>" & ¬
            "<head><title>" & tableTitle & (get thePlaylist's name) & "</title></head>" & return ¬
            & "<body bgcolor=" & myBackgroundColor & " text=" & myTextColor & ">" & return & ¬
            "<table cellpadding=" & mycellpadding ¬
            & " cellspacing=" & mycellspacing ¬
            & " border=" & myborder ¬
            & " width=100%>" & return & "<tr>" & return & "<td colspan=" & myColspan as string) ¬
            & " align=" & myTitleJustification & "><p><font face=" & myTitleFont & " size=" & myTitlesize & ">" & tableTitle & "<b>" & thePlaylist's name ¬
            & "</b> " & num_of_tracks as string) & " song" & s & ", " & myTotalTrackTime ¬
            & " total time, " & myTotalTrackSize) & TDclose & return & "</tr>" & return & ¬
            "<tr>" & return & (my make_headers()) as string
        -- end page
        set endHTML to "</tr>" & return & "</table>" & return & "</body></html>"

        -- init main container
        set html_contents to ""
        -------------------------------------------------------
        -- S T A R T   T H E   P A G E  
        -------------------------------------------------------

        my add_to_contents(startHTML)

        repeat with thisTrack in allTracks -- do each track for each row

            my add_to_contents(startNewRow)

            if do_number is 2 then my add_another_TD(thisTrack's index as string)

            my add_another_TD(thisTrack's name) -- must always appear!

            if myChoices contains "Artist" then my add_another_TD(thisTrack's artist)

            if myChoices contains "Album" then my add_another_TD(thisTrack's album)

            if myChoices contains "Composer" then my add_another_TD(thisTrack's composer)

            if myChoices contains "Genre" then my add_another_TD(thisTrack's genre)

            if myChoices contains "Grouping" then my add_another_TD(thisTrack's grouping)

            if myChoices contains "Rating" then my add_another_TD(thisTrack's rating)

            if myChoices contains "Size" then -- size calculation
                my add_another_TD(my calc_size(thisTrack's size))
            end if

            if myChoices contains "Time" then my add_another_TD(thisTrack's time as string)

            if myChoices contains "Track Number" then my add_another_TD(thisTrack's track number as string)

            if myChoices contains "Track Count" then my add_another_TD(thisTrack's track count as string)

            if myChoices contains "Year" then my add_another_TD(thisTrack's year as string)

            if myChoices contains "Date" then
                my add_another_TD(my fix_date_string(thisTrack's modification date))
            end if

            if myChoices contains "Date Added" then
                my add_another_TD(my fix_date_string(thisTrack's date added))
            end if

            if myChoices contains "Bit rate" then my add_another_TD(thisTrack's bit rate as string)

            if myChoices contains "Sample rate" then my add_another_TD(thisTrack's sample rate as string)

            if myChoices contains "Volume" then my add_another_TD(thisTrack's volume adjustment as string)

            if myChoices contains "Kind" then my add_another_TD(thisTrack's kind)

            if myChoices contains "EQ" then my add_another_TD(thisTrack's EQ)

            if myChoices contains "Comment" then my add_another_TD(thisTrack's comment)

            if myChoices contains "Location" then
                set myLocation to (thisTrack's location as text)
                if myLocation is "missing value" then
                    set myLocation to "<i>not available on local drive</i>"
                end if
                my add_another_TD(myLocation)
            end if

        end repeat

        my add_to_contents(endHTML)
        -- contents now assembled
    end tell -- iTunes

    -------------------------------------------------------
    -- S A V E   F I L E  &  E N D
    -------------------------------------------------------

    my Make_The_File(file_name, html_contents as string)
    set dMes to return & return & "Would you like to view the exported HTML file?"
    set myEnding to (display dialog "Done!" & dMes buttons {"Done", "Yes"} default button 2 with icon 1 giving up after 30)
    if button returned of myEnding is "Yes" or gave up of myEnding is true then
        tell application "TextEdit"
            activate
            try
                open (file_name as alias)
            on error errMs
                display dialog errMs buttons {"Cancel"}
            end try
        end tell
    end if -- button is "Done"
end if -- iTunes not running

-------------------------------------------------------
-- S U B R O U T I N E S ----------------------------
-------------------------------------------------------
-- create file in Finder
to Make_The_File(file_name, cont)
    try
        copy (open for access file_name with write permission) to fileRef
        write cont to fileRef
        --set eof of fileRef to (length of cont)
        close access fileRef
    on error m number n
        try
            close access fileRefr
        end try
        if (n is equal to -48) then
            --display dialog "File exists"
            do shell script "rm " & quoted form of POSIX path of file_name
            my Make_The_File(file_name, cont)
        else
            display dialog "There has been an error creating the file:" & return & return & m & return & "error number: " & n buttons {"Cancel"}
        end if
    end try
end Make_The_File

-- choose file
to get_the_file_name()
    set file_name to (choose file name with prompt ¬
        "Enter a name for the exported HTML file" default name ((thePlaylist's name as text) & ".html"))
    if file_name is false then error number -128 -- cancel
    --return file_name
end get_the_file_name

-- add TD stuff to eventual contents
to add_another_TD(x)
    if x is "" then set x to "<i>n/a</i>"
    my add_to_contents(TDopen & x & TDclose)
end add_another_TD

-- add text to eventual contents
to add_to_contents(x)
    if x is "" then set x to "&nbsp;"
    copy (html_contents & x & return) as string to html_contents
end add_to_contents

-- construct headers based on user selection
to make_headers()
    set do_number to 1
    set myNewHeaders to ""
    if myChoices starts with "Play Order" then
        set myNewHeaders to THopen & "#" & THclose
        --      copy items 2 thru -1 of myChoices to myChoices
        set do_number to 2
    end if
    set myNewHeaders to myNewHeaders & THopen & "Title" & THclose
    repeat with i from do_number to (count of myChoices)
        copy item i of myChoices to thisHeader
        set myNewHeaders to myNewHeaders & return & THopen & thisHeader & THclose
    end repeat

    return myNewHeaders
end make_headers

-- abbreviate date strings
to fix_date_string(x)
    set dateList to (my TextToList((x) as string, " "))
    set myDateAdded to ((((get characters 1 thru 3 of item 1 of dateList) as string) & ¬
        ", " & ¬
        (get characters 1 thru 3 of item 2 of dateList) as string) & ¬
        " " & (item 3 of dateList) & ¬
        " " & ¬
        (item 4 of dateList) & ¬
        " " & ¬
        (get characters 1 thru -4 of item 5 of dateList) as string) & ¬
        (item 6 of dateList) as string
    return myDateAdded as string
end fix_date_string

-- obligatory text->list,list->text GREAT SUBROUTUNES
on TextToList(theText, theDelimiter)
    set saveDelim to AppleScript's text item delimiters
    try
        set AppleScript's text item delimiters to {theDelimiter}
        set theList to every text item of theText
    on error errStr number errNum
        set AppleScript's text item delimiters to saveDelim
        error errStr number errNum
    end try
    set AppleScript's text item delimiters to saveDelim
    return (theList)
end TextToList

on ListToText(theList, theDelimiter)
    set saveDelim to AppleScript's text item delimiters
    try
        set AppleScript's text item delimiters to {theDelimiter}
        set theText to theList as text
    on error errStr number errNum
        set AppleScript's text item delimiters to saveDelim
        error errStr number errNum
    end try
    set AppleScript's text item delimiters to saveDelim
    return (theText)
end ListToText

to calc_total_time(totalSeconds)
    set theHour to totalSeconds div 3600
    if theHour is not 0 then
        set theHour to (theHour as string) & ":"
    else
        set theHour to ""
    end if
    set theMinutes to (totalSeconds mod 3600) div 60
    if theMinutes is not 0 then
        if theMinutes is less than 10 then set theMinutes to "0" & (theMinutes as string)
        set theMinutes to (theMinutes as string) & ":"
    else
        set theMinutes to "00:"
    end if
    set theSeconds to totalSeconds mod 60
    if theSeconds is less than 10 then set theSeconds to "0" & (theSeconds as string)
    -- gets the number of seconds after the minute
    return theHour & theMinutes & theSeconds as string
end calc_total_time

-- below is from SIZE OF FINDER SELECTION
-- ©1998 Sal Soghoian, Apple Computer
-- slightly modified for this script -- I have used a factor of 1024 and 1048576
-- but I am not completely happy with any results; they do not match what
-- is in iTunes' display exactly. However, there is less of a difference
-- created in this version of the script than in previous
to calc_size(x)
    if x > 1.0E+9 then
        set a to (x div 1.0E+9)
        set b to (x mod 1.0E+9) div 10000000 -- notice NOT 100000000
        set b to (round (b / 10) rounding up)
        if b > 9 then set b to 9
        set x to (a & "." & b as string) & " GB"
    else if x > 1048576 then
        set a to (x div 1048576)
        set b to (x mod 1048576) div 10000 -- notice NOT 100000
        set b to (round (b / 10) rounding up)
        if b > 9 then set b to 9
        set x to (a & "." & b as string) & " MB"
    else if x > 1024 then
        set a to (x div 1024)
        set b to (x mod 1024) div 10 -- notice NOT 100
        set b to (round (b / 10) rounding up)
        if b > 9 then set b to 9
        set x to (a & "." & b as string) & " KB"
    else
        set x to x & " Bytes"
    end if
    return x
end calc_size

source : http://dougscripts.com/067 Grand merci à Doug Adams pour tout son travail sur ces scripts.

0voto

konqui Points 876

Il existe un moyen plus simple, qui a fonctionné pour moi.

utilisez applescript.

il existe un site appelé dougscript ( http://dougscripts.com ) il y a beaucoup de scripts et autres aides tout autour d'itunes.

je pense que celui qui correspond le mieux à vos besoins est celui-ci http://dougscripts.com/067

LesApples.com

LesApples est une communauté de Apple où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres utilisateurs d'appareils Apple, poser vos propres questions ou résoudre celles des autres.

Powered by:

X