Skip to content

Commit

Permalink
Removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Nov 26, 2008
1 parent 15db6fb commit b32872f
Showing 1 changed file with 1 addition and 44 deletions.
45 changes: 1 addition & 44 deletions ApertureToGallery.applescript
Expand Up @@ -52,47 +52,4 @@ on run argv
close access fileRef

return "done"
end run

(*script gallery
property myGalleryUrl : "http://www.paour.com/gallery2/"
property myGalleryUser : "paour"
property myGalleryPass : "charsome"
property authToken : 0
to login()
set myCommand to "curl -c /tmp/curlCookies -b /tmp/curlCookies -g \"" & myGalleryUrl & "main.php?g2_controller=remote:GalleryRemote&g2_form[cmd]=login&g2_form[protocol_version]=2.0&g2_form[uname]=" & myGalleryUser & "&g2_form[password]=" & myGalleryPass & "\""
log myCommand
do shell script myCommand
set loginResult to the result
set AppleScript's text item delimiters to "="
repeat with p in paragraphs of loginResult
if word 1 of p = "status" then
set loginStatus to word 3 of p
else if word 1 of p = "auth_token" then
set authToken to word 3 of p
end if
end repeat
if loginStatus ­ "0" then
display alert "Login failed"
end if
return loginStatus
end login
to upload of galleryPicturePath into galleryAlbum
log galleryPicturePath
log authToken
end upload
to listAlbums()
set myCommand to "curl -c /tmp/curlCookies -b /tmp/curlCookies -g \"" & myGalleryUrl & "main.php?g2_controller=remote:GalleryRemote&g2_form[cmd]=fetch-albums-prune&g2_form[protocol_version]=2.0&g2_form[no_perms]=yes&g2_form[auth_token]=" & authToken & "\""
log myCommand
do shell script myCommand
set listAlbumResult to the result
end listAlbums
end script*)
end run

0 comments on commit b32872f

Please sign in to comment.