Hi All,
I am uploading to Youtube Automatically using youtube-upload (https://github.com/tokland/youtube-upload) as below:
on run {theRecord}
do shell script "source ~/.bashrc && /usr/local/bin/youtube-upload --title=" & quote & listingStreetNumber of theRecord & ", " & listingCity of theRecord & " " & listingState of theRecord & " " & listingZipcode of theRecord & quote & " --description=" & quote & listingRemarks of theRecord & quote & " --thumbnail /Users/snaplash/Desktop/SNAPLASH_DO_NOT_DELETE/COMPLETED_DO_NOT_DELETE/" & listingMLSProviderPrefix of theRecord & Mlsid of theRecord & "/Branded/" & listingMLSProviderPrefix of theRecord & Mlsid of theRecord & "_POSTER.png /Users/snaplash/Desktop/SNAPLASH_DO_NOT_DELETE/COMPLETED_DO_NOT_DELETE/" & listingMLSProviderPrefix of theRecord & Mlsid of theRecord & "/Branded/" & listingMLSProviderPrefix of theRecord & Mlsid of theRecord & ".mp4; exit;"
set BrandedIdNumber to result as string
set BrandedYoutubeLink to "https://www.youtube.com/embed/" & BrandedIdNumber
end run
The script gives a result such as BPlj8UOLgNE as the ID number
What is the best most efficient way to pas this variable to another script?
I was thinking it may just be better to output to a txt file?
do shell script "echo " & BrandedYoutubeLink & " > /Users/snaplash/Desktop/SNAPLASH_DO_NOT_DELETE/PROCESSING_DO_NOT_DELETE/BrandedYTID.txt"
Is this the best way to approach this as I will always know the file name?
set BrandedYoutubeLink to (do shell script "cat /Users/snaplash/Desktop/SNAPLASH_DO_NOT_DELETE/PROCESSING_DO_NOT_DELETE/BrandedYTID.txt | xargs echo")
display dialog BrandedYoutubeLink
Any opinions will be most welcome!