Skip to content

Instantly share code, notes, and snippets.

@varenc
Last active November 12, 2020 03:07
Show Gist options
  • Save varenc/b57d6474c4b288df09a58c50fb99693d to your computer and use it in GitHub Desktop.
Save varenc/b57d6474c4b288df09a58c50fb99693d to your computer and use it in GitHub Desktop.
Broken docs: 50% of apple.com links in macOS manpages are broken

Broken docs: Nearly 50% of apple.com links in macOS manpages are broken

A list of 25 apple.com/... URLs was extracted from /usr/share/man. Nearly half of them are now broken links. Links pointing to developers.apple.com in particular are often broken. (9 out 19, or ~47%)

Here's the list of just the broken URLs:

method

extract urls from manpages:

$ ag --nofilename --only-matching "https?://.*apple\.com/[-A-Za-z0-9\+&@#/%=~_|\.]*"  /usr/share/man | sed 's/http:\/\//https:\/\//g' | sed 's/\.$//g' | sort | uniq > /tmp/apple-manpage-urls.txt
$ cat /tmp/apple-manpage-urls.txt
https://developer.apple.com/bonjour/
https://developer.apple.com/darwin/projects/bonjour/
https://developer.apple.com/darwin/projects/opendirectory/
https://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/index.html
https://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/index.html
...

check the status of each URL (following redirects)

$ for i in $(cat /tmp/apple-manpage-urls.txt ); do echo -n "$i ===> "; curl -L -o /dev/null --silent --head --write-out '%{http_code}\n' "$i"; done
https://developer.apple.com/bonjour/ ===> 200
https://developer.apple.com/darwin/projects/bonjour/ ===> 404
https://developer.apple.com/darwin/projects/opendirectory/ ===> 404
https://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/index.html ===> 404
https://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/index.html ===> 404
https://developer.apple.com/documentation/corefoundation/cfpropertylist ===> 200
https://developer.apple.com/documentation/mac/IAC/IAC-361.html ===> 404
https://developer.apple.com/documentation/os/logging ===> 200
https://developer.apple.com/downloads/ ===> 403
https://developer.apple.com/hardwaredrivers/ve/downloads/vDSP_Library.pdf ===> 404
https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html ===> 200
https://developer.apple.com/library/content/technotes/tn2004/tn2123.html ===> 200
https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html ===> 200
https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/vImage/Introduction/Introduction.html ===> 200
https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/vecLib/Reference/reference.html ===> 200
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html ===> 200
https://developer.apple.com/performance/accelerateframework.html ===> 200
https://developer.apple.com/referencelibrary/Networking/ ===> 404
https://developer.apple.com/sdk/ ===> 404
https://support.apple.com/kb/PH18756 ===> 404
https://www.apple.com/ ===> 200
https://www.apple.com/DTDs/PropertyList-1.0.dtd ===> 200
https://www.apple.com/publicsource ===> 200
https://www.apple.com/support ===> 200
https://www.opensource.apple.com/apsl/ ===> 200
https://developer.apple.com/bonjour/
https://developer.apple.com/darwin/projects/bonjour/
https://developer.apple.com/darwin/projects/opendirectory/
https://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/index.html
https://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/index.html
https://developer.apple.com/documentation/corefoundation/cfpropertylist
https://developer.apple.com/documentation/mac/IAC/IAC-361.html
https://developer.apple.com/documentation/os/logging
https://developer.apple.com/downloads/
https://developer.apple.com/hardwaredrivers/ve/downloads/vDSP_Library.pdf
https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html
https://developer.apple.com/library/content/technotes/tn2004/tn2123.html
https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html
https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/vImage/Introduction/Introduction.html
https://developer.apple.com/library/mac/#documentation/Performance/Conceptual/vecLib/Reference/reference.html
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html
https://developer.apple.com/performance/accelerateframework.html
https://developer.apple.com/referencelibrary/Networking/
https://developer.apple.com/sdk/
https://support.apple.com/kb/PH18756
https://www.apple.com/
https://www.apple.com/DTDs/PropertyList-1.0.dtd
https://www.apple.com/publicsource
https://www.apple.com/support
https://www.opensource.apple.com/apsl/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment