File: info.rst

package info (click to toggle)
isbnlib 3.9.3-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 596 kB
  • sloc: python: 4,575; makefile: 4
file content (92 lines) | stat: -rw-r--r-- 2,086 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92


Info
====

``isbnlib`` is a (pure) python library that provides several
useful methods and functions to validate, clean, transform, hyphenate and
get metadata for ISBN strings. Its origin was as the core of isbntools_.

This short version, is suitable to be include as a dependency in other projects.
Has a straightforward setup and a very easy programmatic api.

Runs on py27, py34, py35, py36 and py37.


Usage
-----

Typical usage (as library):

.. code-block:: python

    import isbnlib
    ...


Just for fun, suppose I want the *most spoken about* book with certain words in his title.
For a *quick-and-dirty solution*, enter the following code in a file
and save it as ``isbn_tmsa_book.py``.

.. code-block:: python

    #!/usr/bin/env python
    import sys
    from isbnlib import *

    query = sys.argv[1].replace(' ', '+')
    isbn = isbn_from_words(query)

    print("The ISBN of the most `spoken-about` book with this title is %s" % isbn)
    print("")
    print("... and the book is:")
    print("")
    print((meta(isbn)))

Then in a command line (in the same directory):

.. code-block:: bash

    $ python isbn_tmsa_book.py 'noise'

In my case I get::


    The ISBN of the most `spoken-about` book with this title is 9780143105985

    ... and the book is:

    {'Publisher': u'Penguin Books', 'Language': u'eng', 'Title': u'White noise',
    'Year': u'2009', 'ISBN-13': u'9780143105985', 'Authors': u'Don DeLillo ;
    introduction by Richard Powers.'}


Have fun!



Projects using *isbnlib*
------------------------

**isbntools**      https://github.com/xlcnd/isbntools

**Spreads**        https://github.com/DIYBookScanner/spreads

**BiblioManager**  https://github.com/Phyks/BMC/

**libBMC**    https://github.com/Phyks/libbmc/

**Alessandria**     https://gitlab.com/openlabmatera/alessandria

**Comic Collector**  https://github.com/wengole/comiccollector

**Abelujo**    http://www.abelujo.cc/

**BibLib**    https://pypi.python.org/pypi/biblib




.. _pdfminer: https://pypi.python.org/pypi/pdfminer

.. _isbntools: https://pypi.python.org/pypi/isbntools