Skip to content

[IDEA] - setting for default location of your PDFs so you don’t have to add full path each time #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GitMurf opened this issue Aug 30, 2021 · 18 comments
Labels
enhancement New feature or request

Comments

@GitMurf
Copy link

GitMurf commented Aug 30, 2021

Would be cool to have a setting you can store the default location of your PDFs in vault so you can give the name of the pdf as the annotation-target as opposed to needing to add the full path each time.

For example my PDFs all go into my attachments folder.

@elias-sundqvist elias-sundqvist added the enhancement New feature or request label Aug 30, 2021
@elias-sundqvist
Copy link
Owner

I took some creative liberties with this suggestion.
The next release will include an option like this:
image

Also, the annotation target will be treated similarly to an obsidian link, so if you write the name of a pdf, the plugin will find the pdf regardless of where in the vault it is placed.

@GitMurf
Copy link
Author

GitMurf commented Aug 31, 2021

@elias-sundqvist wait a sec!! Are you saying that 1) if I have a PDF in my vault I can just use 'my pdf name.pdf' and it will find it regardless of the location it is stored in my vault? and 2) I can then set the Custom Default Path to a file:/// location on my hard drive outside my vault where I often store alot of my PDFs so that I could do the same thing where only need to say 'my pdf name.pdf' and it would find it if it is in that named path outside my vault?

If so, wow this is PERFECT!!

@GitMurf
Copy link
Author

GitMurf commented Aug 31, 2021

The problem with coming up with great ideas like this is then users get greedy and want more ;-) The way you have it is PERFECTLY sufficient but if you wanted to get crazy it would be cool if you could add multiple locations for the "Custom Default Path" so that you could supply a handful of locations that maybe you keep many of your PDFs in and the plugin would then check each location to see if a match.

Probably don't need to waste time on this now, but would be a cool enhancement for down the road :)

@GitMurf
Copy link
Author

GitMurf commented Aug 31, 2021

If you need a plugin that does something like this allows for user to add multiple items for a particular setting the cMenu plugin has a nice little UI in the settings with a add button and then a delete button for each individual item you add.

image

elias-sundqvist pushed a commit that referenced this issue Sep 1, 2021
@GitMurf
Copy link
Author

GitMurf commented Sep 1, 2021

The default custom path is working great! The only thing to note that got me the first time is that you HAVE to add a trailing "/" on the end otherwise it won't work. It would be nice if you could add a check if there is a trailing slash and if not, add it for the user.

image

@Jopp-gh
Copy link

Jopp-gh commented Sep 7, 2021

I added a link of my remote pdf target folder to Obsidian, and my main pdf folder is not all messy, but has 3 more subfolders for each category..

It would be highly unproductive and unreasonable to put all pdfs into Obsidian own database!

I've seen your plugin is able to display my remote pdfs, so everything should be fine (I'm on a Mac)

@dummifiedme
Copy link

dummifiedme commented Sep 13, 2021

Any support for drive based pdfs?
I keep my files on Gdrive which is synced on my PC. I can provide a location on the PC for this plugin, but it wont be available in the iPad or mobile. Is there a way I can have my gdrive file links work here?

I don't want to keep all my PDF inside the vault as it is synced using git. ANy help?

I did try adding a drive pdf with a link which had "Anyone with the link can edit" permission, but it never loaded in the plugin. This should have worked or there is no way for a drive file to be linked with plugin? :)

@elias-sundqvist

@elias-sundqvist
Copy link
Owner

I'm not sure if there is a way to do this on the ipad.

On the computer, it should be possible to use https://sites.google.com/site/gdocs2direct/home
to get a "direct download link" to the file and use that as an annotation target.

The reason that it probably doesn't work on ipad is that most websites prevent requests from other websites. (This is called CORS)

I've made a workaround for CORS on the desktop, but I'm not sure how to do it on mobile.

Supposedly, there will be a CORS workaround added to the Obsidian API in the future, so maybe I can add support for this then.

Regarding syncing the vault with Git. I do that as well, but I gitignore all non-markdown files. Then I have a "resources" folder in the vault which I sync using google drive. Maybe something similar is possible on Ipad?

@dummifiedme
Copy link

dummifiedme commented Sep 13, 2021

@elias-sundqvist
I don't eactly know about CORS, but yes, I have heard about it in a few plugins. Its okay if it cant be worked out rigt now. :)

Regarding syncing the vault with Git. I do that as well, but I gitignore all non-markdown files. Then I have a "resources" folder in the vault which I sync using google drive. Maybe something similar is possible on Ipad?

I was thinking of the same, but wouldn't the files be non-accesible from the ipad that way too? I mean, on iPad I had been using the Documents app to keep the sync on my pdfs on PC and iPad when I annotate on either side.

How do you manage it? Can you share?

Also, if I annotate my files on my ipad using any app (or hypothesis - no idea how, though), will the highlights be extracted/visible in my obsdian on PC?

@elias-sundqvist
Copy link
Owner

How do you manage it? Can you share?

I use android, so my method might not apply to ios.
On my computer, I use Insync to synchronize the resource folder with a folder in my google drive.
On my phone, I use Termux with a script that runs every 5 minutes to automatically sync the git repo. I also use Autosync for Google Drive to synchronize the resource folder. So both the markdown files and resource folders are up-to-date on both devices.

Also, if I annotate my files on my ipad using any app (or hypothesis - no idea how, though), will the highlights be extracted/visible in my obsidian on PC?

Hypothesis annotations work in a fundamentally different way than regular pdf annotations. In the future, I might be able to add support for exporting your hypothesis annotations to a pdf, but I'm not so sure about the other direction.

Embedded pdf annotations may show up in the hypothesis reader, but you can't really do anything with them.

@dummifiedme
Copy link

dummifiedme commented Sep 13, 2021

I use android, so my method might not apply to ios.

Oh, android is pretty straight forward from the sync perspective, yes. I am stuck with an iPad lol.

Hypothesis annotations work in a fundamentally different way than regular pdf annotations. In the future, I might be able to add support for exporting your hypothesis annotations to a pdf, but I'm not so sure about the other direction.

I see. Exporting isn't an issue. The main thing what I can think of when I mean annotation is to be able to reach right where that highlight is from. Zotero did this too, but too much hassle for me to move to the Zotero workflow. I avoided hypothesis for a long time because of its inablity to support other annotation types. Like drawings or boxes. But reading inside obsidian with links to the highlights is something that attracted me into this plugin :D

Embedded pdf annotations may show up in the hypothesis reader, but you can't really do anything with them.

As for embedded pdf annotations, if there is a way to get a link of all the annotations (at least the text ones) along with the annotations in the plugin, could work out for me or other users who are highlighting the same document on different apps/devices. But this brings me back to the CORS issue which won't even allow me to view my files from drive, lol. I guess this is a deadend for people on ipad :). Zotero route is the only route, I suppose. :(

I can only use git sync on iOS at the moment because WorkingCopy helps in syncing a folder from git server to obsidian's home folder. A complex but workable setup.

@elias-sundqvist
Copy link
Owner

As for embedded pdf annotations, if there is a way to get a link of all the annotations (at least the text ones) along with the annotations in the plugin, could work out for me or other users who are highlighting the same document on different apps/devices.

There's no feature like that right now. Could be an interesting feature request though :)

@dummifiedme
Copy link

There's no feature like that right now. Could be an interesting feature request though :)

Should I go forward and raise it? :D

@elias-sundqvist
Copy link
Owner

Go ahead. Not sure if/when I'll get around to it, but the more feature suggestions the better :)

@Jopp-gh
Copy link

Jopp-gh commented Sep 13, 2021

I'm on a Mac and usually my preferred pdf highlight app is "Skim"

There are no annotations in the sidebar of annotator, but if I hover over my old highlights (made with Skim) in Annotator, then a generic "about" hint of the annotation pops up, in this formatting user-name creation-date creation-time, be for underlined or highlighted text. Interesting.

@dummifiedme
Copy link

There are no annotations in the sidebar of annotator, but if I hover over my old highlights (made with Skim) in Annotator, then a generic "about" hint of the annotation pops up, in this formatting user-name creation-date creation-time, be for underlined or highlighted text. Interesting.

I think that is just the pdf viewer feature. :D

@GitMurf
Copy link
Author

GitMurf commented Sep 13, 2021

From my perspective this initial Issue/Request has been resolved. Should we close this Issue and if others want to open new issues/requests based on the conversation above they can so it can be tracked separately?

@elias-sundqvist
Copy link
Owner

Yes, that sounds reasonable. This discussion is getting a bit sidetracked from the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants