Frankenstein
frankenstein
checks for live URLs in a file, it can update links based on HTTP redirects in a README
This project uses awesome_bot
to validate links.
Installation
git clone https://github.com/dkhamsing/frankenstein.git
cd frankenstein
rake install
Usage
$ frankenstein https://fastlane.tools # URL
$ frankenstein README.md # Path to file
$ frankenstein ccgus/fmdb # GitHub repo README, https://github.com/ccgus/fmdb works too
Found: master for ccgus/fmdb β A Cocoa / Objective-C wrapper around SQLite β 8935βοΈ β last updated today
π Processing links for ccgus/fmdb ...
π Checking 18 links
β
https://www.zetetic.net/sqlcipher/
β
http://sqlite.org/
β
https://cocoapods.org/
β
https://github.com/marcoarment/FCModel
β
https://github.com/layerhq/FMDBMigrationManager
#...
π Time elapsed: 4.07 seconds
π No failures for ccgus/fmdb
β
200 ok
πΆ 3xx redirect
π΄ 4xx error
βͺ white list / other
Correct GitHub README Redirects
frankenstein
can open a pull request to update README links based on HTTP redirects (this requires credentials set in .netrc).
$ frankenstein fastlane/sigh
Finding default branch for fastlane/sigh
Found: master for fastlane/sigh β Because you would rather spend your time building stuff than fighting provisioning β 864βοΈ β last updated 8 days ago
π Processing links for https://raw.githubusercontent.com/fastlane/sigh/master/README.md ...
π Checking 21 links
πΆ 301 https://github.com/KrauseFx/fastlane
πΆ 301 https://github.com/KrauseFx/deliver
#...
πΆ 10 redirects
https://github.com/KrauseFx/fastlane redirects to
https://github.com/fastlane/fastlane
#...
Next? (pull request | white list w=<s1^s2..> | gist | tweet [-h] [message] | enter to end) p
Creating pull request on GitHub for fastlane/sigh ...
Pull request created: https://github.com/fastlane/sigh/pull/195
White List
-
URLs that are meant to be redirected (i.e. URL shortener, badge, authentication) are white listed and not corrected.
-
You can also white list links at the end of a run with option
w
.
$ frankenstein dkhamsing/forker
Finding default branch for dkhamsing/forker
Found: wip for dkhamsing/forker β Fork GitHub repos found on a page β 0βοΈ β last updated today
π Processing links for dkhamsing/forker ...
π Checking 10 links
β
https://github.com/opensourceios
#...
πΆ 1 redirect
http://gph.is/1768v38 redirects to
http://giphy.com/gifs/loop-factory-how-its-made-n1JN4fSrXovJe
#...
π Time elapsed: 2.56 seconds
π No failures for dkhamsing/forker
Next? (pull request | white list w=<s1^s2..> | gist | tweet [-h] [message] | enter to end) w=gph
#...
Contact
License
This project is available under the MIT license. See the LICENSE file for more info.