Jump to content

phyllisstein

Member
  • Posts

    366
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by phyllisstein

  1. Gah! I thought that looked all wrong. Fixed. Thanks!
  2. I understand the way that escaping and arguments work. I think the hope there, and with string normalization, is to make alp behave a little better when there are special characters thrown into the mix, as I've been advised will happen with one of my own workflows. I'm not sure that it's the best technique, and I haven't done much testing yet, but it's a tilt at the ole windmill. The other element of the logic is that I'd like to reduce the amount of docs-Googling brand-new workflow developers have to engage in. Thanks for the reminder about changing the repo name. Again, it eliminates the need to search the docs for the right formatting codes, which I can personally never remember, and standardizes the way timestamps are used as UIDs for the benefit of Alfred's sorting mechanism. Most of the module boils down to things that anyone could do on his or her own—in fact, all of it does; there's nothing totally "new" in here, as far as I can tell, just a collection of useful "old" tasks made simpler. E.g., yes, anyone could write the ctypes interface to the Keychain functions; the point is that now no one has to.
  3. E-mail and Notification Center interfaces are tested and working well. See the changes at https://github.com/phyllisstein/alp . To be honest, I'm not sure. It's possible that David would know a bit more about this; if not, maybe Andrew could help. It occurred to me, though, that it wouldn't be a bad idea to have a fuzzy way of matching arguments to the script, so that'll be added to the list. Looks terrific! I'll have to play around with it a bit—I've mostly used AppleScript as a sort of second-string language, but you've got some pretty impressive stuff there!
  4. Thanks! As @nikipore pointed out to me, you can accomplish the same thing as Item.fromDictionary() by passing a dictionary to item.__init__() like this: myDictionary = {} # Whatever i = alp.item(**myDictionary) Fuzzy searching would be an interesting addition, but potentially beyond my ken. It's also built into the way Alfred returns results, I think, so potentially unnecessary?
  5. Taking into account some of Jan's feedback—though probably less than he'd like—I've slimmed down PyAl a bit and turned it into alp. There are more details in the first post in this thread and at the Github page. Currently working on adding a Notification Center interface; a way of interacting with e-mail has been requested and is under consideration.
  6. As you're thinking about updating this workflow, you might consider using the iTunes Store API and Alfred's feedback system to display results. It's a little more work, but the presentation is a bit neater. See http://alfred.daniel.sh/Workflows/iTunesStore.alfredworkflow for an example of something similar.
  7. Aha, I gotcha. That's actually a much more sensible way to do it! I'll have to see if I can't modify the shell script to check for ST2/3—not tonight, but soon.
  8. Where did you change the port? scp should know by itself which port to use, as far as I can tell; the configuration in Alfred should just be a server's IP or hostname. Are you sure your network-attached storage device is running an SSH server?
  9. Sorry, that's a little unclear in the directions. It would ideally be a URL that points to the folder on the remote server you're uploading to. So if I'm uploading to /home/bob/www/folder on my remote server, and /www/ is my web root, I might specify http://www.bob.com/folder/ for the base URL. Then, the file's URL will be copied to the Clipboard after the upload is complete. It's not really necessary for scp to run—you could enter anything there. In a future release, it'll hopefully be rejiggered so it's optional.
  10. May've been a bit easier than I expected. Try downloading the latest version, see if that doesn't work for you.
  11. It appears to be. The problem is that the command never outputs a login prompt, so `expect` winds up waiting around forever to send it your password. I've been having the same problem on my system, but haven't come up with a workaround yet. I'll put s'more energy into it today, though.
  12. Really great work! (I'm also an especial fan of the Piratebay workflow.)
  13. Do you by any chance have a certificate installed such that you don't have to log into your SSH server manually?
  14. Now available at http://alfred.daniel.sh/Workflows/UpdateTeX.alfredworkflow , a quick script workflow to run updmap and mktexlsr as the current user and the superuser. Enter texhash followed by your password to execute. Nothing too mind-boggling here, but I could never remember the new commands and so here we are.
  15. Try http://alfred.daniel.sh/Workflows/BackgroundCommand.alfredworkflow
  16. My thinking about the Keychain and Spotlight stuff is actually in sort of flagrant violation of the single-responsibility principle. Viz., my thinking is that the best way to get people who may not have a lot of experience with code stuff creating workflows is to manage and make invisible a handful of potentially common tasks—like HTTP requests, bundling BS and requests_cache, and those two. But this could be very misguided. I'll keep in mind that if I come up with any core stuff, I can fork your repo. And in the meantime—when I get some time in the meantime—I'll keep slimming and trimming (and renaming, heh) this guy.
  17. Heh, the forum was appending the period. Try http://alfred.daniel.sh/Workflows/CreateNewFile.alfredworkflow
  18. You should be able to do this by entering the complete POSIX path to the file after the `subl` keyword. So for example, I just tested: subl "~/Dropbox/" "~/Documents/" and it seemed to work fine. Does that give you any trouble on your end?
  19. Jan, Thanks so much for your feedback! It's great to hear from someone who actually knows their Pythonic asshole from their Pythonic elbow (i.e., someone other than me) about this stuff. No know-it-all-ism detected whatsoever. I think that your remarks are spot-on, and that your API definitely looks much prettier and clearer—I especially think the args and the unified work are great ideas. I agree that it'd be ideal to try minimizing the number of APIs floating around, so maybe we can collaborate a bit on merging your work and mine? I'm of course happy to trim and slim, but I'm also willing to defer to your knowledge and let you pull the stuff that's useful—the keychain interface and whatever else—and massage it into your code.
  20. Just updated this workflow so that it'll check to see whether Sublime Text 2 or 3 is installed (defaults to 3) instead of failing if you had the wrong version. Download at the link above.
  21. Hah, it actually ought to be less complicated than it sounds. You should just be able to switch "Remote Login" on under System Preferences→Sharing, then use your short username and password to scp back and forth between the two machines. However, I've only ever done it with professionally-hosted servers, so there may be a configuration step that I'm missing and your mileage may accordingly vary.
  22. The scp command that the workflow's built around copies files over SSH. So if you had an SSH server running on your Mac Mini, say, you could add it to the workflow by entering "scp add Mini [username] [password] [LAN IP or Bonjour address] [path to copy to] http://" (the base URL is unfortunately necessary, even if you don't use it). And, of course, vice-versa for your MacBook.
  23. Sorry it took me so long to see this! I've just pushed an updated version to http://alfred.daniel.sh/Workflows/CreateNewFile.alfredworkflow. There was a misplaced parenthesis that was throwing everything off. Should be working fine now.
  24. Welcome to our new users! I wanted to let you all know that I've moved the latest versions of my workflows from Droplr to my personal site, at http://alfred.daniel.sh. There, you'll find download links and documentation for: Kindle Bookstore; DEVONthink Note; Secure Copy; Create New File; Scratch Files; Thoughts; Background Command; iTunes Store; Open in Sublime; Kobo Bookstore; and PyAl. I'll slowly be looking for old posts and updating the links there, but this seemed a bit more efficient. As always, please don't hesitate to get in touch via the forums, e-mail, or Twitter if anything goes wrong.
×
×
  • Create New...