Jump to content

Canor

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Canor

  1. Github repository

    Workflows

     

    I came to find out there actually is another workflow that's about 9 months old only after I finished making a new one, but since mine is slightly different so I'm going to post it anyway.

     

    USAGE:

    2d event [[today][tomorrow] on [11][feb 11][11 feb 2018][wed][wednesday][2/11]] [at [9][9:30][pm]] [@[list]] [#[tag]] [[*][**][***]]

     

    You can set due date, due time, list, tags, priority in near-natural-language way. Order between due date, due time, list, tags and priority doesn't matter as long as event is located frontmost.

     

    Require Python3 installed.

     

    Caveat is, Python script isn't properly fast enough(and my coding skill isn't good enough) to handle large inputs like this right away, pausing .5 seconds before pressing return key is recommended. Otherwise metadata may not be fully included.

     

    That being said, I'm looking for someone that could give me ideas to decrease these intervals Python requires to break down inputs and convert it to tasks. Though this script can be improved, since this workflow actually works, I'm posting this workflow here rather than Workflow Questions and Helps. Please let me know if anything's against community rules(or maybe admin can take this down)

  2. Was trying to run convert workflow and didn't work. Turned out there's something wrong with path encoding

     

    Debug log attached below.

    Starting debug for 'Convert'
    
    [2017-10-17 20:31:08][input.scriptfilter] Queuing argument '100'
    [2017-10-17 20:31:08][input.scriptfilter] Queuing argument '100 '
    [2017-10-17 20:31:09][input.scriptfilter] Script with argument '100' finished
    [2017-10-17 20:31:09][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last):
      File "convert.py", line 42, in <module>
        ureg = UnitRegistry()
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 75, in __call__
        obj._after_init()
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 1269, in _after_init
        super(SystemRegistry, self)._after_init()
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 175, in _after_init
        self.load_definitions('default_en.txt', True)
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 368, in load_definitions
        raise ValueError('While opening {0}\n{1}'.format(file, msg))
    ValueError: While opening default_en.txt
    'ascii' codec can't decode byte 0xe1 in position 21: ordinal not in range(128)
    [2017-10-17 20:31:10][input.scriptfilter] Script with argument '100 ' finished
    [2017-10-17 20:31:10][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last):
      File "convert.py", line 42, in <module>
        ureg = UnitRegistry()
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 75, in __call__
        obj._after_init()
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 1269, in _after_init
        super(SystemRegistry, self)._after_init()
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 175, in _after_init
        self.load_definitions('default_en.txt', True)
      File "/Users/Canor/Dropbox/ㄱㅐㅇㅣㄴ ㅈㅏㄹㅛ/Alfred.alfredpreferences/workflows/user.workflow.5E09B0F2-1E7D-4131-8F98-A36B01C3707E/pint/registry.py", line 368, in load_definitions
        raise ValueError('While opening {0}\n{1}'.format(file, msg))
    ValueError: While opening default_en.txt
    'ascii' codec can't decode byte 0xe1 in position 21: ordinal not in range(128)

     

    When I changed the name of my folder that includes .alfredpreferences file, problem solved, but I thought this is just a temporary fix. 

    I thought it's Alfred issue, but please let me know if this has to do with workflow. Thanks.

     

  3. Almost a full year later, I'm also backing amoose136's idea; providing api for toggling auto expansion.

     

    I want my snippet `...`(three dots) to be expanded as `…`(0x2026) when I type in, but only not when I'm dealing with regex. So I want the auto expansion off for the time being, and that means I have to make myself all the way down to alfred preferences > feature > snippet tabs and check the box, and do the exactly same when I finished the work.

     

    In my case, there are not many times I have to toggle the feature on and off, but I find it somewhat opposed to Alfred's basic idea; getting jobs done quickly and automatically. I did try to figure this out with applescript but I couldn't, unfortunately.

     

    So, that's it. I'm asking Mother and Father of Alfred to rethink about providing api for text expansion toggle. Thanks.

  4. I'm using Alfred 3.1.1[737] on my Mac mini running OSX 10.11.6 with theme I've created. And I found out when Safari is open, some characters remain. Safari version is 10.0(11602.1.50.0.10).

     

    I've recorded video and since I can't seem to upload here, I've uploaded to Youtube, was reproducible on my Macbook Air as well. 

     

     

    And I upload the theme here I'm using. http://d.pr/f/1fHu3

     

  5. Search works, but creation does not.

     

    Here is the log from console.

    Starting debug for 'Notes (iCloud)'
    
    [2016-06-24 10:35:09][ERROR: input.scriptfilter] Code 1: execution error: mkdir: /Users/Canor/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data: No such file or directory (1)
    [2016-06-24 10:35:09][ERROR: input.scriptfilter] Code 1: execution error: mkdir: /Users/Canor/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data: No such file or directory (1)
    

    The thing is, the name of my drive on Mac mini is 'Canor\ 1' and on macbook, it's 'Canor'. So they have different names and once I sync one with another, it seems the directory path also gets synced which causes at least one of them won't work.

     

    And I can't seem to find where to modify this code… thanks.

×
×
  • Create New...