motschel123 / Mac-Contact-Sync-Obsidian

GNU Affero General Public License v3.0
9 stars 2 forks source link

FilenamePrefix + Optional heading #5

Open felixchenier opened 9 months ago

felixchenier commented 9 months ago

Hi again @motschel123

Another PR that should be compatible with the other one (those are two distinct features so I didn't want to mix them).

  1. I added a filenameprefix option (e.g., to add a 👤 emoji in front of file name). This is interesting at least for me because I use a flat-folder form where file types are identified by emojis. I know I'm not the only one to use this kind of setup, so it may be interesting for others as well.
  2. I also changed the fullname header to be optional. In my Obsidian setup, I don't put headers in my files because I use the file name as the main header. Since there's an official option for it in Obsidian, I'm pretty sure I'm also not the only one to do so.

Feel free to merge, and if you don't that's also perfectly fine!

Regards,

Felix

motschel123 commented 9 months ago

I see where you coming from with these changes. I will take a look at the code, but I believe that changing the file prefix in between 2 sync, will create a second set of Obsidian files. I'll think of other ways to managing the file names.

felixchenier commented 9 months ago

@motschel123 Yes, you're right. We'd need to set it right, once, forever. But it's the same for the folder name: if you change it, I guess a new folder will be created, duplicating all entries. A way to prevent this duplication would be to batch rename everything just after changing the settings (locate every file using the old setting, and move/rename them using the new setting). It adds complexity for a very rare use case, though. But thanks for considering!

On my side I did the change on a local repository, therefore I don't need you to do it for me, since I already have it.

Many thanks for releasing this wonderful plugin, it's really well crafted and so useful!