Jump to content

CarlosNZ

Member
  • Posts

    392
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by CarlosNZ

  1. Okay, when I run that from the command line, I get this:

    Traceback (most recent call last):
      File "main.py", line 29, in <module>
        plist = plistlib.readPlist(os.path.join(dirname, d, 'info.plist'))
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
        rootObject = p.parse(pathOrFile)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
        parser.ParseFile(fileobj)
    xml.parsers.expat.ExpatError: no element found: line 1, column 0
    

    Hope that's helpful. :huh:

  2. Hey, that worked. Once I switched to Notification Center, it appeared correctly (in notification center), then when I switched to Growl for the workflow, Egg Timer for Alfred showed up in the Growl preferences and it started appearing.

    Okay, that's good to hear. I've got some thoughts on how to make this aspect a little more robust in future updates, so thanks for your help. :)

  3. Reinstalled, but still no eggtimer listed in growl registered applications. Growl is set in eggtimer config. Switched to notification center and back to growl a few times, but didn't help...

    When you re-installed, did you use the nuclear option (timer nuke) to blitz all the settings and stored timers?

     

    I think I've got an idea what's going on, although I can't reproduce it here. Can you try one more thing? What happens if you change Alfred's main notification preference to Notification Centre, and just switch the output of this workflow to Growl? Does it work then? (Obviously, switch it back once you've checked ;) )

     

    Thanks for your help.

  4. UPDATED to v1.5

     

    Hey guys, fairly significant update here - the workflow now uses Google Maps APIs to get the timezone data, which you should find substantially more reliable than Wolfram Alpha.

     

    Also, FLAGS!  :o

    fRMCM2D.png   ujpN5bb.png   FRF4wOz.png

    See the first post for detailed changelist and download link.

     

    PLEASE NOTE: Because this version stores its data substantially differently to previous versions, it will create a new timezones.txt file with default cities. However, it will attempt to save your old timezones.txt file to your Desktop, so you should be able to rebuild your previous list without too much hassle. B) Sorry for any inconvenience.

  5. Hmmm, I don't get any growl popup when mine goes off, (just when I create an alarm)...I'll try to troubleshoot. Thought it was an odd feature to leave out!

    Hi erist, I'm quite keen to get to the bottom of this. Can you check the following things, if you don't mind:

    1. Is it registered properly with Growl? Check Growl preferences -> Applications, and you should see "EggTimer for Alfred" in the list on the left.
    2. What version of Growl do you have?
    3. What version of OS X are you running?
    4. If you're on Mountain Lion, do you have Growl notifications set for all Alfred notifications (in the Advanced pane), or have you just changed it for this workflow?

    I have a suspicion that the problem is to do with the slighty hacky way I've tried to read Alfred's notification preferences and match it to what the EggTimer does, so I'd be keen to try and figure it out if possible.

    Thanks.

  6. If an icon is not a square shape, it displays in Alfred's results as a stretched image. Just wondered if there is any way to specify that the icon aspect ratio should be preserved instead?

     

    I've got a bunch of images that I'm wanting to use as icons in a workflow I'm working on, and most of them are significantly wider than they are tall. I'm about to go and process them all so they have transparent padding at the top and bottom, making them square, but I just thought I'd ask here first in case there's something obvious that I've missed that would achieve this within Alfred.

  7. I love how this has combined about 3 workflows into one, but I'm wondering if it's possible to create keywords to access "Folders", "Favorites", etc. directly?

     

    If I want to access my Favorite folders, say, it would be easier to just type "fav", than have to go "rec", then select from a list. I mean, the branching structure is cool too, and I like having the option, but it'd be really great if we could do it both ways. Do you think this is possible?

     

    :)

  8. I would be nice if we could choose to display the time in the 24h format. Is it possible?

    Sure, but for now you'll need to edit the script yourself. Hope that's cool.

     

    In the file called timezone_list.sh, change this line:

    city_time=$(date -u -j -f %s $city_epochtime +"%l:%M %p") #Create readable time expression
    

    to the following:

    city_time=$(date -u -j -f %s $city_epochtime +"%H:%M") #Create readable time expression
    

    Let me know if you have any probs with that.

     

    Cheers.

  9. 5Xz56hO.png
    This workflow will take a set of PNG or JPG files and compress them using the online TinyPNG service.

    For more info on what it does to the image, see http://tinypng.com/

    Usage:

    This workflow works as either a File Action or a regular keyword process.

    Either:
    1) Select the PNG or JPG files you want processed (in Finder or Alfred), then select the "Compress with TinyPNG" File Action in Alfred.
    2) Select the PNG or JPG files you want processed in Finder, launch Alfred, then use the “tinypng" keyword.

    The processed files will be downloaded to a TinyPNG folder on your Desktop, along with a Report showing the success/failure of each file, and how much it has been compressed by.

    The process may take some time, especially if you have selected several large image files, but you will notified on completion. However, if you have Growl/growlnotify installed, you will get a per-file notification as it progresses.

     

    A Note on Heavy Usage:

     

    The TinyPNG API has a limit of 500 files per month. As you can imagine, once a few people are using the workflow substantially, this doesn't take long to reach. I have provided a default API key built-in so you can use the workflow immediately. However, if you intend to continue using it in any substantial capacity I strongly suggest you visit https://tinypng.com/developers and register for your own API key. You can jump there with the keyword “tinypng_getkey” in Alfred. Once you’ve got your key, save it into the workflow configuration with the keyword  “tinypng_config

     

    Download v1.3

     

    Cheers,

    Carl

     

    ----

     

    28 November 2013 - updated to v1.1

    • Updated to use the new TinyPNG.com API
    • Now works as a regular Alfred keyword (with Finder selection) as well as File Action

     

    19 March 2014 - updated to v1.2

    • Now gives better error reporting on failures. (You’ll be able to tell if the monthly limit has been exceeded.)
    • Consolidated processing to a single bash script. The Finder Selection script now just parses the input and sends it to the main script. (Irrelevant to user experience.)
    • User can enter their own API key to prevent reaching the Free account limit when using a shared key.
    • Updated icons (from TinyPNG.com)

     

    6 October 2015 - updated to v1.3

    •     Now supports JPG files as well.

     

  10. I am having difficulty adding cities  - cant' add Mumbai.

     

    Any thoughts?

    Yeah, I know, for some reason Wolfram Alpha just doesn't have the timezone info for Indian cities. It's a pain in the ass.

     

    On the plus side, I've found a method using Google Maps APIs to get timezone info, which I think will be much more robust and consistent. So I'll be working on implementing that and ditching Wolfram, but it's going to take a bit of time (maybe a week or two?).

     

    In the meantime, if you want Mumbai to show up in the TZ list, you can manually edit the "timezones.txt" file. In particular, add this line:

    Mumbai|UTC+5.5
    

    Hope that helps, and look out for a new-and-improved version of this workflow in a week or so.

     

    Cheers,

    C

  11. Okay, thanks for doing that. I've got it figured out now. It seems that that particular way of expressing the hour without leading 0's is a more recent development and doesn't work on older systems. However there is a perfectly good alternative. :)

     

    I'll put out a proper update for this tomorrow. However, if you'd like to fix it yourself in the meantime, you just need to edit the timezone_list.sh script within the workflow folder.

     

    Find this line:

    city_time=$(date -u -j -f %s $city_epochtime +"%_I:%M %p") #Create readable time expression
    

    and replace it with this one:

    city_time=$(date -u -j -f %s $city_epochtime +"%l:%M %p") #Create readable time expression
    

    That should do the trick! (or just wait and download the proper update tomorrow ;) )

     

    Thanks heaps for helping me figure this out. It's always tricky when you can't see how something is going to perform on all systems, so thanks for getting this sorted for the SnowLeopard users.

  12. Hi Carlos,

     

    It is the default set. I removed the first installation and try again, same result.

    Best regards

    I think I've got an idea what's going on. It looks like whatever version of bash you have installed is not interpreting the date/time display string as expected. What version of OS X are you on? Or have you changed your default bash install somehow?

     

    Can you try something for me? In the OS X Terminal, can you run the following commands?

    date -j -f %s 1364287042 +"%_I:%M %p"
    

    and then this one:

    date -j -f %s 1364287042 +"%I:%M %p"
    

    and then report back what you get for each of them? Thanks.

×
×
  • Create New...