ReSave alle Indesign Dateien

Indesign hat die Eigenart beim Speichern von Dateien immer alles hinten an das Dateiende an zu hängen, dadurch werden die Dateien manchmal sehr groß. Hier hilft es einem “Speichern als” auszuführen, dabei wird die Datei dann komplett neugeschrieben und alle unnötigen Daten gelöscht. Auf diese Art kann man schon mal gerne 50 bis 80% der Dateigröße einsparen.

Um diesen Prozess nicht für alle alten Indesign Dateien ausführen zu müssen, habe ich ein JavaScript geschrieben, dass diesen Prozess automatisiert.

Ich übernehme keine Haftung für irgendwelche Fehler beim ausführen. Zu beachten ist, dass nur Indesign-Dateien mit der Dateiendung .indd bearbeitet werden. Dateien die in einer alten Indesign-Version gespeichert wurden, werden umgewandelt und in der neusten Version gespeichert. Beim Ausführen einfach einen Ordner mit Indesign-Dateien wählen. Es werden alle Unterordner automatisch mitbearbeitet.

Für den Fall, dass Indsign während des Ausführens des Scripts abstürzt, wird eine eine Log-Datei ReSave.log angelegt, so kann man sehen, bei welchem Dokument Indesign Probleme macht.

Download

var myFolder = Folder.selectDialog();
var logFile = makeLogFile("ReSave", myFolder, true, false);
processFolder(myFolder);

function processFolder (myFolder) {
	try {
	var myItems = myFolder.getFiles("*.indd");
	reSave(myItems);
	} catch (e) {
		// nix
		}

	try {
	var myItems = myFolder.getFiles("*");
	for (var i = 0; i < myItems.length-1; i++) {
		processFolder (myItems[i]);
		}
	} catch (e) {
		// nix
		}
	}

function reSave(myItems) {

	for (var i = 0; i < myItems.length; i++) {
		app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;

		var myDocument = app.open(myItems[i]);
		log(logFile, ("Opened " + myDocument.name));
		myDocument.save(myItems[i]);

		myDocument.close();
		app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

		}
	}

function makeLogFile(aName, logLoc, deleteIt, useExisting) {
	var aFile = File(logLoc + "/" + aName + ".log");
	if (deleteIt) {
		aFile.remove();
		return aFile;
	}
	if (!useExisting) {
		var n = 1;
		while (aFile.exists) {
			aFile = File(logLoc + "/" + aName + "_" + String(n) + ".log");
			n++
		}
	}
	return aFile
}

function getScriptPath() { // This function returns the path to the active script, even when running ESTK
	try {
		return app.activeScript;
	} catch(e) {
		return File(e.fileName);
	}
}

function log(aFile, message) {
	var today = new Date();
	if (!aFile.exists) { // make new log file
		aFile.open("w");
		aFile.write(String(today) + " New Script started\n\n");
		aFile.close();
	}
	aFile.open("e");
	aFile.seek(0, 2);
	aFile.write(String(today) + " " + message + "\n");
	aFile.close();
}

backupbyplaylist

backupbyplaylist is a iTunes music backup script written in applescript. You choose a folder and the script backups all your playlists to this folder. I build the same folder/playlist structure as in iTunes.
You could just start it by clicking or by adding it to your Applescript Menu.

Minimum Requirements
iTunes 6, Growl supported

Download latest release: backupbyplaylist 0.9

EyeRecord

Since the last versions of TV-Browser EyeRecord is not needed anymore. Bodo one of the dev of TV-Browser was so kind to include EyeRecord functions into TV-Browser and make it even better. So checkout the EyeTV support of TV-Browser.

EyeRecord is a little script to program EyeTV with the help of TV-Browser. EyeRecord in combination with TV-Browser is the best and fastest alternative to tvtv.de or tvtitan.com.

(Today TV-Browser only support german tv-stations nativly, US stations could be added with the Zap2It plug-in).

Minimum Requirements
Elgato EyeTV 1.8 or EyeTV 2.0, Growl is supported

Download latest release: EyeRecord 2.0.3

Screenshots

EyeRecord2 Growl

EyeRecord2 TV-Browser 2

EyeRecord2 TV-Browser

Changelog

Version 2.0.3

  • Growl function fixed

Version 2.0.2

  • Growl is no longer required but supported

Version 2.0.1

  • Bugfix release
  • Growl is required
  • iCal will not start any longer

Version 2.0

  • you are now able to delete planed recording from TV-Browser
  • added Growl notifications (needs Growl installed http://www.growl.info)
  • Epiosdeinformation are transfered to EyeTV
  • Starttime will now be internally decoded and recoded so that this should be run correct on all systems
  • Titles, Episode and Descriptioninformations are now passed to EyeTV in UTF Code (no more incorrect characters)
  • more EyeTV controls added
    • switch to station [will switch to the station you clicked on in TV-Browser and show the actual broadcast]
    • switch to station (fullscreen) [same as "switch to station" but goes to fullscreen]
    • switch to station and record [same as "switch to station" but also start recording of actual broadcast]
    • switch to station and record (fullscreen) [same as "switch to station and record" but goes to fullscreen]
    • pause / play (Timeshifting – pause the actual broadcast of EyeTV or start it agian)
    • !stop recording! (WARNING – stops the actual recording)

Version 1.2

  • Fixed a bug were date and time could get confused on some systems

Version 1.1.1

  • TV-Browser no longer incluced to the request of the developers

Version 1.1

  • TV-Browser 1.1 CVS Version from 31.03.05 is included
  • Script updated to 1.1
  • Fixed problem with time changes am/pm
  • removed installer no more pkg
  • just drag and drop install