Bilder aus emails automatisch in Fotostream einsortieren

M

michaelffm75

Aktives Mitglied
Thread Starter
Dabei seit
15.03.2007
Beiträge
293
Reaktionspunkte
16
Hallo,


möchte für eine Feier eine Script / Automator-Aktion erstellen welche Bilder die auf eine bestimmte email Adresse geschickt werden automatisch und zeitnah in meinen Fotostream hochlädt.

Hat einer Erfahrungen damit?

Wenn ich mir im Finder das Photostream Verzeichniss mappe habe ich ja diese Kryptischen Unterverzeichnisse -> irgend eine Idee welcher Sinn dahinter steckt?

Danke Euch
 
Hallo,

wie du an der spärlichen Rückmeldung sehen kannst, ist das kein ganz banales Unterfangen. Vielleicht beschreibst du mal dein Vorhaben und den Zweck dieser Aktion, vielleicht gibt es ja einen einfacheren Weg. Fotostream scheint mir dafür ungeeignet zu sein, aber ohne genau zu wissen, um was es geht, ist es schwierig, eine Alternative vorzuschlagen.
 
Hallo,

sorry für die späte Rückmeldung.
Im ganzen möchte ich folgendes :

Party mit Beamer und Leinwand ->
Apple TV hängt am Beamer und soll als Bildschirmschoner oder Sideshow den Fotostream benutzen.
Ich möchte nun das die Gäste ihre Partybilder an eine Emailadresse schicken. diese bilder sollen nun automatisch in den fotostream wandern damit sie zeitnah auf dem beamer erscheinen

Grüße
 
Anstatt die Bilder per Mail an einen Rechner zu senden, der die Bilder dann für ein AppleTV in den Fotostream hochlädt, würde ich eher gleich den Rechner direkt an den Beamer hängen. Denkbar wäre auch, dass du Airplay Mirroring nutzt, wenn dein Mac das unterstützt und du den Rechner nicht direkt an den Beamer hängen möchtest.
 
iTunes Ordner Freigabe für Apple TV

Wenn sich um ein Apple TV ab Version 2 handelt, ist die Freigabe eines Bildordners mit iTunes sicher einfacher als die Verwendung eines Fotostreams.

iTunes Ordner Freigabe für Apple TV
How to use your photos with your Apple TV screensaver http://support.apple.com/kb/HT4362
Ohne Änderung an einer plist von Apple Mail lassen sich Attachments nur unterhalb von "path to home folder" = "/Users/<USERNAME>/Library/Containers/com.apple.mail/Data/Documents" speichern.


Code:
-- Mail Attachments im Ordner test auf dem Desktop speichern

using terms from application "Mail"
	on perform mail action with messages theselectedMessages
		set thePath to ((((path to home folder))) as rich text)
		set SourceFolder to "tmp"
		set DestinationFolder to "test"
		try
			tell application "Finder" to make new folder at thePath with properties {name:SourceFolder}
			tell application "Finder" to make new folder at desktop with properties {name:DestinationFolder}
		end try
		
		set tmpPath to (thePath & SourceFolder)
		tell application "Mail"
			repeat with theMessage in theselectedMessages
				repeat with theAttachment in theMessage's mail attachments
					set tmpFilePath to tmpPath & ":" & (name of theAttachment)
					try
						save theAttachment in (POSIX path of tmpFilePath)
					end try
					delay 5
					
					--tell application "Finder" to duplicate tmpFilePath to folder DestinationFolder of desktop
					tell application "Finder" to set destination to POSIX path of ((folder DestinationFolder of desktop) as alias)
					do shell script "mv  " & POSIX path of tmpFilePath & " " & destination
					
				end repeat
			end repeat
		end tell
	end perform mail action with messages
end using terms from


iPhoto Fotostream mit automatischen Upload


- wie man den iPhoto Workflow "Bereitstellen in Fotostream" mit Applescript steuert ist mir nicht bekannt
- man kann zwar mit "import to album" einem Fotostream manuell ein Foto hinzufügen, dieses verschwindet aber sofort wieder aus dem Fotostream


- iPhoto lässt sich so einstellen, dass bei jedem Import ein automatischen Upload in den Fotostream erfolgt
- das nachfolgende Applescript importiert Mail Attachments in ein iPhoto Album "mail2iphoto"
- dazu muss in Mail eine Regel erstellt werden, die dieses Script aufruft

Code:
-- ohne Änderung an plist von mail app Attachments nur unterhalb von "path to home folder" speicherbar
-- vorhandene gespeicherte Attachments werden überschrieben
-- einfachste Lösung import mit Duplikaten, nicht import ggf. mit UI Skripting möglich
-- Prüfung ob Datei kMDItemContentTypeTree public.image enthält, fehleranfällig, da iPhoto wahrscheinlich nicht alle Bildformate unterstützt
-- getestet mit Mail Version 6.3 (1503) und iPhoto 9.4.3 unter OS X 10.8 

using terms from application "Mail"
	on perform mail action with messages theselectedMessages
		set theAlbumname to "mail2iphoto"
		
		set attachmentsFolder to (((path to home folder)) & "Documents") as rich text
		tell application "iPhoto"
			activate
			if theAlbumname is not in name of every album then
				new album name theAlbumname
			end if
		end tell
		
		tell application "Mail"
			repeat with theMessage in theselectedMessages
				repeat with theAttachment in theMessage's mail attachments
					set savePath to attachmentsFolder & ":" & name of theAttachment
					try
						save theAttachment in savePath
					end try
					delay 5
					set kMDItemContentTypeTree to do shell script "mdls -name kMDItemContentTypeTree " & (POSIX path of savePath)
					if "public.image" is in kMDItemContentTypeTree then
						tell application "iPhoto" to import from (POSIX path of savePath) to album theAlbumname
						delay 1
						tell application "iPhoto" to activate
						tell application "System Events" -- to close potential  import duplicates dialog and import the duplicate
							keystroke return
							keystroke return
						end tell
					end if
				end repeat
			end repeat
		end tell
		
	end perform mail action with messages
end using terms from
 
Super - Dankeschön.....das werde ich am Wochenende ausprobieren.

im moment hab ich es so erledigt :

1) script das mail attachments automatisch in einen Ordner ablegt
2) mit yumi ftp einen automatischen ftp sync erstellt das nach jpg/jpeg filtert. (ist outdoor event)
3) mac mit beamer & ftp verbunden und das tool photolive greift auf diese zu.
 
Zurück
Oben Unten