Jump to content

c-c-c-c

Member
  • Posts

    13
  • Joined

  • Last visited

c-c-c-c's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. @sepulchra I don’t really use alfred’s defualt tag search feature (maybe I should). This is part of a custom workflow that searches within a Devonthink database for markdown files tagged cheatsheet. I have a separate workflow for files tagged with note. I want to combine the two (notes or cheatsheet), but all methods i’ve tries seem to result in notes and cheatsheet
  2. Checking in about this … can’t seem to to find any info in the documentation/help either.
  3. Hi, Using a file filter an File Filter -> Fields ->kMDItemUserTags is it possible to do an OR for multiple tags? For example only showing files that have that tag cheatsheet OR notes? Adding cheatsheet, notes or cheatsheet OR notes or cheatsheet notes doesn't seem to work.
  4. Sorry to keep this going, one more thing – It's not possible to split arguments in a query using the Args and Vars utility? If so, what would that syntax be?
  5. Ah got it - this is what was tripping me up. Thanks for the explanation. I thought there might be a possibility of accessing the individual arguments within a workflow object (copy to clipboard, open url, et.) It might be helpful if the example in the help be amended with that caveat (or an explanation of the difference between args and vars): https://www.alfredapp.com/help/workflows/inputs/script-filter/json/
  6. Yes you're right, I'm conflating arguments/variables (I thought they were the same and couldn't find any documentation clarifying the difference). Attaching a screenshot of the workflow. Ultimately, what I'm curious about is how to use arguments downstream in my workflow: Given I'm passing this (in a bash script filter): "arg": ["Services", "4A7B6A86-460D-4C90-8E20-82DD061E0016"] How do I access those arguments in a copy to clipboard or open url action: to generate a markdown link in copy to clipboard: [{Services <-- what is the syntax to echo the first argument }](x-devonthink-item://{4A7B6A86-460D-4C90-8E20-82DD061E001 <-- what is the syntax to echo the 2nd argument) to generate a url in open url: x-devonthink-item://{4A7B6A86-460D-4C90-8E20-82DD061E0016 <-- what is the syntax to echo the 2nd argument}?reveal=1 I've solved this by avoiding (multiple) arguments all together and using @deanishe's excellent guide Workflow/environment variables in Alfred — deanishe.net and outputted a variable instead in my script filter: (excerpt) { "title": "Design Services", "subtitle": "Business", "arg": ["Design Services"], "variables": {"uuid": "4A7B6A86-460D-4C90-8E20-82DD061E0016"}, "match": "Design Services " }, and accessing the variable (var:uuid) and first arg(query) downstream using: [{query}](x-devonthink-item://{var:uuid}) but how would I do this using only arguments?
  7. I am trying to get to this final output (in Copy to Clipboard) [{var:var1}](x-devonthink-item://{var:var2})
  8. Hi, I've got the following (truncated here to show 2 results) json in a script filter. I'm passing out two args: { "items": [ { "title": "Business", "subtitle": "Practice", "arg": ["Business", "B5F64C25-6C8D-4771-A9D7-7A86F7D98B95"], "match": "Business " }, { "title": "Design Services", "subtitle": "Business", "arg": ["Services", "4A7B6A86-460D-4C90-8E20-82DD061E0016"], "match": "Design Services " } ] } I'm outputted multiple arguments based on this: https://www.alfredapp.com/help/workflows/inputs/script-filter/json/ How do I parse the arg into two variables I can access later in my script? I've tried a split arg with newline as delimiter, which isn't working. Can I access them directly (without split arg)? `{var:1}` or `{var:var2}` doesn't seem to work either.
  9. Figured this out using mdls: mdls -raw -name kMDItemDisplayName $itempath # where item path is an alfred variable that outputs a path from a file filter I'm using it in a workflow related to Devonthink to act on recent documents added to my database:
  10. no, the filename is a uuid, and didn’t see an automation task that returns a metadata field
  11. Hi There, Is there a way to get expose the value of `kMDItemDisplayName` in a workflow? I have a file filter from which I'm trying to extract the value of `kMDItemDisplayName` so I can output a markdown link on the pasteboard. It's exposed in the title field of the results, but there doesn't seem to be a programmatic way to access it? I looked through the Automation Tasks and couldn't find anything. Also looked through the documentation under dynamic placeholders (would be great if file metadata could be exposed this way). I can't use `{query} ` as it returns a path and the filename is a uuid. Thanks
×
×
  • Create New...