Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. Thank you I will take a look.
  3. Hey @politicus My Karabiner configuration is not supported on your macOS version. You have to use Karabiner Elements and I am not sure how my configuration translates to in there, if I did I would update my macOS. Sticky keys are simply custom modifier keys I set up for myself. You can read more about it here. 🙂 Also take a look here. Some people, shared their sticky key configuration that works in Karabiner Elements.
  4. @nikivi Hi! All of this seems to be very interesting and save a lot of time. I used to use Karabiner in the past to remap one or two keys but have never been a heavy/super user of this application. Because of that I was at the same excited by the potential and frustrated because I didn't see how to start. I even downloaded your profile.xml file loaded it in Karabiner. Got an error line 42 unexpected =... That's how my incursion to height of productivity ended. Could you please elaborate what sticky keys are? They seem to not be supported anymore, so I couldn't tried this special feature. I tried to make in work in Karabiner-Elements but as I have an azerty keyboard I couldn't even use the application as only qwerty keyboards are supported. Karabiner-Elements 11.4.0 Mac OS X 10.12.6 (16G1114)
  5. Yesterday
  6. Ulysses workflow

    Thanks, It seems like it works now.
  7. ZotQuery: an Alfred workflow for Zotero

    Thanks. I'd come to the same conclusion, but it's great to have confirmation that I'm not barking up completely the wrong tree. I found that typeMap.xml, too, but haven't figured out how best to extract and use the data from it. I guess I'll filter the Zotero data on import and add a csl member to the Entry class and a method to generate csl-json, which the formatter can pass to the CSL library along with the style. I found the repo for the style definitions, but that's ~50MB and there are, exactly as you said, many thousands of them. So I'm going to read the styles from Zotero's styles directory instead. Presumably, that contains the styles the user is interested in, and they can use Zotero's UI and search engine to fetch new ones. I'm currently pondering how to structure the citation-styling infrastructure. In any case, what would be very helpful would be another Zotero database with a small, but varied, selection of entries. Like, something with all the common types of entries with common fields filled in.
  8. @nikivi, it's great seeing you're still using my code As for accessing the "Move to..." directly, I don't see another way at the moment, but using simulated keystrokes... @Andrew, maybe it would be great to make native Alfred's File Actions items accessible using External Triggers ? So that we could do something in the like: tell application "Alfred 3" to run trigger "Move to..." in workflow "Alfred's File Actions" with argument "/path/to/file". This way we could directly access those actions from anywhere. I think this could be great also from a Workflow point of view, so we don't recreate actions that are built-in like "Delete", "Copy To...", "Get Info", "Open With...", "Email To...", ... To get back to your question @nikivi, what I think I would do at the moment is something like: aw "/path/to/your/file" && osascript -e "delay 0.1" -e "tell application \"System Events\" to keystroke \"Move to...\" & return" I'll let you know if I find another idea!
  9. I haven’t dug into the code to see what’s coming out of the queries, but I think the easiest would be to map it into csl-json https://github.com/citation-style-language/schema/blob/master/csl-data.json based on the zotero field mappings here: https://aurimasv.github.io/z2csl/typeMap.xml The library should handle csl-json & spit out plain text or html - user can choose to use a markdown csl format like this https://github.com/philipbelesky/Markdown-Citation-Style-Languages but the elegance of this approach is that that will be up to the user.
  10. ZotQuery: an Alfred workflow for Zotero

    Sorry I've been away but should be able to answer some of these questions either much later tonight or tomorrow at the latest. It's always more complicated than I imagine.
  11. ZotQuery: an Alfred workflow for Zotero

    Pipe what into the CSL library? So far, I've learnt that there are long and short citations. Are there also multiple citations? If so, how do they differ? And what needs to come out? Markdown? HTML? RTF? Plaintext?
  12. converting HHMMSS to Seconds

    Fortunately, he also posted the code. Put that in a Run Script action with Language = /usr/bin/ruby
  13. Alfred Workflows do support auto-updating, but it’s up to the Workflow developers to implement it. It’s currently not hard at all to do. @deanishe’s Alfred-Workflow is a popular library for writing workflows in Python that supports auto-updating among many other features. My own OneUpdater is a simple node to add auto-updating to any Workflow, regardless of language. If you want to add auto-updating to one of your Workflows, you’ll be well served with either of those (both are well maintained). If you want third-party Workflows to implement auto-updating, you’ll need to ask their developers.
  14. converting HHMMSS to Seconds

    Victor's link is broken.
  15. I have this code I very often use that @GuiB kindly shared once: # Alfred action function (pop the alfred action window) aw() { if [ $# -eq 0 ]; then # If no arguments, pop Alfred Action Window in the working directory osascript -e "tell application \"Alfred 3\" to action \"$(pwd)\"" else args="" argsAreAllPaths=true for arg in "$@" ; do filePath=$(realpath -s "$arg") if [[ -d $filePath ]] || [[ -f $filePath ]]; then # if the arg is a file of folder, append the path to the args string to build a list for the osascript command args+="\"$filePath\"," else argsAreAllPaths=false # if one argument is not a folder or file path, then pop Alfred with the standard search and try to access Alfred Action Window. This also makes it clear there's a problem with one of the passed paths break fi done if [ "$argsAreAllPaths" = true ] ; then # If all arguments are files or directories, open Alfred Action Window with the list args=${args%?} # remove the trailing comma osascript -e "tell application \"Alfred 3\" to action { $args }" else # If not all arguments are files or directories, search as is and try to access the Alfred Action Window. The Action Window should pop if it's possible, or the standard Alfred Search would be shown (ex: alfa activity monitor -> Would open the file action window of the Activity Monitor) actionKey="keystroke (ASCII character 29)" # (meaning: right arrow) Put your prefered action key (Alfred -> File Search -> Actions -> Show Actions) as applescript command for keystroke or key code (ex: "key code 98") delayBetweenEvents=0.1 # Play with the number if the action doesn't work correctly osascript -e "tell application \"Alfred 3\" to search \"$*\"" -e "delay $delayBetweenEvents" -e "tell application \"System Events\" to $actionKey" fi fi } This will activate a file action search on a passed in directory or file. I want to make it so that it would instantly open "Move to..." file action. Is it possible? I can think of a way to activate aw() and then simulate 'move' keystrokes and pressing enter but perhaps there is a better way than this.
  16. Ulysses workflow

    Hi @40-02, @apoc527, @dfay (thanks for the stack trace). Thanks for the reports that the workflow is broken with Ulysses 12. I had the same problem. Try this new release v1.0.2. Please let me know if it looks okay and I'll upload it to Packal later and close issue. Thanks. EDIT: updated link to v1.0.2 as I've also fixed the 'uo' command to work with the new app name (although this one always has mixed results and I've tweaked the way it wants for ulysses to be ready to receive cmd-O.
  17. alfred-make-appicon

    Dear Alfred users, Here is a file action workflow for Alfred. It creates an AppIcon (ICNS file) which is based upon a selected input image. Github: https://github.com/vookimedlo/alfred-make-appicon alfred-make-appicon Alfred 3 workflow for making an app icon [icns] based upon the selected file. Installation Install alfred-make-appicon workflow. All further updates are handled automatically. Usage In finder, select an image file, which is at least 1024x1024px large, and invoke the alfred file actions, by default the ⌃⌘\ shortcut. The new icns file will be created in the same location as the original input file.
  18. Caffeinate Control v 3 Released

    Just discoring this Workflow. Thanks a lot for your work, definitely great to be able to use it ! I was previously using KeepingYouAwake which is a fork of the Caffeinated app and was looking for some way to use it with a keyboard shortcut. Your workflow soled it all at once !
  19. Yeah he had written his own export template scheme for Skim even though there’s a native one that can be implemented in a few lines of AppleScript... Basically you should just need to pipe into the CSL library and let it do its thing. Once you get it to that point post a draft & I can look at it.
  20. I suggest alfred support workflow auto download and auto update details as follows, * a config file, whose each item corresponding a workflow * each item contains: download addr(github addr)、current version get addr(github addr)、etc. * auto download, add a new item to the config file, then alfred auto download new workflow and install * auto update, alfred workflow check for update everyday and auto update background by this way, user could use workflow more conveniently.
  21. Last week
  22. ZotQuery: an Alfred workflow for Zotero

    Thanks for the input. I have the first bits working (search, open in Zotero, open attachments). Citations are totally the sticking point. I can integrate a CSL library (which seems straightforward enough), but I know literally nothing about citing things. I can't do the citation stuff when I'm not in any position to tell whether it's working correctly. So, so much. There are epic amounts of crap in there. Hundreds and hundreds of lines of code to search the database on different columns, when SQLite supports that natively. You just have to do column:<term> in the query… I honestly can't figure out what half of the code is even supposed to do. There are barely any comments, the structure is insane, and it relies heavily on global state and import-time side effects. I threw the lot in the bin.
  23. If you're going to start over, refactor, clean up, etc., I'd suggest the following: Search for entries (by title, author, tag, all fields) Open entries in Zotero open the attachment(s) for an entry select a CSL file for export format - see http://citationstyles.org output a single citation in the selected format's in-text style ( see http://docs.citationstyles.org/en/stable/primer.html ) output a single citation in the selected format's note style (ditto) same for selected entries in Zotero and/or contents of a group in Zotero The advantage to using CSL is that the workflow then becomes extensible to practically any citation format anyone can throw at it, with no intervention required by the developer. There are 1000s of CSL templates out there. Having reworked quite a few of smargh's AppleScripts for Skim, I suspect there is a lot that can be trimmed down.
  24. Add Event or Todo to BusyCal

    1) Switch on the reminder syncing service inside Daylite by installing the profile 2) Just use any of the workflows to add events to reminders, and choose the reminder calendar to be 'Worklist'
  25. ZotQuery: an Alfred workflow for Zotero

    Anybody else, then? I can't do it on my own because I don't know the first thing about citations. The rest is all pretty straightforward (search, open attachments, open in Zotero etc.).
  26. Brunoc, thanks for your advice and effort to assist me. I am going to try your solution.
  27. Hello, @Philip Venema! We can adapt the script to reiterate over groups, but I think it can get rather slow. In my case, I don't find it very useful, as most of my sub-groups get similar names (by using DTP templates for conferences, projects, classes etc.). Anyway, if you really want to try it, see the script below. I filtered Tags and Trash groups in order to make it a little faster. Also notice you can create multiple triggers in your Alfred workflow with the same "dtp" keyword. This is how I manage working with multiple "Active Projects" databases. I don't think you should do it for all your databases (including Archives for instance) as this could get really slow! property pstrDatabaseName : "Projetos Ativos" -- set the name of your database here set lstGroups to {} tell application id "com.devon-technologies.thinkpro2" to set tagsGroupUUID to the uuid of tags group of database pstrDatabaseName tell application id "com.devon-technologies.thinkpro2" to set trashGroupUUID to the uuid of trash group of database pstrDatabaseName on reiterateOnGroup(theRec) tell application id "com.devon-technologies.thinkpro2" repeat with r in every child of theRec if (type of r is group) and uuid of r is not in {my tagsGroupUUID, my trashGroupUUID} then set the end of my lstGroups to {name of r, "x-devonthink-item://" & the uuid of r} my reiterateOnGroup(r) end if end repeat end tell end reiterateOnGroup tell application id "com.devon-technologies.thinkpro2" set rootRec to root of database pstrDatabaseName my reiterateOnGroup(rootRec) end tell set jsonOutput to "{\"items\": [" repeat with i from 1 to length of lstGroups set {strGroupName, strId} to item i of lstGroups if i > 1 then set jsonOutput to jsonOutput & ", " end if set jsonOutput to jsonOutput & "{\"uid\":\"" & strId & "\", \"title\":\"" & strGroupName & "\", \"arg\":\"" & strId & "\"}" end repeat set jsonOutput to jsonOutput & "]}"
  1. Load more activity