OliverCi / freeplane2md

Convert Freeplane mind maps into Markdown format
GNU Lesser General Public License v2.1
19 stars 3 forks source link

Prevent erroneous overwrites of target files #13

Closed OliverCi closed 1 year ago

OliverCi commented 1 year ago

Prevent erroneous overwrites of Markdown files, which have already been manually edited, after they were converted using freeplane2md.

When converting, Insert a diagnostic HTML comment with a timestamp. Do not overwrite an existing target file, if its modification time is newer than the timestamp; instead exit with a message.

New command line options: --no-timestamp: Do not insert the HTML timestamp comment.
-n --no-clobber: Prevent from overwriting an existing target file in any case, even if it does not contain a timestamp comment. -f --force: Force overwriting the target file anyway.