diff --git a/.gitignore b/.gitignore index b255847..b53eaff 100755 --- a/.gitignore +++ b/.gitignore @@ -124,3 +124,8 @@ dmypy.json # End of https://www.gitignore.io/api/python 0 +config.backup.json +create_db.sql +uwsgi.ini +installer.log +pyshelf_nginx.conf diff --git a/README.md b/README.md index 9d8fe31..63e3590 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pyShelf 0.3.0 +# pyShelf 0.4.0

Terminal based ebook server. Open source & Lightweight.

@@ -7,22 +7,35 @@ Having used Calibre for hosting my eBook collection in the past, I found myself frustrated having to install X on my server, or manage my library externally, Thus I have decided to spin up my own. ## Current Features +* Custom Installer * Recursive Scanning * Fast database access * Django based frontend * Basic seaching via a SearchVector of author, title, & file_name fields. +* Ebook Downloading ## Currently Supported Formats * epub ## Installation Example - -* In addition to the above steps you must now also make the requisite changes in config.json to reflect the connection to your postgresql server -Server Frontend +pyShelf Installation Video ## Further Installation & Support Information * [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md) +## 0.4.0 Patch Notes. +### The Installer Initiative + +All work this time around was centered on creating an installer simple and inclusive enough to hopefully enable all +users to simply set it and forget it. I have debugged as much as I can with my setup. I am performing some simple file finding to determine which system installer is present, and setting it as the installer used by pyShelf. + +This setup has been tested and is working flawlessly on arch based distros, and i have done what I can for debian, and centos based distros, If you do encounter installer issues please let me know if it isnt finding the system installer, or possibly isnt passing command line arguments to your installer. + +Also it should be noted that I am determining the presence of your postgresql, and nginx servers based on whether or not the +process is listed in the process list. + +At this time I would suggest stopping both your postgresql and nginx servers should you already have them and allowing the installer to do its work generating custom configurations and putting the nginx config files in place (/etc/nginx/sites-available, and symlinked to /etc/nginx/sites-enabled/) None of your existing configurations will be overwritten. + ## 0.3.0 Patch Notes. ### "And now we search." @@ -48,25 +61,13 @@ _Before advancing version numbers be sure to set PROJECT_NUMBER in doxygen.conf ## Configuration -### Nginx -Included is a default nginx config file {pyshelf_nginx.conf}. This file should be sufficient to get you up and running. You are required to change the location alias's to reflect your pyshelf install folder leaving everything after /frontend intact. - -Further resources for nginx setup may be found @ [This nginx, django, & uwsgi, guide](https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html) - -### uwsgi -Inside uwsgi.ini you should make changes to reflect your install directory, and the port you wish uwsgi to listen on. Alternativly you can make the requisite changes to listen on a socket instead. This change would also require a change to the pyshelf_nginx.conf file as well. - -### pyShelf -User configuration is contained within config.json in the project root. You must set book_path to the location of your books, and change the database connection details to match your environment. - -## Misc -Django has been implemented to power the frontend experience, and web based database maintenance. A properly configured web server is required for hosting the frontend, and a PostgreSQL server for the database, configuration of these servers is outside of the scope of this readme. +All configuration is now handled by the installer. Running via the Django test server might be possible, albeit not recomended. ## In Progress -* Searching, & further organizational tools. +* Organizational tools. * Docker image for those who need it. * Improved cover image storage, and acquisition. diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 9171045..0000000 --- a/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -import sys - -sys.path.insert(1, "app/") -sys.path.insert(2, "frontend/") diff --git a/config.json b/config.json index 77f2b02..18a02eb 100644 --- a/config.json +++ b/config.json @@ -1,11 +1 @@ -{ - "TITLE": "pyShelf E-Book Server", - "VERSION": "0.3.0", - "BOOKPATH": "books/", - "DB_HOST": "localhost", - "DB_PORT": "5432", - "DATABASE": "pyshelf", - "USER": "pyshelf", - "PASSWORD": "pyshelf", - "BOOKSHELF": "data/shelf.json" -} +{"TITLE": "pyShelf E-Book Server", "VERSION": "0.3.0", "BOOKPATH": "/home/raelon/Books", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"} diff --git a/docs/html/HTML/index.html b/docs/html/HTML/index.html index c610c6b..4fe4f22 100644 --- a/docs/html/HTML/index.html +++ b/docs/html/HTML/index.html @@ -1,16 +1,16 @@ -pyShelf Open Source Ebook Server-0.3.0 +pyShelf Open Source Ebook Server-0.4.0 -

pyShelf Open Source Ebook Server-0.3.0

+

pyShelf Open Source Ebook Server-0.4.0

-Last updated Sun Dec 15 12:54:07 EST 2019
+Last updated Wed Jan 01 09:54:41 EST 2020
Powered by GLOBAL-6.6.3.

diff --git a/docs/html/HTML/mains.html b/docs/html/HTML/mains.html index c610c6b..4fe4f22 100644 --- a/docs/html/HTML/mains.html +++ b/docs/html/HTML/mains.html @@ -1,16 +1,16 @@ -pyShelf Open Source Ebook Server-0.3.0 +pyShelf Open Source Ebook Server-0.4.0 -

pyShelf Open Source Ebook Server-0.3.0

+

pyShelf Open Source Ebook Server-0.4.0

-Last updated Sun Dec 15 12:54:07 EST 2019
+Last updated Wed Jan 01 09:54:41 EST 2020
Powered by GLOBAL-6.6.3.

diff --git a/docs/html/HTML/rebuild.sh b/docs/html/HTML/rebuild.sh index a0ce080..c9ea341 100644 --- a/docs/html/HTML/rebuild.sh +++ b/docs/html/HTML/rebuild.sh @@ -5,4 +5,4 @@ # Usage: # % sh rebuild.sh # -cd /home/raelon/Projects/pyShelf/src/backend && GTAGSCONF=':langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php\:.php.php3.phtml:skip=HTML/,HTML.pub/,tags,TAGS,ID,y.tab.c,y.tab.h,gtags.files,cscope.files,cscope.out,cscope.po.out,cscope.in.out,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,autom4te.cache/,*.orig,*.rej,*.bak,*~,#*#,*.swp,*.tmp,*_flymake.*,*_flymake,*.o,*.a,*.so,*.lo,*.zip,*.gz,*.bz2,*.xz,*.lzh,*.Z,*.tgz,*.min.js,*min.css:' htags -g -s -a -n -v -w -t 'pyShelf Open Source Ebook Server-0.3.0' /home/raelon/Projects/pyShelf/docs/html +cd /home/raelon/Projects/pyShelf/src/backend && GTAGSCONF=':langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php\:.php.php3.phtml:skip=HTML/,HTML.pub/,tags,TAGS,ID,y.tab.c,y.tab.h,gtags.files,cscope.files,cscope.out,cscope.po.out,cscope.in.out,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,autom4te.cache/,*.orig,*.rej,*.bak,*~,#*#,*.swp,*.tmp,*_flymake.*,*_flymake,*.o,*.a,*.so,*.lo,*.zip,*.gz,*.bz2,*.xz,*.lzh,*.Z,*.tgz,*.min.js,*min.css:' htags -g -s -a -n -v -w -t 'pyShelf Open Source Ebook Server-0.4.0' /home/raelon/Projects/pyShelf/docs/html diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 0cf1c06..fa4ac12 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -45,35 +45,36 @@ $(function() {
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 123456]
- - - - - - - - - - - - - - - - - - - - - - +
[detail level 12345]
 NpyShelf
 Nsrc
 Nbackend
 Nlib
 Napi_hooks
 CDuckDuckGo
 Nconfig
 CConfig
 Nlibrary
 CCatalogue
 NpyShelf
 CBookDisplay
 CInitFiles
 Nstorage
 CStorage
 Ntests
 Nconfig_test
 CTestConfig
 Nlibrary_test
 CTest_Catalogue
 CTest_Config
 CTestCatalogue
+ + + + + + + + + + + + + + + + + + + + + + +
 Nsrc
 Nbackend
 Nlib
 Napi_hooks
 CDuckDuckGo
 Nconfig
 CConfig
 Ndisplay
 CTerminalDisplay
 Nlibrary
 CCatalogue
 NpyShelf
 CBookDisplay
 CInitFiles
 Nstorage
 CStorage
 Ntests
 Nconfig_test
 CTestConfig
 Nlibrary_test
 CTest_Catalogue
 CTest_Config
 CTestCatalogue
diff --git a/docs/html/classes.html b/docs/html/classes.html index 98d2ccf..6f13f38 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -48,32 +48,33 @@ $(function() { - + - + - + - - - + + + - + - + + - - + + - +
  b  
Config (pyShelf.src.backend.lib.config)   Config (src.backend.lib.config)   
  s  
Test_Config (pyShelf.src.backend.tests.library_test)   Test_Catalogue (src.backend.tests.library_test)   
  d  
TestCatalogue (pyShelf.src.backend.tests.library_test)   Test_Config (src.backend.tests.library_test)   
BookDisplay (pyShelf.src.backend.lib.pyShelf)   Storage (pyShelf.src.backend.lib.storage)   TestConfig (pyShelf.src.backend.tests.config_test)   
BookDisplay (src.backend.lib.pyShelf)   Storage (src.backend.lib.storage)   TestCatalogue (src.backend.tests.library_test)   
  c  
DuckDuckGo (pyShelf.src.backend.lib.api_hooks)   DuckDuckGo (src.backend.lib.api_hooks)   
  t  
TestConfig (src.backend.tests.config_test)   
  i  
Catalogue (pyShelf.src.backend.lib.library)   Test_Catalogue (pyShelf.src.backend.tests.library_test)   
Catalogue (src.backend.lib.library)   TerminalDisplay (src.backend.lib.display)   
InitFiles (pyShelf.src.backend.lib.pyShelf)   
InitFiles (src.backend.lib.pyShelf)   
@@ -81,7 +82,7 @@ $(function() { diff --git a/docs/html/d0/d35/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay.html b/docs/html/d0/d35/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay.html new file mode 100644 index 0000000..92f7c5d --- /dev/null +++ b/docs/html/d0/d35/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay.html @@ -0,0 +1,129 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.display.TerminalDisplay Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Static Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.lib.display.TerminalDisplay Class Reference
+
+
+ + + + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self)
 
+def screen (self)
 
+def installer (self)
 
+def prompt (self, questions)
 
+def h_rule (self)
 
+def banner (self)
 
+def banner_render (self)
 
+ + + +

+Static Public Member Functions

+def clear ()
 
+ + + + + + + + + + + + + + + + + + + +

+Public Attributes

term
 
y
 
home
 
user
 
version
 
slogan
 
green
 
blue
 
clr_term
 
+

Detailed Description

+

The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d1/dca/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles-members.html b/docs/html/d1/dca/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles-members.html new file mode 100644 index 0000000..626db33 --- /dev/null +++ b/docs/html/d1/dca/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles-members.html @@ -0,0 +1,64 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.pyShelf.InitFiles Member List
+
+
+ +

This is the complete list of members for src.backend.lib.pyShelf.InitFiles, including all inherited members.

+ + + +
__init__(self, file_array) (defined in src.backend.lib.pyShelf.InitFiles)src.backend.lib.pyShelf.InitFiles
CreateFile(self, _pointer)src.backend.lib.pyShelf.InitFiles
+ + + + diff --git a/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html new file mode 100644 index 0000000..d4e8a48 --- /dev/null +++ b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html @@ -0,0 +1,167 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.tests.library_test.Test_Config Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.tests.library_test.Test_Config Class Reference
+
+
+
+ + Inheritance diagram for src.backend.tests.library_test.Test_Config:
+
+
+ + + + + + + +

+Public Member Functions

+def __init__ (self)
 
def open_file (self, root="config.json")
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

book_path
 
TITLE
 
VERSION
 
book_shelf
 
catalogue_db
 
user
 
password
 
db_host
 
db_port
 
file_array
 
root
 
auto_scan
 
allowed_hosts
 
db_user
 
db_pass
 
+

Detailed Description

+

Member Function Documentation

+ +

◆ open_file()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.tests.library_test.Test_Config.open_file ( self,
 _cp = "config.json" 
)
+
+
Opens config.json and reads in configuration options
+
+

Reimplemented from src.backend.lib.config.Config.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.png b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.png new file mode 100644 index 0000000..d263ae1 Binary files /dev/null and b/docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.png differ diff --git a/docs/html/d3/d4a/classsrc_1_1backend_1_1lib_1_1config_1_1Config-members.html b/docs/html/d3/d4a/classsrc_1_1backend_1_1lib_1_1config_1_1Config-members.html new file mode 100644 index 0000000..38218c9 --- /dev/null +++ b/docs/html/d3/d4a/classsrc_1_1backend_1_1lib_1_1config_1_1Config-members.html @@ -0,0 +1,79 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.config.Config Member List
+
+
+ +

This is the complete list of members for src.backend.lib.config.Config, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
__init__(self, root)src.backend.lib.config.Config
allowed_hosts (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
auto_scan (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
book_path (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
book_shelf (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
catalogue_db (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_host (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_pass (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_port (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_user (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
file_array (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
open_file(self, _cp)src.backend.lib.config.Config
password (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
root (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
TITLE (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
user (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
VERSION (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
+ + + + diff --git a/docs/html/d3/d95/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue-members.html b/docs/html/d3/d95/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue-members.html new file mode 100644 index 0000000..09af39e --- /dev/null +++ b/docs/html/d3/d95/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue-members.html @@ -0,0 +1,65 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.tests.library_test.TestCatalogue Member List
+
+
+ +

This is the complete list of members for src.backend.tests.library_test.TestCatalogue, including all inherited members.

+ + + + +
config (defined in src.backend.tests.library_test.TestCatalogue)src.backend.tests.library_test.TestCataloguestatic
root (defined in src.backend.tests.library_test.TestCatalogue)src.backend.tests.library_test.TestCataloguestatic
test_filter_books(self) (defined in src.backend.tests.library_test.TestCatalogue)src.backend.tests.library_test.TestCatalogue
+ + + + diff --git a/docs/html/d4/d45/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay-members.html b/docs/html/d4/d45/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay-members.html new file mode 100644 index 0000000..a4a4734 --- /dev/null +++ b/docs/html/d4/d45/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay-members.html @@ -0,0 +1,79 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.display.TerminalDisplay Member List
+
+
+ +

This is the complete list of members for src.backend.lib.display.TerminalDisplay, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
__init__(self) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
banner(self) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
banner_render(self) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
blue (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
clear() (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplaystatic
clr_term (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
green (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
h_rule(self) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
home (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
installer(self) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
prompt(self, questions) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
screen(self) (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
slogan (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
term (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
user (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
version (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
y (defined in src.backend.lib.display.TerminalDisplay)src.backend.lib.display.TerminalDisplay
+ + + + diff --git a/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html b/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html new file mode 100644 index 0000000..ee4ff15 --- /dev/null +++ b/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html @@ -0,0 +1,407 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.library.Catalogue Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Static Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.lib.library.Catalogue Class Reference
+
+
+
+ + Inheritance diagram for src.backend.lib.library.Catalogue:
+
+
+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self, config)
 
def scan_folder (self, _path=None)
 
def filter_books (self)
 
def extract_metadata (self, book)
 
def extract_content (self, book_zip, book)
 
def extract_cover_html (self, book_zip, book)
 
def extract_cover_image (self, book_zip, book)
 
def compare_shelf_current (self)
 
def import_books (self, list=None)
 
+ + + +

+Static Public Member Functions

def process_book (book)
 
+ + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

file_list
 
opf_regx
 
cover_regx
 
html_regx
 
root_dir
 
book_folder
 
book_shelf
 
books
 
db_pointer
 
config
 
+

Detailed Description

+
Decodes book metadata for storage
+

Member Function Documentation

+ +

◆ compare_shelf_current()

+ +
+
+ + + + + + + + +
def src.backend.lib.library.Catalogue.compare_shelf_current ( self)
+
+
Calls storage system, gets list of books stored and compares against files on disk
+
+
+
+ +

◆ extract_content()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_content ( self,
 book_zip,
 book 
)
+
+
Opens epub as zip file filters then stores as list any files matching opf_regx
+
+
+
+ +

◆ extract_cover_html()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_cover_html ( self,
 book_zip,
 book 
)
+
+
Opens epub as zip file filters then stores as list any files matching html_regx
+
+
+
+ +

◆ extract_cover_image()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_cover_image ( self,
 book_zip,
 book 
)
+
+
Opens epub as zip file filters then stores as list any files matching cover_regx
+
+
+
+ +

◆ extract_metadata()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_metadata ( self,
 book 
)
+
+
Return extracted metadata and cover picture
+book['path'] == Full path to ebook file
+book['files'] == list of files from self.process_book(book)
+
+
+
+ +

◆ filter_books()

+ +
+
+ + + + + + + + +
def src.backend.lib.library.Catalogue.filter_books ( self)
+
+
Calls scan_folder and filters out book files
+Proceeds to call process_book
+
+:returns self._book_list_expanded: json string containing all book metadata
+
+

Reimplemented in src.backend.tests.library_test.Test_Catalogue.

+ +
+
+ +

◆ import_books()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.import_books ( self,
 list = None 
)
+
+
Main entry point for import operations.
+Gets a list of new files via compare_shelf_current.
+Iterates over list and inserts new books into database.
+
+
+
+ +

◆ process_book()

+ +
+
+ + + + + +
+ + + + + + + + +
def src.backend.lib.library.Catalogue.process_book ( book)
+
+static
+
+
Return dictionary of epub file contents
+
+
+ +

◆ scan_folder()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.scan_folder ( self,
 _path = None 
)
+
+
Scan folder by _path, allows recurisive scanning
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.png b/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.png new file mode 100644 index 0000000..22e8081 Binary files /dev/null and b/docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.png differ diff --git a/docs/html/d5/ddf/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config-members.html b/docs/html/d5/ddf/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config-members.html new file mode 100644 index 0000000..e6d7d43 --- /dev/null +++ b/docs/html/d5/ddf/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config-members.html @@ -0,0 +1,80 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.tests.library_test.Test_Config Member List
+
+
+ +

This is the complete list of members for src.backend.tests.library_test.Test_Config, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
__init__(self) (defined in src.backend.tests.library_test.Test_Config)src.backend.tests.library_test.Test_Config
src::backend::lib::config::Config.__init__(self, root)src.backend.lib.config.Config
allowed_hosts (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
auto_scan (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
book_path (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
book_shelf (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
catalogue_db (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_host (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_pass (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_port (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
db_user (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
file_array (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
open_file(self, root="config.json")src.backend.tests.library_test.Test_Config
password (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
root (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
TITLE (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
user (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
VERSION (defined in src.backend.lib.config.Config)src.backend.lib.config.Config
+ + + + diff --git a/docs/html/d5/dee/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig-members.html b/docs/html/d5/dee/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig-members.html new file mode 100644 index 0000000..9f0bb13 --- /dev/null +++ b/docs/html/d5/dee/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig-members.html @@ -0,0 +1,66 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.tests.config_test.TestConfig Member List
+
+
+ +

This is the complete list of members for src.backend.tests.config_test.TestConfig, including all inherited members.

+ + + + + +
config (defined in src.backend.tests.config_test.TestConfig)src.backend.tests.config_test.TestConfigstatic
test_book_dir(self) (defined in src.backend.tests.config_test.TestConfig)src.backend.tests.config_test.TestConfig
test_title(self) (defined in src.backend.tests.config_test.TestConfig)src.backend.tests.config_test.TestConfig
test_version(self) (defined in src.backend.tests.config_test.TestConfig)src.backend.tests.config_test.TestConfig
+ + + + diff --git a/docs/html/d6/d20/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue-members.html b/docs/html/d6/d20/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue-members.html new file mode 100644 index 0000000..ff25948 --- /dev/null +++ b/docs/html/d6/d20/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue-members.html @@ -0,0 +1,82 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.library.Catalogue Member List
+
+
+ +

This is the complete list of members for src.backend.lib.library.Catalogue, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + +
__init__(self, config) (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
book_folder (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
book_shelf (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
books (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
compare_shelf_current(self)src.backend.lib.library.Catalogue
config (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
cover_regx (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
db_pointer (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
extract_content(self, book_zip, book)src.backend.lib.library.Catalogue
extract_cover_html(self, book_zip, book)src.backend.lib.library.Catalogue
extract_cover_image(self, book_zip, book)src.backend.lib.library.Catalogue
extract_metadata(self, book)src.backend.lib.library.Catalogue
file_list (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
filter_books(self)src.backend.lib.library.Catalogue
html_regx (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
import_books(self, list=None)src.backend.lib.library.Catalogue
opf_regx (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
process_book(book)src.backend.lib.library.Cataloguestatic
root_dir (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
scan_folder(self, _path=None)src.backend.lib.library.Catalogue
+ + + + diff --git a/docs/html/d7/d40/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage.html b/docs/html/d7/d40/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage.html new file mode 100644 index 0000000..ad47d00 --- /dev/null +++ b/docs/html/d7/d40/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage.html @@ -0,0 +1,220 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.storage.Storage Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.lib.storage.Storage Class Reference
+
+
+ + + + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self, config)
 
+def check_ownership (self, table=None)
 
def create_tables (self)
 
def insert_book (self, book)
 
def book_paths_list (self)
 
def commit (self)
 
def close (self)
 
+ + + + + + + + + + + + + + + + + +

+Public Attributes

sql
 
user
 
password
 
db_host
 
db_port
 
db
 
config
 
cursor
 
+

Detailed Description

+
Contains all methods for system storage

Member Function Documentation

+ +

◆ book_paths_list()

+ +
+
+ + + + + + + + +
def src.backend.lib.storage.Storage.book_paths_list ( self)
+
+
Get file paths from database for comparison to system files
+
+
+
+ +

◆ close()

+ +
+
+ + + + + + + + +
def src.backend.lib.storage.Storage.close ( self)
+
+
Close database connection
+
+
+
+ +

◆ commit()

+ +
+
+ + + + + + + + +
def src.backend.lib.storage.Storage.commit ( self)
+
+
Commit database transactions
+
+
+
+ +

◆ create_tables()

+ +
+
+ + + + + + + + +
def src.backend.lib.storage.Storage.create_tables ( self)
+
+
Create table structure
+
+
+ +

◆ insert_book()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.storage.Storage.insert_book ( self,
 book 
)
+
+
Insert book in database
+:returns: True if succeeds False if not
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d7/d69/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay-members.html b/docs/html/d7/d69/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay-members.html new file mode 100644 index 0000000..7432d9d --- /dev/null +++ b/docs/html/d7/d69/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay-members.html @@ -0,0 +1,72 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.pyShelf.BookDisplay Member List
+
+
+ +

This is the complete list of members for src.backend.lib.pyShelf.BookDisplay, including all inherited members.

+ + + + + + + + + + + +
__init__(self, **kwargs)src.backend.lib.pyShelf.BookDisplay
books_per_page (defined in src.backend.lib.pyShelf.BookDisplay)src.backend.lib.pyShelf.BookDisplay
booksPerPage(self, screen_size)src.backend.lib.pyShelf.BookDisplay
current_page (defined in src.backend.lib.pyShelf.BookDisplay)src.backend.lib.pyShelf.BookDisplay
nextPage(self)src.backend.lib.pyShelf.BookDisplay
previousPage(self)src.backend.lib.pyShelf.BookDisplay
screen_size (defined in src.backend.lib.pyShelf.BookDisplay)src.backend.lib.pyShelf.BookDisplay
thumbnail_scale (defined in src.backend.lib.pyShelf.BookDisplay)src.backend.lib.pyShelf.BookDisplay
thumbnail_size (defined in src.backend.lib.pyShelf.BookDisplay)src.backend.lib.pyShelf.BookDisplay
total_pages (defined in src.backend.lib.pyShelf.BookDisplay)src.backend.lib.pyShelf.BookDisplay
+ + + + diff --git a/docs/html/d7/d88/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo.html b/docs/html/d7/d88/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo.html new file mode 100644 index 0000000..e86078a --- /dev/null +++ b/docs/html/d7/d88/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo.html @@ -0,0 +1,113 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.api_hooks.DuckDuckGo Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.lib.api_hooks.DuckDuckGo Class Reference
+
+
+ + + + + + +

+Public Member Functions

+def __init__ (self)
 
def image_result (self, query)
 
+ + + +

+Public Attributes

url
 
+

Detailed Description

+
duckduckgo related searching

Member Function Documentation

+ +

◆ image_result()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.api_hooks.DuckDuckGo.image_result ( self,
 query 
)
+
+
Returns json containing url to image
+:param _key: &t=h_&iar=images&iax=images&ia=images&format=json&pretty=1
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d8/d3d/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue.html b/docs/html/d8/d3d/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue.html new file mode 100644 index 0000000..c978887 --- /dev/null +++ b/docs/html/d8/d3d/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue.html @@ -0,0 +1,83 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.tests.library_test.TestCatalogue Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Static Public Attributes | +List of all members
+
+
src.backend.tests.library_test.TestCatalogue Class Reference
+
+
+ + + + +

+Public Member Functions

+def test_filter_books (self)
 
+ + + + + +

+Static Public Attributes

root = os.path.abspath(os.path.curdir)
 
config = Test_Config()
 
+

Detailed Description

+

The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.html b/docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.html new file mode 100644 index 0000000..50d33d9 --- /dev/null +++ b/docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.html @@ -0,0 +1,197 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.config.Config Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.lib.config.Config Class Reference
+
+
+
+ + Inheritance diagram for src.backend.lib.config.Config:
+
+
+ + + + + + + +

+Public Member Functions

def __init__ (self, root)
 
def open_file (self, _cp)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

book_path
 
TITLE
 
VERSION
 
book_shelf
 
catalogue_db
 
user
 
password
 
db_host
 
db_port
 
file_array
 
root
 
auto_scan
 
allowed_hosts
 
db_user
 
db_pass
 
+

Detailed Description

+
Main System Configuration
+

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.config.Config.__init__ ( self,
 root 
)
+
+
Initialize main configuration options
+
+
+
+

Member Function Documentation

+ +

◆ open_file()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.config.Config.open_file ( self,
 _cp 
)
+
+
Opens config.json and reads in configuration options
+
+

Reimplemented in src.backend.tests.library_test.Test_Config.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.png b/docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.png new file mode 100644 index 0000000..c1f0983 Binary files /dev/null and b/docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.png differ diff --git a/docs/html/da/d3c/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles.html b/docs/html/da/d3c/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles.html new file mode 100644 index 0000000..50ebda1 --- /dev/null +++ b/docs/html/da/d3c/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles.html @@ -0,0 +1,105 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.pyShelf.InitFiles Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +List of all members
+
+
src.backend.lib.pyShelf.InitFiles Class Reference
+
+
+ + + + + + +

+Public Member Functions

+def __init__ (self, file_array)
 
def CreateFile (self, _pointer)
 
+

Detailed Description

+
First run file creation operations

Member Function Documentation

+ +

◆ CreateFile()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.pyShelf.InitFiles.CreateFile ( self,
 _pointer 
)
+
+
Checks if file exists and creates it if not
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/db/d7d/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay.html b/docs/html/db/d7d/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay.html new file mode 100644 index 0000000..fcbeb4b --- /dev/null +++ b/docs/html/db/d7d/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay.html @@ -0,0 +1,206 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.lib.pyShelf.BookDisplay Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.lib.pyShelf.BookDisplay Class Reference
+
+
+ + + + + + + + + + +

+Public Member Functions

def __init__ (self, **kwargs)
 
def nextPage (self)
 
def previousPage (self)
 
def booksPerPage (self, screen_size)
 
+ + + + + + + + + + + + + +

+Public Attributes

books_per_page
 
current_page
 
thumbnail_size
 
thumbnail_scale
 
total_pages
 
screen_size
 
+

Detailed Description

+
All functions related to displaying book information in the HTML UI

Constructor & Destructor Documentation

+ +

◆ __init__()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.pyShelf.BookDisplay.__init__ ( self,
** kwargs 
)
+
+
Initialize class variables
+:return: None
+
+
+
+

Member Function Documentation

+ +

◆ booksPerPage()

+ +
+
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.pyShelf.BookDisplay.booksPerPage ( self,
 screen_size 
)
+
+
## TODO Remove me
+Set books per page
+:param screen_size: Array containing x,y pixel sizes
+:return: self.books_per_page
+
+
+
+ +

◆ nextPage()

+ +
+
+ + + + + + + + +
def src.backend.lib.pyShelf.BookDisplay.nextPage ( self)
+
+
## TODO Remove me
+Goto next book page
+:return: new current_page
+
+
+
+ +

◆ previousPage()

+ +
+
+ + + + + + + + +
def src.backend.lib.pyShelf.BookDisplay.previousPage ( self)
+
+
## TODO Remove me
+Goto previous book page
+:return: new current_page
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/db/d9a/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage-members.html b/docs/html/db/d9a/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage-members.html new file mode 100644 index 0000000..f4d2cbe --- /dev/null +++ b/docs/html/db/d9a/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage-members.html @@ -0,0 +1,77 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.storage.Storage Member List
+
+
+ +

This is the complete list of members for src.backend.lib.storage.Storage, including all inherited members.

+ + + + + + + + + + + + + + + + +
__init__(self, config) (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
book_paths_list(self)src.backend.lib.storage.Storage
check_ownership(self, table=None) (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
close(self)src.backend.lib.storage.Storage
commit(self)src.backend.lib.storage.Storage
config (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
create_tables(self)src.backend.lib.storage.Storage
cursor (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
db (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
db_host (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
db_port (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
insert_book(self, book)src.backend.lib.storage.Storage
password (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
sql (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
user (defined in src.backend.lib.storage.Storage)src.backend.lib.storage.Storage
+ + + + diff --git a/docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.html b/docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.html new file mode 100644 index 0000000..ba67401 --- /dev/null +++ b/docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.html @@ -0,0 +1,462 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.tests.library_test.Test_Catalogue Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Static Public Member Functions | +Public Attributes | +List of all members
+
+
src.backend.tests.library_test.Test_Catalogue Class Reference
+
+
+
+ + Inheritance diagram for src.backend.tests.library_test.Test_Catalogue:
+
+
+ + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+def __init__ (self)
 
def filter_books (self)
 
def scan_folder (self, _path=None)
 
def extract_metadata (self, book)
 
def extract_content (self, book_zip, book)
 
def extract_cover_html (self, book_zip, book)
 
def extract_cover_image (self, book_zip, book)
 
def compare_shelf_current (self)
 
def import_books (self, list=None)
 
+ + + +

+Static Public Member Functions

def process_book (book)
 
+ + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

book_shelf
 
file_list
 
opf_regx
 
cover_regx
 
html_regx
 
root_dir
 
book_folder
 
books
 
db_pointer
 
config
 
+

Detailed Description

+

Member Function Documentation

+ +

◆ compare_shelf_current()

+ +
+
+ + + + + +
+ + + + + + + + +
def src.backend.lib.library.Catalogue.compare_shelf_current ( self)
+
+inherited
+
+
Calls storage system, gets list of books stored and compares against files on disk
+
+
+
+ +

◆ extract_content()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_content ( self,
 book_zip,
 book 
)
+
+inherited
+
+
Opens epub as zip file filters then stores as list any files matching opf_regx
+
+
+
+ +

◆ extract_cover_html()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_cover_html ( self,
 book_zip,
 book 
)
+
+inherited
+
+
Opens epub as zip file filters then stores as list any files matching html_regx
+
+
+
+ +

◆ extract_cover_image()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_cover_image ( self,
 book_zip,
 book 
)
+
+inherited
+
+
Opens epub as zip file filters then stores as list any files matching cover_regx
+
+
+
+ +

◆ extract_metadata()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.extract_metadata ( self,
 book 
)
+
+inherited
+
+
Return extracted metadata and cover picture
+book['path'] == Full path to ebook file
+book['files'] == list of files from self.process_book(book)
+
+
+
+ +

◆ filter_books()

+ +
+
+ + + + + + + + +
def src.backend.tests.library_test.Test_Catalogue.filter_books ( self)
+
+
Calls scan_folder and filters out book files
+Proceeds to call process_book
+
+:returns self._book_list_expanded: json string containing all book metadata
+
+

Reimplemented from src.backend.lib.library.Catalogue.

+ +
+
+ +

◆ import_books()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.import_books ( self,
 list = None 
)
+
+inherited
+
+
Main entry point for import operations.
+Gets a list of new files via compare_shelf_current.
+Iterates over list and inserts new books into database.
+
+
+
+ +

◆ process_book()

+ +
+
+ + + + + +
+ + + + + + + + +
def src.backend.lib.library.Catalogue.process_book ( book)
+
+staticinherited
+
+
Return dictionary of epub file contents
+
+
+ +

◆ scan_folder()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
def src.backend.lib.library.Catalogue.scan_folder ( self,
 _path = None 
)
+
+inherited
+
+
Scan folder by _path, allows recurisive scanning
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.png b/docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.png new file mode 100644 index 0000000..2532ba5 Binary files /dev/null and b/docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.png differ diff --git a/docs/html/dc/d3e/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue-members.html b/docs/html/dc/d3e/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue-members.html new file mode 100644 index 0000000..921410a --- /dev/null +++ b/docs/html/dc/d3e/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue-members.html @@ -0,0 +1,83 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.tests.library_test.Test_Catalogue Member List
+
+
+ +

This is the complete list of members for src.backend.tests.library_test.Test_Catalogue, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + +
__init__(self) (defined in src.backend.tests.library_test.Test_Catalogue)src.backend.tests.library_test.Test_Catalogue
__init__(self, config) (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
book_folder (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
book_shelf (defined in src.backend.tests.library_test.Test_Catalogue)src.backend.tests.library_test.Test_Catalogue
books (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
compare_shelf_current(self)src.backend.lib.library.Catalogue
config (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
cover_regx (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
db_pointer (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
extract_content(self, book_zip, book)src.backend.lib.library.Catalogue
extract_cover_html(self, book_zip, book)src.backend.lib.library.Catalogue
extract_cover_image(self, book_zip, book)src.backend.lib.library.Catalogue
extract_metadata(self, book)src.backend.lib.library.Catalogue
file_list (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
filter_books(self)src.backend.tests.library_test.Test_Catalogue
html_regx (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
import_books(self, list=None)src.backend.lib.library.Catalogue
opf_regx (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
process_book(book)src.backend.lib.library.Cataloguestatic
root_dir (defined in src.backend.lib.library.Catalogue)src.backend.lib.library.Catalogue
scan_folder(self, _path=None)src.backend.lib.library.Catalogue
+ + + + diff --git a/docs/html/de/d11/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo-members.html b/docs/html/de/d11/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo-members.html new file mode 100644 index 0000000..55b343e --- /dev/null +++ b/docs/html/de/d11/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo-members.html @@ -0,0 +1,65 @@ + + + + + + + +pyShelf Open Source Ebook Server: Member List + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+
src.backend.lib.api_hooks.DuckDuckGo Member List
+
+
+ +

This is the complete list of members for src.backend.lib.api_hooks.DuckDuckGo, including all inherited members.

+ + + + +
__init__(self) (defined in src.backend.lib.api_hooks.DuckDuckGo)src.backend.lib.api_hooks.DuckDuckGo
image_result(self, query)src.backend.lib.api_hooks.DuckDuckGo
url (defined in src.backend.lib.api_hooks.DuckDuckGo)src.backend.lib.api_hooks.DuckDuckGo
+ + + + diff --git a/docs/html/df/d83/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig.html b/docs/html/df/d83/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig.html new file mode 100644 index 0000000..bc28bae --- /dev/null +++ b/docs/html/df/d83/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig.html @@ -0,0 +1,86 @@ + + + + + + + +pyShelf Open Source Ebook Server: src.backend.tests.config_test.TestConfig Class Reference + + + + + + +
+
+ + + + + + +
+
pyShelf Open Source Ebook Server +  0.4.0 +
+
Open source, console based E-book server
+
+
+ + + + + + + +
+
+
+Public Member Functions | +Static Public Attributes | +List of all members
+
+
src.backend.tests.config_test.TestConfig Class Reference
+
+
+ + + + + + + + +

+Public Member Functions

+def test_book_dir (self)
 
+def test_title (self)
 
+def test_version (self)
 
+ + + +

+Static Public Attributes

config = Config(os.path.abspath(os.path.curdir))
 
+

Detailed Description

+

The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html b/docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html index e0f30e1..308f4df 100644 --- a/docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html +++ b/docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -51,7 +51,7 @@ $(function() { diff --git a/docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html b/docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html index 267c996..3129658 100644 --- a/docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html +++ b/docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -55,7 +55,7 @@ Directories diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index aa80e43..7e4182d 100644 --- a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -55,7 +55,7 @@ Directories diff --git a/docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html b/docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html index 7973a41..22365cb 100644 --- a/docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html +++ b/docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -51,7 +51,7 @@ $(function() { diff --git a/docs/html/files.html b/docs/html/files.html index 44fb9b7..fb05f8e 100644 --- a/docs/html/files.html +++ b/docs/html/files.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -52,21 +52,22 @@ $(function() {  __init__.py  api_hooks.py  config.py - library.py - pyShelf.py - storage.py -  tests - __init__.py - config_test.py - library_test.py - __init__.py - pyShelf_ScanLibrary.py + display.py + library.py + pyShelf.py + storage.py +  tests + __init__.py + config_test.py + library_test.py + __init__.py + pyShelf_ScanLibrary.py diff --git a/docs/html/functions.html b/docs/html/functions.html index d7ac943..8d4b0b8 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -42,76 +42,76 @@ $(function() {
Here is a list of all documented class members with links to the class documentation for each member:
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html index c71a6b5..d375f54 100644 --- a/docs/html/functions_func.html +++ b/docs/html/functions_func.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -42,76 +42,76 @@ $(function() {
 
diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html index bacea1f..9148d1a 100644 --- a/docs/html/hierarchy.html +++ b/docs/html/hierarchy.html @@ -19,7 +19,7 @@
pyShelf Open Source Ebook Server -  0.3.0 +  0.4.0
Open source, console based E-book server
@@ -46,22 +46,23 @@ $(function() {
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12]
- - - - - - - - - - + + + + + + + + + + +
 CpyShelf.src.backend.lib.pyShelf.BookDisplay
 CpyShelf.src.backend.lib.library.Catalogue
 CpyShelf.src.backend.tests.library_test.Test_Catalogue
 CpyShelf.src.backend.lib.config.Config
 CpyShelf.src.backend.tests.library_test.Test_Config
 CpyShelf.src.backend.lib.api_hooks.DuckDuckGo
 CpyShelf.src.backend.lib.pyShelf.InitFiles
 CpyShelf.src.backend.lib.storage.Storage
 CpyShelf.src.backend.tests.library_test.TestCatalogue
 CpyShelf.src.backend.tests.config_test.TestConfig
 Csrc.backend.lib.pyShelf.BookDisplay
 Csrc.backend.lib.library.Catalogue
 Csrc.backend.tests.library_test.Test_Catalogue
 Csrc.backend.lib.config.Config
 Csrc.backend.tests.library_test.Test_Config
 Csrc.backend.lib.api_hooks.DuckDuckGo
 Csrc.backend.lib.pyShelf.InitFiles
 Csrc.backend.lib.storage.Storage
 Csrc.backend.lib.display.TerminalDisplay
 Csrc.backend.tests.library_test.TestCatalogue
 Csrc.backend.tests.config_test.TestConfig
diff --git a/docs/html/index.hhc b/docs/html/index.hhc index d1f6a98..99b5e6b 100644 --- a/docs/html/index.hhc +++ b/docs/html/index.hhc @@ -8,165 +8,192 @@