I had introduce the gimp scripts to generate watermark and resize the image in the context menus. I also to upload the images onto the website . I can use wordpress web interface or ftp client, but I think I can upload it with context menu.
There is a command ftp client in windows, we can make use this client to write upload scripts. This is my script ‘rs-ftp.bat’:
echo open 208.97.171.116 >ftp.txt
echo user username userpassword >>ftp.txt
echo cd /rocksun.cn/wp-content/uploads/ >>ftp.txt
echo prompt off >>ftp.txt
echo put %1 >>ftp.txt
echo bye >>ftp.txt
echo quit >>ftp.txt
echo exit >>ftp.txt
ftp -n -s:ftp.txt
del ftp.txt
You must change the ‘username’, ‘userpassword’, and the base directory ‘/rocksun.cn/wp-content/uploads/’ accordding you server configuration. I run ‘rs-ftp.bat test.jpg’, and the test.jpg will upload to my server. Then we write a ‘rs-ftp.reg’ and run it.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\RSUpload]
@="Upload to rocksun"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\RSUpload\command]
@="F:\\rocksun\\gimp-script\\rs-ftp\\rs-ftp.bat \"%1\""
Now we select a file and in the context menu we choose ‘Upload to rocksun’, we will see the file upload to the ‘/rocksun.cn/wp-content/uploads/’. The file below is shrinked, watermarked and uploaded all by my scripts.

All files you can download or checkout from http://gimp-script.googlecode.com/svn/trunk/rs-ftp/ . I create this project to collect and produce gimp script and other scripts, you can join it.
Related posts:
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.