obsidian-markmind
obsidian-markmind copied to clipboard
[Feature request] Support for PDFs via File:// , HTTP:// and HTTPS://
I used a third-party tool to manage PDFs I do not want to duplicate them by having a copy in Obsiden.
I noticed that one of the other annotation plugins supported HTTP(s) it would download the PDF each time it was required, all the data is stored in a note as JSON same as your plugin.
This allowed me to use a PDF source such as
http://localhost:8000/Stuff%20To%20Sort/PDF/21844.pdf
It would be great if MarkMind can also do this e.g
annotate-target: http://localhost:8000/Stuff%20To%20Sort/PDF/21844.pdf
You could also support file:// and point to files outside of the Obsidian vault but on the same machine or mounted network share.
Currently, file
is supported , support for file://absolute pdf path
http(s)
is not support
@MarkMindCkm
Currently,
file
is supported , support forfile://absolute pdf path
I cannot get this to work
---
mindmap-plugin: rich
annotate-target: file:///Volumes/NAS/Books/Mathematics/writing/How%20to%20Write%20Mathematics.pdf
annotate-type: pdf
---
I get file not found
However, loads fine in the browser (safari)
@MarkMindCkm
Currently,
file
is supported , support forfile://absolute pdf path
I cannot get this to work
--- mindmap-plugin: rich annotate-target: file:///Volumes/NAS/Books/Mathematics/writing/How%20to%20Write%20Mathematics.pdf annotate-type: pdf ---
I get file not found
However, loads fine in the browser (safari)
the reason is %20
,please use space
---
annotate-target: file://D:test/math test.pdf
annotate-type: pdf
---
@MarkMindCkm
Yes that does get around the issue thanks
However, I think the way other apps copy and paste including how Obsidian handles uri/url encodings it should be able to parse and use codes such as %20
as well.
encode
let encURI = encodeURI("file://w3docs/this is a test!/test.txt");
console.log(encURI);
> file://w3docs/this%20is%20a%20test!/test.txt
decode
let decURI = decodeURI("file://w3docs/this%20is%20a%20test!/test.txt");
console.log(decURI);
> file://w3docs/this is a test!/test.txt
or decoding mixed
let decURI = decodeURI("file://w3docs/this is a%20test!/test.txt");
console.log(decURI);
> file://w3docs/this is a test!/test.txt
These functions also work with HTTP(S) URLs
@MarkMindCkm
Yes that does get around the issue thanks
However, I think the way other apps copy and paste including how Obsidian handles uri/url encodings it should be able to parse and use codes such as
%20
as well.encode
let encURI = encodeURI("file://w3docs/this is a test!/test.txt"); console.log(encURI); > file://w3docs/this%20is%20a%20test!/test.txt
decode
let decURI = decodeURI("file://w3docs/this%20is%20a%20test!/test.txt"); console.log(decURI); > file://w3docs/this is a test!/test.txt
or decoding mixed
let decURI = decodeURI("file://w3docs/this is a%20test!/test.txt"); console.log(decURI); > file://w3docs/this is a test!/test.txt
These functions also work with HTTP(S) URLs
I will add this feature