Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by dfay

  1. Glad to see you've made the connection. For all people complain about his unmaintained workflows, Stephen did a lot of great work on automation.
  2. Why wouldn’t you just use a file filter set to that directory?
  3. Wow that's eight different variations on the same solution! Thanks guys....I'm sure the time we have committed to this far outweighs the savings for file vs. array vs. json, python vs. bash, etc.
  4. I'd bet that Alfred dumping to a file is faster than starting python and loading two modules....
  5. haha yes I figured you would spot a way to improve my python - thanks!
  6. Well here's what I came up with: File Action (unchanged) write the file list to a text file (files.txt) List of Actions (unchanged) then Run Script: #!/usr/bin/python import sys import subprocess theFiles = open('files.txt', 'r').readlines() for aFile in theFiles: args = ['/opt/local/bin/tag', '-a', sys.argv[1], aFile.replace('\n','')] p = subprocess.call(args) In theory, writing to a file might slow things down a tiny bit, but this is a solution that I will be able to come back to in a year and immediately understand again.
  7. "if you put the File Filter output into a variable, you end up with a single, TAB-separated string, just like if you try to set a workflow variable to an array" -- did not know that...which shows how few workflows I've actually worked up since Alfred 3 came out.... I agree, the code is not pretty, but it is working for me at the moment with spaces in my tags & filenames. Maybe we need a feature request for Alfred to produce a JSON array rather than a tab-delimited list.
  8. spoke too soon...running into the usual pitfalls with escaping spaces in tags and filenames....
  9. Thanks Yes, that worked well -- rather than use the multiple pathways in your example, I used a single pipeline: file action (as original) -> Arg and Vars to set filesList (as original) -> list filter that passes the desired tag as arg -> Arg and Vars object to concatenate {query} {var:filesList} -> run bash script /opt/local/bin/tag -a $1 My OCD wants a native version but this works fine.
  10. I recently wanted to create a file action that would then display a list of tags and allow me to select one to tag the selected file. I was hoping to model it on the Move To... , Open With... , Copy To.... actions that are built into Alfred, but with my list of tags as the options. But I realized this isn't possible. The same functionality has been requested in some other recent threads: Basically the structure be File action (with selected file) -> embedded List Filter (displayed in Alfred file actions pane, to get second parameter) -> action
  11. Back to the discussion of why people use Pinboard....because del.icio.us went yahoo and mag.nol.ia had an irrecoverable data loss.... I started using delicious about 12 years ago when I wanted a way to sync my bookmarks in Opera for win xp with my new iMac. Switched to Pinboard a couple years later and never looked back. Even though I’ve been off Windows since 2006 or so I’d never consider leaving now, mostly because of the tag-based organization - vastly preferable to folders for reference materials.
  12. Unfortunately there's no real Google Scholar API (there are a few homemade attempts on GitHub but they rely on scraping the web page results and break easily) so there's no immediate way to get results in a form Alfred can parse and display. But if you just want to launch a search the basic custom search is just http://scholar.google.com/scholar?q={query} In practice, the results are good enough that I use advanced search maybe once every six months (and I probably use Google Scholar at least a dozen times a day). If you want to go for advanced search you'll need to parse the query string in a workflow -- see an example.
  13. Rather than split hairs over a few keystrokes, wouldn’t it be easier to just embed your content in PowerPoint or Keynote or whatever you use for your presentations so you don’t have to worry about switching apps when you’re presenting? I switch to show PDFs once in a great while (using Skim in its presentation mode) but I can’t imagine going to a Word document in front of an audience.... Incidentally I built this which you may find useful: http://www.packal.org/workflow/skim-remote
  14. Spotlight, built into the last 8 or so iterations of macos, also searches PDF content...
  15. Hi Rob I am getting the same issue described above with uo . Also using any of u ug uf us throws a KeyError: 'displayName' full message here: [2017-10-28 10:51:16][ERROR: input.scriptfilter] Code 1: ulysses_items.py:124: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (os.path.exists(args.limit_scope_dir), 10:51:15 workflow.py:2249 DEBUG workflow version: 1.0.0 10:51:15 workflow.py:1657 DEBUG reading settings from /Users/usernamehere/Library/Application Support/Alfred 3/Workflow Data/com.github.robwalton.alfred-ulysses-workflow/settings.json 10:51:15 workflow.py:2532 DEBUG Update check not due 10:51:15 ulysses_items.py:57 INFO ulysses_items.main(wf): args = Namespace(kind='sheet', limit_scope_dir=None, query='', search_content=False, search_ulysses_path=True) 10:51:15 workflow.py:1884 DEBUG loading cached data: /Users/usernamehere/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.github.robwalton.alfred-ulysses-workflow/__workflow_update_status.cpickle 10:51:15 workflow.py:2462 DEBUG update_data: {u'available': False} 10:51:15 ulysses_items.py:82 INFO Added iCloud items from '/Users/usernamehere/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library/Groups-ulgroup' 10:51:16 ulysses_items.py:82 INFO Added iCloud Inbox items from '/Users/usernamehere/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library/Unfiled-ulgroup' 10:51:16 workflow.py:2267 ERROR 'displayName' Traceback (most recent call last): File "/Users/usernamehere/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A4FD89F-3A79-4823-934E-855B611DA3DD/workflow/workflow.py", line 2260, in run func(self) File "ulysses_items.py", line 85, in main include_sheets) File "ulysses_items.py", line 145, in parse_ulysses_for_groups_and_sheets groups_tree = parse_ulysses.create_tree(root_dir, None) File "/Users/usernamehere/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A4FD89F-3A79-4823-934E-855B611DA3DD/parse_ulysses.py", line 113, in create_tree group = Group(rootgroupdir, parent_group) File "/Users/usernamehere/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A4FD89F-3A79-4823-934E-855B611DA3DD/parse_ulysses.py", line 63, in __init__ join(self.dirpath, 'Info.ulgroup'))['displayName'] KeyError: 'displayName' 10:51:16 workflow.py:2269 INFO for assistance, see: https://github.com/robwalton/alfred-ulysses-workflow 10:51:16 workflow.py:2290 DEBUG workflow finished in 0.313 seconds
  16. I haven’t done any more work on the Ulysses workflow - but I’ve been using it many times a day with no problems - until earlier today, actually. I had to reset LaunchServices to clear up some Quicklook problems (cf. ) and it broke my custom url handler as a result. Fortunately reopening the applet directly from /Applications re-registered it and got it working fine again.
  17. Nice. Knowing the developers there'll probably be a lot more capability three or four versions down the line.
  18. You need to view the source of the page and look for the name attribute of the search text entry box itself. In this case it's here: <form class="header-search-form" id="searchForm1" action="https://papers.ssrn.com/sol3/results.cfm" method="post" target="_top" name="formQuickSearch"> <i class="icon icon-gizmo-search" role="button" aria-label="Search eLibrary"></i> <input type="text" class="header-search-input" aria-label="Search eLibrary" placeholder="Search eLibrary" name="txtKey_Words" id="txtKeywords" required> <input type="hidden" name="isQuickSearch" value="true"> </form> Unfortunately with all the JavaScript cluttering most web pages, it's become a bit harder to reverse engineer searches this way compared to 10-15 years ago when the web was s lot cleaner.
  19. No AppleScript support or URL scheme so far, so there's not an easy point of entry.
  20. Wow this might be the workflow that finally gets me to switch from BibDesk to Bookends....
  21. Or get Hazel. It's built for exactly this kind of scenario.
  22. download link on 1st page is broken
  23. See also this which uses conversion to seconds as the basis for a time calculator
  24. Ooh it sure would be nice to have a better interface for editing services....
  25. It probably can, but the workflows date back to Alfred 2 before those features were available.
×
×
  • Create New...