Package: lspace
l-spacea cli ebook manager built aroundisbnlibon import, lspace tries to find isbns in the files metadata and in the text.
with the isbn it tries to fetch metadata about the book from google books and openlibrary.
if no isbn is found, it queries metadata based on the filename.after this, your properly renamed files will be stored in your library folder.currently supports epub and pdf.requirementspython >=3.5 and pipinstallationfrom pypi (latest release)pip install lspacefrom github (probably-not-so-stable-dev-stuff)pip install git+https://github.com/puhoy/lspace.gitsetupafter installation, you should runlspace initthis will setup a new configuration file, which you can edit to specify the structure of your library, for example.a default config file would look like this:database_path: sqlite:////home/USER/.config/lspace/lspace.db
file_format: '{SHELF}/{AUTHORS}_{TITLE}'
library_path: ~/library
loglevel: error
default_shelf: misc
default_author: no author
default_language: no language
default_publisher: no publisherdatabase pathpath to your database.
the project uses sqlalchemy, so all databases supported by sqlalchemy should be fine.file_formattemplate string for storing the plain files in the library.{SHELF}/{AUTHORS}_{TITLE}would produce files likescifi/cixin-liu_three-body-problem.epubauthor and title will be automatically slugified for this.possible variables to use are: AUTHORS, TITLE, SHELF, YEAR, LANGUAGE, PUBLISHERlibrary pathwhere the imported files are storedloglevelthe default python loglevels (debug, info, error, exception)default_{shelf, author, language, publisher}the default field names, in case nothing is specified in importusageimportinglspace import path/to/ebook.epublspace import path/to/folder/*if you already have a folder you are happy with and, for example, just want to use it to serve your books or search through your files, you can add the--inplaceswitch on import, which will not copy them over to your library folder, but instead keep the book as an "external" reference.lspace import --inplace path/to/ebook.epubimport from calibre librarylspace import path/to/calibre_library/metadata.dbimport from lspace apilspace import http://<some-address>/api/v1/the web interface (lspace web- scroll down a bit!) generates import strings based on your search!searching your librarylspace list QUERY [--path]for example,lspace list programming --pathwould return something like/home/USER/library/donald-e-knuth/art-of-computer-programming-volume-2.pdf
/home/USER/library/donald-e-knuth/the-art-of-computer-programming-volume-1-fascicle-1.pdfandlspace list dwarfwould return returnPeter Tyson - Getting Started With Dwarf Fortressremoving stufflspace remove QUERYthis command will ask you before it actually deletes stuff :)Peter Tyson - Getting Started With Dwarf Fortress
/home/USER/library/peter-tyson/getting-started-with-dwarf-fortress.epub
delete this book from library? [y/N]:exporting bookslspace export QUERY ~/some/folder/ --format mobiwould convert all books matching on QUERY to 'mobi' and export them to ~/some/folderto actually export to another format, you need "ebook-convert", which is part ofcalibre!browse & share your books via webserverlspace web --host 0.0.0.0 --port 5000this also gives you the import command for your current search results!(or you can just download them manually..)setting up a dev env1. clone this repo2. make a virtualenv and activate itpython -m venv env

source env/bin/activate  # for bash

# or
#. env/bin/activate.fish  # for fish3. install requirementspip install  -e .[dev]4. set up a separate config to not mess up your regular installation# initialize a new config file at a separate path
LSPACE_CONFIG=~/.config/lspace_dev/config.yml lspace init

# change the database and library path! (otherwise it would still use the regular db)
sed -i 's/lspace\/lspace.db/lspace_dev\/lspace.db/g' ~/.config/lspace_dev/config.yml
sed -i 's/~\/library/~\/library_dev/g' ~/.config/lspace_dev/config.yml

# also, if you want, set the loglevel to something elseafter this, just set LSPACE_CONFIG to your new config file before you start to try new stuffexport LSPACE_CONFIG=~/.config/lspace_dev/config.yml  # bash
set -gx LSPACE_CONFIG ~/.config/lspace_dev/config.yml  # fishmigrationsthe db command is available when running in dev mode.create a new migration withLSPACE_DEV=1 lspace db migrateafterwards, running any lspace command will automatically update the databasemaking a releasecommands to build, test-release and release are wrapped in adoitscriptdodo.py.bumping is requires bump2version, twine is used for uploading to pypi.why "L-space"?its named after discworldslibrary-spacedimension :)