Jump to content

Screenshot to folder / tagger


Recommended Posts

So I type in screen, hit return, the selector pops up and then I press command-3 and nothing happens. It gives me no option to select the part of the screen I want to capture.

That's because my version doesn't use -i. You need to re-add that option to screencapture.

Also, is it possible for it to have me select the folder to be put into *after* I take the screenshot. 

Perhaps that's what's supposed to happen.

You do select the folder after taking the screenshot. First the screenshot is saved to ~/.temporary-screenshot.png, then when you select a folder, it's moved to that folder and renamed "Screenshot.png" (or "Screenshot 1.png" etc.).

Link to comment

IT WORKS! 

 

Another question; this is what my workflow looks like. I'm confused as to why there are two flows that don't connect; for instance, the way I have it set up, the flow I'm feeding my hotkey into doesn't interact with the one that contains the .py instructions. Again, apologies if I'm being dense. 

Link to comment

Yeah, it does. It's just not clear from looking at Alfred that this is what's happening (this is a complaint I have with Alfred).

The new script that's connected to the Keyword (and now Hotkey) first calls screencapture, and when that's finished, it calls Alfred via AppleScript. That's what this line does: 

osascript -e 'tell application "Alfred 2" to run trigger "screens" in workflow "net.deanishe.alfred-move-screens"'

That tells Alfred to run the External Trigger (the new element on the far left), which is connected to the Script Filter that shows your folders.

Link to comment

Dean, it's all of a sudden stopped working. The only thing I did was update to 10.11.4 but I can't see that having an effect. Do you have any ideas how I can troubleshoot it?

 

This is what I'm getting: "Starting debug for 'Take and Move Screenshots'

 

[sTDERR: alfred.workflow.input.scriptfilter] 13:12:33 workflow.py:2330 WARNING  Can't save last version: workflow has no version

13:12:33 workflow.py:2186 DEBUG    Workflow finished in 0.002 seconds."

Link to comment
#!/usr/bin/python
# encoding: utf-8
#
# Created on 2016-03-22
#

"""
Show a list of folders to move screenshot to.
"""

from __future__ import unicode_literals

import os

from workflow import Workflow

# Where screenshots can be saved
# ~ is short for your home directory.
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',
]


def main(wf):
    """Run workflow."""
    for path in FOLDERS:
        p = os.path.expanduser(path)
        wf.add_item(os.path.basename(path),
                    path,
                    arg=p,
                    uid=path,
                    valid=True,
                    type='file',
                    icon=path,
                    icontype='fileicon')

    wf.send_feedback()


if __name__ == '__main__':
    wf = Workflow()
    log = wf.logger
    wf.run(main)

That's my workflow and here's a picture of the finder

 

2016-03-31%20at%2014.06.jpg

Link to comment

I just tried it out by creating one of you folders. It works perfectly fine by me being on el capitan 10.11.4 too.

Try to delete the workflow and readd it. 

 

Have to say that i used the "screen" keyword.

 

Ok also works with the set keyword, which makes sense so idk mmhh

Edited by FroZen_X
Link to comment

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