Skip to content

Commit

Permalink
A truckload of refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamim committed Nov 9, 2023
1 parent 1c0a467 commit a8dea7f
Show file tree
Hide file tree
Showing 15 changed files with 2,646 additions and 2,236 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "*"

env:
PLUGIN_NAME: ultimate-TickTick-sync # Change this to match the id of your plugin.
PLUGIN_NAME: TickTickSync # Change this to match the id of your plugin.

jobs:
build:
Expand Down
85 changes: 43 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,63 @@
# Ultimate ticktick Sync for Obsidian
# TickTickSync

> [!important]
> This plugin is based on [Ultimate Todoist Sync for Obsidian](https://github.com/HeroBlackInk/ultimate-todoist-sync-for-obsidian)
> as of 2023-09-28 this is a work in progress, guarantied to fail. Just saving progress at this point.
> This plugin is based on [Ultimate Todoist Sync for Obsidian](https://github.com/HeroBlackInk/ultimate-todoist-sync-for-obsidian).
> There have been significant changes due to the difference between TickTick and ToDoist task handling. I am grateful for the work that [HeroBlackInk](https://github.com/HeroBlackInk/ultimate-todoist-sync-for-obsidian/commits?author=HeroBlackInk "View all commits by HeroBlackInk") put it in to the original plugin.
The Ultimate ticktick Sync plugin automatically creates tasks in ticktick and synchronizes task state between Obsidian and ticktick.


## Demo

### Usage
![Alt Text](/attachment/demo.gif)

### Settings page
<img src="/attachment/settings.png" width="500">
The TickTickSync plugin automatically creates tasks in ticktick and synchronizes task state between Obsidian and ticktick.

The plugin works best when the [Tasks](https://github.com/obsidian-tasks-group/obsidian-tasks) is installed.

## Features

###
| Feature | Sync from Obsidian to ticktick | Sync from ticktick to Obsidian | Description |
|-------------------------|-------------------------------|-------------------------------|-------------|
| Add task | โœ… | ๐Ÿ”œ | |
| Delete task | โœ… | ๐Ÿ”œ | |
| Modify task content | โœ… | โœ… | |
| Modify task due date | โœ… | โœ… | |
| Modify task description | ๐Ÿ”œ | ๐Ÿ”œ | |
| Modify task labels/tags | โœ… | ๐Ÿ”œ | |
| Mark task as completed | โœ… | โœ… | |
| Mark task as uncompleted| โœ… | โœ… | |
| Modify project | ๐Ÿ”œ | ๐Ÿ”œ | |
| Modify section | ๐Ÿ”œ | ๐Ÿ”œ | |
| Modify priority | โœ… | ๐Ÿ”œ | Currently, task priority only support one-way synchronization from ticktick to Obsidian. |
| Add reminder | ๐Ÿ”œ | ๐Ÿ”œ | |
| Move tasks between files| ๐Ÿ”œ | ๐Ÿ”œ | |
| Added-at date | ๐Ÿ”œ | ๐Ÿ”œ | |
| Completed-at date | ๐Ÿ”œ | ๐Ÿ”œ | |
| Task notes | ๐Ÿ”œ | โœ… | Currently, task notes/comments only support one-way synchronization from ticktick to Obsidian. |
- Any task created in Obsidian and taged with #ticktick will be synchronized with TickTick
- Any task created in TickTick will be synchronized to Obisidian.
- Updates are bi-directional
- Tasks added or updated from Obsidian are synched to TickTick immediately.
- Tasks added or updated from TickTick are synched on a configurable time interval.

## Notes
1. TickTick lists are referred to as Projects in the plugin, and throughout documentation.
2. TickTick only has four priorities (High, Medium, Low, None). Please see Priority in [Task Format](#Task-format) for Task mapping of priority

## Known Issues
1. Currently, ALL TickTick tasks are synched. Depending on feedback, may add a tag on the TickTick side. ie: If tagged with #obisidian a task will be synched. If not, it will be ignored.
2. The plugin only works with the [Tasks emoji formats](https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats). It will **not** work with the Dataview format. In the fullness of time, this plugin will be refactored to use Tasks functionality to support both.
3. **Description warning**: Currently, a link to the vault and file in the vault are saved in the Description field. Meaning that any items or descriptions will be over-written during synchronization
1. How this will be handled will be determined by feedback from users.
4. Have only tested in one time zone. Not sure if cross time zone tasks will work, or if TickTick's time zone implementations will be handled.
5. Due Date:
1. On the Obsidian side: if no time is provided, the start time will default to 08:00
2. On the TickTick side: if not time is provided, the start time will be 00:00
6. Parent/Child tasks are supported bi-directionally. However, changes to the parent/child relationship are not handled. Yet.
7. Moving tasks between Projects/Lists is unsupported at this time.
8. Because Tags can't have spaces, at this time it is not possible to add a task to a project with name that contains spaces. In the fullness of time, will implement some kind of workaround (eg: `#folder_with_a_space` will be converted to `folder with a space`)
9. If a file has a default project association (see settings), it is possible to create a task with project tag other than the default project. The Task will be correctly synched to TickTick in the correct folder. However, if the Task is then updated with subtasks, from TickTick, the subtasks will be synched to the project's default file rather than the file where the original parent task was created.


## Installation

### From within Obsidian
**During Beta, only manual installation is supported.**

%%### From within Obsidian

From Obsidian v1.3.5+, you can activate this plugin within Obsidian by doing the following:

1. Open Obsidian's `Settings` window
2. Select the `Community plugins` tab on the left
3. Make sure `Restricted mode` is **off**
4. Click `Browse` next to `Community Plugins`
5. Search for and click on `Ultimate ticktick Sync`
5. Search for and click on `TickTickSync`
6. Click `Install`
7. Once installed, close the `Community Plugins` window
8. Under `Installed Plugins`, activate the `Ultimate ticktick Sync` plugin
8. Under `Installed Plugins`, activate the `TickTickSync` plugin

You can update the plugin following the same procedure, clicking `Update` instead of `Install`
You can update the plugin following the same procedure, clicking `Update` instead of `Install`%%

### Manually

If you would rather install the plugin manually, you can do the following:

1. Download the latest release of the plugin from the [Releases](https://github.com/thesamim/ultimate-ticktick-sync-for-obsidian/releases) page.
1. Download the latest release of the plugin from the [Releases](https://github.com/thesamim/TickTickSync-for-obsidian/releases) page.
2. Extract the downloaded zip file and copy the entire folder to your Obsidian plugins directory.
3. Enable the plugin in the Obsidian settings.

Expand All @@ -69,8 +66,8 @@ If you would rather install the plugin manually, you can do the following:

1. Open Obsidian's `Settings` window
2. Select the `Community plugins` tab on the left
3. Under `Installed plugins`, click the gear icon next to the `Ultimate ticktick Sync` plugin
4. Enter your ticktick API token
3. Under `Installed plugins`, click the gear icon next to the `TickTickSync` plugin
4. Enter your TickTick user ID and Password.


## Settings
Expand All @@ -92,7 +89,9 @@ By enabling this option, the plugin will automatically add `#ticktick` to all ta
| ๐Ÿ“…YYYY-MM-DD | The date format is ๐Ÿ“…YYYY-MM-DD, indicating the due date of a task. | `- [ ] task content ๐Ÿ“…2025-02-05 #ticktick` <br>Supports the following calendar emojis.๐Ÿ“…๐Ÿ“†๐Ÿ—“๐Ÿ—“๏ธ|
| #projectTag | New tasks will be added to the default project(For example, inbox .), and you can change the default project in the settings or use a tag with the same name to specify a particular project. | `- [ ] taskA #ticktick` will be added to inbox.<br>`- [ ] taskB #tag #testProject #ticktick` will be added to testProject.|
| #tag | Note that all tags without a project of the same name are treated as normal tags | `- [ ] task #tagA #tagB #tagC #ticktick` |
| `!!<number>` | The priority of the task (a number between 1 and 4, 4 for very urgent and 1 for natural).<br>**Note**: Keep in mind that very urgent is the priority 1 on clients. So, the priority 1 in the client corresponds to the number 4 here (Because that's how the official API of ticktick is designed.). | `- [ ] task !!4 #ticktick` |
| Priority | <p>TickTick only has three priority levels. They are mapped as follows.</p><table><thead><tr><th>TickTick</th><th>Obsidian</th></tr></thead><tbody><tr><td>0</td><td>null</td></tr><tr><td>0</td><td>&#39;โฌ&#39;</td></tr><tr><td>1</td><td>&#39;๐Ÿ”ฝ&#39;</td></tr><tr><td>3</td><td>&#39;๐Ÿ”ผ&#39;</td></tr><tr><td>5</td><td>&#39;โซ&#39;</td></tr><tr><td>5</td><td>&#39;๐Ÿ”บ&#39;</td></tr></tbody></table> | `- [ ] task โซ #ticktick` |

^f1f17d

### Set a default project for each file separately

Expand All @@ -107,7 +106,9 @@ You can see the current file's default project in the status bar at the bottom r

## Disclaimer

This plugin is for learning purposes only. The author makes no representations or warranties of any kind, express or implied, about the accuracy, completeness, or usefulness of this plugin and shall not be liable for any losses or damages resulting from the use of this plugin.
This plugin was built with the author's specific use cases in mind. Additional use cases can and will be considered.

The author makes no representations or warranties of any kind, express or implied, about the accuracy, completeness, or usefulness of this plugin and shall not be liable for any losses or damages resulting from the use of this plugin.

The author shall not be responsible for any loss or damage, including but not limited to data loss, system crashes, computer damage, or any other form of loss arising from software problems or errors. Users assume all risks and are solely responsible for any consequences resulting from the use of this product.

Expand Down
10 changes: 5 additions & 5 deletions dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "ultimate-TickTick-sync",
"name": "Ultimate TickTick Sync",
"version": "1.0.1",
"id": "TickTickSync",
"name": "TickTickSync",
"version": "1.0.3",
"minAppVersion": "1.0.0",
"description": "This is the best TickTick task synchronization plugin for Obsidian so far.",
"description": "A bidirectional sync plugin for TickTick",
"author": "thesamim",
"authorUrl": "https://github.com/thesamim/ultimate-ticktick-sync-for-obsidian.git",
"authorUrl": "https://github.com/thesamim/TickTickSync-for-obsidian.git",
"fundingUrl": "",
"isDesktopOnly": false
}
Loading

0 comments on commit a8dea7f

Please sign in to comment.