Dragging URLs to Research

User avatar
em
Posts: 36
Joined: Fri May 18, 2007 2:36 am
Location: Somavarr
Contact:

Thu Jun 12, 2008 6:43 pm Post

I'd like to see the URL that I drag into Scrivener automatically assigned the Title of the page, instead of "Web page." I'm doing a lot of research for the book I'm writing and it's cumbersome to switch back and forth between Safari and Scrivener to name things.

User avatar
KB
Site Admin
Posts: 20901
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jun 12, 2008 6:58 pm Post

Hi,

This has come up a number of times and the answer is that I'm afraid it cannot be done. When a URL is dragged, only the URL itself is put on the pasteboard; it does not provide Scrivener with the title of the web page, so Scrivener has no way of knowing it. It is easy enough to add a title manually, although it does take an extra step.

All the best,
Keith

User avatar
em
Posts: 36
Joined: Fri May 18, 2007 2:36 am
Location: Somavarr
Contact:

Thu Jun 12, 2008 7:43 pm Post

Keith,
That's interesting. I'm a Together http://reinventedsoftware.com/together/ user and importing URLs converts the file name to the URL so I guess I thought it was part of OS X.

Also, sorry for asking what I thought would be a redundant feature request. I tried searching for "Research Link" but was prevented from doing so because the words were too common!

User avatar
KB
Site Admin
Posts: 20901
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jun 12, 2008 7:45 pm Post

No problem. Yes, other users have said that Together does it somehow, but I have no idea how. I've searched developer forums about this and everyone says it can't be done! Unless there is some private drag type that Safari and other browsers post on the paste board other than the URL type that does provide this information... I don't know. I'll look into it further, though.
Best,
Keith

si
signinstranger
Posts: 268
Joined: Sun Oct 21, 2007 4:15 pm
Platform: Mac
Location: Germany

Fri Jun 13, 2008 6:15 am Post

I don't understand this? When I drag a URL from Safari into a Scrivener document, I get the web page title as a hyperlink. When I drag the same URL into the research folder, Scrivener loads the page, but it can't retrieve the title? I don't know much about Cocoa, but Google found this here.

If everything fails, you can always resort to Méthode Traditionelle: :wink:

Code: Select all

curl -s -r 0-1000 http://www.literatureandlatte.com | grep -e "<title>"

User avatar
KB
Site Admin
Posts: 20901
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Sat Jun 14, 2008 12:01 pm Post

Okay smart arse, give me your full name so I can put a credit to you in the About panel. :) I had somehow missed this method in all my searches for how to do this. D'oh!

So, ahem, the next update now attempts to get the web page title for imported web pages. (Note, however, that it still will not be able to get the title for pages dragged directly into the References pane. Because the References pane doesn't import the pages, it doesn't load the whole page into memory which is what would be required to get the title - overkill for the references area as in most cases the wait for the page to load would be slower than typing in a title yourself.)

Best,
Keith

si
signinstranger
Posts: 268
Joined: Sun Oct 21, 2007 4:15 pm
Platform: Mac
Location: Germany

Sat Jun 14, 2008 5:29 pm Post

KB wrote:Okay smart arse, give me your full name so I can put a credit to you in the About panel.

:oops:
...the References pane doesn't import the pages, it doesn't load the whole page into memory which is what would be required to get the title...

Ok, here's some more of my smart arsery :wink: Is it really necessary to load the page? This
here looks as if the the title of the URL is on the pasteboard, or is this for something else? I mean, when I drag a URL from Safari onto the desktop, the title of the page becomes the filename of the .webloc file, so the title has to be on the pasteboard, right? :?

User avatar
KB
Site Admin
Posts: 20901
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Sat Jun 14, 2008 6:27 pm Post

Is "Malte Rosenau" in the credits correct? :oops:

si
signinstranger
Posts: 268
Joined: Sun Oct 21, 2007 4:15 pm
Platform: Mac
Location: Germany

Sun Jun 15, 2008 6:51 am Post

Yep :D

User avatar
em
Posts: 36
Joined: Fri May 18, 2007 2:36 am
Location: Somavarr
Contact:

Sun Jun 15, 2008 3:18 pm Post

You guys rock.