Jump to content

Screenshot to folder / tagger


Recommended Posts

I'm reproducing atm the Problem as this also occurs in deanishe's version. The bash has a fault in it.

i=1 has to be $i=1 if im right and then the $i++ somehow has a syntax error which im checking on atm

 

Edit: the i=1 is right lol silly me....you have to change the $i++ to i++

there is the mistake. Its for numbering the different screenshots.

Edited by FroZen_X
Link to comment

Forgot to add your old folders here the version with the folders added: https://dropfile.to/3Zvu5

 

The counter was wrong and somehow the version checking was giving another fault out, but 

the counter was the main problem. Like it could make a screenshot and a screenshot 1 but never 2,3,4 etc.

Idk why it didn't just overwrite them as i thought it would. Could be that it doesnt have the rights no clue

Edited by FroZen_X
Link to comment

Forgot to add your old folders here the version with the folders added: https://dropfile.to/3Zvu5

 

The counter was wrong and somehow the version checking was giving another fault out, but 

the counter was the main problem. Like it could make a screenshot and a screenshot 1 but never 2,3,4 etc.

Idk why it didn't just overwrite them as i thought it would. Could be that it doesnt have the rights no clue

Yup. I messed up the incrementing of $i. I only ever tested it with 2 images (Screenshot.png and Screenshot 1.png), so I didn't notice that. Good work FroZen.

The version thing isn't an error. That's why it says WARNING, not ERROR ;)

It's just the library complaining 'cos a couple of its features (updates and noticing when a workflow has been upgraded) depend on there being a version number.

It doesn't matter in the slightest for this workflow because it doesn't store any data that may need migrating after an upgrade, and it doesn't have a GitHub repository it can update itself from.

Link to comment

This looks an ideal workflow, but your link has expired FroZen. Could you upload again please?

 

Many thanks

 

Nick

 

Sure, here is the Workflow: https://www.dropbox.com/s/mzo0525tj8w0y2b/Take%20and%20Move%20Screenshots.alfredworkflow?dl=0

 

To change the shown folders where you can save the screenshots you have to go to the 

Workflow folder and open "folders.py".

There you can change this part to what you desire:

FOLDERS = [
	'~/Downloads/Images/',
    '~/Downloads/Images/Unsorted',
    '~/Downloads/Images/Apple',
    '~/Downloads/Images/Beatles',
    '~/Downloads/Images/Beautiful',
    '~/Downloads/Images/Blur',
    '~/Downloads/Images/Cartoons',
    '~/Downloads/Images/Comments',
    '~/Downloads/Images/Creepy',
    '~/Downloads/Images/Delete in three days',
    '~/Downloads/Images/Design',
    '~/Downloads/Images/Follow Up',
    '~/Downloads/Images/Funny',
    '~/Downloads/Images/I did this',
    '~/Downloads/Images/Interesting',
    '~/Downloads/Images/Luminaries',
    '~/Downloads/Images/Material',
    '~/Downloads/Images/Movies',
    '~/Downloads/Images/Nostalgia',
    '~/Downloads/Images/Products',
    '~/Downloads/Images/Quotations',
    '~/Downloads/Images/Random',
    '~/Downloads/Images/Veitch',
    '~/Downloads/Images/Words',
    '~/Downloads/Images/YoShirt',
]

It's brilliant isn't it. I'm inspired. 

 

What's the best way to learn a bit more about coding in Alfred? I want to be prepared for Alfred 3. 

 

You'll be able to do more in Alfred v3 without having to script anything. Other than that you can do a lot by looking at tutorials from 

deanishe like here: http://www.deanishe.net/alfred-workflow/tutorial_1.html#adding-a-script-filter

Knowing a programming language before you want to code anything in Alfred is a huge plus. Like i don't know much of Python scripting 

but i know C, C++, C# etc. which helps a lot to understand whats going on. Together with a little piece of code and the help of Sir Google you

can quickly make something your own. If you have then any other Problems then you can always ask here :)

Edited by FroZen_X
Link to comment

I'd also recommend having a look at Python (strangely enough). It's an excellent first language, and can be used for just about anything.

This is an awesome Python tutorial/book.

Thing is, the Python situation is a bit a funny right now. The above book (and Alfred-Workflow and its tutorial) are targeted at Python 2, because that's what's installed on OS X.

But Python 3 is the version of the future, so learning Python 2 now would be a strange thing to do.

They're not really that different, but most programs won't run on both unchanged or without extra effort.

Here's the version of the above tutorial/book for Python 3.

I honestly don't know which version to recommend.
 
There's also Ruby, which is very similar in terms of what it can do. It's arguably more elegant that Python, and terser. I'm not a big fan personally, however, because Ruby makes it a bit too easy to write unreadable code. It always made me feel so stupid not being able to understand my own code :(

Link to comment

Wow. Do we have an ETA on Alfred 3? I can't wait to get cracking. 

 

Meanwhile, I also frequently drag and drop pictures; how might I adapt the script to copy an image from a browser or email into one of the selected folders by either right clicking or dropping into a folder on my desktop? 

Link to comment

Meanwhile, I also frequently drag and drop pictures; how might I adapt the script to copy an image from a browser or email into one of the selected folders by either right clicking or dropping into a folder on my desktop? 

 

I use hazel to organize files that get saved in my downloads folder, desktop etc. There is no easy way of what i know tho. 

In Alfred 3 i know that the clipboard will have images too, so lets see what that will bring.

 

Keep in mind that you can also search with Alfred for files and then drag and drop out of Alfred. You don't have to extra open finder.

Edited by FroZen_X
Link to comment

Hmmm. That's interesting. I use Hazel for organisation but there's no way I can give rules as it depends on what I think at the time about the picture I'm saving. Hazel won't pop something up saying "what shall I do with this" that I know of. 

 

There's no software that can read your mind, alas.

 

You can drag the image into the proper folder in the first place.

 

You can tag the image and have Hazel do different things depending on the tags.

 

You can write a simple AppleScript (or Python program) that does indeed pop up a dialog box asking you what to do with the image, and have Hazel run that for you.

 

AppleScript dialogs are simple enough.

 

Pashua and cocoaDialog are available if you're not insane and therefore do not want to use AppleScript.

Edited by deanishe
Link to comment
  • 1 month later...

Hey Deanishe, 

 

So I began using the beta of Alfred 3 and the workflow has stopped working. I'm wondering whether this is something that will get ironed out as Alfred leaves beta or whether it's something to do with the fact that Alfred 3 works differently. Do you have any idea? 

All best, 

James. 

Link to comment

Thanks so much FroZen_X   !

 

Is there a way of modifying the script to allow me to upload a screenshot to google image search? Currently, I screenshot something, find it in Finder then upload it to google image search with dropzone. 

Maybe I should make another thread for this. 

Link to comment

Check this thread out: http://www.alfredforum.com/topic/8811-how-can-i-combine-two-workflows-that-already-exist/

There you can find the function to upload a picture for an image search :) Rest is just copy pasta.

Like with Alfred 3 you can set up really easy a file action that you can add to your current one's.

Once done you can search for you file via Alfred and then use the Action on that file or idk combine screenshot with direct upload :)

Link to comment
  • 5 weeks later...
  • 2 months later...

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...