Jump to content

rice.shawn

Member
  • Posts

    973
  • Joined

  • Last visited

  • Days Won

    57

Everything posted by rice.shawn

  1. Maybe you could write a quick config AppleScript type thing that would create dialog boxes to enter in the credentials (then put in an action launched by something like "github configure"), and then you could encrypt the user and password from there.
  2. Planned for an upcoming version. I'm trying to incorporate all requests that I've seen for the next version.
  3. Yes! I'm glad that this bugfix helped everyone (so far). @greenamit: as twinpeaks and domenic mentioned, many workflows are now using Alleyoop, so you should download that workflow to help with the updates. It's a clever system, although it was designed as a stop-gap measure. There is an unofficial repo in the works (the website is nearly done, and the workflow that accompanies it is also near completion) that will serve to browse, download, install, and update workflows more efficiently. @domenic: the smaller font is possible, and I'll include it in v1.1. The blacklisting could work too, although that might be a bit more complex based on identifiers and how not enough workflow developers include all the metadata in their workflows (I've just noticed this through the debugging for this script). Right now, I've been working with creating config files through dialogs to make it easy to do. Right now, I'm just using Applescript dialogs to do it, but they're ugly. I'm considering writing an actual frontend to it via xcode, but I've never done that, so I have no idea how to do it and don't enough time to learn. I could do it easily with a php web interface, but I can't seem to get the popups to use php (since they don't come from the web server, and I need this to be all offline). If I could figure out a way to get an ajax call on a webpage to execute a script via some post data in the web popup (in automator), then I could do that well, but I haven't figured that out yet. I've recently found out that it's hard to write dynamic web pages when there is no server to serve dynamic webpages. Fun, right? One possibility that I could do would be to install the file, or perhaps create a symlink, in a place that osx could serve it (/Users/USERNAME/Sites/...), but I can't remember if all recent versions of OS X come with the server automatically enabled with PHP enabled. Does anyone remember if they do? I'm also hesitant to write files outside of the appropriate storage places. Anyone have thoughts on this? Without something like a dynamic webpage, it would be hard to create an elegant UI to handle blacklisting. Right now, I'm considering having Alfred run some scripts to generate the HTML files for the Help workflow when necessary and cache them in the appropriate places, but that's not optimal for interaction. Send me ideas! Also, send me any more feature requests. Shawn
  4. And... updated again (v 1.05). This one should fix the ALP errors. Really incomplete workflows might not show up on the list because, well, I haven't figured out a way to write this workflow without relying on the info.plist that defines every workflow... Let me know if there is a particular one that doesn't show up. And, again, let me know of any errors you encounter. Hopefully that will be none.
  5. Just posted a new version. I think it should take care of those problems. To duplicate it, I created a new workflow or two and put in a few placeholder keywords and script filters that didn't have any keywords assigned to them. The script broke in the same places, so I escaped for those circumstances. v 1.04 now here.
  6. Just thoughts: Use a script filter to search through the contacts, then have two different options via AppleScript to open it in one or the other. You could always do this as well by having a script filter that has the keyword "outlook" and then searches through contacts (just typing in outlook would still launch outlook, but having an argument with it would invoke the contact search/compose). The inverse could be done for sparrow. Does that help? I can always look into it later if you need more.
  7. I haven't played with it too much. The added keywords could be nice, but that's only if you're not sure often like me whether or not you turned it on. I have a tendency to forget, so I like the ability to enable it when it's already enabled. I'm spending quite a bit of time reworking the "help" workflow that I just put up the other day, and I'm thinking that some of the cooler parts of that workflow might be implemented into the caffeinate workflow. I'll check out what you did a bit more and think on it.
  8. There is another workflow that did this sort of thing posted way back. I remember that the syntax was changed between osx versions, so I looked up the command for previous versions and posted them (maybe with an updated workflow). I just modified it to run the commands for before 10.8 and 10.8, which wasn't the most elegant way to do it, but it did the job. It would be great to see one that's more elegant (gets the version of osx and runs the appropriate command). If you do a search on these forums, then you can probably find the old one if you want to work from there. I'd love to see it done better.
  9. Maybe I can add in a testing script to see if I can get some debugging info.
  10. @CarlosNZ: That looks like it might be something with ALP. Maybe there is a malformed info.plist file in your workflows directory.... I'll look into it. I'm working on figuring out all the kinks that people are running into. It works fine on my system, but then we all have different workflows installed and in different states of development... I need to figure out possible places where it may be breaking. Thanks for bearing with me. I think that I might have set this out for public consumption too soon. Expect more updates.
  11. Can you change 94 to if "keyword" in item['config']: Tell me if that works.
  12. Python works on indentation to figure out where things start and end. And, you need to use tabs for each (maybe a copy/paste is turning them into spaces... if so, go back and turn them into tabs). Make it look like well-formated code for pretty much any language, and it should work.
  13. Actually, can you go in and change the script so that you paste this over line 94:? if item['config']['keyword']: commands += "\r\n* `" + item['config']['keyword'] + "`" else: commands += "\r\n* `" + "<font color=\"red\">No Keyword Defined</font>" + "`" Tell me if that fixes it, and then I'll commit the change.
  14. That's probably why it's failing: the keyword field is there, but it is empty. I can add an escape to the script so that it will just display something like "No Keyword Set." I'll push another version in a bit.
  15. @CarlosNZ: The notification will display no matter what as it just runs while the script runs in the background. I put that in so that people would know something was happening while the script was running in the background. Can you open the terminal window cd to the workflow directory and then run: "python help.py" and let me know where it's breaking? I can do only limited testing on my machine because I don't have every workflow installed (I'm assuming that some of these are breaking the help), so finding out where the script is breaking for other people should help a lot. Also, are you using v1.03? If you're using something before that (which was posted just a few hours ago), then you might be running into old bugs. The next version will regenerate the file only if things have changed (I need to double check when alfred modifies the files in a substantial way that would be relevant to generate a new one, until then, it seems best to just have it regenerate every time for now...). I'm working on a configuration part of this in order to let people choose display and storage methods. That should be out in v1.1.
  16. Out of curiosity, is the alleyoop updating working for everyone? I just want to make sure I'm doing that correctly. Should be version 1.03 now.
  17. Thanks to clintxs, a few bugfixes were made that should make the script more stable. Those have been pushed to the repo, and now we're on v 1.03. Alleyoop should update it. Thanks to everyone for helping with testing and bug fixes. I'll continue to do more. Thanks, phyllistein for making alp and helping me figure out what can be cut. In version 1.1, I'll make the display prettier, and I'll strip down alp to what's needed, and I'll make it so that it regenerates the file only when a workflow has changed (I need to look into how workflows update themselves with timestamps to make sure there aren't too many false positives). Jaemok Jeong's workflow is interesting, but I wanted something more comprehensive and easier to read for many workflows (I tend to install a lot of them). I'll look into Brett Terpstra's "cheaters" script/app and see how it works. If I feel like it works better than quicklook, I'll implement it for that. Although, I do really like the idea of dismissing the window quickly so that it is just a quick reference. I'll try to fork it to create a version that opens an html file in a browser that can stay open, although I don't really like the idea personally because I don't want anything to stay open for me. Or, perhaps, maybe I could generate a quick config file that will let you change the method between all three of these. That might be fun, but I'll have to check to make sure that it doesn't make the size of the workflow overwhelming large. Thanks for all the great ideas. Also, I take pull requests on github, especially for bug fixes. After I get the pull request, I update the alleyoop files so that it can be easily updated. Cheers. Shawn
  18. I updated it a couple of times tonight already. One bug that was found came from something like legacy hotkey values... or so we think. Each modifier key (shift+ctrl+option+command) has a numeric value, and so when used together they add up to something. A few bugs that were noted came out of this when unrecognized values were thrown at the script. Values that had to come from older numeric equivalents. But, these bugs are not reproducible for me because I never assigned any hotkeys before this most recent update of Alfred. Now there is an escape for that, so the new version should work. If the new one doesn't work, then could you go into the workflow folder in a terminal screen and just type "python help.py" and send me the error message? Glad you like it.
  19. (--- update: currently on version 1.05 -- download links all the same) So, I have a workflow problem in that I like to install them. Quite a few of them, and I can easily lose track of the commands for each of them. Hence, I present to you a tool that I needed for me: Alfred2 Workflows Help. Basically, this is a python script that will cycle through your workflows folder, process the info.plist files, and grab the hotkeys and commands from each of them. Then it will compile all of them into a Markdown file, and then show that file in a Quicklook window. Yes! Screenshot is below. Github Repository here: https://github.com/shawnrice/alfred2-workflow-help Download here: https://github.com/shawnrice/alfred2-workflow-help/raw/master/Command%20Help.alfredworkflow Currently, there is just one command: help. The file can take a few seconds to generate, and it is generated every time. This will change in a later version. --- Some notes: The main script (help.py) is written in python, and it's really my first venture into python, so the code might be laughable. I welcome collaboration and commits. I can give you access to the repo if you private message me. I do think that this workflow has a lot of potential. This is version 1.0, and there are many improvements to be made. It has Alleyoop support, so updating should be easy. Quirks and files included: This workflow displays the file generated through a debug mode of Quicklook (so that the focus doesn't need to switch to finder), so there will always be a "[debug]" message on the window. I've included a Quicklook Markdown generator in the workflow to make sure that it always displays correctly. There are some images that are included that are not currently used (these are in the "images" folder). They will be used to show the hotkeys later. ALP is included. Right now, only part of the library is used, so I might strip it down to make the workflow smaller. So, the size of the workflow is larger because of these things in there. --- Roadmap: Clean up the help.py code. Cache the generated file and update it only when the workflow folder changes. Make the display of the file nicer. Add in more images to the file. Display individual workflow helps (show the data for that workflow as well as the readme.md file). Have a better precedent to show either text or subtext for the command help. Try to figure out a way to describe arguments taken for different commands / hotkeys. Make it understand file actions better. Clean up the file/folder structure. Maybe some more... any ideas? Dependencies and Testing: Built on 10.8.3, but this should be compatible for all systems as the only dependencies are included in the workflow. Screenshot:
  20. I had originally posted these workflows in a previous thread (Toggle Caffeine), but it had a bunch of different ones posted in it. I just updated both to have Alleyoop update functionality. Caffeine Toggle — (Github Repo) (Download) Just just "caf" to enable or disable caffeine. There are others with more functionality (i.e. activate for a number of minutes) if you want those. Caffeinate — (Github Repo) (Download) Caffeinate is a native Mountain Lion utility that does the same thing as caffeine, but it has no menu icon. In this workflow, you can set the time in minutes. Here is the readme.md file from Github: --- RequirementsOS X 10.8.x (Mountain Lion) DescriptionIn Mountain Lion (10.8), Apple introduced a utility called "Caffeinate" that basically replicates what the Caffeine utility (web | app storefrom Lighthead Software does. CommandsAvailable Commands: status — Shows whether caffeinate is active and returns the number of minutes if it is. en — Enables caffeinate. en "minutes" — Enables caffeinate for X minutes. dis — Disables caffeinate." Screenshots Caffeinate Activated Caffeinate Help Caffeinate Launch Caffeinate Status
  21. The script included is in php, but it just has a shell_exec() call with the command inside of it. I just pushed a new version of the workflow that changed the escaping, which might make it work better for people. Also, I added alleyoop update functionality to it. So, it can now be self-updating (although I don't think this will ever need an update). I can't really test it again because I need to wait until some program updates itself again in order to get that duplicate entry to test. Maybe when we get the next Alfred2 update I'll test it again.
  22. Thanks for setting this up, phyllisstein. Olivier Hardy is in a beta with the more substantial one that includes a browsable website, etc.. There are a few last features to implement before it goes live, so the public will probably be able to see it within a couple weeks. So far, it looks nice and runs fast. Shawn
  23. The command that I used was here: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user & Try that in terminal, and see if it works for you. (http://www.alfredforum.com/topic/792-alfred-applescript-dictionary-installed-multiple-times/) I'm using 10.8.2, so the command might be different between different different versions os OS X.
  24. In another thread (http://www.alfredforum.com/topic/792-alfred-applescript-dictionary-installed-multiple-times/), a solution was posted for a problem in which AppleScript dictionaries would have multiple entries. These duplicates don't have any effect on your system, and removing them doesn't either. Here you go: https://github.com/shawnrice/alfred2-workflow-remove-dup-applescript-dicts/raw/master/Clean%20AS%20Dictionaries.alfredworkflow There's just one command: "clean dict" Github repo: https://github.com/shawnrice/alfred2-workflow-remove-dup-applescript-dicts (Now with Alleyoop support).
  25. If you're already signed into Google, then you can just create a url shortcut: New doc: http://docs.google.com/document/create?hl=en New Spreadsheet: http://spreadsheets.google.com/ccc?new&hl=en There are others for presentations and drawings, etc...
×
×
  • Create New...