Collections, and installer patches
2
config.json
vendored
Normal file → Executable file
@@ -1 +1 @@
|
|||||||
{"TITLE": "pyShelf E-Book Server", "VERSION": "0.4.1", "BOOKPATH": "", "DB_HOST": "localhost", "DB_PORT": "5432", "DATABASE": "pyshelf", "USER": "pyshelf", "PASSWORD": "pyshelf", "BOOKSHELF": "data/shelf.json", "ALLOWED_HOSTS": "*", "hostname": "localhost", "webport": "8000", "wsgiport": "8001"}
|
{"TITLE": "pyShelf E-Book Server", "VERSION": "0.4.1", "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"}
|
||||||
|
|||||||
0
data/.track_this_folder
vendored
Normal file → Executable file
0
docs/html/annotated.html
vendored
Normal file → Executable file
0
docs/html/bc_s.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
0
docs/html/bdwn.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
0
docs/html/classes.html
vendored
Normal file → Executable file
0
docs/html/closed.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 132 B |
0
docs/html/d0/d35/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay.html
vendored
Normal file → Executable file
0
docs/html/d1/dca/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles-members.html
vendored
Normal file → Executable file
2
docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html
vendored
Normal file → Executable file
@@ -148,7 +148,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens config.json and reads in configuration options
|
<pre class="fragment">Opens config.json and reads in configuration options
|
||||||
</pre>
|
</pre>
|
||||||
<p>Reimplemented from <a class="el" href="../../d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.html#a2a99caf1885585c5baeacad038272fdb">src.backend.lib.config.Config</a>.</p>
|
<p>Reimplemented from <a class="el" href="../../d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.html#a2a99caf1885585c5baeacad038272fdb">src.backend.lib.config.Config</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
0
docs/html/d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 853 B After Width: | Height: | Size: 853 B |
0
docs/html/d3/d4a/classsrc_1_1backend_1_1lib_1_1config_1_1Config-members.html
vendored
Normal file → Executable file
0
docs/html/d3/d95/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue-members.html
vendored
Normal file → Executable file
0
docs/html/d4/d45/classsrc_1_1backend_1_1lib_1_1display_1_1TerminalDisplay-members.html
vendored
Normal file → Executable file
18
docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html
vendored
Normal file → Executable file
@@ -144,7 +144,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Calls storage system, gets list of books stored and compares against files on disk
|
<pre class="fragment">Calls storage system, gets list of books stored and compares against files on disk
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a0993bce2b4fe64a46d96a5eba1d5af50"></a>
|
<a id="a0993bce2b4fe64a46d96a5eba1d5af50"></a>
|
||||||
@@ -179,7 +179,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching opf_regx
|
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching opf_regx
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="abcf0dc2d816393afbfb07ea9f5c152f9"></a>
|
<a id="abcf0dc2d816393afbfb07ea9f5c152f9"></a>
|
||||||
@@ -214,7 +214,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching html_regx
|
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching html_regx
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="abd1c3b416586faaabb37515705588a89"></a>
|
<a id="abd1c3b416586faaabb37515705588a89"></a>
|
||||||
@@ -249,7 +249,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching cover_regx
|
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching cover_regx
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="abab8649249ef71103f314aa29644a739"></a>
|
<a id="abab8649249ef71103f314aa29644a739"></a>
|
||||||
@@ -280,7 +280,7 @@ Public Attributes</h2></td></tr>
|
|||||||
<pre class="fragment">Return extracted metadata and cover picture
|
<pre class="fragment">Return extracted metadata and cover picture
|
||||||
book['path'] == Full path to ebook file
|
book['path'] == Full path to ebook file
|
||||||
book['files'] == list of files from self.process_book(book)
|
book['files'] == list of files from self.process_book(book)
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a9dec8499f181aee506861142004d002d"></a>
|
<a id="a9dec8499f181aee506861142004d002d"></a>
|
||||||
@@ -302,7 +302,7 @@ book['files'] == list of files from self.process_book(book)
|
|||||||
Proceeds to call process_book
|
Proceeds to call process_book
|
||||||
|
|
||||||
:returns self._book_list_expanded: json string containing all book metadata
|
:returns self._book_list_expanded: json string containing all book metadata
|
||||||
</pre>
|
</pre>
|
||||||
<p>Reimplemented in <a class="el" href="../../db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.html#ad708c5a24143ca6fb38733f62396ee21">src.backend.tests.library_test.Test_Catalogue</a>.</p>
|
<p>Reimplemented in <a class="el" href="../../db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.html#ad708c5a24143ca6fb38733f62396ee21">src.backend.tests.library_test.Test_Catalogue</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -335,7 +335,7 @@ Proceeds to call process_book
|
|||||||
<pre class="fragment">Main entry point for import operations.
|
<pre class="fragment">Main entry point for import operations.
|
||||||
Gets a list of new files via compare_shelf_current.
|
Gets a list of new files via compare_shelf_current.
|
||||||
Iterates over list and inserts new books into database.
|
Iterates over list and inserts new books into database.
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="aedf70ab79105f8251d36848fb790fb9f"></a>
|
<a id="aedf70ab79105f8251d36848fb790fb9f"></a>
|
||||||
@@ -361,7 +361,7 @@ Iterates over list and inserts new books into database.
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Return dictionary of epub file contents</pre>
|
<pre class="fragment">Return dictionary of epub file contents</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a204c5171b7de8ddd199563fd1b252032"></a>
|
<a id="a204c5171b7de8ddd199563fd1b252032"></a>
|
||||||
@@ -390,7 +390,7 @@ Iterates over list and inserts new books into database.
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Scan folder by _path, allows recurisive scanning
|
<pre class="fragment">Scan folder by _path, allows recurisive scanning
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||||
|
|||||||
0
docs/html/d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 966 B After Width: | Height: | Size: 966 B |
0
docs/html/d5/ddf/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config-members.html
vendored
Normal file → Executable file
0
docs/html/d5/dee/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig-members.html
vendored
Normal file → Executable file
0
docs/html/d6/d20/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue-members.html
vendored
Normal file → Executable file
10
docs/html/d7/d40/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage.html
vendored
Normal file → Executable file
@@ -117,7 +117,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Get file paths from database for comparison to system files
|
<pre class="fragment">Get file paths from database for comparison to system files
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a112f9b3fbb18b9475fdeba6245d90fdf"></a>
|
<a id="a112f9b3fbb18b9475fdeba6245d90fdf"></a>
|
||||||
@@ -136,7 +136,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Close database connection
|
<pre class="fragment">Close database connection
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a394cfed178f5fd150ed5f1bca13dfc05"></a>
|
<a id="a394cfed178f5fd150ed5f1bca13dfc05"></a>
|
||||||
@@ -155,7 +155,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Commit database transactions
|
<pre class="fragment">Commit database transactions
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="ae0fdacb661febbfa3cba95e578ad2112"></a>
|
<a id="ae0fdacb661febbfa3cba95e578ad2112"></a>
|
||||||
@@ -173,7 +173,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Create table structure</pre>
|
<pre class="fragment">Create table structure</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a912a5030c1277bb9b635eb4bb5c97c40"></a>
|
<a id="a912a5030c1277bb9b635eb4bb5c97c40"></a>
|
||||||
@@ -203,7 +203,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Insert book in database
|
<pre class="fragment">Insert book in database
|
||||||
:returns: True if succeeds False if not
|
:returns: True if succeeds False if not
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||||
|
|||||||
0
docs/html/d7/d69/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay-members.html
vendored
Normal file → Executable file
2
docs/html/d7/d88/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo.html
vendored
Normal file → Executable file
@@ -96,7 +96,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Returns json containing url to image
|
<pre class="fragment">Returns json containing url to image
|
||||||
:param _key: &t=h_&iar=images&iax=images&ia=images&format=json&pretty=1
|
:param _key: &t=h_&iar=images&iax=images&ia=images&format=json&pretty=1
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||||
|
|||||||
0
docs/html/d8/d3d/classsrc_1_1backend_1_1tests_1_1library__test_1_1TestCatalogue.html
vendored
Normal file → Executable file
4
docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.html
vendored
Normal file → Executable file
@@ -148,7 +148,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Initialize main configuration options
|
<pre class="fragment">Initialize main configuration options
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="groupheader">Member Function Documentation</h2>
|
<h2 class="groupheader">Member Function Documentation</h2>
|
||||||
@@ -178,7 +178,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens config.json and reads in configuration options
|
<pre class="fragment">Opens config.json and reads in configuration options
|
||||||
</pre>
|
</pre>
|
||||||
<p>Reimplemented in <a class="el" href="../../d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html#a03e5a6c59bffd93c1e81ddc52a84254f">src.backend.tests.library_test.Test_Config</a>.</p>
|
<p>Reimplemented in <a class="el" href="../../d3/d29/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Config.html#a03e5a6c59bffd93c1e81ddc52a84254f">src.backend.tests.library_test.Test_Config</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
0
docs/html/d8/dfe/classsrc_1_1backend_1_1lib_1_1config_1_1Config.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 858 B |
2
docs/html/da/d3c/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1InitFiles.html
vendored
Normal file → Executable file
@@ -88,7 +88,7 @@ def </td><td class="memItemRight" valign="bottom"><b>__init__</b> (self, fi
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Checks if file exists and creates it if not
|
<pre class="fragment">Checks if file exists and creates it if not
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||||
|
|||||||
8
docs/html/db/d7d/classsrc_1_1backend_1_1lib_1_1pyShelf_1_1BookDisplay.html
vendored
Normal file → Executable file
@@ -114,7 +114,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Initialize class variables
|
<pre class="fragment">Initialize class variables
|
||||||
:return: None
|
:return: None
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="groupheader">Member Function Documentation</h2>
|
<h2 class="groupheader">Member Function Documentation</h2>
|
||||||
@@ -147,7 +147,7 @@ Public Attributes</h2></td></tr>
|
|||||||
Set books per page
|
Set books per page
|
||||||
:param screen_size: Array containing x,y pixel sizes
|
:param screen_size: Array containing x,y pixel sizes
|
||||||
:return: self.books_per_page
|
:return: self.books_per_page
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a5dd3965776e63d09dfb0f887f88a9582"></a>
|
<a id="a5dd3965776e63d09dfb0f887f88a9582"></a>
|
||||||
@@ -168,7 +168,7 @@ Set books per page
|
|||||||
<pre class="fragment">## TODO Remove me
|
<pre class="fragment">## TODO Remove me
|
||||||
Goto next book page
|
Goto next book page
|
||||||
:return: new current_page
|
:return: new current_page
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a59098e1427ae89dba07ea0790dd8e0ed"></a>
|
<a id="a59098e1427ae89dba07ea0790dd8e0ed"></a>
|
||||||
@@ -189,7 +189,7 @@ Goto next book page
|
|||||||
<pre class="fragment">## TODO Remove me
|
<pre class="fragment">## TODO Remove me
|
||||||
Goto previous book page
|
Goto previous book page
|
||||||
:return: new current_page
|
:return: new current_page
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||||
|
|||||||
0
docs/html/db/d9a/classsrc_1_1backend_1_1lib_1_1storage_1_1Storage-members.html
vendored
Normal file → Executable file
18
docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.html
vendored
Normal file → Executable file
@@ -151,7 +151,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Calls storage system, gets list of books stored and compares against files on disk
|
<pre class="fragment">Calls storage system, gets list of books stored and compares against files on disk
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a0993bce2b4fe64a46d96a5eba1d5af50"></a>
|
<a id="a0993bce2b4fe64a46d96a5eba1d5af50"></a>
|
||||||
@@ -194,7 +194,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching opf_regx
|
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching opf_regx
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="abcf0dc2d816393afbfb07ea9f5c152f9"></a>
|
<a id="abcf0dc2d816393afbfb07ea9f5c152f9"></a>
|
||||||
@@ -237,7 +237,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching html_regx
|
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching html_regx
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="abd1c3b416586faaabb37515705588a89"></a>
|
<a id="abd1c3b416586faaabb37515705588a89"></a>
|
||||||
@@ -280,7 +280,7 @@ Public Attributes</h2></td></tr>
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching cover_regx
|
<pre class="fragment">Opens epub as zip file filters then stores as list any files matching cover_regx
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="abab8649249ef71103f314aa29644a739"></a>
|
<a id="abab8649249ef71103f314aa29644a739"></a>
|
||||||
@@ -319,7 +319,7 @@ Public Attributes</h2></td></tr>
|
|||||||
<pre class="fragment">Return extracted metadata and cover picture
|
<pre class="fragment">Return extracted metadata and cover picture
|
||||||
book['path'] == Full path to ebook file
|
book['path'] == Full path to ebook file
|
||||||
book['files'] == list of files from self.process_book(book)
|
book['files'] == list of files from self.process_book(book)
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="ad708c5a24143ca6fb38733f62396ee21"></a>
|
<a id="ad708c5a24143ca6fb38733f62396ee21"></a>
|
||||||
@@ -341,7 +341,7 @@ book['files'] == list of files from self.process_book(book)
|
|||||||
Proceeds to call process_book
|
Proceeds to call process_book
|
||||||
|
|
||||||
:returns self._book_list_expanded: json string containing all book metadata
|
:returns self._book_list_expanded: json string containing all book metadata
|
||||||
</pre>
|
</pre>
|
||||||
<p>Reimplemented from <a class="el" href="../../d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html#a9dec8499f181aee506861142004d002d">src.backend.lib.library.Catalogue</a>.</p>
|
<p>Reimplemented from <a class="el" href="../../d5/da5/classsrc_1_1backend_1_1lib_1_1library_1_1Catalogue.html#a9dec8499f181aee506861142004d002d">src.backend.lib.library.Catalogue</a>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -382,7 +382,7 @@ Proceeds to call process_book
|
|||||||
<pre class="fragment">Main entry point for import operations.
|
<pre class="fragment">Main entry point for import operations.
|
||||||
Gets a list of new files via compare_shelf_current.
|
Gets a list of new files via compare_shelf_current.
|
||||||
Iterates over list and inserts new books into database.
|
Iterates over list and inserts new books into database.
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="aedf70ab79105f8251d36848fb790fb9f"></a>
|
<a id="aedf70ab79105f8251d36848fb790fb9f"></a>
|
||||||
@@ -408,7 +408,7 @@ Iterates over list and inserts new books into database.
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Return dictionary of epub file contents</pre>
|
<pre class="fragment">Return dictionary of epub file contents</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="a204c5171b7de8ddd199563fd1b252032"></a>
|
<a id="a204c5171b7de8ddd199563fd1b252032"></a>
|
||||||
@@ -445,7 +445,7 @@ Iterates over list and inserts new books into database.
|
|||||||
</table>
|
</table>
|
||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
<pre class="fragment">Scan folder by _path, allows recurisive scanning
|
<pre class="fragment">Scan folder by _path, allows recurisive scanning
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||||
|
|||||||
0
docs/html/db/dda/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 962 B After Width: | Height: | Size: 962 B |
0
docs/html/dc/d3e/classsrc_1_1backend_1_1tests_1_1library__test_1_1Test__Catalogue-members.html
vendored
Normal file → Executable file
0
docs/html/de/d11/classsrc_1_1backend_1_1lib_1_1api__hooks_1_1DuckDuckGo-members.html
vendored
Normal file → Executable file
0
docs/html/df/d83/classsrc_1_1backend_1_1tests_1_1config__test_1_1TestConfig.html
vendored
Normal file → Executable file
0
docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html
vendored
Normal file → Executable file
0
docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html
vendored
Normal file → Executable file
0
docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
vendored
Normal file → Executable file
0
docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html
vendored
Normal file → Executable file
0
docs/html/doc.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 746 B After Width: | Height: | Size: 746 B |
59
docs/html/doxygen.css
vendored
Normal file → Executable file
@@ -166,11 +166,11 @@ a.elRef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.code, a.code:visited, a.line, a.line:visited {
|
a.code, a.code:visited, a.line, a.line:visited {
|
||||||
color: #4665A2;
|
color: #4665A2;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
|
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
|
||||||
color: #4665A2;
|
color: #4665A2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @end */
|
/* @end */
|
||||||
@@ -356,7 +356,7 @@ p.formulaDsp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
img.formulaDsp {
|
img.formulaDsp {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img.formulaInl, img.inline {
|
img.formulaInl, img.inline {
|
||||||
@@ -414,20 +414,20 @@ span.charliteral {
|
|||||||
color: #008080
|
color: #008080
|
||||||
}
|
}
|
||||||
|
|
||||||
span.vhdldigit {
|
span.vhdldigit {
|
||||||
color: #ff00ff
|
color: #ff00ff
|
||||||
}
|
}
|
||||||
|
|
||||||
span.vhdlchar {
|
span.vhdlchar {
|
||||||
color: #000000
|
color: #000000
|
||||||
}
|
}
|
||||||
|
|
||||||
span.vhdlkeyword {
|
span.vhdlkeyword {
|
||||||
color: #700070
|
color: #700070
|
||||||
}
|
}
|
||||||
|
|
||||||
span.vhdllogic {
|
span.vhdllogic {
|
||||||
color: #ff0000
|
color: #ff0000
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
@@ -652,9 +652,9 @@ table.memberdecls {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.memdoc, dl.reflist dd {
|
.memdoc, dl.reflist dd {
|
||||||
border-bottom: 1px solid #A8B8D9;
|
border-bottom: 1px solid #A8B8D9;
|
||||||
border-left: 1px solid #A8B8D9;
|
border-left: 1px solid #A8B8D9;
|
||||||
border-right: 1px solid #A8B8D9;
|
border-right: 1px solid #A8B8D9;
|
||||||
padding: 6px 10px 2px 10px;
|
padding: 6px 10px 2px 10px;
|
||||||
background-color: #FBFCFD;
|
background-color: #FBFCFD;
|
||||||
border-top-width: 0;
|
border-top-width: 0;
|
||||||
@@ -706,18 +706,18 @@ dl.reflist dd {
|
|||||||
.params, .retval, .exception, .tparams {
|
.params, .retval, .exception, .tparams {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
|
.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.params .paramtype, .tparams .paramtype {
|
.params .paramtype, .tparams .paramtype {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.params .paramdir, .tparams .paramdir {
|
.params .paramdir, .tparams .paramdir {
|
||||||
font-family: "courier new",courier,monospace;
|
font-family: "courier new",courier,monospace;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
@@ -973,8 +973,8 @@ table.fieldtable {
|
|||||||
|
|
||||||
.fieldtable td.fielddoc p:first-child {
|
.fieldtable td.fielddoc p:first-child {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fieldtable td.fielddoc p:last-child {
|
.fieldtable td.fielddoc p:last-child {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
@@ -1049,7 +1049,7 @@ table.fieldtable {
|
|||||||
color: #283A5D;
|
color: #283A5D;
|
||||||
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navpath li.navelem a:hover
|
.navpath li.navelem a:hover
|
||||||
@@ -1078,7 +1078,7 @@ div.summary
|
|||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.summary a
|
div.summary a
|
||||||
{
|
{
|
||||||
@@ -1093,7 +1093,7 @@ table.classindex
|
|||||||
margin-right: 3%;
|
margin-right: 3%;
|
||||||
width: 94%;
|
width: 94%;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1273,12 +1273,12 @@ dl.section dd {
|
|||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
}
|
}
|
||||||
|
|
||||||
#projectlogo img
|
#projectlogo img
|
||||||
{
|
{
|
||||||
border: 0px none;
|
border: 0px none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#projectalign
|
#projectalign
|
||||||
{
|
{
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -1290,7 +1290,7 @@ dl.section dd {
|
|||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 2px 0px;
|
padding: 2px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#projectbrief
|
#projectbrief
|
||||||
{
|
{
|
||||||
font: 120% Tahoma, Arial,sans-serif;
|
font: 120% Tahoma, Arial,sans-serif;
|
||||||
@@ -1406,7 +1406,7 @@ div.toc ul {
|
|||||||
list-style: none outside none;
|
list-style: none outside none;
|
||||||
border: medium none;
|
border: medium none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.toc li.level1 {
|
div.toc li.level1 {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
@@ -1761,11 +1761,10 @@ table.DocNodeLTR {
|
|||||||
tt, code, kbd, samp
|
tt, code, kbd, samp
|
||||||
{
|
{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
direction:ltr;
|
direction:ltr;
|
||||||
}
|
}
|
||||||
/* @end */
|
/* @end */
|
||||||
|
|
||||||
u {
|
u {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
0
docs/html/doxygen.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
0
docs/html/dynsections.js
vendored
Normal file → Executable file
0
docs/html/files.html
vendored
Normal file → Executable file
0
docs/html/folderclosed.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
0
docs/html/folderopen.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 597 B |
0
docs/html/functions.html
vendored
Normal file → Executable file
0
docs/html/functions_func.html
vendored
Normal file → Executable file
0
docs/html/hierarchy.html
vendored
Normal file → Executable file
0
docs/html/index.hhc
vendored
Normal file → Executable file
0
docs/html/index.hhk
vendored
Normal file → Executable file
0
docs/html/index.hhp
vendored
Normal file → Executable file
0
docs/html/index.html
vendored
Normal file → Executable file
2
docs/html/jquery.js
vendored
Normal file → Executable file
0
docs/html/menu.js
vendored
Normal file → Executable file
0
docs/html/menudata.js
vendored
Normal file → Executable file
0
docs/html/nav_f.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
0
docs/html/nav_g.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 95 B |
0
docs/html/nav_h.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 98 B After Width: | Height: | Size: 98 B |
0
docs/html/open.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
0
docs/html/splitbar.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
0
docs/html/sync_off.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 853 B After Width: | Height: | Size: 853 B |
0
docs/html/sync_on.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 845 B |
0
docs/html/tab_a.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
0
docs/html/tab_b.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 169 B |
0
docs/html/tab_h.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
0
docs/html/tab_s.png
vendored
Normal file → Executable file
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 184 B |
2
docs/html/tabs.css
vendored
Normal file → Executable file
10
docs/man/man3/src_backend_lib_api_hooks_DuckDuckGo.3
vendored
Normal file → Executable file
@@ -24,16 +24,16 @@ src.backend.lib.api_hooks.DuckDuckGo
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
duckduckgo related searching
|
duckduckgo related searching
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.api_hooks\&.DuckDuckGo\&.image_result ( self, query)"
|
.SS "def src\&.backend\&.lib\&.api_hooks\&.DuckDuckGo\&.image_result ( self, query)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -43,8 +43,8 @@ Returns json containing url to image
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
14
docs/man/man3/src_backend_lib_config_Config.3
vendored
Normal file → Executable file
@@ -68,7 +68,7 @@ Inherited by \fBsrc\&.backend\&.tests\&.library_test\&.Test_Config\fP\&.
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
@@ -76,9 +76,9 @@ Main System Configuration
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Constructor & Destructor Documentation"
|
.SH "Constructor & Destructor Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.config\&.Config\&.__init__ ( self, root)"
|
.SS "def src\&.backend\&.lib\&.config\&.Config\&.__init__ ( self, root)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -87,9 +87,9 @@ Initialize main configuration options
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.config\&.Config\&.open_file ( self, _cp)"
|
.SS "def src\&.backend\&.lib\&.config\&.Config\&.open_file ( self, _cp)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -98,10 +98,10 @@ Opens config.json and reads in configuration options
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Reimplemented in \fBsrc\&.backend\&.tests\&.library_test\&.Test_Config\fP\&.
|
Reimplemented in \fBsrc\&.backend\&.tests\&.library_test\&.Test_Config\fP\&.
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
4
docs/man/man3/src_backend_lib_display_TerminalDisplay.3
vendored
Normal file → Executable file
@@ -70,9 +70,9 @@ src.backend.lib.display.TerminalDisplay
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
26
docs/man/man3/src_backend_lib_library_Catalogue.3
vendored
Normal file → Executable file
@@ -81,7 +81,7 @@ Inherited by \fBsrc\&.backend\&.tests\&.library_test\&.Test_Catalogue\fP\&.
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
@@ -89,9 +89,9 @@ Decodes book metadata for storage
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.compare_shelf_current ( self)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.compare_shelf_current ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -100,7 +100,7 @@ Calls storage system, gets list of books stored and compares against files on di
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_content ( self, book_zip, book)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_content ( self, book_zip, book)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -109,7 +109,7 @@ Opens epub as zip file filters then stores as list any files matching opf_regx
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_html ( self, book_zip, book)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_html ( self, book_zip, book)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -118,7 +118,7 @@ Opens epub as zip file filters then stores as list any files matching html_regx
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_image ( self, book_zip, book)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_image ( self, book_zip, book)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -127,7 +127,7 @@ Opens epub as zip file filters then stores as list any files matching cover_regx
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_metadata ( self, book)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_metadata ( self, book)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -138,7 +138,7 @@ book['files'] == list of files from self.process_book(book)
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.filter_books ( self)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.filter_books ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -150,7 +150,7 @@ Proceeds to call process_book
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Reimplemented in \fBsrc\&.backend\&.tests\&.library_test\&.Test_Catalogue\fP\&.
|
Reimplemented in \fBsrc\&.backend\&.tests\&.library_test\&.Test_Catalogue\fP\&.
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.import_books ( self, list = \fCNone\fP)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.import_books ( self, list = \fCNone\fP)"
|
||||||
@@ -163,7 +163,7 @@ Iterates over list and inserts new books into database.
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.process_book ( book)\fC [static]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.process_book ( book)\fC [static]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -171,7 +171,7 @@ Iterates over list and inserts new books into database.
|
|||||||
Return dictionary of epub file contents
|
Return dictionary of epub file contents
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.scan_folder ( self, _path = \fCNone\fP)"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.scan_folder ( self, _path = \fCNone\fP)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -180,8 +180,8 @@ Scan folder by _path, allows recurisive scanning
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
18
docs/man/man3/src_backend_lib_pyShelf_BookDisplay.3
vendored
Normal file → Executable file
@@ -45,16 +45,16 @@ src.backend.lib.pyShelf.BookDisplay
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
All functions related to displaying book information in the HTML UI
|
All functions related to displaying book information in the HTML UI
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Constructor & Destructor Documentation"
|
.SH "Constructor & Destructor Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.__init__ ( self, ** kwargs)"
|
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.__init__ ( self, ** kwargs)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -64,9 +64,9 @@ Initialize class variables
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.booksPerPage ( self, screen_size)"
|
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.booksPerPage ( self, screen_size)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -78,7 +78,7 @@ Set books per page
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.nextPage ( self)"
|
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.nextPage ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -89,7 +89,7 @@ Goto next book page
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.previousPage ( self)"
|
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.previousPage ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -100,8 +100,8 @@ Goto previous book page
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
10
docs/man/man3/src_backend_lib_pyShelf_InitFiles.3
vendored
Normal file → Executable file
@@ -17,16 +17,16 @@ src.backend.lib.pyShelf.InitFiles
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
First run file creation operations
|
First run file creation operations
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.pyShelf\&.InitFiles\&.CreateFile ( self, _pointer)"
|
.SS "def src\&.backend\&.lib\&.pyShelf\&.InitFiles\&.CreateFile ( self, _pointer)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -35,8 +35,8 @@ Checks if file exists and creates it if not
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
18
docs/man/man3/src_backend_lib_storage_Storage.3
vendored
Normal file → Executable file
@@ -60,16 +60,16 @@ src.backend.lib.storage.Storage
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
Contains all methods for system storage
|
Contains all methods for system storage
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.book_paths_list ( self)"
|
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.book_paths_list ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -78,7 +78,7 @@ Get file paths from database for comparison to system files
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.close ( self)"
|
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.close ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -87,7 +87,7 @@ Close database connection
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.commit ( self)"
|
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.commit ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -96,7 +96,7 @@ Commit database transactions
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.create_tables ( self)"
|
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.create_tables ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -104,7 +104,7 @@ Commit database transactions
|
|||||||
Create table structure
|
Create table structure
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.insert_book ( self, book)"
|
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.insert_book ( self, book)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -114,8 +114,8 @@ Insert book in database
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
4
docs/man/man3/src_backend_tests_config_test_TestConfig.3
vendored
Normal file → Executable file
@@ -27,9 +27,9 @@ src.backend.tests.config_test.TestConfig
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
4
docs/man/man3/src_backend_tests_library_test_TestCatalogue.3
vendored
Normal file → Executable file
@@ -24,9 +24,9 @@ src.backend.tests.library_test.TestCatalogue
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
24
docs/man/man3/src_backend_tests_library_test_Test_Catalogue.3
vendored
Normal file → Executable file
@@ -81,9 +81,9 @@ Inherits \fBsrc\&.backend\&.lib\&.library\&.Catalogue\fP\&.
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.compare_shelf_current ( self)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.compare_shelf_current ( self)\fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -92,7 +92,7 @@ Calls storage system, gets list of books stored and compares against files on di
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_content ( self, book_zip, book)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_content ( self, book_zip, book)\fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -101,7 +101,7 @@ Opens epub as zip file filters then stores as list any files matching opf_regx
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_html ( self, book_zip, book)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_html ( self, book_zip, book)\fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -110,7 +110,7 @@ Opens epub as zip file filters then stores as list any files matching html_regx
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_image ( self, book_zip, book)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_image ( self, book_zip, book)\fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -119,7 +119,7 @@ Opens epub as zip file filters then stores as list any files matching cover_regx
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_metadata ( self, book)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_metadata ( self, book)\fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -130,7 +130,7 @@ book['files'] == list of files from self.process_book(book)
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.tests\&.library_test\&.Test_Catalogue\&.filter_books ( self)"
|
.SS "def src\&.backend\&.tests\&.library_test\&.Test_Catalogue\&.filter_books ( self)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -142,7 +142,7 @@ Proceeds to call process_book
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Reimplemented from \fBsrc\&.backend\&.lib\&.library\&.Catalogue\fP\&.
|
Reimplemented from \fBsrc\&.backend\&.lib\&.library\&.Catalogue\fP\&.
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.import_books ( self, list = \fCNone\fP)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.import_books ( self, list = \fCNone\fP)\fC [inherited]\fP"
|
||||||
@@ -155,7 +155,7 @@ Iterates over list and inserts new books into database.
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.process_book ( book)\fC [static]\fP, \fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.process_book ( book)\fC [static]\fP, \fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -163,7 +163,7 @@ Iterates over list and inserts new books into database.
|
|||||||
Return dictionary of epub file contents
|
Return dictionary of epub file contents
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.scan_folder ( self, _path = \fCNone\fP)\fC [inherited]\fP"
|
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.scan_folder ( self, _path = \fCNone\fP)\fC [inherited]\fP"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -172,8 +172,8 @@ Scan folder by _path, allows recurisive scanning
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
8
docs/man/man3/src_backend_tests_library_test_Test_Config.3
vendored
Normal file → Executable file
@@ -68,9 +68,9 @@ Inherits \fBsrc\&.backend\&.lib\&.config\&.Config\fP\&.
|
|||||||
.br
|
.br
|
||||||
.in -1c
|
.in -1c
|
||||||
.SH "Detailed Description"
|
.SH "Detailed Description"
|
||||||
.PP
|
.PP
|
||||||
.SH "Member Function Documentation"
|
.SH "Member Function Documentation"
|
||||||
.PP
|
.PP
|
||||||
.SS "def src\&.backend\&.tests\&.library_test\&.Test_Config\&.open_file ( self, _cp = \fC'config\&.json'\fP)"
|
.SS "def src\&.backend\&.tests\&.library_test\&.Test_Config\&.open_file ( self, _cp = \fC'config\&.json'\fP)"
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
@@ -79,10 +79,10 @@ Opens config.json and reads in configuration options
|
|||||||
|
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Reimplemented from \fBsrc\&.backend\&.lib\&.config\&.Config\fP\&.
|
Reimplemented from \fBsrc\&.backend\&.lib\&.config\&.Config\fP\&.
|
||||||
|
|
||||||
.SH "Author"
|
.SH "Author"
|
||||||
.PP
|
.PP
|
||||||
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
|
||||||
|
|||||||
2
docs/warn.log
vendored
Normal file → Executable file
@@ -4,7 +4,7 @@
|
|||||||
/opt/pyshelf/src/backend/tests/library_test.py:8: warning: Compound src::backend::tests::library_test::Test_Config is not documented.
|
/opt/pyshelf/src/backend/tests/library_test.py:8: warning: Compound src::backend::tests::library_test::Test_Config is not documented.
|
||||||
/opt/pyshelf/src/backend/lib/display.py:9: warning: Compound src::backend::lib::display::TerminalDisplay is not documented.
|
/opt/pyshelf/src/backend/lib/display.py:9: warning: Compound src::backend::lib::display::TerminalDisplay is not documented.
|
||||||
error: Problems running htags. Check your installation
|
error: Problems running htags. Check your installation
|
||||||
error: USE_HTAGS is YES but htags(1) failed.
|
error: USE_HTAGS is YES but htags(1) failed.
|
||||||
/opt/pyshelf/src/backend/lib/api_hooks.py:12: warning: Member __init__(self) (function) of class src::backend::lib::api_hooks::DuckDuckGo is not documented.
|
/opt/pyshelf/src/backend/lib/api_hooks.py:12: warning: Member __init__(self) (function) of class src::backend::lib::api_hooks::DuckDuckGo is not documented.
|
||||||
/opt/pyshelf/src/backend/lib/api_hooks.py:13: warning: Member url (variable) of class src::backend::lib::api_hooks::DuckDuckGo is not documented.
|
/opt/pyshelf/src/backend/lib/api_hooks.py:13: warning: Member url (variable) of class src::backend::lib::api_hooks::DuckDuckGo is not documented.
|
||||||
/opt/pyshelf/src/backend/lib/api_hooks.py:15: warning: parameters of member src.backend.lib.api_hooks.DuckDuckGo.image_result are not (all) documented
|
/opt/pyshelf/src/backend/lib/api_hooks.py:15: warning: parameters of member src.backend.lib.api_hooks.DuckDuckGo.image_result are not (all) documented
|
||||||
|
|||||||
0
doxygen.conf
vendored
Normal file → Executable file
2
importBooks
vendored
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!python
|
||||||
|
|
||||||
import pathlib
|
import pathlib
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
63
installer
vendored
Normal file → Executable file
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!python
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
@@ -136,6 +136,9 @@ class SystemInstaller:
|
|||||||
if os.path.isdir(_dirs[1]):
|
if os.path.isdir(_dirs[1]):
|
||||||
ln_string = str(_dirs[0] + outfile + " " + _dirs[1] + outfile)
|
ln_string = str(_dirs[0] + outfile + " " + _dirs[1] + outfile)
|
||||||
os.system("sudo ln -s %s" % ln_string)
|
os.system("sudo ln -s %s" % ln_string)
|
||||||
|
|
||||||
|
""" TODO check for sites-enabled, create it if it doesnt exist,
|
||||||
|
then symlink the config """
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
return True
|
return True
|
||||||
@@ -152,7 +155,7 @@ class SystemInstaller:
|
|||||||
wsgiport = r["answer"]
|
wsgiport = r["answer"]
|
||||||
nginx_conf_str = """
|
nginx_conf_str = """
|
||||||
# pyshelf_nginx.conf
|
# pyshelf_nginx.conf
|
||||||
upstream django {server unix://%s/pyshelf_wsgi.sock;}
|
upstream django {server unix:///tmp/pyshelf_wsgi.sock;}
|
||||||
server {
|
server {
|
||||||
listen %s;
|
listen %s;
|
||||||
server_name %s;
|
server_name %s;
|
||||||
@@ -166,7 +169,6 @@ class SystemInstaller:
|
|||||||
location / {uwsgi_pass django; include %s/uwsgi_params;}
|
location / {uwsgi_pass django; include %s/uwsgi_params;}
|
||||||
}
|
}
|
||||||
""" % (
|
""" % (
|
||||||
root,
|
|
||||||
port,
|
port,
|
||||||
hostname,
|
hostname,
|
||||||
root,
|
root,
|
||||||
@@ -194,11 +196,10 @@ class SystemInstaller:
|
|||||||
master=True
|
master=True
|
||||||
pidfile=/tmp/pyShelf.pid
|
pidfile=/tmp/pyShelf.pid
|
||||||
vacuum=True
|
vacuum=True
|
||||||
socket=%s/pyshelf_wsgi.sock
|
socket=/tmp/pyshelf_wsgi.sock
|
||||||
chmod-socket=666
|
chmod-socket=666
|
||||||
""" % (
|
""" % (
|
||||||
root,
|
root,
|
||||||
root
|
|
||||||
)
|
)
|
||||||
with open(_fp, "w") as write_file:
|
with open(_fp, "w") as write_file:
|
||||||
write_file.write(wsgi_conf_str)
|
write_file.write(wsgi_conf_str)
|
||||||
@@ -222,8 +223,8 @@ installer = sysinstall.bin
|
|||||||
install_answers = TerminalDisplay().installer()
|
install_answers = TerminalDisplay().installer()
|
||||||
for key in install_answers:
|
for key in install_answers:
|
||||||
config[key["name"]] = key["answer"]
|
config[key["name"]] = key["answer"]
|
||||||
#config["USER"] = os.environ["USER"]
|
# config["USER"] = os.environ["USER"]
|
||||||
config["USER"] = 'pyshelf'
|
config["USER"] = "pyshelf"
|
||||||
# Write configuration
|
# Write configuration
|
||||||
Configuration().write_file(config)
|
Configuration().write_file(config)
|
||||||
|
|
||||||
@@ -300,23 +301,29 @@ if RequiredServices().db_server_found(req) is False:
|
|||||||
)
|
)
|
||||||
install_status = os.system(cmd)
|
install_status = os.system(cmd)
|
||||||
for r in install_answers:
|
for r in install_answers:
|
||||||
if r["name"] == "PASSWORD": sql_pass = r["answer"]
|
if r["name"] == "PASSWORD":
|
||||||
|
sql_pass = r["answer"]
|
||||||
|
|
||||||
#sql_user = config["USER"]
|
# sql_user = config["USER"]
|
||||||
sql_user = "pyshelf"
|
sql_user = "pyshelf"
|
||||||
db_name = "pyshelf"
|
db_name = "pyshelf"
|
||||||
psql_cmd = """
|
import pudb
|
||||||
CREATE DATABASE %s;
|
|
||||||
CREATE USER %s WITH PASSWORD \'%s\';
|
pudb.set_trace()
|
||||||
GRANT ALL PRIVILEGES ON DATABASE %s TO %s;
|
psql_cmd = (
|
||||||
""" % (db_name, sql_user, sql_pass, db_name, sql_user)
|
"CREATE DATABASE %s; CREATE USER %s WITH PASSWORD '%s'; GRANT ALL PRIVILEGES ON DATABASE %s TO %s;"
|
||||||
_sql_file = "create_db.sql"
|
% (db_name, sql_user, sql_pass, db_name, sql_user)
|
||||||
|
)
|
||||||
|
_sql_file = "/tmp/create_db.sql"
|
||||||
with open(_sql_file, "w") as sql_file_open:
|
with open(_sql_file, "w") as sql_file_open:
|
||||||
sql_file_open.write(psql_cmd)
|
sql_file_open.write(psql_cmd)
|
||||||
sql_file_open.close()
|
sql_file_open.close()
|
||||||
os.system("sudo -u postgres initdb --locale=en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data")
|
os.system(
|
||||||
|
"sudo -u postgres initdb --locale=en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data"
|
||||||
|
)
|
||||||
os.system("sudo systemctl start postgresql")
|
os.system("sudo systemctl start postgresql")
|
||||||
os.system("sudo -u postgres psql -f %s"%_sql_file)
|
os.system("sudo -u postgres psql -f %s" % _sql_file)
|
||||||
|
# os.system("sudo -u postgres psql -c \'%s\'"%psql_cmd)
|
||||||
messages = messages + [
|
messages = messages + [
|
||||||
"PostgreSQL installed and started",
|
"PostgreSQL installed and started",
|
||||||
"To enable autostart you must run",
|
"To enable autostart you must run",
|
||||||
@@ -324,7 +331,7 @@ if RequiredServices().db_server_found(req) is False:
|
|||||||
"\n",
|
"\n",
|
||||||
"Database cluster initialized at /var/lib/postgres",
|
"Database cluster initialized at /var/lib/postgres",
|
||||||
"pyShelf database and user created",
|
"pyShelf database and user created",
|
||||||
psql_cmd
|
psql_cmd,
|
||||||
]
|
]
|
||||||
|
|
||||||
# Post install configurations
|
# Post install configurations
|
||||||
@@ -337,23 +344,31 @@ try:
|
|||||||
os.system("python manage.py migrate interface")
|
os.system("python manage.py migrate interface")
|
||||||
os.chdir("../")
|
os.chdir("../")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("-"*80)
|
print("-" * 80)
|
||||||
print(" E:"+e)
|
print(" E:" + e)
|
||||||
try:
|
try:
|
||||||
copy_config = sysinstall.copy_config()
|
copy_config = sysinstall.copy_config()
|
||||||
if copy_config:
|
if copy_config:
|
||||||
messages = messages + ["pyShelf site config copied to sites-available, and symlinked to sites-enabled"]
|
messages = messages + [
|
||||||
|
"pyShelf site config copied to sites-available, and symlinked to sites-enabled"
|
||||||
|
]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
messages = messages + ["nginx site config not copied", "A nginx config for your install has been created \"pyshelf_nginx.conf\""]
|
messages = messages + [
|
||||||
|
"nginx site config not copied",
|
||||||
|
'A nginx config for your install has been created "pyshelf_nginx.conf"',
|
||||||
|
]
|
||||||
sysinstall.make_wsgi_config(install_answers)
|
sysinstall.make_wsgi_config(install_answers)
|
||||||
messages = messages + ["You should now import your books by running importBooks", "You can then start the interface with uwsgi --ini uwsgi.ini"]
|
messages = messages + [
|
||||||
|
"You should now import your books by running importBooks",
|
||||||
|
"You can then start the interface with uwsgi --ini uwsgi.ini",
|
||||||
|
]
|
||||||
|
|
||||||
# Display end screen
|
# Display end screen
|
||||||
sysinstall.log()
|
sysinstall.log()
|
||||||
TerminalDisplay().clear()
|
TerminalDisplay().clear()
|
||||||
TerminalDisplay().banner()
|
TerminalDisplay().banner()
|
||||||
for message in messages:
|
for message in messages:
|
||||||
print(" "+message)
|
print(" " + message)
|
||||||
print()
|
print()
|
||||||
|
|
||||||
TerminalDisplay().h_rule()
|
TerminalDisplay().h_rule()
|
||||||
|
|||||||
0
pyproject.toml
vendored
Normal file → Executable file
5
requirements.txt
vendored
Normal file → Executable file
@@ -12,9 +12,12 @@ pre-commit
|
|||||||
isort
|
isort
|
||||||
django
|
django
|
||||||
toml
|
toml
|
||||||
uwsgi
|
:close
|
||||||
|
|
||||||
|
q
|
||||||
django-debug-toolbar
|
django-debug-toolbar
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
prompt_toolkit
|
prompt_toolkit
|
||||||
psutil
|
psutil
|
||||||
pyfiglet
|
pyfiglet
|
||||||
|
psycopg2
|
||||||
|
|||||||
0
src/__init__.py
Normal file → Executable file
0
src/backend/empty_bookshelf.sql
vendored
Normal file → Executable file
0
src/backend/lib/display.py
Normal file → Executable file
@@ -1,10 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import sqlite3
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
from psycopg2 import Error
|
|
||||||
from .config import Config
|
|
||||||
|
|
||||||
# db_pointer = Config().catalogue_db
|
|
||||||
|
|
||||||
|
|
||||||
class Storage:
|
class Storage:
|
||||||
@@ -29,7 +24,6 @@ class Storage:
|
|||||||
try:
|
try:
|
||||||
self.cursor.execute(_q)
|
self.cursor.execute(_q)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
breakpoint()
|
|
||||||
if e.pgcode == "42501":
|
if e.pgcode == "42501":
|
||||||
_q = """ALTER TABLE public.books OWNER to pyshelf;"""
|
_q = """ALTER TABLE public.books OWNER to pyshelf;"""
|
||||||
self.close()
|
self.close()
|
||||||
@@ -102,24 +96,29 @@ class Storage:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def make_collections(self):
|
def make_collections(self):
|
||||||
_q = "SELECT id,file_name FROM books"
|
_q = "SELECT id,file_name FROM books"
|
||||||
self.cursor.execute(_q)
|
self.cursor.execute(_q)
|
||||||
_set = self.cursor.fetchall()
|
_set = self.cursor.fetchall()
|
||||||
for book in _set:
|
for book in _set:
|
||||||
path = self.config.book_path+'/'
|
path = self.config.book_path + "/"
|
||||||
_collections = []
|
_collections = []
|
||||||
_pathing = book[1].split(path)[1].split('/')
|
_pathing = book[1].split(path)[1].split("/")
|
||||||
_pathing.pop(0);_pathing.pop(-1)
|
_pathing.pop(0)
|
||||||
|
_pathing.pop(-1)
|
||||||
for _p in _pathing:
|
for _p in _pathing:
|
||||||
_s = _p.replace("'","")
|
_s = _p.replace("'", "")
|
||||||
_q_x = """
|
_q_x = """
|
||||||
SELECT id FROM collections where collection='%s' AND book_id_id=%s
|
SELECT id FROM collections where collection='%s' AND book_id_id=%s
|
||||||
"""%(_s,book[0])
|
""" % (
|
||||||
|
_s,
|
||||||
|
book[0],
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
self.cursor.execute(_q_x)
|
self.cursor.execute(_q_x)
|
||||||
if len(self.cursor.fetchall()) < 1:
|
if len(self.cursor.fetchall()) < 1:
|
||||||
self.cursor.execute(
|
self.cursor.execute(
|
||||||
"""INSERT INTO collections (collection, book_id_id) VALUES ('%s',%s)"""%(_s,book[0])
|
"""INSERT INTO collections (collection, book_id_id) VALUES ('%s',%s)"""
|
||||||
|
% (_s, book[0])
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||||||
SECRET_KEY = "@(9b9jslgg41u1u=mr)-2*-n2x0vef0zsy39*z@sz18&tvow18"
|
SECRET_KEY = "@(9b9jslgg41u1u=mr)-2*-n2x0vef0zsy39*z@sz18&tvow18"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = TEMPLATE_DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = CONFIG.allowed_hosts
|
ALLOWED_HOSTS = CONFIG.allowed_hosts
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ urlpatterns = [
|
|||||||
path("search/", views.search, name="search"),
|
path("search/", views.search, name="search"),
|
||||||
path("search/<query>", views.search, name="search"),
|
path("search/<query>", views.search, name="search"),
|
||||||
path("search/<query>/<_set>", views.search, name="search"),
|
path("search/<query>/<_set>", views.search, name="search"),
|
||||||
|
path(
|
||||||
|
"show_collection/<_collection>/<_colset>",
|
||||||
|
views.show_collection,
|
||||||
|
name="show_collection",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
|
|||||||
0
src/interface/migrations/0001_initial.py
Normal file → Executable file
0
src/interface/migrations/0002_auto_20200101_0445.py
Normal file → Executable file
0
src/interface/migrations/0003_auto_20200101_0447.py
Normal file → Executable file
30
src/interface/migrations/0004_collections.py
Normal file → Executable file
@@ -1,25 +1,37 @@
|
|||||||
# Generated by Django 3.0.2 on 2020-02-04 20:22
|
# Generated by Django 3.0.2 on 2020-02-04 20:22
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('interface', '0003_auto_20200101_0447'),
|
("interface", "0003_auto_20200101_0447"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Collections',
|
name="Collections",
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
(
|
||||||
('collection', models.CharField(max_length=255)),
|
"id",
|
||||||
('book_id', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='interface.Books')),
|
models.AutoField(
|
||||||
|
auto_created=True,
|
||||||
|
primary_key=True,
|
||||||
|
serialize=False,
|
||||||
|
verbose_name="ID",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("collection", models.CharField(max_length=255)),
|
||||||
|
(
|
||||||
|
"book_id",
|
||||||
|
models.ForeignKey(
|
||||||
|
on_delete=django.db.models.deletion.PROTECT,
|
||||||
|
to="interface.Books",
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
options={
|
options={"db_table": "collections",},
|
||||||
'db_table': 'collections',
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -30,12 +30,14 @@ class Books(models.Model):
|
|||||||
progress = models.IntegerField(null=True)
|
progress = models.IntegerField(null=True)
|
||||||
file_name = models.CharField(max_length=255, null=False)
|
file_name = models.CharField(max_length=255, null=False)
|
||||||
|
|
||||||
class Collections(models.Model):
|
|
||||||
|
|
||||||
|
class Collections(models.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = "collections"
|
db_table = "collections"
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.collection
|
return self.collection
|
||||||
|
|
||||||
collection = models.CharField(max_length=255)
|
collection = models.CharField(max_length=255)
|
||||||
book_id = models.ForeignKey(Books, on_delete=models.PROTECT)
|
book_id = models.ForeignKey(Books, on_delete=models.PROTECT)
|
||||||
|
|
||||||
@@ -45,9 +47,9 @@ class Collections(models.Model):
|
|||||||
|
|
||||||
def generic_search(self, query):
|
def generic_search(self, query):
|
||||||
try:
|
try:
|
||||||
results = Books.objects.annotate(
|
results = Books.objects.annotate(search=SearchVector("collection"),).filter(
|
||||||
search=SearchVector("author", "title", "file_name"),
|
search=query
|
||||||
).filter(search=query)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise
|
raise
|
||||||
return results
|
return results
|
||||||
|
|||||||