I am updating Links in CDpedia that that did not transfer from my previous DB app's XML export. I love the ability to be able to drag a URL from Safari and then drop it on the Details view to automatically create a hyperlink in the current album. However, it would be nice to have the web page's title automatically be entered in the Link's Name field.
To illustrate this, here is a step by step example.
1. Launch both CDpedia and Safari.
2. In Safari, open this URL: http://www.stevemillerband.com
3. Drag and drop this URL from Safari to the Desktop. Note that link filename is "Steve Miller Band Official Site".
4. Now drag and drop this same URL from Safari to the Details view of any album in CDpedia.
Note that the link name in CDpedia is "stevemillerband" instead of "Steve Miller Band Official Site".
Would it be possible to implement this? It would save me a lot of editing. I know that some of the web page titles can be quite verbose but I do not encounter these as often.
UPDATE
I have discovered that with some sites the title does get picked up. These sites seem to be using PHP for the pages.
The following URL is an example.
http://www.mountainrockband.com/main.php
All Apps - Link Name Match Web Page Name
Re: All Apps - Link Name Match Web Page Name
Thanks for the exact details, it makes understanding the feature enhancement easy as well as testing.
It was not originally done, as all that CDpedia gets from thee drag information is the actual URL and not access to the title of the page. Means that CDpedia had to request the page again, but I have figured out how to get the caching system in Safari to kick in and it should be fairly fast to request that info again. The beta version will now us the title information from the page as the name.
Since it's not done in the background (for code simplicity sake), I have set a timeout to 3 seconds (should be more then plenty for 99% of sites).If it's a very complex page that the cache system can't kick in and load under 3 seconds you might get the old behavior of getting the domain as the name.
Thanks for suggestion.
It was not originally done, as all that CDpedia gets from thee drag information is the actual URL and not access to the title of the page. Means that CDpedia had to request the page again, but I have figured out how to get the caching system in Safari to kick in and it should be fairly fast to request that info again. The beta version will now us the title information from the page as the name.
Since it's not done in the background (for code simplicity sake), I have set a timeout to 3 seconds (should be more then plenty for 99% of sites).If it's a very complex page that the cache system can't kick in and load under 3 seconds you might get the old behavior of getting the domain as the name.
Thanks for suggestion.
Re: All Apps - Link Name Match Web Page Name
Thanks Connor! This is such a time saver. I'm almost done all my artist URLs.
I have noticed a few site with odd behaviours as you had mentioned. It would seem to be with dashes, apostrophes, ampersands and characters with accent but the majority of sites were OK with these. Here some URLs that were problematic. I understand that there are scenarios where no fix can be found. But this implementation does truly saves a tremendous amount of Link Name edits. Well done.
http://www.progquebec.com/nouvellefrontiere.html
http://www.robertplant.com/
http://www.ronstadt-linda.com/
http://seal.com/
http://tommyshaw.net/wp/
http://www.simonandgarfunkel.com/
http://www.thehip.com/
http://www.u2.com/index/home
http://www.suzannevega.com/
http://www.viscerasrecital.com/
I have noticed a few site with odd behaviours as you had mentioned. It would seem to be with dashes, apostrophes, ampersands and characters with accent but the majority of sites were OK with these. Here some URLs that were problematic. I understand that there are scenarios where no fix can be found. But this implementation does truly saves a tremendous amount of Link Name edits. Well done.
http://www.progquebec.com/nouvellefrontiere.html
http://www.robertplant.com/
http://www.ronstadt-linda.com/
http://seal.com/
http://tommyshaw.net/wp/
http://www.simonandgarfunkel.com/
http://www.thehip.com/
http://www.u2.com/index/home
http://www.suzannevega.com/
http://www.viscerasrecital.com/
Re: All Apps - Link Name Match Web Page Name
Thank you for all the edge cases. I should have expected that some sites would go old school on me and use the old HTML encoding instead of UTF8. Luckily I have a my own function to deal with this encoding, so ran the title through that and it fixed most of the issue, again in the beta.
Re: All Apps - Link Name Match Web Page Name
Wow! Another leap. Re-entered the links from my last post and all is good.
Just finished my artist URLs. I only encounter one other link that worked on the desktop but not in CDpedia. Funny how finicky some of these sites can be. Here is the URL for your review.
http://www.thewaroftheworlds.com/
Just finished my artist URLs. I only encounter one other link that worked on the desktop but not in CDpedia. Funny how finicky some of these sites can be. Here is the URL for your review.
http://www.thewaroftheworlds.com/
Re: All Apps - Link Name Match Web Page Name
Thank you, that one is harder to fix. If you run into several more let me know, but I think that one is just a very rare edge case.