Jump to content

Recommended Posts

s3cmd Toolkit

 

This workflow gives the ability to upload files to Amazon S3 using the s3cmd commandline function. You can download the s3cmd utility at http://s3tools.org/s3cmd. I added a copy of the s3cmd in the workflow. You will need to setup the s3 credentials from a terminal opened to the workflow area. Please refer to the s3cmd website for configuration instructions.

 

With the addition to the "s3c:list" keyword, this is now a full upload/download client for s3! Check it out!

 

Here are the currently defined keywords and file actions:

 

"s3c:copydir" This keywork allows you to pick a directory that contains videos (mp4|mov). The videos will be copied to the corresponding directory on s3. Make sure to set the base directory using "s3c:base".

 

"s3c:base" You use this keyword to set the base directory for s3. It should be the format of "s3://<bucket>/directory/..".

 

"s3c:target" This keyword is used to set a target directory under the base directory to copy individual files to s3 using the file action.

 


"s3c:webheader" This keyword is used to set a web header for getting a web friendly url to an item in your s3.

 


"s3c:sbase" This will show the base directory in a notification.

 

"s3c:starget" This will show the target directory in a notification.


 

"s3c:swebheader" This will show the header to make a web friendly address in a notification.

 


"s3c:copy file" This file action will copy the file in the Alfred browser to the base and target directory on s3.

 

"s3c:list" This keyword action allows you to browse your S3 directory. If you hit “cmd-enter” on an item, it will download it to your Download directory. If you hit “alt-enter” on an item, it will set that directory as your target directory for uploading files. If you hit “ctl-enter” on an item, it will push a web facing friendly url for that item in to the clipboard. If you hit “shift-enter” on an item, it will set the items directory as the base directory for future browsing. If you hit “function-enter” on an item, you can move the item to a new name or location. It will prompt for the new location with a copy of the original item twice. You change the second one. If you start typing after the keyword, your selection will be reduced to selections that match what you type.

 

"s3c:configure" This keyword will open a terminal and start the configuration process for the s3cmd command line tool. This has to be done before using the other commands.

 


 

You can see all of my workflows here: https://github.com/raguay/MyAlfred/

 

November 18, 2014

Version: 1.2


Edited by raguay.customct

Share this post


Link to post

Just pushed a quick update. It was broken for sending an individual file. There is also partial work done on s3 directory listing for setting the target directory. It is not working yet, but does show up in the menu.

 

Let me know what other features would be needed or wanted. I have so far used it to copy 20GB of files to s3!  

Share this post


Link to post

I just updated the workflow with a few bug fixes and the addition of the s3c:list keyword. This keyword allows you to browse your S3 directories, download a file, and set the target directory. This makes this workflow a full upload/download client for S3!

Share this post


Link to post

I just added a keyword for configuring the s3cmd. It will open a terminal to the directory where the workflow is to run the "s3cmd --configure" command. It will prompt you for the s3 key and secret. Once configured, you can use the other keywords to interact with your account on s3.

 

Let me know what other features is needed.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...