Yakitrak Posted November 5, 2023 Share Posted November 5, 2023 (edited) TickTick Workflow This workflow allows you to search, open, add, and complete tasks in TickTick Installation Click here to download the latest version of the workflow. Or you can build it yourself by cloning the repo into your Alfred workflows directory: https://github.com/Yakitrak/ticktick-alfred-workflow Setup Go to https://developer.ticktick.com/manage and create a new app with any name you want. You'll be asked for a redirect url, please enter in http://localhost. Now you should have a "Client ID" and "Client Secret". Go to "Configure Workflow" button on this workflow on Alfred, and copy and paste the "Client ID" and "Client Secret" Using Alfred, type in tsetup1 and authorise the workflow, you'll be redirected to http://localhost?code=xxxxx. Please copy the code from the url. Using Alred, type in tsetup2 followed by the code from the step 1 (e.g. tsetup2 xxxxx). You are now ready to use the workflow! Usage Lists List Search tls <query> Search for a list in TickTick. Pressing enter will open the list in TickTick. Create List tln <list-name> Create a new list in TickTick with the given name. Tasks Task Search tts <query> Search for a task in TickTick. Pressing enter will open the task in TickTick. You can search for tasks in a few different ways: tts - Search for all tasks tts <task-name> - Search for tasks with the given name tts <list-name> - Search for tasks in the given list tts @today or tts @tod - Search for tasks due today tts @tomorrow or tts @tom - Search for tasks due tomorrow tts @thisweek or tts @tw - Search for tasks due this week Complete Task You can complete a task by pressing cmd + enter when selecting a task in the search results from the Task Search command. Create Task ttn <task-name>, <due-date> Create a new task in TickTick with the given name. You can add an optional comma at the end and include a due date using natural language: ttn Do laundry ttn Do the laundry, tomorrow at 5pm ttn Do the laundry, next week ttn Do the laundry, monday Sync tsync Sync your TickTick account with the workflow by clearing the cache and fetching your latest lists and tasks. This is done automatically when: You search for a list or task, and it's been more than 5 minutes since the last sync You create a new list or task You complete a task Once you run this command, please wait a moment for the sync to complete before searching for a list or task. This can take a few seconds if you have a lot of lists. Calendar Calendar (Day) tcd Open the calendar in TickTick, in the day view. Calendar (Week) tcw Open the calendar in TickTick, in the week view. Calendar (Month) tcm Open the calendar in TickTick, in the month view. Edited November 5, 2023 by Yakitrak Adding tags Link to comment
borderless Posted November 21, 2023 Share Posted November 21, 2023 Hi! Thanks for putting all this together. It looks great. I got everything setup but am getting the following error (shown in debug mode) when I try to add a task. Link to comment
Yakitrak Posted November 21, 2023 Author Share Posted November 21, 2023 Thank you for giving it a try! I think I know the issue and will aim to fix it soon. Its missing requests which I didn’t package locally, thinking it was in built to python3. But its an easy fix if you want it working in the mean time, you can just install it for yourself so the workflow can use it globally. Please run this anywhere: pip3 install requests Also did you run tsetup1 and tsetup2 first? I’d have expected tsetup2 to have failed if you tried the setup based on the above error. Link to comment
borderless Posted November 21, 2023 Share Posted November 21, 2023 I have requests installed but its possible I messed up my python environment. also, tsetup1 ran as expected, took me to a browser, authenticated TickTick, and then gave me a redirect that didn't work but gave me my "code". I then ran tsetup2 and pasted that code in. I got no response but assumed that it was successful. I just ran it again and you are correct (see attached from results of tsetup2). Any way.. I can wait till you package it together.. let me know if you want me to try anything else. Thanks for the quick responses! Link to comment
Yakitrak Posted November 21, 2023 Author Share Posted November 21, 2023 Thank you for reporting this. I have just added another release which packages requests locally which you can install now: https://github.com/Yakitrak/ticktick-alfred-workflow/releases/latest Please let me know if this works. I'll look into switching into a more lightweight package (compared to requests) in the future. Link to comment
borderless Posted November 21, 2023 Share Posted November 21, 2023 That worked! Thank you! Note that I had to rerun both tsetup1 and tsetup2 for it to work. Will continue to give you feedback. Great job! Yakitrak 1 Link to comment
DrSirius Posted January 3 Share Posted January 3 Hi there Thanks for all your hard work. I'm keen to get going but when I run tsetup2 I get the following error: This comes up twice and then I cannot continue. Link to comment
Yakitrak Posted January 3 Author Share Posted January 3 Do t 9 minutes ago, DrSirius said: Hi there Thanks for all your hard work. I'm keen to get going but when I run tsetup2 I get the following error: This comes up twice and then I cannot continue. Hey thank you for using this and the feedback! Do you have python3 installed and working in general? That is a prerequisite for this workflow. If you open a terminal and type in `python3 --version` and press enter, do you see it's version? It seems like running the installation of Python3 itself is having some issues. If you can also run the workflow in debug mode and screenshot what you see that would also help me understand a bit more. Link to comment
DrSirius Posted January 4 Share Posted January 4 14 hours ago, Yakitrak said: Do t Hey thank you for using this and the feedback! Do you have python3 installed and working in general? That is a prerequisite for this workflow. If you open a terminal and type in `python3 --version` and press enter, do you see it's version? It seems like running the installation of Python3 itself is having some issues. If you can also run the workflow in debug mode and screenshot what you see that would also help me understand a bit more. Python 3.11.7. I will Try and run a debug later on and send that. Thanks for a quick response! Link to comment
DrSirius Posted January 4 Share Posted January 4 Here is the debug 🙂 I replaced my username with xxxx: [08:05:25.769] TickTick[Keyword] Processing complete [08:05:25.769] TickTick[Keyword] Passing output 'http://localhost/?code=HyyjiT' to Run Script [08:05:31.408] ERROR: TickTick[Run Script] Traceback (most recent call last): File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/requests/compat.py", line 11, in <module> import chardet ModuleNotFoundError: No module named 'chardet' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/./src/setup-access-token.py", line 3, in <module> import requests File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/requests/__init__.py", line 45, in <module> from .exceptions import RequestsDependencyWarning File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/requests/exceptions.py", line 9, in <module> from .compat import JSONDecodeError as CompatJSONDecodeError File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/requests/compat.py", line 13, in <module> import charset_normalizer as chardet File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/__init__.py", line 24, in <module> from .api import from_bytes, from_fp, from_path, is_binary File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/api.py", line 5, in <module> from .cd import ( File "/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/cd.py", line 14, in <module> from .md import is_suspiciously_successive_range ImportError: dlopen(/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/md.cpython-311-darwin.so, 0x0002): tried: '/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/md.cpython-311-darwin.so' (code signature in <89141903-D9CE-369C-B76F-2F794585B0E3> '/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/md.cpython-311-darwin.so' not valid for use in process: library load disallowed by system policy), '/System/Volumes/Preboot/Cryptexes/OS/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/md.cpython-311-darwin.so' (no such file), '/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/md.cpython-311-darwin.so' (code signature in <89141903-D9CE-369C-B76F-2F794585B0E3> '/Users/xxxx/Library/CloudStorage/OneDrive-Personal/Documents/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.ACA83CA4-F78D-4B10-A538-3B83D8A590E7/src/charset_normalizer/md.cpython-311-darwin.so' not valid for use in process: library load disallowed by system policy) [08:05:31.410] TickTick[Run Script] Processing complete [08:05:31.410] TickTick[Run Script] Passing output '' to Post Notification [08:06:12.887] Logging Stopped. Link to comment
Yakitrak Posted January 4 Author Share Posted January 4 @DrSirius thank you for sharing that. I am not 100% sure why that is happening as everything is packaged with the workflow. It looks like it cannot find the module "chardet" which I would expect to be already there. Could you please run "pip3 install chardet" and then retry the command? Link to comment
Yakitrak Posted April 17 Author Share Posted April 17 Hello, I noticed the TickTick process to get authenticated has slightly changed so I have updated the instructions on the Github. Please reach out here or on Github if you have any issues. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now