jonjampen / obsidian-xournalpp

Obsidian plugin that seamlessly integrates Xournal++ for handwritten notes and annotations.
https://obsidian.md/plugins?id=xournalpp
GNU General Public License v3.0
19 stars 3 forks source link

Default folder, Automatic Link #4

Closed Susrex closed 1 month ago

Susrex commented 1 month ago

First of all, I love this plugin! It makes integration with XPP so much easier.

Anyway, I might have a couple of ideas to make it even better!

1) New .xopp files (and their .pdf) are created in the root directory of the vault. Could you add an option to specify a directory where to place those? Or have I overlooked it?

2) It would be awesome to have the option to automatically insert a link to the PDF file at the current cursor position.

Thanks for developing this!

jonjampen commented 1 month ago

That's so great to hear, thanks for the feedback!

1. New .xopp files (and their .pdf) are created in the root directory of the vault. Could you add an option to specify a directory where to place those? Or have I overlooked it?

Currently, there are two ways to create a new XOPP file in a specific folder:

  1. By right-clicking on the desired folder in the file explorer and then selecting Create new Xournal++. This will create the file inside that folder.
  2. By using the command or the icon at the top of the file explorer, and then entering the entire file path instead of just the file name. Sadly, there is no fuzzy complete yet, as I have not figured out how to implement that.

I can definitely add an option in the settings where users can set their preferred default folder for new XOPP notes. The new notes will then be created in that folder unless a specific path is entered as described in 1. or 2.. Would that work for you?

2. It would be awesome to have the option to automatically insert a link to the PDF file at the current cursor position

When would you like to insert the link to the PDF? After creating the new XOPP file or using a command that shows a list of all Xournal++ notes and after selecting one, the link to the corresponding PDF will be inserted?

Based on my personal workflow I think that automatically pasting the link on file creation might not be ideal, as often the currently open file, where the cursor is at, has nothing to do with the newly created file.

Thanks again for your suggestions!

Susrex commented 1 month ago

I can definitely add an option in the settings where users can set their preferred default folder for new XOPP notes. The new notes will then be created in that folder unless a specific path is entered as described in 1. or 2.. Would that work for you?

That would be ideal. Thank you!

Based on my personal workflow I think that automatically pasting the link on file creation might not be ideal, as often the currently open file, where the cursor is at, has nothing to do with the newly created file.

I totally understand that:). What about creating new command which in addition to creating the desired .xopp and .pdf file inserts link to current cursor position as well? Something like: Xournal++: Create new note and insert link

jonjampen commented 1 month ago

That's a great idea! I will implement that as soon as possible 👍

Thanks and let me know if you have any more suggestions :)

nikhilCad commented 1 month ago

Xournal++: Create new note and insert link -> Yeah this looks good, its similar to how excalidraw does its commands, moreover, there is this Setting in Obsidian Settings > Files and links, maybe we can respect this setting image

jonjampen commented 1 month ago

Hi @nikhilCad

Thanks for your input! However, I would prefer to implement a plugin setting for the default path instead of using Obsidian's attachments folder. This way, users can customize their file organization and don't have to put attachments and Xournal++ files in the same folder. But users can still set both settings to the same folder if they prefer that arrangement.

jonjampen commented 1 month ago

@Susrex @nikhilCad

I am finalizing the implementation of those two features and will publish a release later today. Let me know if everything works as expected!