mhoeher / opentodolist

A simple Todo and task management application - Mirror of https://gitlab.com/rpdev/opentodolist
https://opentodolist.rpdev.net
GNU General Public License v3.0
161 stars 12 forks source link

Export Notes and todo to Markdown or txt #54

Open uGeek opened 2 years ago

uGeek commented 2 years ago

The note-taking mode is great to me, being able to take lots of little notes within a main note is a great idea.

I use Opentodolist to collect information that I will later publish on my blog, but to export all that information, it is very tedious to do it by copying and pasting.

Would there be the possibility of being able to implement the power to export a note and subnotes in Markdown or txt format? It would be that being inside that note, to be able to export it to Markdown or txt.

Thank you very much and great application. congratulations

mhoeher commented 2 years ago

Hi @uGeek,

thanks for raising this issue! In fact, there already is an "export" (or better: save as...) functionality available: There is a "Save" button next to each note (which is also possible for notes collected within a todo list, todo or image). Using it will bring up a dialog where you can select a file to write the note text to.

image

Note that this functionality is currently only available on "desktop" systems (Windows, Linux, macOS) but not mobile platforms like Android and iOS.

Does this somehow solve what you had in mind? Or, do you rather want to export all the pages within a "note book" into a single file? Implementing this should be rather simple as well. However, then we would need to think about how to combine several notes into a single markdown file.

uGeek commented 2 years ago

I meant to export all NEW PAGE in a Markdown file

The main TITLE could be the H1 header and H2 NEW PAGE

Exporting all the notes of a book in Markdown as you comment, would also be very nice.

I could export all the notes as I have commented before, each note in a markdown file within the chosen directory

uGeek commented 2 years ago

imagen

When you export a task, the task list is not exported or if there is a sublist of tasks. The export of the image looks like this:

# NEW TODO

New Todo
huste commented 2 years ago

Adding myself to this thread, since I created a nested TODO list that I am using as template for my vacation checklist. And whenever I am going on vacation, I copy the template and work on that copy (removing items I don't need this time and ticking those I already packed).

I'd wanted to create an "offsite" backup just in case, I mess up the original template and used the export feature. All I ended up with was, as @uGeek wrote, a file with a single line

Vorlage Urlaub

(instead of a complete nested file)

That said, I reckon, the export feature is not meant to act as text file which also can be reimported to create a todo list again? Also, is there a way to make a note/todo list read only? My use case would be the template for check lists which I only want to remove or edit when I really want it unlocked. When it's locked, the only thing it sould do is allow to be unlocked or copied.

uGeek commented 2 years ago

During this week I was thinking the same thing that says @huste . Exporting as import notes in markdown would be a great solution. Maybe you are using another application and could import all your notes to OpenTodoList.

I also have a vacation list. I thought about the possibility of importing it into OpenTodoList but it is very hard work. I'd rather leave it in the application I'm using now than write the whole list again

It would be great to export all the notes from a book to a directory, as well as import all the markdown from the directory to a book.

huste commented 2 years ago

I won't be creating my vacaion checklist on Android. I created it in OpenTodoList on Windows, which works quite fast. And I just copied it to another todo list which I am working on on my Android device. Works quite fine.

mhoeher commented 2 years ago

Uff... that are quite some different requirements in one issue now :wink: Let me dissect this a bit:

  1. The current "export" feature is basically just a way to save the notes of an item (or one of the pages in a note book) to a file on disk. No additional ado included.
  2. It would be possible to implement a more sophisticated export, which e.g. contains also child items (when exporting a todo list or a note book). However, this also is not trivial: The export would also contain the notes within the included items. The notes in turn can contain headings - and these might then interfere with the ones that are added by OpenTodoList itself for e.g. the item titles. So the export would need to parse the notes and intelligently adapt them as needed. So this alone would probably need a bit of time for getting it implemented.
  3. Now regarding import... this also is not a too trivial thing, especially when importing from a format like Markdown. There are various flavours of Markdown out there, and the format one tool produces might not necessarily be consumable (entirely) by another. So such an import could be at most on an best effort base. Ideally, if you would have some example outputs from tools you would like to import from, let me know :wink:
  4. Last but not least: Backup copies and read only mode. I would actually rather prefer to avoid the latter; this creates some complications. What in turn could be rather easy to implement is the backup feature. OpenTodoList could provide a way to copy an item (including all child items) in a suitable exchange format (e.g. JSON). This format could be saved somewhere and easily imported into the app later at any point.

Would be great if you could let me know if you agree with these points/steps and - if not - provide additional input. Thanks!

huste commented 2 years ago

I see. As for 1-3, I can understand that.

  1. The read-only idea came to my mind because I usually don't want to edit a template accidentally. Currently, I am using lilac for templates. And as there's no read-only or protection feature, I was thinking of an export possibility as kind of backup. So feel free to decline any of those suggestions. As far as I'm concerned, I can live with the coloring idea quite well.
mhoeher commented 2 years ago

Hi @huste, thanks for your feedback! Maybe also @uGeek could add some thoughts. I'll be on vacation for the following two weeks, hence, probably I'll have no chance to work on this. Once I'm back, I'll try to phrase some (more specific) issues over on GitLab to work on your suggestions.

DamageIncorporated commented 5 months ago

Checking in here as I just now realized I could very well use an export/import feature for a List with all nested Items, so I would prefer the JSON-Route that you, @mhoeher pointed out in (4).

My (unusual) usecase is the newspaper delivery job I mentioned in issue #94 that you have solved in a great way in the meantime, thank you for that! Saves me hours of clicking every week :-)

With an per-list import/export feature I would be able to share single lists (read: delivery districts) with colleagues who do a specific district after me. This way the information I collected during my work would not be lost if another person steps in.

mhoeher commented 5 months ago

Hi @DamageIncorporated,

thanks! Yeah, I think for use cases like yours, such a feature definitely would make sense. I created a ticket on GitLab to track progress on that: https://gitlab.com/rpdev/opentodolist/-/issues/649

Feel free to add further comments and ideas there. I cannot promise when this will come (I am currently a bit underwater with work, both professionally and in my private life, so please bear with me if this will not come anytime soon).