epwalsh / obsidian.nvim

Obsidian 🤝 Neovim
Apache License 2.0
4.15k stars 189 forks source link

Add attachments other than images, e.g. PDFs #624

Open msundin opened 4 months ago

msundin commented 4 months ago

🚀 The feature, motivation and pitch

Possibility to add other attachments than images. E.g. PDFs etc.

I.e. like :ObsidianPasteImg [IMGNAME] but for PDFs etc.

I guess the PDF cannot be in the clipboard though so some other solution needed to add the PDF.

Alternatives

No response

Additional context

No response

ibash commented 4 months ago

Generic attachment support would be awesome. On macos if you cmd-c a file in finder then the clipboard gets written with the path of the file under public.file-url. Detecting that and copying the file into attachments + linking it would be excellent.

Screenshot 2024-06-18 at 9 40 24 AM
LarsZauberer commented 2 months ago

I think also a good idea would be to implement something similar to the command browse_media from Telekasten.nvim.

It would also be a great idea to try reimplement a behavior similar to the real Obsidian App with references to certain sections in a pdf text. For example: [[Script Analysis.pdf#page=74&selection=212,0,318,1|Script Analysis, page 74]] gets resolved to a certain text passage in the pdf and can be opened in any pdf tool. Unfortunately, from what I have seen the selection property of the link is something built by Obsidian.

hwamil commented 2 weeks ago

This would be a great feature