alanvardy / tod

An unofficial Todoist command line client written in Rust
MIT License
105 stars 9 forks source link

Bulk import tasks #365

Open alanvardy opened 1 year ago

alanvardy commented 1 year ago

This could be a

tod task import /path/to/file.md

And then the file could be in format

- This is a main task p1
 - This is a subtask p2
- This is another task

And then the user is prompted for which project they should be inserted into

Maybe we could get a little crazy and also find or create the project as well?

# ProjectOne

- This is a main task p1
 - This is a subtask p2
- This is another task

# ProjectTwo

- This task is in another project
stacksjb commented 1 year ago

I love this, as I regularly import tasks.

Lots of powerful options here: 1) Import a list of tasks to a specific project? 2) Do we want to create each line by quickadd, or parse them? 3) Do we want to require it in a specific format (such as JSON or CSV?) for more complex options?

I like these two options:

1) Import plaintext or markdown list tasks as line-by-line as detailed above (short term easier option) 2) Import CSV or JSON for more complex task creation in some sort of predefined format. (long term more powerful option)

That said, is there a specific need here the Todoist app doesn't support? I don't love the todoist import template but it seems to work OK, so this might be an area we avoid duplicating existing functionality (or just allow the basic import functionality)

alanvardy commented 1 year ago

I think that Todoist has an excellent "complex" CSV import option, and maybe we can just support the simple case.

Would you consider using this? How about you @titoOdUA ? I do have situations where I have a list of tasks in my text editor and would love to just select them and use a command to pipe them straight into Todoist... but I wouldn't say that this is a critical feature for me.

stacksjb commented 1 year ago

I like this suggestion. I currently copy/paste delimited lists (1 per newline) into Todoist as tasks. I would use an import feature.

BobToninho commented 1 year ago

I would start by adding a simple-as-possible plaintext bulk import. No markdown, no lists. Just a line by line import, every line is a task. This would give us a foundation on the import logic, with the possibility to extend it in the future

stacksjb commented 1 year ago

Let's do that, then spawn another request for subtasks.

From what I can tell, we don't really specifically support subtasks at the moment anyway (just treat them as another/regular task) so that's a future item.

BobToninho commented 1 year ago

I will start working on this (if Alan agrees on my solution) then!

alanvardy commented 1 year ago

I like it! I really appreciate you guys putting so much thought into it :+1: