Jump to content

[First Workflow] Creating folders and downloading google images.


Recommended Posts

Posted

Hi all,

 

I'm working on my first workflow, here's what I'd like to happen:

 

 

Uses a [command] [query] syntax

 

e.g:  performer Scott Joplin

 

Starts at the folder /~/Performers/

 

Checks if the folder already exists, using the query of the alfred command.

 

e.g If a folder name "Scott Joplin" already exists, don't execute.

 

If not, creates a folder inside /Performers/ called Scott Joplin.

 

Create a sub-directory within it named "RAW".

 

Will then Google search Scott Joplin for images within a resolution of 616x370.

Downloads the first 10 images and puts it into the /RAW/ folder.

 

Opens the /RAW/ folder in finder.

 

I've got a rough idea on how to do the creation of folders, but a bit stuck on downloading the images off Google Images.

 

All help is appreciated! 

 

Thanks, 

Henry

 

Posted

 

Hi all,

 

I'm working on my first workflow, here's what I'd like to happen:

 

 

Uses a [command] [query] syntax

 

e.g:  performer Scott Joplin

 

Starts at the folder /~/Performers/

 

Checks if the folder already exists, using the query of the alfred command.

 

e.g If a folder name "Scott Joplin" already exists, don't execute.

 

If not, creates a folder inside /Performers/ called Scott Joplin.

 

Create a sub-directory within it named "RAW".

 

Will then Google search Scott Joplin for images within a resolution of 616x370.

Downloads the first 10 images and puts it into the /RAW/ folder.

 

Opens the /RAW/ folder in finder.

 

I've got a rough idea on how to do the creation of folders, but a bit stuck on downloading the images off Google Images.

 

All help is appreciated! 

 

Thanks, 

Henry

 

 

Checking for the folder and/or creating it and then opening it in Finder are the simple parts. Searching the images is going to require using the Google Custom Search API a bit and then probably using curl to download the images to the specified directory

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...