From 02345e0d70fee2744d3079f45dcdb8c9574e23cb Mon Sep 17 00:00:00 2001 From: j Date: Tue, 3 Apr 2018 13:26:13 +0530 Subject: [PATCH] use markdown for readme, remove download url --- README | 41 ----------------------------------------- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 4 ++-- 3 files changed, 49 insertions(+), 43 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index de79456..0000000 --- a/README +++ /dev/null @@ -1,41 +0,0 @@ -python-ox - the web in a dict - -Depends: - python >= 2.7 or python3 >= 3.4 - python-chardet (http://chardet.feedparser.org/) - python-feedparser (http://www.feedparser.org/) - python-lxml (http://codespeak.net/lxml/) [optional] - django (otherwise dates < 1900 are not supported) [optional] - -Usage: - import ox - - data = ox.cache.read_url('http:/...') - text = ox.strip_tags(data) - ox.normalize_newlines(text) - ox.format_bytes(len(data)) - - ox.format_bytes(1234567890) - '1.15 GB' - - import ox.web.imdb - imdbId = ox.web.imdb.guess('The Matrix') - info = ox.web.imdb.Imdb(imdbId) - info['year'] - 1999 - -For information on ox.django see https://wiki.0x2620.org/wiki/ox.django - -Install: - python setup.py install - -Cookies: - some ox.web modules require user accont information or cookies to work, - those are saved in ~/.ox/auth.json, most basic form looks like this: - { - "key": "value" - } - -Tests: - nosetests --with-doctest ox - nosetests3 --with-doctest ox diff --git a/README.md b/README.md new file mode 100644 index 0000000..2c6f044 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# python-ox - the web in a dict + +## Depends: + + - python >= 2.7 or python3 >= 3.4 + - python-chardet (http://chardet.feedparser.org/) + - python-feedparser (http://www.feedparser.org/) + - python-lxml (http://codespeak.net/lxml/) [optional] + - django (otherwise dates < 1900 are not supported) [optional] + +## Usage: + + import ox + + data = ox.cache.read_url('http:/...') + text = ox.strip_tags(data) + ox.normalize_newlines(text) + ox.format_bytes(len(data)) + + ox.format_bytes(1234567890) + '1.15 GB' + + import ox.web.imdb + imdbId = ox.web.imdb.guess('The Matrix') + info = ox.web.imdb.Imdb(imdbId) + info['year'] + 1999 + + +## Install: + + python setup.py install + + +## Cookies: + +some ox.web modules require user accont information or cookies to work, +those are saved in ~/.ox/auth.json, most basic form looks like this: + + { + "key": "value" + } + +## Tests: + + nosetests --with-doctest ox + nosetests3 --with-doctest ox diff --git a/setup.py b/setup.py index 89fc803..e5948ea 100644 --- a/setup.py +++ b/setup.py @@ -40,14 +40,14 @@ def get_version(): return '2.3.%s' % rev[0] return '2.3.x' + setup( name="ox", version=get_version(), description="python-ox - the web in a dict", author="0x2620", author_email="0x2620@0x2620.org", - url="https://wiki.0x2620.org/wiki/python-ox", - download_url="https://code.0x2620.org/python-ox/download", + url="https://code.0x2620.org/0x2620/python-ox", license="GPLv3", packages=['ox', 'ox.torrent', 'ox.web'], install_requires=['six>=1.5.2', 'chardet'],