Package: isbntools
Infoisbntoolsprovides several useful methods and functions
to validate, clean, transform, hyphenate and
get metadata for ISBN strings.For the end userseveral scripts are provided to usefrom the command line:$to_isbn10ISBN13transforms an ISBN13 number to ISBN10.$to_isbn13ISBN10transforms an ISBN10 number to ISBN13.$isbn_infoISBNgives you thegroup identifierof the ISBN.$isbn_maskISBNmasks(hyphenate) an ISBN (split it by identifiers).$isbn_metaISBN[goob|openl|merge][bibtex|csl|msword|endnote|refworks|opf|json][YOUR_APIKEY_TO_SERVICE]gives you the main metadata associated with the ISBN,goobuses theGoogle Books service(no key is needed),
andis the default option(you only have to enter, e.g.isbn_meta 9780321534965),openluses theOpenLibrary.orgapi (no key is needed) andwikiuses theWikipediaapi (no key is needed).
You can enter API keys and
set preferences in the fileisbntools.confin your$HOME\.isbntoolsdirectory (UNIX). For Windows, you should look at%APPDATA%/isbntools/isbntools.conf. The output can be formatted asbibtex,csl(CSL-JSON),msword,endnote,refworks,opforjson(BibJSON) bibliographic formats.NOTEYou can apply this command to many ISBNs by usingposix pipes(e.g.type FILE_WITH_ISBNs.txt | isbn_meta [SERVICE] [FORMAT] [APIKEY]in Windows)You can add more sources for metadata by installingisbnlibplugins:isbnlib-bnf,isbnlib-porbase,isbnlib-loc,isbnlib-mcues,isbnlib-dnb,isbnlib-sbn,isbnlib-kb, …
(checkpypifor available plugins).$isbn_editionsISBNgives the collection of ISBNs that represent a given book (usesWikipediaandLibraryThing).$isbn_validateISBNvalidates ISBN10 and ISBN13.$...|isbn_validateto use withposix pipes(e.g.cat FILE_WITH_ISBNs | isbn_validatein OSX or Linux).TIPSuppose you want to extract the ISBN of a pdf eboook (MYEBOOK.pdf).
Installpdfminerand then enter in a command line:$ pdf2txt.py -m 5 MYEBOOK.pdf | isbn_validate$isbn_from_words"words from title and author name"afuzzyscript that returns themost probableISBN from a set of words!
(You can verify the result withisbn_meta)!$isbn_goom"words from title and author name"[bibtex|csl|msword|endnote|refworks|json]a script that returns fromGoogle Books multiple references.$isbn_doiISBNreturns the doi’s ISBN-A code of a given ISBN.$isbn_ean13ISBNreturns the EAN13 code of a given ISBN.$isbn_classifyISBNreturns the OCLC classifiers of a given ISBN.$isbn_renFILENAMErenames (using metadata) files in thecurrent directorythat have ISBNs in their
filename (e.g.isbn_ren 1783559284_book.epub,isbn_ren"*.pdf").Enterisbn_rento see many other options.$isbntoolswrites version and copyright notice andchecks if there are updates.With$isbn_replyou will get aREPL with history, autocompletion, fuzzy options,
redirection and access to the shell.Following is a typical session:$isbn_replWelcome to the isbntools 4.3.29 REPL.
    ** For help type 'help' or '?'
    ** To exit type 'exit' :)
    ** To run a shell command, type '!<shellcmnd>'
    ** Use '#' in place of the last ISBN$isbn>?Commands available (type ?<command> to get help):
-------------------------------------------------
BIBFORMATS  classify  desc     ean13     from_words  info  to_isbn10
PROVIDERS   conf      doi      editions  goom        mask  to_isbn13
audit       cover     doi2tex  exit      help        meta  validate$isbn>meta9780156001311tex@book{9780156001311,
     title = {The Name Of The Rose},
    author = {Umberto Eco},
      isbn = {9780156001311},
      year = {1994},
 publisher = {Harcourt Brace}
}$isbn>meta9780156001311tex>>myreferences.bib$isbn>!lsmyreferences.bib$isbn>desc#It is the year 1327. Franciscans in an Italian abbey are suspected of
heresy, but Brother William of Baskerville's investigation is suddenly
overshadowed by seven bizarre deaths. Translated by William Weaver. A Helen
and Kurt Wolff Book$isbn>cover#thumbnail:  http://books.google.com/books/content?id=PVVyuD1UY1wC&printsec=frontcover&img=1&zoom=1
smallThumbnail:  http://books.google.com/books/content?id=PVVyuD1UY1wC&printsec=frontcover&img=1&zoom=5$isbn>PROVIDERSbnf  dnb  goob  kb  loc  mcues  openl  porbase  wiki$isbn>exitbyeWithin REPL many of the operations are faster.InstallFrom the command line enter (in some cases you have to precede the
command withsudo):$pipinstallisbntoolsIf you use linux systems, you can install using your distribution package
manager (packagespython-isbntoolsandpython3-isbntools), however
usually these packages arevery old and don’t work well anymore!For DevsIf you would like to contribute to the project please read theguidelines.Conf FileYou can enter API keys and set preferences in the fileisbntools.confin your$HOME/.isbntoolsdirectory (UNIX). For Windows, you should look at%APPDATA%/isbntools/isbntools.conf(create these, directory and file, if don’t exist[Now just enterisbn_conf make!]).
The file should look like:...

[MISC]
REN_FORMAT={firstAuthorLastName}{year}_{title}_{isbn}
DEBUG=False

[SYS]
URLOPEN_TIMEOUT=10
THREADS_TIMEOUT=12
LOAD_METADATA_PLUGINS=True
LOAD_FORMATTER_PLUGINS=True

[SERVICES]
DEFAULT_SERVICE=goob
VIAS_MERGE=parallel

...The values are self-explanatory!NOTEIf you are runningisbntoolsinside a virtual environment, theisbntools.conffile will be inside folderisbntoolsat the root of the environment.The easier way to manipulate these files is by using the scriptisbn_conf.
At a terminal enter:$isbn_confshowto see the current conf file.This script has many options that allow a controlled editing of the conf file.
Just enterisbn_conffor help.Known IssuesThemetamethod and theisbn_metascript sometimes give a wrong result
(this is due to errors on the chosen service), in alternative you should
try one of the others services.Theisbntoolsworks internally with unicode, however this doesn’t
solve errors of lost information due to bad encode/decode at the origin!Periodically, agencies, issue new blocks of ISBNs. Therangeof these blocks is on a database thatmaskuses. So it could happen,
if you have a version ofisbntoolsthat is too old,maskdoesn’t work for
valid (recent) issued ISBNs. The solution?Update isbntools often!Calls to metadata services are cached by default. If you don’t want this
feature, just enterisbn_conf setopt cache no. If by any reason you need
to clear the cache, just enterisbn_conf delcache.Any issue that you would like to report, please do it atgithubor atstackoverflowwith tagisbntools.