BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

Notes with identical titles overwrite during export of folder #3305

Open arcturus140 opened 4 years ago

arcturus140 commented 4 years ago

Current behaviour

Currently, notes in a folder containing the same title are being overwritten in the exported output with the operation "Export Folder -> Export as md".

Expected behaviour

All notes in a folder are exported as Markdown.

Steps to reproduce

  1. create three notes in the same folder
  2. choose Export Folder -> Export as md
  3. only one out of three notes are created in the export location
MNWE used to illustrates the issue: (3 notes) # Markdown Note to Export 1st note. # Markdown Note to Export 2nd note. # Markdown Note to Export 3rd note.

Important: Note that all 3 notes have the same title.

Environment

arcturus140 commented 4 years ago

one could, additionally, validate the export and create a user notification: #3306. (I closed it for now but could be reopened on interest).

Flexo013 commented 4 years ago

We could export duplicate named files with _(1) appended and increment if we find more.

I like the idea of #3306! I can't think of a reason that we don't want such a warning.

arcturus140 commented 4 years ago

We could export duplicate named files with _(1) appended and increment if we find more.

Boostnote already has functions defined that implement that behaviour.

Flexo013 commented 4 years ago

Nice! Then fixing this export overwrite problem should be fairly simple.

Jongkeun commented 4 years ago

We could export duplicate named files with _(1) appended and increment if we find more.

Boostnote already has functions defined that implement that behaviour.

@arcturus140 , where is the function? I tried to find the function in Boostnote program operation and code, but I couldn't. I hope to contribute to this issue. Would you mind if you let me know where it is? If you can't find it too, I will make another function or import other opensource. Thanks 👍

arcturus140 commented 4 years ago

@Jongkeun I am sorry I couldn't. I know I've seen it but it has been a while.

arcturus140 commented 4 years ago

I think it has changed...

Jongkeun commented 4 years ago

No problem, thanks for checking out.

daiyam commented 4 years ago

@arcturus140 the PR #2612 is fixing this issue.