use markdown for readme, remove download url
This commit is contained in:
parent
607603a12e
commit
02345e0d70
3 changed files with 49 additions and 43 deletions
41
README
41
README
|
@ -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
|
47
README.md
Normal file
47
README.md
Normal file
|
@ -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
|
4
setup.py
4
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'],
|
||||
|
|
Loading…
Reference in a new issue