[GastForen Programmierung/Entwicklung AppleScript IDML-Dateien entzippen

  • Suche
  • Hilfe
  • Lesezeichen
  • Benutzerliste
Themen
Beiträge
Moderatoren
Letzter Beitrag

IDML-Dateien entzippen

-hans-
Beiträge gesamt: 748

3. Feb 2010, 16:28
Beitrag # 1 von 4
Bewertung: |||
(5438 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
IDML-Entzipperlein:
Kleines Helferlein mit dem sich IDML-Dateien entzippen lassen.
Der Archivinhalt wird in einen Ordner mit dem Namen "Dateiname.idml-entpackt" auf der selben Ebene wie die gedropte Datei entpackt.

Code
on open these_items 
repeat with i from 1 to the count of these_items
set this_item to item i of these_items
set the item_info to info for this_item
set MyTypeIdml to file type of item_info
if MyTypeIdml is not "IDml" then
display dialog "Bitte nur IDML-Dateien auf das Droplet ziehen."
else
set ExpandFolderPath to (this_item as string) & "-entpackt"
do shell script "mkdir -p " & quoted form of POSIX path of ExpandFolderPath
tell application "Finder" to duplicate file this_item to folder ExpandFolderPath with replacing
set NewFile to (ExpandFolderPath & ":" & (name of item_info)) as alias
do shell script "unzip -o " & quoted form of POSIX path of NewFile & " -d " & quoted form of POSIX path of ExpandFolderPath
do shell script "rm " & quoted form of POSIX path of NewFile
end if
end repeat
end open

X

IDML-Dateien entzippen

Stibi
Beiträge gesamt: 832

3. Feb 2010, 17:24
Beitrag # 2 von 4
Beitrag ID: #432614
Bewertung:
(5424 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Klasse hans, danke.

Gruß Stibi


als Antwort auf: [#432603]

IDML-Dateien entzippen

-hans-
Beiträge gesamt: 748

4. Feb 2010, 11:16
Beitrag # 3 von 4
Beitrag ID: #432690
Bewertung:
(5377 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Danke :)

Mit etwas Hilfe (http://www.hohubadu.de) noch das IDML-Zipperlein ...

Code
on open these_items 
repeat with i from 1 to the count of these_items
set this_Folder to item i of these_items
if folder of (info for this_Folder) then
try
alias ((this_Folder as string) & "designmap.xml")
on error
display dialog ("Der Ordner " & this_Folder as string) & " enthält nicht alle erforderlichen XML-Dateien." & return & "Die IDML-Datei lässt sich eventuell nicht öffnen." giving up after 5
end try
set parentfolder to POSIX file ((POSIX path of this_Folder) & "/..") as alias
set shellcommand to "ditto -ck --sequesterRsrc " & quoted form of POSIX path of this_Folder & space & quoted form of ((POSIX path of parentfolder) & (name of (info for this_Folder)) & ".idml" as text)
do shell script shellcommand
else
display dialog "Bitte nur Ordner auf das droplet ziehen."
end if
end repeat
end open



als Antwort auf: [#432614]

IDML-Dateien entzippen

Stibi
Beiträge gesamt: 832

4. Feb 2010, 13:22
Beitrag # 4 von 4
Beitrag ID: #432716
Bewertung:
(5362 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Nochmals danke ;-)

Der Link oben geht nicht, soll sicher http://hohabadu.de/ sein?

Gruß Stibi


als Antwort auf: [#432690]
X