https://github.com/juancarlospaco/nim-calibre
Calibre eBooks App Database Client for Nim.
https://github.com/juancarlospaco/nim-calibre
calibre calibre-server nim nim-lang sqlite
Last synced: about 2 months ago
JSON representation
Calibre eBooks App Database Client for Nim.
- Host: GitHub
- URL: https://github.com/juancarlospaco/nim-calibre
- Owner: juancarlospaco
- License: mit
- Created: 2018-09-18T00:23:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T19:07:21.000Z (over 6 years ago)
- Last Synced: 2025-01-26T14:48:41.206Z (10 months ago)
- Topics: calibre, calibre-server, nim, nim-lang, sqlite
- Language: Nim
- Size: 4.88 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nim-Calibre
[Calibre](https://calibre-ebook.com) eBooks App Database Client for [Nim](https://nim-lang.org).

# Install
- `nimble install calibre`
# Use
```nim
import calibre
var client = Calibre(filepath: "/path/to/calibre/metadata.db")
client.connect()
echo client.get_all()
echo client.get_tags()
echo client.get_series()
echo client.get_authors()
echo client.get_formats("96")
echo client.get_synopsis("96")
echo client.get_author_of_book("96")
echo client.get_book_by_name("Hellraiser")
echo client.get_by_author("J. K. Rowling")
client.close()
```
- Run `nim doc calibre.nim` for more Docs.
- Feel free to send more proc with useful Queries.
- All proc return a standard lib simple [Row object](https://nim-lang.org/docs/db_sqlite.html#Row).
- This is a read-only client, database is meant to be written by Calibre.
- If you have a Calibre database you can run the module as an Example `nim c -r calibre.nim`.
# Requisites
- None.
# Credits
- [**This code is ported from Python from Biblioteca-Guerrilla.**](https://github.com/elKaZe/biblioteca-guerrilla#biblioteca-guerrilla "eBook Web Catalog to embed on network Routers")
- All credit for the SQL Queries is for Biblioteca-Guerrilla.
See both if you want [calibre.py](https://github.com/elKaZe/biblioteca-guerrilla/blob/master/biblioteca_guerrilla/app/connector/calibre/calibre.py) ⟺ [calibre.nim](https://github.com/juancarlospaco/nim-calibre/blob/master/src/calibre.nim)