You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
breadability/params.json

1 line
4.2 KiB
JSON

{"body":"breadability - another readability Python port\r\n===============================================\r\nI've tried to work with the various forks of some ancient codebase that ported\r\n`readability`_ to Python. The lack of tests, unused regex's, and commented out\r\nsections of code in other Python ports just drove me nuts.\r\n\r\nI put forth an effort to bring in several of the better forks into one\r\ncodebase, but they've diverged so much that I just can't work with it.\r\n\r\nSo what's any sane person to do? Re-port it with my own repo, add some tests,\r\ninfrastructure, and try to make this port better. OSS FTW (and yea, NIH FML,\r\nbut oh well I did try)\r\n\r\nThis is a pretty straight port of the JS here:\r\n\r\n- http://code.google.com/p/arc90labs-readability/source/browse/trunk/js/readability.js#82\r\n\r\n\r\nInstallation\r\n-------------\r\nThis does depend on lxml so you'll need some C headers in order to install\r\nthings from pip so that it can compile.\r\n\r\n::\r\n\r\n sudo apt-get install libxml2-dev libxslt-dev\r\n pip install breadability\r\n\r\n\r\nUsage\r\n------\r\n\r\ncmd line\r\n~~~~~~~~~\r\n\r\n::\r\n\r\n $ breadability http://wiki.python.org/moin/BeginnersGuide\r\n\r\nOptions\r\n``````````\r\n\r\n - b will write out the parsed content to a temp file and open it in a\r\n browser for viewing.\r\n - d will write out debug scoring statements to help track why a node was\r\n chosen as the document and why some nodes were removed from the final\r\n product.\r\n - f will override the default behaviour of getting an html fragment (<div>)\r\n and give you back a full <html> document.\r\n - v will output in verbose debug mode and help let you know why it parsed\r\n how it did.\r\n\r\n\r\nUsing from Python\r\n~~~~~~~~~~~~~~~~~~\r\n\r\n::\r\n\r\n from breadability.readable import Article\r\n doc = Article(html_text, url=url_came_from)\r\n print doc.readable\r\n\r\n\r\nWork to be done\r\n---------------\r\nYep, I've got some catching up to do. I don't do pagination, I've got a lot of\r\ncustom tweaks I need to get going, there are some articles that fail to parse.\r\nI also have more tests to write on a lot of the cleaning helpers, but\r\nhopefully things are setup in a way that those can/will be added.\r\n\r\nFortunately, I need this library for my tools:\r\n\r\n- https://bmark.us\r\n- http://readable.bmark.us\r\n\r\nso I really need this to be an active and improving project.\r\n\r\n\r\nOff the top of my heads todo list:\r\n\r\n - Support metadata from parsed article [url, confidence scores, all\r\n candidates we thought about?]\r\n - More tests, more thorough tests\r\n - More sample articles we need to test against in the test_articles\r\n - Tests that run through and check for regressions of the test_articles\r\n - Tidy'ing the HTML that comes out, might help with regression tests ^^\r\n - Multiple page articles\r\n - Performance tuning, we do a lot of looping and re-drop some nodes that\r\n should be skipped. We should have a set of regression tests for this so\r\n that if we implement a change that blows up performance we know it right\r\n away.\r\n - More docs for things, but sphinx docs and in code comments to help\r\n understand wtf we're doing and why. That's the biggest hurdle to some of\r\n this stuff.\r\n\r\nHelping out\r\n------------\r\nIf you want to help, shoot me a pull request, an issue report with broken\r\nurls, etc.\r\n\r\nYou can ping me on irc, I'm always in the `#bookie` channel in freenode.\r\n\r\n\r\nImportant Links\r\n----------------\r\n\r\n- `Builds`_ are done on `TravisCI`_\r\n\r\n\r\nInspiration\r\n~~~~~~~~~~~~\r\n\r\n- `python-readability`_\r\n- `decruft`_\r\n- `readability`_\r\n\r\n\r\n\r\n.. _readability: http://code.google.com/p/arc90labs-readability/\r\n.. _Builds: http://travis-ci.org/#!/mitechie/breadability\r\n.. _TravisCI: http://travis-ci.org/\r\n.. _decruft: https://github.com/dcramer/decruft\r\n.. _python-readability: https://github.com/buriy/python-readability\r\n","google":"UA-33507554-1","tagline":"Reworked Python Readability parsing library. ","note":"Don't delete this file! It's used internally to help with page regeneration.","name":"breadability"}