Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    61

Reputation Activity

  1. Like
    dfay got a reaction from daniel_r in Ask for Input / Confirmation   
    If you want to do it through a native dialog rather than Alfred, just use AppleScript.
     
    This is an old reference but everything there should work: 
    https://www.macobserver.com/tips/applescript/2001/20010917.shtml
     
  2. Like
    dfay got a reaction from boddicker in Can TextExpander snippets expand in Alfred 3?   
    I use them all the time with TE 5.1.4.  Never upgraded to the subscription version but earlier ones (3 & 4 as well) have worked fine with Alfred 2 & 3.
  3. Like
    dfay got a reaction from deanishe in Search through 2500+ mind maps and curated study plans with Alfred   
    Basically it looks like you're trying to reinvent the wiki, and honestly I think you'd do much better to use an off-the-shelf solution like WIkidot, where all this infrastructure is taken care of for you and you can concentrate on content. Wikidot has a decent API & it would be pretty easy to build a workflow that queries it.  Or you could use mediawiki & adapt the existing Wikipedia workflows.
  4. Like
    dfay got a reaction from mlondon in Request for Google Ngram Workflow   
    {query} in the custom search refers to what you've typed into Alfred - you can type in a comma-separated list of terms, and it will search for each term, just as if you had typed it into the ngrams search box.
     
    Here are the directions for creating a custom search : https://www.alfredapp.com/help/features/web-search/ - basically you need to click the Add Custom Search button and paste the URL I provided above.
     
    It's really not hard to do, and well worth looking at so you can try the solutions other people have provided (preferably before saying they don't work....) even if you are not going to be creating your own custom searches.
  5. Like
    dfay got a reaction from phil-a in Shortcut for new note in Dropbox Paper   
    The Dropbox API doesn't have a call to create a new note at this point.  There are ways to automate a click but they will be messy and breakable.
  6. Like
    dfay got a reaction from patowod in Convenient way to tag files with Alfred?   
    I use it in Alfred file actions, mostly (I can't think offhand of any conventional workflows where I use it....).  
     
    e.g. I have a file action "Move to Dropbox tagging current"
     
    which runs the following bash script:
     
    /opt/local/bin/tag -a current {query} mv {query} '~/Dropbox/'  
  7. Thanks
    dfay got a reaction from mcouthon in Apple Music workflow with Love   
    create a trigger that connects to the following applescript:
    tell application "iTunes" set loved of current track to true end tell This didn't used to work with Apple Music, but it does now.
     
    Adding an Apple Music track throws up error "iTunes got an error: current track doesn’t understand the “add” message." number -1708 from current track
     
    So that's not easily possible at the moment.  
  8. Like
    dfay got a reaction from bidays in Apple Music workflow with Love   
    still not working
     
  9. Like
    dfay reacted to xilopaint in PDF Actions (so far only splitting double pages)   
    Thank you! I will surely take a look on it on the next days.
  10. Like
    dfay got a reaction from xilopaint in PDF Actions (so far only splitting double pages)   
    PDF Split (File Action)
    Split a two-page scanned PDF into two separate pages. Accepts multiple files.
    When used on a file original.pdf, it creates original-split.pdf in the same location.
     

     
    All the action is in splitPDF.py which is a very slightly tweaked version of a script by Hanspeter Schmid posted here.
    Built with PyPDF2.
     
    Download: https://www.dropbox.com/s/ablkq7p94dxnn5l/PDF Actions.alfredworkflow?dl=1
     
    Not as versatile as Skimmer : PDF actions for Skim was, but working and hopefully more future-proof.
  11. Like
    dfay reacted to robwalton in Ulysses workflow   
    The vote came in for Boaty McBoatFace I'm afraid.
  12. Like
    dfay got a reaction from deanishe in Ulysses workflow   
    stately-plump-buck-mulligan was taken?
  13. Like
    dfay got a reaction from patgilmour in Ulysses workflow   
    Here's a cleaner version of ul that makes use of the ulysses-python-client library.  I also changed it to output just the identified as the argument.
     
    #!/usr/bin/python # search for a sheet's title and return its identifier import ulysses import json token = "your token here" ulysses.set_access_token(token) library = ulysses.get_root_items(recursive=True) def all_sheets(g): if hasattr(g, 'containers'): for c in g.containers: yield json.dumps({u'title': c.title.replace('"', '').replace(',', '').replace(':',''), u'arg': c.identifier, u'subtitle': c.type.capitalize()}) for child in all_sheets(c): yield child if hasattr(g, 'sheets'): for s in g.sheets: yield json.dumps({u'title': s.title.replace('"', '').replace(',', '').replace(':',''), u'arg': s.identifier, u'subtitle': s.type.capitalize()}) print('{"items":'+str(list(all_sheets(library[0]))).replace('\\\'','').replace('\'','')+'}') I now have it set up to output to this script to build the Markdown link:
     
    #!/usr/bin/python # create a Markdown link from an identifier import sys import ulysses token = "your token here" ulysses.set_access_token(token) query = sys.argv[1] title = ulysses.get_item(query).title print('['+title+'](ulysses://x-callback-url/open?id='+query+')') Now thinking of what else one can do with the identifier...
     
    (Update) I've added a modifier (ctrl) to send the identifier only to the keyboard -- this can then be pasted into Ulysses group search (command-shift-F) and it will return all sheets that contain a link to the queried sheet. 
     
     
  14. Like
    dfay reacted to vitor in Workflow libraries and helpers   
    Libraries and Frameworks

    Python 3: Alfred-Workflow, by Adam Hitchcock
    Python 3: Ualfred, by @chaojie
    Dart: Alfred Workflow, by Klemen Tusar
    Go: go-alfred by Jason Cheatham
    PHP: Alfred Workflows PHP Helper by @joetannenbaum
    Node.js: Alfy, by @sindresorhus

    Other Utilities

    Add auto-updating to your Workflow: OneUpdater, by @vitor
    iTerm2 intergration: Custom Alfred iTerm Scripts, by @vitor
     

    All the libraries on this list are (at the time of the last edit) up-to-date and their developers are either still supporting them or forum regulars. That means any problems you find and suggestions you have are likely to be addressed.

    If there’s any library you think belongs in (or should be removed from) this list, leave a reply below. I’ll evaluate it and then hide the comments (so the thread can be kept tidy).
     
  15. Like
    dfay got a reaction from pseudometa in Fuzzy filtering   
    Please allow fuzzy search when "Alfred Filters Results" is turned on in a Script Filter.  Thanks.
  16. Like
    dfay got a reaction from deanishe in web search   
    try 
     
    http://starwars.wikia.com/wiki/Special:Search?search={query}&fulltext=Search
     
    in general, building web searches, you need to look at an actual search URL and figure out where the search term appears, then replace that with {query}
  17. Like
    dfay reacted to robwalton in Ulysses workflow   
    I've uploaded a new version 1.0 to packal and github. Big improvements are the addition of uf find command to search inside content and the introduction of fuzzy searching (from @deanishe's workflow) to other search commands. Don't know I lived without those two @katie. Also updates Alfred-Workflow to fix hanging in Sierra and add's @dfay's code for opening or importing files--no appending yet.
     
  18. Like
    dfay reacted to deanishe in Workflow Library for Python   
    What? Like grep for?
     
    update_settings and run_in_background are your huckleberries:
    grep -R update_settings . | grep -v /workflow/ grep -R run_in_background . | grep -v /workflow/ That should filter out the library itself. Hopefully, @vitor will show up with some of his CLI wizardry to expand that to return the folders the library wants installing in  
  19. Like
    dfay reacted to mrchow19910319 in Could someone write a workflow that tells time machine to start backup?   
    Thanks. It worked. 
     
    For anyone who is too lazy to do it themselves, here is how to do it. 

  20. Like
    dfay reacted to dsburfitt in Placing Files in InDesign using Alfred Commands   
    thanks a million! haha i was dancing with a 100 things trying to figure it out. THANK YOU THANK YOU
  21. Like
    dfay got a reaction from dsburfitt in Placing Files in InDesign using Alfred Commands   
    I don't have InDesign to test but if you're passing from a File Action to AppleScript you need to begin the script like this:
     
    set myNameFile to POSIX file "{query}" See https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ReferenceFilesandFolders.html
  22. Like
    dfay got a reaction from matthew16 in keyboard shortcut for every keyword that takes you to workflow   
    I think this has come up before but it's a great idea.  Alternatively the keystroke for Alfred Preference command-, could just be context-sensitive.
  23. Like
    dfay reacted to vitor in RecentlyAdded — List directory contents by added date   
    This workflow is officially deprecated in favour of Thumbnail Navigation
     
    List the contents of directories, ordered by add or modified date. rda sorts from the most recently added and rdz does the reverse; rdn sorts from the most recently modified and rdo does the reverse.



    The list is auto-refreshed, making for a good way to track changes.

    To act on the selections, use the standard Alfred shortcuts. You can activate file actions, dive into directories, preview files, reveal in Finder, add to the file buffer…

    By default the Workflow searches in ~/Desktop and ~/Downloads. Change the value in the directories Workflow Environment Variable to use different paths, separated by commas.
  24. Like
    dfay reacted to mandrigin in Swift Windows Switcher [Safari/Chrome tabs support]   
    Hello!

    I made an Alfred 3 workflow to search and switch between open windows in the system and Safari (and Chrome) tabs.

    More app-by-app support are (hopefully) coming.

    It is uses the companion native app, that's what makes it much faster than the other alternatives.

    https://github.com/mandrigin/AlfredSwitchWindows/releases
     
    Sierra only (at the moment).

    PS: Thanks to Emanuele Munafò and his "Windows Switcher" workflow for the inspiration.
     
  25. Like
    dfay got a reaction from deanishe in Hours:Minutes to decimal format   
    Also if you want to go further here is a whole command-line time calculator library I wrote in python some years ago.  The code above does the conversion to minutes rather than seconds but it's basically the same as the input_time, to_seconds and base_time functionality below.
     
    def to_seconds(i): seconds=int(i[2])+(int(i[1])*60)+(int(i[0]) * 60 * 60) return seconds def from_seconds(raw_seconds): seconds=abs(int(raw_seconds)) minutes=0 hours=0 while seconds > 59: seconds=seconds-60 minutes=minutes+1 while minutes > 59: minutes=minutes-60 hours=hours+1 if raw_seconds<0: hours=hours*-1 return [str(hours), str(minutes), str(seconds)] def input_time(): time = raw_input('enter time in h:m:s format: ') time_list=time.split(":") return time_list def add(base_time): increase=input_time() return(from_seconds(to_seconds(base_time)+to_seconds(increase))) def subtract(base_time): decrease=input_time() return(from_seconds(to_seconds(base_time)-to_seconds(decrease))) def multiply(base_time, multiplier): return(from_seconds(to_seconds(base_time)*multiplier)) def divide(base_time, divisor): return(from_seconds(to_seconds(base_time)/divisor)) def milePaceToKMPace(mile_pace): return(multiply(mile_pace,0.621371)) def kmPacetoMilePace(km_pace): return(multiply(km_pace,1.609343994)) def decimal_equivalent(base_time): return(to_seconds(base_time)/3600.0) def negative(base_time): return(multiply(base_time,-1)) def display_time(i): if len (i[1])==1: i[1]="0"+i[1] if len (i[2])==1: i[2]="0"+i[2] print i[0]+":"+i[1]+":"+i[2]  
×
×
  • Create New...