Python module to search in all German online libraries that work with the software Onleihe
.
- To use the module including command line interface you need python3.
For the later call it is easiest if python is included in the path variable. - clone or download this repository
- open your preferred console program in the downloaded project folder
- Install the required dependencies
python -m pip install -r requirements.txt
If you want to develop the source code further, there are some interesting tools (like
pytest
) in requirements_tools.txt - Start the command line program and display the corresponding help text:
shell python -m PyLeihe -h
It is assumed that the terminal is open in the project folder. The module can then be executed with the following command:
python3 -m PyLeihe
-
An overview of all possible options can be displayed with the following parameter:
python3 -m PyLeihe --help
-
To avoid having to retrieve relatively static data every time you search, it is recommended that you save it locally. For this purpose the module provides the possibility to load it and save it as a JSON file.
python3 -m PyLeihe --loadonline --makejson
-
The actual search can then be performed with the following call:
python3 -m PyLeihe -s "SEARCH TERM"
For more specific searches, additional options can be used. For example:
- books only:
-category eBook
- displays only the first 10 libraries, descending Sorted by number of hits:
-t 10
- eight threads are used in parallel for the search (default is 4):
--threads 8
Results in th following call:
python3 -m PyLeihe -s "SEARCH TERM" -c eBook -t 10 --threads 8
- books only:
How the individual classes can be used together can be found in the functions from simple_functions.py
.
The source code documentation was created automatically with pdoc3.
To rebuild the documentation you can either run pdoc
manually or start the package with the option python3 -m PyLeihe --make
.
Project Icon from Icons8.