Jump to content

Jarek

Member
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Jarek

  1. Is this still working in Alfred 5? Can't find this option in 5.0.2.

     

    Regards!

     

    ----

    Self update: Found it! However it was not easy... also - these options are not found through "Search Preferences" textbox.

     

    Quote

    Alfred Preferences > Appearance, then Options at the bottom left, then Show Alfred on … has a dropdown to choose active, mouse, or default screen.

     

  2. 13 hours ago, deanishe said:

    But this hasn't really been a problem for anyone before, so is your workflow really that special?

     

    6 hours ago, drwatson said:

     

    this seems like an unnecessary question. If I had to guess, it's because Jarek inherited the code from someone else. He's done a great job.  I'd leave it at that.

     

    I don't take it personally. I don't think this workflow is special in any way. But it was even admitted in your response to mu question, that there are no official guidelines how to treat workflow preferences to make them mobile across different devices. However, I like the suggestion provided there, will try to implement.

     

    Best regards,

    Jarek

  3. 52 minutes ago, deanishe said:

    Save the file in $alfred_workflow_data, like you're supposed to. As noted above, this will never change again.

     

    The script is using this variable even now. Problem with this setup is that there is no link between value of this variable and your Advanced | Set preferences folder . I was assuming that once changing the preference folder, the $alfred_workflow_datawill be also changed - but it's not. My bad, will need to rectify it.

     

    Best regards,

    Jarek

  4. Hi,

     

    I'd expect that after changing my preferences folder, it will also affect location of the workflows (including their working directories). But somehow it only affects location of the Alfred.alfredpreferences

     

    image.png.997da72dd9d5e1f1313971bbd85acdcc.png

     

    But it does not change Workflow Data location. Here an example:

     

    • In my workflow, I use these two variables. Below values when using a default location:
    alfred_workflow_data /Users/jhartman/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones2
    alfred_preferences /Users/jhartman/Library/Application Support/Alfred 3/Alfred.alfredpreferences

     

    • After changing Preferences Folder:
    alfred_workflow_data /Users/jhartman/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones2
    alfred_preferences /Users/jhartman/Downloads/Alfred/Alfred.alfredpreferences

    As you can see, still points to the old location.

     

    Edit I think bottom question is: how to handle custom workflow preferences to allow them being synchronised across different laptops, alongside Alfred preferences?

     

    To me it somehow invalidates the idea of syncing the configuration? Or em I missing something?

    Thank you,

    Jarek

     

    ---------------

     

    Alfred 3.8.2 Build 963, Friday 31st May 2019

    MacOS 10.14.6 (18G87)

    Can be consistently reproduced

  5. 7 minutes ago, drwatson said:
    1. The preference folder as determined in Advanced | Set preferences folder
    2. The storage location as defined within the timezone script itself (timezone move command).

    Right now, it doesn't appear to honor either

     

    I think the (1) still works, as the location set by Set Preferences Folder should be reflected as $alfred_workflow_data variable (which is in use).

     

    Indeed, there is a regression in (2) - the Move command does not work anymore. Registered as https://github.com/jaroslawhartman/TimeZones-Alfred/issues/23 . Will try to prioritise.

     

    Best regards,

    Jarek

  6. 6 minutes ago, drwatson said:

    Jarek: I noticed that the workflow doesn't save the timezone.txt file to the correct location anymore. Any chance you could look into that ?

     

    Could you please elaborate what do you mean by correct location?

    Indeed, there was a change a few releases back and it was related to Alfred 4. Instead of having a hardcoded path,  it uses now alfred_workflow_data variable.

     

    On my Mac it's /Users/jhartman/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones2:

    jhartman$ cd "/Users/jhartman/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones2"
    jhartman$ ls -l
    total 16
    -rw-r--r--@ 1 jhartman  staff   26 Aug 14 14:48 configExtra
    -rw-r--r--  1 jhartman  staff  369 Aug 14 15:04 timezones.txt

    Best regards,

    Jarek

     

  7. On 10/22/2018 at 5:03 PM, JQuinn said:

    One quick question, in the original version I believe you can do a quick search on any city's time with below;

    
    tz *city*

    Is that still available now? I didn't see it in the workflow scripts, but maybe I missed the prompt ¯\_(ツ)_/¯ 

     

    I would like to search for a random city without adding it to the cities list.

     

    Good point. Seems it has been regressed during one of the updates.

    I will take a look; to have it on the radar created GitHub ticket in https://github.com/jaroslawhartman/TimeZones-Alfred/issues/6

     

    Thank you and best regards,

    Jarek

     

    PS: A new version 2.1 has been created to remove dependency on Growl and improve (I hope!) adding new cites via timezone add

     

    Download version 2.1 

  8. Hi,

     

    I think I've managed to fix the workflow and adding new cities is possible again!

    More changes:

    • Added a keyword to open list of the cities in an editor _timezone edit. Thanks to that you will be able to quickly delete not needed lines.
    • When displaying the list and pressing Alt, you can remove a single city (this is fixed now)

    Unfortunately, you will need to create your list of cities again... But this will also clean up your list as in previous version it got messed up.

     

    Download version 2.0 

     

    I hope you will like it :) Note, that major parts of the app have been rewritten so I could expect also new bugs... Please let me know in such cases.

    Best regards,

    Jarek

  9. Hi,

     

    This is actually an issue, and this is pretty serious:

     

    Quote

    Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account

     

    In a short - it's caused by Google, who disabled charge-free access to their services.

     

    I'd have to find an other (free) service to provide an API to lookup for Time Zone details based on Geographical location.

     

    Until then, adding new city or update timezones will not work ? As a workaround, add a line with Boston to the config file. Open in terminal

     

    $ open -a /Applications/TextEdit.app  "$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones/timezones.txt"

    Add a line like:

     

    Dubai|Dubai|United Arab Emirates|25.2048493|55.2707828|14400|Asia/Dubai|Gulf Standard Time|UTC+4||971

    Best regards,

    Jarek 

  10. 5 hours ago, ericb said:

    I just installed v1.7 with Alfred 3 and could not get any timezones to list. Even the default ones. It seems the scripts were looking for an Alfred 2 directory that I didn't have. I created a symbolic link called Alfred 2 to Alfred 3 and now things are working. I'm surprised I had to make this change though so I'm wondering if there is something else wrong.

     

    /Users/eric/Library/Application Support/Alfred 3

    /Users/eric/Library/Application Support/Alfred 2

     

    Eric

     

     

    Hi Eric, try version 1.9 from https://jhartman.pl/2017/05/04/timezone-v1-9/

     

    Best regards,

    Jarek

  11. Hi Miguel,

     

    The problem is happening around these lines:

     

    ++ curl --connect-timeout 10 -s 'https://maps.googleapis.com/maps/api/timezone/xml?location=25.2711390,55.3074850&timestamp=1524754016&sensor=false'
    + api_timezone=
    + OIFS='     
    '
    + IFS='    '
    ++ php parsexml_timezone.php ''

    As you see, whenever attempting to read the timezone details from the web, curl command does not return any data.

     

    I'm guessing it's exactly because of your VPN and the way, how it allows to access the Internet. Most likely, it requires a proxy. Run two tests pls:

     

    a) Open this page in a web browser (e.g. Safari or Chrome)

     

    https://maps.googleapis.com/maps/api/timezone/xml?location=-36.8484597,174.7633315&timestamp=1524754015&sensor=false

     

    b) run this in Terminal

     

    curl --connect-timeout 10 -s 'https://maps.googleapis.com/maps/api/timezone/xml?location=-36.8484597,174.7633315&timestamp=1524754015&sensor=false'

    Both should generate similar results, but I'm afraid the second returns just nothing.

     

    If this is really because of the proxy, in a first step you would need to find out what the proxy is (this depends on you VPN provider or your IT). Then, let's make a test in Terminal:

     

     

    export http_proxy=http://<proxy>:<port>/ 
    
    curl --connect-timeout 10 -s 'https://maps.googleapis.com/maps/api/timezone/xml?location=-36.8484597,174.7633315&timestamp=1524754015&sensor=false'

    Of course, you need to change http://<proxy>:<port>/ into legit proxy URL.

    If this time curl will return something like below:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <TimeZoneResponse>
     <status>OK</status>
     <raw_offset>43200.0000000</raw_offset>
     <dst_offset>0.0000000</dst_offset>
     <time_zone_id>Pacific/Auckland</time_zone_id>
     <time_zone_name>New Zealand Standard Time</time_zone_name>
    </TimeZoneResponse>

    Then fixing will be as easy as updating includes.sh by adding the line below:

    #includes for TimeZones scripts
    
    #Working Directories
    TZWD="$HOME/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/carlosnz.timezones"
    TZPREFS="$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones"
    
    CONFIG_EXTRA="$TZPREFS/configExtra"
    
    export http_proxy=http://<proxy>:<port>/   #### ADD THIS LINE WITH PROPER PROXY DETAILS

     

    I hope it will help.

    Jarek

     

    PS: The log you posted above is quite long, perhaps you may want to remove it from the forum and post to e,.g. https://justpaste.it/

     

  12. Hi Miguel,

     

     

    Quote

    I already uncommented everything on the add city file and the timezone update and here is what i notice

     

    Could you please revert to the original versions and give me output from these commands.

     

    Go to the Workflows and select Open in Terminal:

     

     

    image.png.5c117498c9b3f01a10d5783cc1971a8a.png

     

    Then type copy and paste these lines and paste here the output:

    cat "$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones/timezones.txt"
    cat "$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones/configExtra"

    Then run:

     

    sh -x update.sh > ~/Desktop/Update.txt 2>&1

    This will provide a lot of output

     

    This should create file Update.txt on your desktop - please post it here as well.

     

    Thanks and best regards,

    Jarek

×
×
  • Create New...