Package: liches
Introduction==================In fantasy fiction, a lich is a type of undead creature. (wikipedia_)Liches is used to find dead links in your website so I thought this namewas appropriate (and a nicer explanation than liches stands for LInk CheckerServer).Liches wraps the linkchecker_ output into a web interface.You can run Liches as a stand-alone service for use with your websitesregardless of the language they're written in. While Liches itself iswritten in Python, it interacts with your website purely via HTTP andJSON_. You can even integrate it with pure javascript without the need ofserver side programming or use it as a stand alone service.An example how to integrate it into a website can be found athttps://github.com/collective/collective.lichesRational--------While linkchecker_ itself can produce html this results in a singlemonolithic page with all results included. This can be intimidatingand is from a usability point of view suboptimal. Liches presentsthe results agregated per page, so you get a quick overview of howmany pages in your site have broken links and for each page an overviewwhich links are broken. You can also filter the results for a specificerror message so you can narrow down and prioritize which errors to dealwith first.You can configure your linkchecks and invoke linkchecker through thewebinterface.Install=======Prerequisites-------------It is strongly recommended to install Liches in a virtualenv_::$ mkdir liches$ virtualenv --no-site-packages liches/$ cd liches/In this virtualenv you can install liches for productionor development.Install for production----------------------In the virtualenv you created above execute these commands::$ wget http://github.com/downloads/wummel/linkchecker/LinkChecker-8.4.tar.xz$ xz -d LinkChecker-8.4.tar.xz$ bin/pip install LinkChecker-8.4.tar$ bin/pip install liches$ wget https://raw.github.com/cleder/liches/master/production.ini$ bin/initialize_liches_db production.iniUsername [admin]:Password [generate]:('password generated: ', 'whmgfi6r')Fullname: AdministratorEmail: root@localhost$ bin/pserve production.iniUsername and password are written to the file 'password.txt'. Delete thisfile after installation.Install for development------------------------In the virtualenv you created above execute these commands:::$ wget https://raw.github.com/cleder/liches/master/buildout.cfg$ mkdir buildout-cache$ mkdir buildout-cache/eggs$ mkdir buildout-cache/downloads$ bin/easy_install -u setuptools$ wget http://python-distribute.org/bootstrap.py$ bin/python bootstrap.py$ bin/buildout$ rm buildout.cfg$ ln -s src/liches/buildout.cfg$ ln -s src/liches/development.ini$ bin/initialize_liches_db development.iniUsername [admin]:Password [generate]:('password generated: ', 'whmgfi6r')Fullname: AdministratorEmail: root@localhost$ bin/pserve development.iniUsername and password are written to the file 'password.txt', so you donot have to input these values every time you reinitialize your database.Configuration--------------You configure you liches server in you production.ini or development.inifile.Database+++++++++In the `[app:main]` section of you configuration file change the sqlalchemy.url_to point to your database (or leave it like it is if you want to use sqllite).. _sqlalchemy.url: http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#database-urlsAPI Key++++++++To enable a website to request a linkcheck of a particular page you haveto provide an `api_key` in the `[liches]` section of your ini file. If thisparameter is not set liches will generate a random key every time it isstarted. The generated key will be displayed during startup.::2013-08-05 17:16:01,085 WARNI [liches.utils][MainThread] API Key: w4NhYBHSVGzfmpiKAs the generated key is reasonably unique and complicated you may copyit into your ini file.Getting Started===============Define your linkchecks in the web GUI or alternatively import linkchecksfrom the commandline.Web GUI--------Open your Liches server in your webbrowser... image:: https://raw.github.com/cleder/liches/master/docs/liches-home-loggedout.pngLog into your liches server... image:: https://raw.github.com/cleder/liches/master/docs/liches-home-loggedin.pngGoto linkchecks... image:: https://raw.github.com/cleder/liches/master/docs/liches-linkchecks.pngand add a new linkcheck... image:: https://raw.github.com/cleder/liches/master/docs/liches-add-linkcheck.pngOn the commandline you can then call:::$ bin/liches_linkchecker development.iniThis command will call linkchecker_ for all the checks you have enabledand import the results into the database. For regular linkchecks you cancall this command as a cron job.Manual Import--------------Check a site for bad links with e.g:::$ bin/linkchecker --file-output=csv --pause=3 --no-warnings http://localhost/index.htmlPlease refer to the linkchecker_ manual for usage.Import the output produced by linkchecker_ into liches::$ bin/import_liches_csv production.iniView the results-----------------Open `http://localhost:6543/` in your browser to see the results. Thefrontpage tells you how many pages with broken urls are in your site.Click on the link *'You have XYZ pages with broken links'* to view thepages at `http://localhost:6543/getpages`.At `http://localhost:6543/getpages?format=json` you can access the datain JSON_ format... image:: https://raw.github.com/cleder/liches/master/docs/liches-brokenpages.pngThe links will take you to a page with detailed results for this page e.g.`http://localhost:6543/checkurl?url=http://localhost/index.html`which can also be accessed as JSON_`http://localhost:6543/checkurl?url=http://localhost/index.html&format=json`.. image:: https://raw.github.com/cleder/liches/master/docs/liches-brokenlinks.png.. _linkchecker: http://wummel.github.io/linkchecker/.. _virtualenv: http://www.virtualenv.org/.. _JSON: http://www.json.org/.. _wikipedia: https://en.wikipedia.org/wiki/LichChanges========0.7 (2013/11/28)----------------- remove linkchecker dependency so you can `pip install -U liches`- pyramid 1.5 compatible (if you are using pyramid < 1.5 use liches 0.6)0.6 (2013/11/28)----------------- add ability to invoke linkchecker in the webinterface- add a broken links count to each page in overview0.5 (2013/08/29)------------------ add ability to show invalid pages only- inititialize_liches_db writes a file 'password.txt' with user:password0.4 (2013/08/12)----------------- bug fixes- add ability to filter pages by error0.3 (2013/08/07)------------------ add script to check all linkchecks- add linkcheck contenttype- add authentication- add form to change password- add user add form0.2 (2013/07/31)------------------ Add script to empty db- fixes- more documentation- add license0.1 (2013/07/31)-----------------  Initial version