Suggestions: Link validation and automatic naming

I use a bike document of increasingly questionable size to prepare for an exam. In the process, I also link numerous pdf documents on my Mac, which works great.

Two ideas:

  • When I drag a document to Bike, I get e.g. the link file:///Users/Standard/Papers/Guillain-Barre%CC%81-Syndrome/van%20den%20Berg%20-%20Guillain-Barre%CC%81%20syndrome%20-%20pathogenesis,%20diagnosis,%20treatment%20and%20prognosis%20(2022).pdf It would be nice if Bike would offer here to automatically adjust the title of the link to the file name → van den Berg - Guillain-Barré syndrome - pathogenesis, diagnosis, treatment and prognosis (2022).
  • Link validation would be helpful. Marked 2 has the feature validate external links which shows you which links are broken. If a link to a local file is broken, search for the file location would be helpful.

Regards,
Chris

Hi Chris, good ideas, have you checked out Hookmark? I know its a separate little helper application (and purchase) but it is just so useful, it will format the name of the link correctly and also the link generated is robust, meaning even if you move the item, the link still reveals it. Something to consider, good luck with your exam.

Thanks!

I tried Hookmark twice, but couldn’t get used to it.

I agree that’s probably better, though it’s also a little problematic. macOS already has a standard way to communicate that a dragged URL has an associated name. A name associated with public.url-name is put on the drag pasteboard. For example if you drag a message from Mail.app or a URL from Safari Address bar then Bike will insert the URL behind the associated name.

Files dragged from the finder don’t have that, so that’s why the full url is inserted. Still it does seem like file URLs are maybe a special case and I can just assume people would like to see just the filename.

I’m adding to my list.

This could also make sense, but also looks like it might be a never ending project. I can validate file links (assuming there are not sandbox issues that would make life hard), but then URL links gets a little more tricky, and then all the custom link types Mail, etc, not sure how to handle. So I agree this could be useful, I probably don’t do soon.

You might be able to do just the validations that you are interested in AppleScript. Here’s a start that will loop through your Bike outline and find all the links:

tell front document of application "Bike"
	repeat with eachRow in rows
		repeat with eachRun in (attribute runs of (text content of eachRow))
			set eachLink to link of eachRun
			if eachLink is not missing value then
				log eachLink
			end if
			set eachViewLink to view link of eachRun
			if eachViewLink is not missing value then
				log eachViewLink
			end if
		end repeat
	end repeat
end tell
1 Like