Jump to content

Generating Feedback in Workflows


Recommended Posts

Question about uid and feedback items order: "Give your results a unique identifier and Alfred will learn which ones you use the most and prioritize them by moving them up in the result list.

 

I tried to give unique uid for feedback each items. However, after I activated some of the items many times, Alfred does not "prioritize them by moving them up in the result list".

 

If by unique id you mean "DAE8DC59-6844-493D-893F-88A0C3EA6578" or something similar, Alfred will not learn what you want; in fact, this is the current recommended way to disable Alfred's intelligence.

 

If you want Alfred to use his knowledge on your feedback items, you must use something that uniquely identifies it against other scripts.

 

For example, I use 'tylereich.colors {the mode of input} to {the mode  of output}' as the unique id for Colors' feedback items. So if you entered an RGB color and selected the HSL conversion, the unique id of your selection would have been 'tylereich.colors rgb to hsl'. Then, next time you entered an RGB color, the HSL conversion would be the top result.

 

Does this make sense?

Link to comment

If by unique id you mean "DAE8DC59-6844-493D-893F-88A0C3EA6578" or something similar, Alfred will not learn what you want; in fact, this is the current recommended way to disable Alfred's intelligence.

 

If you want Alfred to use his knowledge on your feedback items, you must use something that uniquely identifies it against other scripts.

 

For example, I use 'tylereich.colors {the mode of input} to {the mode  of output}' as the unique id for Colors' feedback items. So if you entered an RGB color and selected the HSL conversion, the unique id of your selection would have been 'tylereich.colors rgb to hsl'. Then, next time you entered an RGB color, the HSL conversion would be the top result.

 

Does this make sense?

Thanks for your help! I guess I know what is wrong. The feedback items are not valid. They are for autocompletion.

Link to comment
One more question,
 
Is it possible to feedback multiple times to Alfred? Specifically, output xml items multiple times.

 

 

No, not yet. It has been requested several times, so I wouldn't be surprised if it were eventually supported.

 

See my new post in this forum about chaining multiple script filters together or reusing a single one. I also provided an example workflow so you can see how it works.

Link to comment

See my new post in this forum about chaining multiple script filters together or reusing a single one. I also provided an example workflow so you can see how it works.

I had forgotten this! My mind immediately went live feedback, like echoing results as they are processed.

Link to comment

Is it possible to inline format titles and subtitles? e.g. <title>In<b>cub</b>us</title> would be formatted as Incubus

 

I'd like to be able to highlight the characters that match a query, similar to http://api.rubyonrails.org/ when you enter a search term.

 

It's currently not possible, but that would definitely be an awesome feature! Alfred devs, this one would really make us "see" the results better :)

Link to comment

What does "Defaults to the script filter extension" mean for icons? If I don't provide an <icon> in my script filter output, the resulting entry always gets the folder icon, even if my workflow has an icon. This holds true even if I give the script filter itself an icon.

Link to comment

What does "Defaults to the script filter extension" mean for icons? If I don't provide an <icon> in my script filter output, the resulting entry always gets the folder icon, even if my workflow has an icon. This holds true even if I give the script filter itself an icon.

 

Apologies. This appears to be an error in the documentation. If no icon value is specified, it will show a blank icon as the result. If the icon item is not included at all, it will default back to a folder icon. I'll get the documentation corrected. Thanks.

Link to comment

Apologies. This appears to be an error in the documentation. If no icon value is specified, it will show a blank icon as the result. If the icon item is not included at all, it will default back to a folder icon. I'll get the documentation corrected. Thanks.

 

Folder icon seems like a really weird default. Maybe show the blank document icon? I actually used the filetype public.text for a while to get that, before I got around to making a real icon for my workflow.

Link to comment

I really want a way to control the order of the output from my workflow. For the time being I'll go with the suggested idea of using a UUID as the uid, but I really wish just omitting the uid entirely would work.

 

This is going to be improved in a future release :)

Link to comment

Just a quick note to say that in the next release (after 2.0.2), the item UID attribute will be optional.

 

You only need to populate it if you want Alfred to learn and order your results (an example of this would be something similar to Alfred's open / find keywords where he learns the selected file for latter ordering).

 

If you leave the UID attribute empty, a UUID is used instead which means Alfred won't learn the ordering so always show results in the XML order.

Link to comment
  • 1 month later...

Hi guys - a quick update to let you know this has been improved in v2.0.4 which has just gone to pre-release. I'd be grateful if you could update and have a play :)

 

Quick question: the <item arg=“"> should be removed completely in order to use <arg></arg>? Or Alfred will use <arg></arg> if set and ignore the other (no need to remove the other for good)?

 

Thank you.

 

 

 

 

Link to comment

Quick question: the <item arg=“"> should be removed completely in order to use <arg></arg>? Or Alfred will use <arg></arg> if set and ignore the other (no need to remove the other for good)?

 

Thank you.

 

 

That's exactly how it works. Andrew made it backward compatible to prevent it from breaking all previous workflows.

Link to comment
<?xml version="1.0"?>
<items>
  <item uid="rdioartist" arg="r96664" valid="yes" autocomplete="Incubus">
    <title>
            Incubus
    </title>
    <subtitle>Artist</subtitle>
    <icon>rdio-artist.png</icon>
  </item>
  <item uid="albumart" arg="/Users/user/Documents/album.jpg" type="file">
    <title>Incubus Album Art</title>
    <subtitle>Album Art for Science</subtitle>
    <icon type="filetype">public.jpeg</icon>
  </item>
</items>

Seems like Alfred2 doesn't handle newline characters correctly. This XML docunement will get one of the title empty. Please confirm.

Link to comment
<?xml version="1.0"?>
<items>
  <item uid="rdioartist" arg="r96664" valid="yes" autocomplete="Incubus">
    <title>
            Incubus
    </title>
    <subtitle>Artist</subtitle>
    <icon>rdio-artist.png</icon>
  </item>
  <item uid="albumart" arg="/Users/user/Documents/album.jpg" type="file">
    <title>Incubus Album Art</title>
    <subtitle>Album Art for Science</subtitle>
    <icon type="filetype">public.jpeg</icon>
  </item>
</items>

Seems like Alfred2 doesn't handle newline characters correctly. This XML docunement will get one of the title empty. Please confirm.

 

Probably because you have superfluous whitespace in your <title> tag. It starts with a newline, then a bunch of spaces, before the title you actually wanted. You should rewrite it as <title>Incubus</title>.

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