Jump to content

Martien Oranje

Member
  • Posts

    69
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Martien Oranje

  1. You may be right about the case-insensitivity, I think in this case-sensitivity may be preferred. That's a piece of documentation that stems from a time when the workflow didn't recommend projects yet.

     

    Not sure I understand the second part. Can you show me the debug output?

  2. 21 hours ago, deanishe said:

     

    If I've understood the problem, it's the project parser. Can you not extract projects and labels with, say, #(\S+) (i.e. every non-space character) or #\[[^\]]+\] (i.e. every character that isn't ])? Then you don't need to worry about alphabets.

     

    FWIW, if you did want to use a regex to explicitly match the characters in the project, I think the "Letters" classes on the page you linked to are what you would want.

     

    Yes I could do that, but I fear that some control characters like `,` and `:` and `;` might be problematic. I've opted for the long way. I've spun up a beta version  for @Pavel A to test. My Cyrillic literacy is not very good but seems to work. If you can confirm it works I'll merge the changes to master.

     

    https://drive.google.com/file/d/1nmdTrYqpt7Ef1Dzt1k9PAA1oVPSMiwAh/view?usp=sharing

  3. 22 hours ago, Pavel A said:

    Hi Martien,

     

    I faced with issue with project name in Cyrillic. Project fetching works as expected, however when I press Return it fails. Just in case, there is no such issue with project name with Latin symbols only.

     

    Here is output from debugger:

    
    [2019-03-14 00:55:50][ERROR: input.scriptfilter] Code 1: /Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:24645
                throw new Error(this.formatError(fallbackToken, "invalid syntax"))
                ^
    Error: invalid syntax at line 1 col 7:
      Test #Проект
            ^
        at Lexer.next (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:24645:19)
        at Parser.feed (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:25344:30)
        at parser (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:25469:12)
        at init$1 (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46714:18)
        at Object.create (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46852:20)
        at Object.<anonymous> (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46928:10)
        at Module._compile (internal/modules/cjs/loader.js:799:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
        at Module.load (internal/modules/cjs/loader.js:666:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:606:12)

    How could I fix it?

     

    Right now the parser only supports latin characters. I hadn't considered other scripts. Is there a non-capital and capital range that includes all characters (like `a-z` and `A-Z`)?

     

    Edit: that would seem to be `а-я` and `А-Я` am I right?

    Edit 2: or perhaps [Ѐ-Ӿ] (as recommended here)

  4. 14 minutes ago, Habeneck said:

    Hi there,

     

    Thanks a lot for creating that workflow, it looks great! 🙂

     

    I’m having trouble in the configuration, with a case of "the workflow disappearing and you just see a bunch of "Search ABC for XYZ" options".

     

    I use Todoist 7.1.1 (11546), Alfred v3.7.1 [946], workflow v5.6.5 on macOS 10.14.2, and node.js version 6.14.2 installed in /usr/local/bin/.

     

    Below is the debug log:

     

    ======

     

    [2018-12-19 12:52:28][input.scriptfilter] Queuing argument ''

    [2018-12-19 12:52:28][input.scriptfilter] Script with argument '(null)' finished

    [2018-12-19 12:52:28][ERROR: input.scriptfilter] Code 1: /Users/dude/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.C454EBCF-EA52-4ADD-A1FC-A4C0F88F7195/alfred-workflow-todoist.js:39662

    url$$1 = normalizeUrlObject({ ...opts, pathname, search });

                                                         ^^^

     

    SyntaxError: Unexpected token ...

        at createScript (vm.js:56:10)

        at Object.runInThisContext (vm.js:97:10)

        at Module._compile (module.js:549:28)

        at Object.Module._extensions..js (module.js:586:10)

        at Module.load (module.js:494:32)

        at tryModuleLoad (module.js:453:12)

        at Function.Module._load (module.js:445:3)

        at Module.runMain (module.js:611:10)

        at run (bootstrap_node.js:394:7)

        at startup (bootstrap_node.js:160:9)

     

    ======

     

    Could there be a problem with my node.js installation? 🤔

     

    Yeah, the use of spread operators in objects was included in node.js in version `8.3`

  5. On 10/26/2018 at 11:15 AM, marcvanderpeet said:

    Hi guys,

     

    Im eager to try out the todoist workflow. However something seems to be broke, I did the following:

     

    - Got my API key via Todoist, fe x

    - Inserted the following phrase into Alfred.

     

    todo:setting token {x}

     

    But it didnt work, I tried both

     

    todo:setting token {x} and todo:setting token x

     

    Any thoughts where this is going wrong?

     

     

     

    The right way is without brackets. 'x' should be a valid todoist token. There should be something in the first list item with some feedback about whats going on. The notification should also help with whats going on and if there's an error I expect something to show in Alfreds debug log (In alfred: Show Alfred Settings, then Tab Workflows -> select the Alfred Workflow Todoist -> in the upper right corner click the 'bug' icon -> set built-in terminal to  'Log: All information')

  6. On 21-1-2018 at 5:32 PM, beetlefrosch said:

    No, Todoist doesn't support German. 

     

    Other workflows are working, "ebay searching" for example … I write "ebay" hit Enter an I can type "Audi A4". 

    Screenshot 2018-01-21 17.29.41.png

    Screenshot 2018-01-21 17.31.29.png

     

    Maybe I misunderstood, I thought you were asking about not being able to use Todoist in German. Was that not your question?

  7. 3 hours ago, beetlefrosch said:

    At first, sorry for my bad english …

     

    When i type a "t" and navigate to "Store Language" and hit Enter, runs the command "t:language" with no chance tor write "de" …

     

    Screenshot 2018-01-20 18.34.25.png

    Screenshot 2018-01-20 18.34.58.png

     

    I'm afraid Todoist doesn't support German at the moment, correct me if I'm wrong.

     

    Martien

  8. I see what you are saying, I erroneously thought a high priority equaled a high number. That must have been why I never noticed. The API handles priorities in reverse order from the client. I'll throw in a conversion step. Nice catch! I must admit I have very little OSS time in January, I am using all the spare time a have for building a kitchen and baby room. The project makeover is about 85% done but still contains bugs and incomplete test suite and I rather not release a buggy version anymore :/

     

    Martien

  9. 2 hours ago, Dzier said:

     

    Thanks for the quick response!

     I'm just only adding a task ;) (By the way, I'm seaching a Screen Protector for my FitBit). About the behavior, the normal as usual, if you declare !!1 then !!1, not !!4 to guess that is !!1 :blink:

     

    I'll wait anxious :ph34r:

     

    Si you are saying you expect 1 to have the lowest priority?

  10. 2 hours ago, Dzier said:

     

    Hi @Martien Oranje! Well I have an issue with the workflow since I upgrade to High Sierra 10.13.2, this is the debug message, I think is the same:

    
    [2018-01-05 10:18:03][input.scriptfilter] Queuing argument 'Buscar lamina proctectora FitBit #Personal !!1 , today'
    [2018-01-05 10:18:04][input.scriptfilter] Script with argument '(null)' finished
    [2018-01-05 10:18:04][input.scriptfilter] {"items":[{"title":"Create new task - Buscar lamina proctectora FitBit","uid":"todoist_create_task","arg":"{\"labels\":[],\"priority\":\"1\",\"project\":\"Personal\",\"date\":\"today\",\"task\":\"Buscar lamina proctectora FitBit\"}","type":"default","valid":true,"autocomplete":"Buscar lamina proctectora FitBit #Personal !!1 , today","icon":"icon.png","subtitle":"PERSONAL          ‼ 1          ⧖ today          "},{"title":"Set project","uid":"--------------------","arg":"","type":"default","valid":false,"autocomplete":"Buscar lamina proctectora FitBit #Personal !!1 , today #","icon":{"path":"project.png"},"subtitle":"Store task in a project, ex. #Work"},{"title":"Add label","uid":"--------------------","arg":"","type":"default","valid":false,"autocomplete":"Buscar lamina proctectora FitBit #Personal !!1 , today @","icon":{"path":"label.png"},"subtitle":"Add a label to this task, ex. @15min"},{"title":"Set priority","uid":"--------------------","arg":"","type":"default","valid":false,"autocomplete":"Buscar lamina proctectora FitBit #Personal !!1 , today !!","icon":{"path":"priority.png"},"subtitle":"Set task priority, ex. !!3"},{"title":"Set date","uid":"--------------------","arg":"","type":"default","valid":false,"autocomplete":"Buscar lamina proctectora FitBit #Personal !!1 , today , ","icon":{"path":"date.png"},"subtitle":"Set a date using a todoist date string, ex. today"}]}
    [2018-01-05 10:18:06][input.scriptfilter] Processing output of 'action.script' with arg '{"labels":[],"priority":"1","project":"Personal","date":"today","task":"Buscar lamina proctectora FitBit"}'
    [2018-01-05 10:18:17][action.script] Processing output of 'utility.junction' with arg 'Error: Invalid argument value ({"threshold":1,"expected":"minlen","argument":"temp_id"})
    '
    [2018-01-05 10:18:17][utility.junction] Processing output of 'utility.filter' with arg 'Error: Invalid argument value ({"threshold":1,"expected":"minlen","argument":"temp_id"})
    '
    [2018-01-05 10:18:17][utility.filter] Processing output of 'output.notification' with arg 'Error: Invalid argument value ({"threshold":1,"expected":"minlen","argument":"temp_id"})
    '
    [2018-01-05 10:18:17][utility.junction] Processing output of 'utility.filter' with arg 'Error: Invalid argument value ({"threshold":1,"expected":"minlen","argument":"temp_id"})

    There's is also a issue with priorities, they are displaying in the wrong way, like they are inverted, ex: !!4 (in the workflow is !!1), !!1 (in the workflow is !!4)

     

    Thanks in advance, and so many thanks for creating this amazing workflow, it simplified a lot the administration of assignment keys and learn them T.T!

     

    What is your search?

     

    I could produce an alfa build that had most of the new features implemented. But I haven't updated the test suite yet.

     

    Ps. The priorities being inverted is a could be due to the Todoist server and client reasoning different about priorities, what is your expected behaviour?

  11. On 23-7-2017 at 1:33 AM, evinsmj said:

    Thanks, Martien. I was able to add the token without error messages this time. However, when I type "todo get milk" in Alfred, I now get an "invalid argument" error message. I have also tried "todo get milk tomorrow #personal" and the same happens. I can't find anything in the documentation that I'm doing incorrect. 

     

    Any thoughts?

     

    First thought? I shouln't be allow to write code :-p. I am a little pressed for time atm so I tried to quick fix this one and should have tested it better. Also the code library needs a test suite, to protect me from myself. I'll try to fix, properly test and write and create a test suite after. Hang on..

     

    Martien

  12. Found it, working with JSON in bash is a little tricky. Should be fixed. If not let me know.

     

    Find the updated binairy on github or use t:update (assuming you are on v3.1.5) 

     

    Martien

  13. Hmmm yeah, I think I do. I may have made a wrong an assumption on the characters in the API token. I made the assumption based on tokens I've seen that they are always exactly 40 characters long and only consist of numbers 0-9 and lower case letters 'a' to 'f'. Can you tell where your token is different from this (don't share the entire token)?

     

    Martien

  14. 6 hours ago, nateyall said:

    Hi Martien,

     

    Apologies if I haven't read this thread closely enough but I wasn't sure if you had thought of incorporating in the todos call an option to display your todos by #project or #inbox or #today in order to selectively display certain to-do lists? This would be a great feature if it's not already part of the workflow.

     

    Best,

    Nate

     

     

     

    Hi it's something I am willing to look in, would you mind creating an issue here on github (https://github.com/moranje/alfred-workflow-todoist/issues) so I can keep track of different requests. Also if you have any ideas on how you would like this function to work, write that down too. 

     

    Also for those interested, I've just posted 3.1.4beta here which adds a better parser (namely #projects) and a little more visual feedback for the `todo add` command.

     

    Thanks

     

    Martien

  15. Hi Rique,

     

    Sorry for not replying. I'm not able to commit any time to this right now as I have a newborn to take care of. I hope someone else might have some free time to dive into this. From looking at your error I can however tell you that spaces in your labels (ie Single actions instead of for example single_actions) are a problem, see if things work without them.

     

    Martien

×
×
  • Create New...