Bulk hyperlink testing
-
- Posts: 3
- Joined: Sun Feb 17, 2019 7:34 pm
Bulk hyperlink testing
I have an online post on Wordpress that was written in OpenOffice Writer and is about 130 pages long. Each page averages 2 to 3 hyperlinks to source material. It is in HTML on Wordpress. The links work fine unless some of the linked material goes away, which happens. What I'd like to see is a one step process to find any links that are no longer valid. Simple, no?
OpenOffice 4.1.5 Win 10
Re: Bulk hyperlink testing
Take a look here: https://validator.w3.org/checklink
Openoffice4.16 on windows 10 Libreoffice Version: 6.1.3.2 (x64)
Re: Bulk hyperlink testing
Or try this web search
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
-
- Posts: 3
- Joined: Sun Feb 17, 2019 7:34 pm
Re: Bulk hyperlink testing
Thanks to both of you. I'll need to experiment some. But a process built into Writer should be preferable.
OpenOffice 4.1.5 Win 10
Re: Bulk hyperlink testing
If all the links are in the bodytext of a text document opened in Writer, I would use something like the little Sub posted below. If you also need to treat hyperlinks anchored to TexPportions in cells of TextTables or in TextFrames, it's a bit more complicated.
===Edit 2019-02-18 01:42 (UCT + 1)===
I had to rectify the code a bit. The " h = ..." and the inner IF were not correctly placed. In consequence a "End If" was missing
(A short test of the Sub was done with LibO V 6.2.0.3 and with AOO V 4.1.5.)
Code: Select all
Sub showRemoveDeadLinks()
theDoc = ThisComponent
theBodyText = theDoc.Text
For each para In theBodyText
For Each piece In para
hlU = piece.HyperLinkURL
If hlU<>"" Then
h = FileExists(hlU)
If NOT h Then
piece.String = "[" & piece.String & "(" & hlU & ")dead" &"]"
piece.HyperLinkURL=""
End If
End If
Next piece
Next para
End Sub
I had to rectify the code a bit. The " h = ..." and the inner IF were not correctly placed. In consequence a "End If" was missing
(A short test of the Sub was done with LibO V 6.2.0.3 and with AOO V 4.1.5.)
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
-
- Posts: 3
- Joined: Sun Feb 17, 2019 7:34 pm
Re: Bulk hyperlink testing
I tried 3 tools found online. All of them test the html, not the source document. So on a site like wordpress it tests their stuff too. Several extraneous errors there. Here's my review.
**validator3 was very thorough, even identified redirected links. It gives the html line number and the bad link.
**Gizmo's "Best free website link checker" is a downloadable exe. It did not identify any link problems.
**www.deadlinkchecker.com/website-dead-link-checker.asp is my favorite. Very fast and identifies bad links and the hyperlinked text. Did not identify redirects.
**validator3 was very thorough, even identified redirected links. It gives the html line number and the bad link.
**Gizmo's "Best free website link checker" is a downloadable exe. It did not identify any link problems.
**www.deadlinkchecker.com/website-dead-link-checker.asp is my favorite. Very fast and identifies bad links and the hyperlinked text. Did not identify redirects.
OpenOffice 4.1.5 Win 10
Re: Bulk hyperlink testing
I'd be surprised to learn that Wordpress doesn't have a plugin to check for this built by someone in the community.
Yes; here's the first one that came up in my Google search: https://wordpress.org/plugins/broken-link-checker/
Yes; here's the first one that came up in my Google search: https://wordpress.org/plugins/broken-link-checker/
LibreOffice 6.0.7.3 on Ubuntu 18.04.1 LTS