Compare commits

...

4 Commits

@ -1,8 +1,52 @@
Scaruffi
========
Get some data from scaruffi.com from Python. Work in progress (i.e. abandoned).
Get some data from scaruffi.com from Python.
Piero Scaruffi has written a lot about rock music, jazz, classical, whether it
is reviews or history. It is a valuable ressource for a variety of reasons and
this script aims to make data fetching easier for personal usage.
Install
-------
This library is available on PyPI:
```bash
pip install scaruffi
```
Usage
-----
Check out the `ScaruffiApi` for all available methods.
```python
from scaruffi.api import ScaruffiApi
api = ScaruffiApi()
api.get_ratings(1960)
# { 9.5: [ Release(title='Trout Mask Replica', ...
```
This module can also be used as a command-line tool:
```bash
scaruffi --help
scaruffi --musicians --offset 5555 --limit 5
# Mooseheart Faith
# Morbid Angel
# Morcheeba
# Morgan Fisher
# Morning 40 Federation
scaruffi --ratings 1960
# 9.5
# - Captain Beefheart - Trout Mask Replica (1969)
# 9.0
# - Bob Dylan - Blonde On Blonde (1966)
# - Captain Beefheart - Safe As Milk (1967)
# ...
```

@ -4,7 +4,7 @@
import argparse
import logging
from scaruffi import api
from scaruffi.api import ScaruffiApi
def main():
@ -22,8 +22,7 @@ def main():
args = parser.parse_args()
log_level = logging.DEBUG if args.verbose else logging.WARNING
global LOG
LOG = api.setup_logging("scaruffi", level=log_level)
api = ScaruffiApi(log_level=log_level)
if args.musicians:
musicians = api.get_musicians(args.offset, args.limit)

@ -1,6 +1,6 @@
[metadata]
name = scaruffi
version = 0.0.1
version = 0.0.2
description = Get some data from scaruffi.com.
long_description = file: README.md
license = MIT
@ -17,6 +17,10 @@ classifiers =
packages = scaruffi
python_requires = >= 3.7
setup_requires = setuptools >= 38.3.0
install_requires =
requests~=2.24
beautifulsoup4~=4.9
html5lib~=1.1
[options.entry_points]
console_scripts =

Loading…
Cancel
Save