diff --git a/.github/contributing.md b/.github/contributing.md
deleted file mode 100644
index 36c4eaa..0000000
--- a/.github/contributing.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
-
-## Our Standards
-
-Examples of behavior that contributes to a positive environment for our community include:
-
-* Demonstrating empathy and kindness toward other people
-* Being respectful of differing opinions, viewpoints, and experiences
-* Giving and gracefully accepting constructive feedback
-* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
-* Focusing on what is best not just for us as individuals, but for the overall community
-
-Examples of unacceptable behavior include:
-
-* The use of sexualized language or imagery, and sexual attention or
- advances of any kind
-* Trolling, insulting or derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or email
- address, without their explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Enforcement Responsibilities
-
-Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
-
-Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
-
-## Scope
-
-This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [enforcement@pyshelf.com](mailto:enforcement@pyshelf.com). All complaints will be reviewed and investigated promptly and fairly.
-
-All community leaders are obligated to respect the privacy and security of the reporter of any incident.
-
-## Enforcement Guidelines
-
-Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
-
-**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series of actions.
-
-**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
-
-**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within the project community.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
-available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
-
-Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
-
-[homepage]: https://www.contributor-covenant.org
-
-For answers to common questions about this code of conduct, see the FAQ at
-https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
diff --git a/.gitignore b/.gitignore
index b53eaff..7d5c28b 100755
--- a/.gitignore
+++ b/.gitignore
@@ -129,3 +129,6 @@ create_db.sql
uwsgi.ini
installer.log
pyshelf_nginx.conf
+tags
+TAGS
+config.json
diff --git a/.tern-config b/.tern-config
new file mode 100644
index 0000000..158d9f4
--- /dev/null
+++ b/.tern-config
@@ -0,0 +1,6 @@
+{
+ “plugins”:
+ {
+ “node”: {}
+ }
+}
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index b8ab274..00cd8f1
--- a/README.md
+++ b/README.md
@@ -1,20 +1,22 @@
-# pyShelf 0.4.1
+# pyShelf 0.5.0
Terminal based ebook server. Open source & Lightweight.
+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.
+https://pyshelf.com
-[](https://ko-fi.com/D1D51ALZH)
+
+
-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.
-
-### Join the discussion: Discord [https://discord.gg/H9TbNJS](https://discord.gg/H9TbNJS) | IRC freenode.net @ #pyshelf
+Discord [https://discord.gg/H9TbNJS](https://discord.gg/H9TbNJS) | IRC freenode.net @ #pyshelf
## Current Features
-* Custom Installer
+* Custom Installer -- pre-req installs work on Arch Based Distros Only
* Recursive Scanning
* Fast database access
* Django based frontend
* Basic seaching via a SearchVector of author, title, & file_name fields.
* Ebook Downloading
+* Collections
## Currently Supported Formats
* epub
@@ -25,22 +27,39 @@ Having used Calibre for hosting my eBook collection in the past, I found myself
## Further Installation & Support Information
* [SUPPORT.md](https://github.com/th3r00t/pyShelf/blob/development/.github/SUPPORT.md)
-## 0.4.1 Patch Notes.
-### Filename detection
-Now using os.path.splitext to ensure proper formating of downloaded files
+## 0.5.0 Patch Notes.
-## 0.4.0 Patch Notes.
-### The Installer Initiative
+### Pre-req Dependencies
+* gcc -- This will be installed by the new pre-installer script if its binary is not detected at /usr/bin/gcc
+Users on distros other then Arch should install gcc via their systems package manager prior to
+running the installer.
+* Python3
+* pip
+### New Features
+* Collections
+We are now categorizing your ebooks into collections based on the folder
+structure used to store them. Any folder after the root book folder is now
+considered as a collection.
+#### books/forgotten realms/ -> Forgotten Realms Collection.
+#### books/Dune/Prelude To Dune -> Dune, & Preluse To Dune Collections.
-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.
+In addition to the work on the collection system, a good deal of time was spent
+on the installer, and the concept of having an installer in the first place.
-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.
+I mainly wanted to make this project for Network Administrators, and other home
+enthusiasts whom I assume will know how to setup a Django app, and a
+Postgres server. Beyond that theres nothing the user has to do to make the
+system work...
-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.
+The installer will only run correctly on arch based distros. This could be
+easily rectified to include other package managers, Members of the community
+are welcome to dig into the installer source and patch in support
+for other package managers.
-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.
+There is some support for detection of the aptitude package manager
+installation already present in the source now, however it is not complete and
+should not be relied upon to be present in future releases unless completed by
+a member of the community,
## Development
@@ -59,15 +78,24 @@ All configuration is now handled by the installer.
Running via the Django test server might be possible, albeit not recomended.
-## In Progress
+### In Progress
-* Organizational tools.
-* Docker image for those who need it.
-* Improved cover image storage, and acquisition.
+#### Organizational tools.
+- [x] Automated Collections
+- [ ] Manual Collections
+- [ ] Books Removal
+- [ ] Access Restrictions
+- [ ] Metadata Manipulation
+- [ ] Others?
+#### Improved cover image storage, and acquisition.
+#### OPDS Support
+#### Support for other formats
+- [ ] .mobi
+- [ ] .pdf
+- [ ] .cbz
+- [ ] .zip (Zipped book folders, is this a new idea? (Consider storing your library folders zipped and retrieving a book on demand))
-## Future Goals
-* Support for other book formats (Currently only supporting EPUBS)
-* Terminal Backend for catalogue maintenance
-* Calculate page count from total characters
+### Future Goals
+#### Terminal Backend for catalogue maintenance
+#### Calculate page count from total characters
* (Thanks to @Fireblend for the idea) https://github.com/th3r00t/pyShelf/issues/3
-* Reader for easy integration with your catalogue
diff --git a/config.json b/config.json
old mode 100644
new mode 100755
index b83d7e3..71951be
--- a/config.json
+++ b/config.json
@@ -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.5.0", "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"}
diff --git a/data/.track_this_folder b/data/.track_this_folder
old mode 100644
new mode 100755
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
old mode 100644
new mode 100755
diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png
old mode 100644
new mode 100755
diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png
old mode 100644
new mode 100755
diff --git a/docs/html/classes.html b/docs/html/classes.html
old mode 100644
new mode 100755
diff --git a/docs/html/closed.png b/docs/html/closed.png
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index 585ec70..c9dc6cb
--- 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
@@ -148,7 +148,7 @@ Public Attributes
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index 9ed75d7..aad2433
--- 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
@@ -144,7 +144,7 @@ Public Attributes
Calls storage system, gets list of books stored and compares against files on disk
-
+
@@ -179,7 +179,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching opf_regx
-
+
@@ -214,7 +214,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching html_regx
-
+
@@ -249,7 +249,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching cover_regx
-
+
@@ -280,7 +280,7 @@ Public Attributes
Return extracted metadata and cover picture
book['path'] == Full path to ebook file
book['files'] == list of files from self.process_book(book)
-
+
@@ -302,7 +302,7 @@ book['files'] == list of files from self.process_book(book)
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 .
@@ -335,7 +335,7 @@ Proceeds to call process_book
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.
-
+
@@ -361,7 +361,7 @@ Iterates over list and inserts new books into database.
-
Return dictionary of epub file contents
+
Return dictionary of epub file contents
@@ -390,7 +390,7 @@ Iterates over list and inserts new books into database.
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index 2a3edc3..a0f660a
--- 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
@@ -117,7 +117,7 @@ Public Attributes
Get file paths from database for comparison to system files
-
+
@@ -136,7 +136,7 @@ Public Attributes
Close database connection
-
+
@@ -155,7 +155,7 @@ Public Attributes
Commit database transactions
-
+
@@ -173,7 +173,7 @@ Public Attributes
-
Create table structure
+
Create table structure
@@ -203,7 +203,7 @@ Public Attributes
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index cb4e721..4584639
--- 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
@@ -96,7 +96,7 @@ Public Attributes
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index fefef33..72c66dc
--- 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
@@ -148,7 +148,7 @@ Public Attributes
Initialize main configuration options
-
+
@@ -178,7 +178,7 @@ Public Attributes
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index 6c7ab61..7588592
--- 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
@@ -88,7 +88,7 @@ def __init__ (self, fi
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
old mode 100644
new mode 100755
index c80f7b9..721795e
--- 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
@@ -114,7 +114,7 @@ Public Attributes
Initialize class variables
:return: None
-
+
@@ -147,7 +147,7 @@ Public Attributes
Set books per page
:param screen_size: Array containing x,y pixel sizes
:return: self.books_per_page
-
+
@@ -168,7 +168,7 @@ Set books per page
## TODO Remove me
Goto next book page
:return: new current_page
-
+
@@ -189,7 +189,7 @@ Goto next book page
## 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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
index d27694a..ee6e13b
--- 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
@@ -151,7 +151,7 @@ Public Attributes
Calls storage system, gets list of books stored and compares against files on disk
-
+
@@ -194,7 +194,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching opf_regx
-
+
@@ -237,7 +237,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching html_regx
-
+
@@ -280,7 +280,7 @@ Public Attributes
Opens epub as zip file filters then stores as list any files matching cover_regx
-
+
@@ -319,7 +319,7 @@ Public Attributes
Return extracted metadata and cover picture
book['path'] == Full path to ebook file
book['files'] == list of files from self.process_book(book)
-
+
@@ -341,7 +341,7 @@ book['files'] == list of files from self.process_book(book)
Proceeds to call process_book
:returns self._book_list_expanded: json string containing all book metadata
-
+
Reimplemented from src.backend.lib.library.Catalogue .
@@ -382,7 +382,7 @@ Proceeds to call process_book
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.
-
+
@@ -408,7 +408,7 @@ Iterates over list and inserts new books into database.
-
Return dictionary of epub file contents
+
Return dictionary of epub file contents
@@ -445,7 +445,7 @@ Iterates over list and inserts new books into database.
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
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
old mode 100644
new mode 100755
diff --git a/docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html b/docs/html/dir_1c7294442ce83d360610449d04c9d7fc.html
old mode 100644
new mode 100755
diff --git a/docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html b/docs/html/dir_3f615ade772d23cefe5e20dcb18424a2.html
old mode 100644
new mode 100755
diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
old mode 100644
new mode 100755
diff --git a/docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html b/docs/html/dir_9020577e2da81c4cf5a5554c26431f94.html
old mode 100644
new mode 100755
diff --git a/docs/html/doc.png b/docs/html/doc.png
old mode 100644
new mode 100755
diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css
old mode 100644
new mode 100755
index 73ecbb2..4267a97
--- a/docs/html/doxygen.css
+++ b/docs/html/doxygen.css
@@ -166,11 +166,11 @@ a.elRef {
}
a.code, a.code:visited, a.line, a.line:visited {
- color: #4665A2;
+ color: #4665A2;
}
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
- color: #4665A2;
+ color: #4665A2;
}
/* @end */
@@ -356,7 +356,7 @@ p.formulaDsp {
}
img.formulaDsp {
-
+
}
img.formulaInl, img.inline {
@@ -414,20 +414,20 @@ span.charliteral {
color: #008080
}
-span.vhdldigit {
- color: #ff00ff
+span.vhdldigit {
+ color: #ff00ff
}
-span.vhdlchar {
- color: #000000
+span.vhdlchar {
+ color: #000000
}
-span.vhdlkeyword {
- color: #700070
+span.vhdlkeyword {
+ color: #700070
}
-span.vhdllogic {
- color: #ff0000
+span.vhdllogic {
+ color: #ff0000
}
blockquote {
@@ -652,9 +652,9 @@ table.memberdecls {
}
.memdoc, dl.reflist dd {
- border-bottom: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
+ border-bottom: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
padding: 6px 10px 2px 10px;
background-color: #FBFCFD;
border-top-width: 0;
@@ -706,18 +706,18 @@ dl.reflist dd {
.params, .retval, .exception, .tparams {
margin-left: 0px;
padding-left: 0px;
-}
+}
.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
font-weight: bold;
vertical-align: top;
}
-
+
.params .paramtype, .tparams .paramtype {
font-style: italic;
vertical-align: top;
-}
-
+}
+
.params .paramdir, .tparams .paramdir {
font-family: "courier new",courier,monospace;
vertical-align: top;
@@ -973,8 +973,8 @@ table.fieldtable {
.fieldtable td.fielddoc p:first-child {
margin-top: 0px;
-}
-
+}
+
.fieldtable td.fielddoc p:last-child {
margin-bottom: 2px;
}
@@ -1049,7 +1049,7 @@ table.fieldtable {
color: #283A5D;
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
- text-decoration: none;
+ text-decoration: none;
}
.navpath li.navelem a:hover
@@ -1078,7 +1078,7 @@ div.summary
padding-right: 5px;
width: 50%;
text-align: right;
-}
+}
div.summary a
{
@@ -1093,7 +1093,7 @@ table.classindex
margin-right: 3%;
width: 94%;
border: 0;
- border-spacing: 0;
+ border-spacing: 0;
padding: 0;
}
@@ -1273,12 +1273,12 @@ dl.section dd {
vertical-align: bottom;
border-collapse: separate;
}
-
+
#projectlogo img
-{
+{
border: 0px none;
}
-
+
#projectalign
{
vertical-align: middle;
@@ -1290,7 +1290,7 @@ dl.section dd {
margin: 0px;
padding: 2px 0px;
}
-
+
#projectbrief
{
font: 120% Tahoma, Arial,sans-serif;
@@ -1406,7 +1406,7 @@ div.toc ul {
list-style: none outside none;
border: medium none;
padding: 0px;
-}
+}
div.toc li.level1 {
margin-left: 0px;
@@ -1761,11 +1761,10 @@ table.DocNodeLTR {
tt, code, kbd, samp
{
display: inline-block;
- direction:ltr;
+ direction:ltr;
}
/* @end */
u {
text-decoration: underline;
}
-
diff --git a/docs/html/doxygen.png b/docs/html/doxygen.png
old mode 100644
new mode 100755
diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js
old mode 100644
new mode 100755
diff --git a/docs/html/files.html b/docs/html/files.html
old mode 100644
new mode 100755
diff --git a/docs/html/folderclosed.png b/docs/html/folderclosed.png
old mode 100644
new mode 100755
diff --git a/docs/html/folderopen.png b/docs/html/folderopen.png
old mode 100644
new mode 100755
diff --git a/docs/html/functions.html b/docs/html/functions.html
old mode 100644
new mode 100755
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html
old mode 100644
new mode 100755
diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html
old mode 100644
new mode 100755
diff --git a/docs/html/index.hhc b/docs/html/index.hhc
old mode 100644
new mode 100755
diff --git a/docs/html/index.hhk b/docs/html/index.hhk
old mode 100644
new mode 100755
diff --git a/docs/html/index.hhp b/docs/html/index.hhp
old mode 100644
new mode 100755
diff --git a/docs/html/index.html b/docs/html/index.html
old mode 100644
new mode 100755
diff --git a/docs/html/jquery.js b/docs/html/jquery.js
old mode 100644
new mode 100755
index 103c32d..4344b33
--- a/docs/html/jquery.js
+++ b/docs/html/jquery.js
@@ -32,4 +32,4 @@
*/
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017
* http://www.smartmenus.org/
- * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$(" ").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$(' ')[0],$(' ')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$});
\ No newline at end of file
+ * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$(" ").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$(' ')[0],$(' ')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$});
diff --git a/docs/html/menu.js b/docs/html/menu.js
old mode 100644
new mode 100755
diff --git a/docs/html/menudata.js b/docs/html/menudata.js
old mode 100644
new mode 100755
diff --git a/docs/html/nav_f.png b/docs/html/nav_f.png
old mode 100644
new mode 100755
diff --git a/docs/html/nav_g.png b/docs/html/nav_g.png
old mode 100644
new mode 100755
diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png
old mode 100644
new mode 100755
diff --git a/docs/html/open.png b/docs/html/open.png
old mode 100644
new mode 100755
diff --git a/docs/html/splitbar.png b/docs/html/splitbar.png
old mode 100644
new mode 100755
diff --git a/docs/html/sync_off.png b/docs/html/sync_off.png
old mode 100644
new mode 100755
diff --git a/docs/html/sync_on.png b/docs/html/sync_on.png
old mode 100644
new mode 100755
diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png
old mode 100644
new mode 100755
diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png
old mode 100644
new mode 100755
diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png
old mode 100644
new mode 100755
diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png
old mode 100644
new mode 100755
diff --git a/docs/html/tabs.css b/docs/html/tabs.css
old mode 100644
new mode 100755
index 85a0cd5..56ec360
--- a/docs/html/tabs.css
+++ b/docs/html/tabs.css
@@ -1 +1 @@
-.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}}
\ No newline at end of file
+.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}}
diff --git a/docs/man/man3/src_backend_lib_api_hooks_DuckDuckGo.3 b/docs/man/man3/src_backend_lib_api_hooks_DuckDuckGo.3
old mode 100644
new mode 100755
index 234ad1c..09e6a47
--- a/docs/man/man3/src_backend_lib_api_hooks_DuckDuckGo.3
+++ b/docs/man/man3/src_backend_lib_api_hooks_DuckDuckGo.3
@@ -24,16 +24,16 @@ src.backend.lib.api_hooks.DuckDuckGo
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.PP
.nf
duckduckgo related searching
.fi
.PP
-
+
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.api_hooks\&.DuckDuckGo\&.image_result ( self, query)"
.PP
@@ -43,8 +43,8 @@ Returns json containing url to image
.fi
.PP
-
+
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_lib_config_Config.3 b/docs/man/man3/src_backend_lib_config_Config.3
old mode 100644
new mode 100755
index 36ad409..d43c50d
--- a/docs/man/man3/src_backend_lib_config_Config.3
+++ b/docs/man/man3/src_backend_lib_config_Config.3
@@ -68,7 +68,7 @@ Inherited by \fBsrc\&.backend\&.tests\&.library_test\&.Test_Config\fP\&.
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.PP
.nf
@@ -76,9 +76,9 @@ Main System Configuration
.fi
.PP
-
+
.SH "Constructor & Destructor Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.config\&.Config\&.__init__ ( self, root)"
.PP
@@ -87,9 +87,9 @@ Initialize main configuration options
.fi
.PP
-
+
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.config\&.Config\&.open_file ( self, _cp)"
.PP
@@ -98,10 +98,10 @@ Opens config.json and reads in configuration options
.fi
.PP
-
+
.PP
Reimplemented in \fBsrc\&.backend\&.tests\&.library_test\&.Test_Config\fP\&.
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_lib_display_TerminalDisplay.3 b/docs/man/man3/src_backend_lib_display_TerminalDisplay.3
old mode 100644
new mode 100755
index c2fcdf9..5b17d9e
--- a/docs/man/man3/src_backend_lib_display_TerminalDisplay.3
+++ b/docs/man/man3/src_backend_lib_display_TerminalDisplay.3
@@ -70,9 +70,9 @@ src.backend.lib.display.TerminalDisplay
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_lib_library_Catalogue.3 b/docs/man/man3/src_backend_lib_library_Catalogue.3
old mode 100644
new mode 100755
index c304f5f..00b4f9b
--- a/docs/man/man3/src_backend_lib_library_Catalogue.3
+++ b/docs/man/man3/src_backend_lib_library_Catalogue.3
@@ -81,7 +81,7 @@ Inherited by \fBsrc\&.backend\&.tests\&.library_test\&.Test_Catalogue\fP\&.
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.PP
.nf
@@ -89,9 +89,9 @@ Decodes book metadata for storage
.fi
.PP
-
+
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.compare_shelf_current ( self)"
.PP
@@ -100,7 +100,7 @@ Calls storage system, gets list of books stored and compares against files on di
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_content ( self, book_zip, book)"
.PP
@@ -109,7 +109,7 @@ Opens epub as zip file filters then stores as list any files matching opf_regx
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_html ( self, book_zip, book)"
.PP
@@ -118,7 +118,7 @@ Opens epub as zip file filters then stores as list any files matching html_regx
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_image ( self, book_zip, book)"
.PP
@@ -127,7 +127,7 @@ Opens epub as zip file filters then stores as list any files matching cover_regx
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_metadata ( self, book)"
.PP
@@ -138,7 +138,7 @@ book['files'] == list of files from self.process_book(book)
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.filter_books ( self)"
.PP
@@ -150,7 +150,7 @@ Proceeds to call process_book
.fi
.PP
-
+
.PP
Reimplemented in \fBsrc\&.backend\&.tests\&.library_test\&.Test_Catalogue\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
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.process_book ( book)\fC [static]\fP"
.PP
@@ -171,7 +171,7 @@ Iterates over list and inserts new books into database.
Return dictionary of epub file contents
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.scan_folder ( self, _path = \fCNone\fP)"
.PP
@@ -180,8 +180,8 @@ Scan folder by _path, allows recurisive scanning
.fi
.PP
-
+
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_lib_pyShelf_BookDisplay.3 b/docs/man/man3/src_backend_lib_pyShelf_BookDisplay.3
old mode 100644
new mode 100755
index b2edd78..f4dbe34
--- a/docs/man/man3/src_backend_lib_pyShelf_BookDisplay.3
+++ b/docs/man/man3/src_backend_lib_pyShelf_BookDisplay.3
@@ -45,16 +45,16 @@ src.backend.lib.pyShelf.BookDisplay
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.PP
.nf
All functions related to displaying book information in the HTML UI
.fi
.PP
-
+
.SH "Constructor & Destructor Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.__init__ ( self, ** kwargs)"
.PP
@@ -64,9 +64,9 @@ Initialize class variables
.fi
.PP
-
+
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.booksPerPage ( self, screen_size)"
.PP
@@ -78,7 +78,7 @@ Set books per page
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.nextPage ( self)"
.PP
@@ -89,7 +89,7 @@ Goto next book page
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.pyShelf\&.BookDisplay\&.previousPage ( self)"
.PP
@@ -100,8 +100,8 @@ Goto previous book page
.fi
.PP
-
+
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_lib_pyShelf_InitFiles.3 b/docs/man/man3/src_backend_lib_pyShelf_InitFiles.3
old mode 100644
new mode 100755
index 845893e..fb9763e
--- a/docs/man/man3/src_backend_lib_pyShelf_InitFiles.3
+++ b/docs/man/man3/src_backend_lib_pyShelf_InitFiles.3
@@ -17,16 +17,16 @@ src.backend.lib.pyShelf.InitFiles
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.PP
.nf
First run file creation operations
.fi
.PP
-
+
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.pyShelf\&.InitFiles\&.CreateFile ( self, _pointer)"
.PP
@@ -35,8 +35,8 @@ Checks if file exists and creates it if not
.fi
.PP
-
+
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_lib_storage_Storage.3 b/docs/man/man3/src_backend_lib_storage_Storage.3
old mode 100644
new mode 100755
index 9d74c11..23857ca
--- a/docs/man/man3/src_backend_lib_storage_Storage.3
+++ b/docs/man/man3/src_backend_lib_storage_Storage.3
@@ -60,16 +60,16 @@ src.backend.lib.storage.Storage
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.PP
.nf
Contains all methods for system storage
.fi
.PP
-
+
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.book_paths_list ( self)"
.PP
@@ -78,7 +78,7 @@ Get file paths from database for comparison to system files
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.close ( self)"
.PP
@@ -87,7 +87,7 @@ Close database connection
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.commit ( self)"
.PP
@@ -96,7 +96,7 @@ Commit database transactions
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.create_tables ( self)"
.PP
@@ -104,7 +104,7 @@ Commit database transactions
Create table structure
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.storage\&.Storage\&.insert_book ( self, book)"
.PP
@@ -114,8 +114,8 @@ Insert book in database
.fi
.PP
-
+
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_tests_config_test_TestConfig.3 b/docs/man/man3/src_backend_tests_config_test_TestConfig.3
old mode 100644
new mode 100755
index 50513d2..cf77f5f
--- a/docs/man/man3/src_backend_tests_config_test_TestConfig.3
+++ b/docs/man/man3/src_backend_tests_config_test_TestConfig.3
@@ -27,9 +27,9 @@ src.backend.tests.config_test.TestConfig
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_tests_library_test_TestCatalogue.3 b/docs/man/man3/src_backend_tests_library_test_TestCatalogue.3
old mode 100644
new mode 100755
index 50d749d..fae6de1
--- a/docs/man/man3/src_backend_tests_library_test_TestCatalogue.3
+++ b/docs/man/man3/src_backend_tests_library_test_TestCatalogue.3
@@ -24,9 +24,9 @@ src.backend.tests.library_test.TestCatalogue
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_tests_library_test_Test_Catalogue.3 b/docs/man/man3/src_backend_tests_library_test_Test_Catalogue.3
old mode 100644
new mode 100755
index 9f68037..98d2f36
--- a/docs/man/man3/src_backend_tests_library_test_Test_Catalogue.3
+++ b/docs/man/man3/src_backend_tests_library_test_Test_Catalogue.3
@@ -81,9 +81,9 @@ Inherits \fBsrc\&.backend\&.lib\&.library\&.Catalogue\fP\&.
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.compare_shelf_current ( self)\fC [inherited]\fP"
.PP
@@ -92,7 +92,7 @@ Calls storage system, gets list of books stored and compares against files on di
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_content ( self, book_zip, book)\fC [inherited]\fP"
.PP
@@ -101,7 +101,7 @@ Opens epub as zip file filters then stores as list any files matching opf_regx
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_html ( self, book_zip, book)\fC [inherited]\fP"
.PP
@@ -110,7 +110,7 @@ Opens epub as zip file filters then stores as list any files matching html_regx
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_cover_image ( self, book_zip, book)\fC [inherited]\fP"
.PP
@@ -119,7 +119,7 @@ Opens epub as zip file filters then stores as list any files matching cover_regx
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.extract_metadata ( self, book)\fC [inherited]\fP"
.PP
@@ -130,7 +130,7 @@ book['files'] == list of files from self.process_book(book)
.fi
.PP
-
+
.SS "def src\&.backend\&.tests\&.library_test\&.Test_Catalogue\&.filter_books ( self)"
.PP
@@ -142,7 +142,7 @@ Proceeds to call process_book
.fi
.PP
-
+
.PP
Reimplemented from \fBsrc\&.backend\&.lib\&.library\&.Catalogue\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
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.process_book ( book)\fC [static]\fP, \fC [inherited]\fP"
.PP
@@ -163,7 +163,7 @@ Iterates over list and inserts new books into database.
Return dictionary of epub file contents
.fi
.PP
-
+
.SS "def src\&.backend\&.lib\&.library\&.Catalogue\&.scan_folder ( self, _path = \fCNone\fP)\fC [inherited]\fP"
.PP
@@ -172,8 +172,8 @@ Scan folder by _path, allows recurisive scanning
.fi
.PP
-
+
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/man/man3/src_backend_tests_library_test_Test_Config.3 b/docs/man/man3/src_backend_tests_library_test_Test_Config.3
old mode 100644
new mode 100755
index 17dba10..b4a9ac6
--- a/docs/man/man3/src_backend_tests_library_test_Test_Config.3
+++ b/docs/man/man3/src_backend_tests_library_test_Test_Config.3
@@ -68,9 +68,9 @@ Inherits \fBsrc\&.backend\&.lib\&.config\&.Config\fP\&.
.br
.in -1c
.SH "Detailed Description"
-.PP
+.PP
.SH "Member Function Documentation"
-.PP
+.PP
.SS "def src\&.backend\&.tests\&.library_test\&.Test_Config\&.open_file ( self, _cp = \fC'config\&.json'\fP)"
.PP
@@ -79,10 +79,10 @@ Opens config.json and reads in configuration options
.fi
.PP
-
+
.PP
Reimplemented from \fBsrc\&.backend\&.lib\&.config\&.Config\fP\&.
.SH "Author"
-.PP
+.PP
Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code\&.
diff --git a/docs/warn.log b/docs/warn.log
old mode 100644
new mode 100755
index 5d1cf7f..cb87bd7
--- a/docs/warn.log
+++ b/docs/warn.log
@@ -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/lib/display.py:9: warning: Compound src::backend::lib::display::TerminalDisplay is not documented.
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: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
diff --git a/doxygen.conf b/doxygen.conf
old mode 100644
new mode 100755
diff --git a/importBooks b/importBooks
index b69661a..244906d 100755
--- a/importBooks
+++ b/importBooks
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!python
import pathlib
import sys
diff --git a/install.sh b/install.sh
index cda8ef9..b146c1c 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
-
+eval python3 preinstall
eval "pip install -r requirements.txt"
eval python3 installer
diff --git a/installer b/installer
old mode 100644
new mode 100755
index c524396..f6882b5
--- a/installer
+++ b/installer
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!python
import json
import os
import pathlib
@@ -136,6 +136,9 @@ class SystemInstaller:
if os.path.isdir(_dirs[1]):
ln_string = str(_dirs[0] + outfile + " " + _dirs[1] + outfile)
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:
pass
return True
@@ -152,7 +155,7 @@ class SystemInstaller:
wsgiport = r["answer"]
nginx_conf_str = """
# pyshelf_nginx.conf
- upstream django {server unix://%s/pyshelf_wsgi.sock;}
+ upstream django {server unix:///tmp/pyshelf_wsgi.sock;}
server {
listen %s;
server_name %s;
@@ -166,7 +169,6 @@ class SystemInstaller:
location / {uwsgi_pass django; include %s/uwsgi_params;}
}
""" % (
- root,
port,
hostname,
root,
@@ -194,11 +196,10 @@ class SystemInstaller:
master=True
pidfile=/tmp/pyShelf.pid
vacuum=True
- socket=%s/pyshelf_wsgi.sock
+ socket=/tmp/pyshelf_wsgi.sock
chmod-socket=666
""" % (
root,
- root
)
with open(_fp, "w") as write_file:
write_file.write(wsgi_conf_str)
@@ -222,20 +223,19 @@ installer = sysinstall.bin
install_answers = TerminalDisplay().installer()
for key in install_answers:
config[key["name"]] = key["answer"]
-#config["USER"] = os.environ["USER"]
-config["USER"] = 'pyshelf'
+# config["USER"] = os.environ["USER"]
+config["USER"] = "pyshelf"
# Write configuration
Configuration().write_file(config)
-
# Start checking for our list of required services
-service_list = ["postgres", "nginx", "httpd", "test"]
+service_list = ["postgres", "nginx", "httpd"]
req = RequiredServices().check_ps(service_list)
-
# Does user have either nginx || apache?
if RequiredServices().web_server_found(req) is False:
web_prompt = [
{
- "message": " You must have either apache or nginx\n would you like us to try and install nginx now? > ",
+ "message": " You must have either apache or nginx\n would you like \
+ us to try and install nginx now? Enter for default 'no' > ",
"options": "nginx",
"name": "NGINX",
"answer": None,
@@ -274,7 +274,8 @@ if RequiredServices().web_server_found(req) is False:
if RequiredServices().db_server_found(req) is False:
db_prompt = [
{
- "message": " You must have PostgreSQL\n would you like us to try and install it now? > ",
+ "message": " You must have PostgreSQL\n would you like us to try \
+ and install it now? Enter for default 'no' > ",
"options": "postgres",
"name": "postgresql",
"answer": None,
@@ -300,23 +301,28 @@ if RequiredServices().db_server_found(req) is False:
)
install_status = os.system(cmd)
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"
db_name = "pyshelf"
- psql_cmd = """
- CREATE DATABASE %s;
- CREATE USER %s WITH PASSWORD \'%s\';
- GRANT ALL PRIVILEGES ON DATABASE %s TO %s;
- """ % (db_name, sql_user, sql_pass, db_name, sql_user)
- _sql_file = "create_db.sql"
+ psql_cmd = (
+ "CREATE DATABASE %s; CREATE USER %s WITH PASSWORD '%s'; \
+ GRANT ALL PRIVILEGES ON DATABASE %s TO %s;"
+ % (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:
sql_file_open.write(psql_cmd)
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 systemctl start postgresql")
- os.system("sudo -u postgres initdb --locale=en_US.UTF-8 -E UTF8 -D /var/lib/postgres/data")
- 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 + [
"PostgreSQL installed and started",
"To enable autostart you must run",
@@ -324,7 +330,24 @@ if RequiredServices().db_server_found(req) is False:
"\n",
"Database cluster initialized at /var/lib/postgres",
"pyShelf database and user created",
- psql_cmd
+ psql_cmd,
+ ]
+ else:
+ psql_cmd = (
+ "CREATE DATABASE %s; CREATE USER %s WITH PASSWORD '%s'; \
+ GRANT ALL PRIVILEGES ON DATABASE %s TO %s;"
+ % (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:
+ sql_file_open.write(psql_cmd)
+ sql_file_open.close()
+ os.system("sudo systemctl start postgresql")
+ os.system("sudo -u postgres psql -f %s" % _sql_file)
+ # os.system("sudo -u postgres psql -c \'%s\'"%psql_cmd)
+ messages = messages + [
+ "pyShelf database and user created",
+ psql_cmd,
]
# Post install configurations
@@ -337,23 +360,31 @@ try:
os.system("python manage.py migrate interface")
os.chdir("../")
except Exception as e:
- print("-"*80)
- print(" E:"+e)
+ print("-" * 80)
+ print(" E:" + e)
try:
copy_config = sysinstall.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:
- 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)
-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
sysinstall.log()
TerminalDisplay().clear()
TerminalDisplay().banner()
for message in messages:
- print(" "+message)
+ print(" " + message)
print()
TerminalDisplay().h_rule()
diff --git a/makeCollections b/makeCollections
new file mode 100755
index 0000000..4333055
--- /dev/null
+++ b/makeCollections
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+
+import pathlib
+import sys
+
+from src.backend.lib.storage import Storage
+from src.backend.pyShelf_MakeCollections import MakeCollections
+
+PRG_PATH = pathlib.Path.cwd()
+LIB_PATH = pathlib.Path.joinpath(PRG_PATH, "src", "backend", "lib")
+sys.path.insert(0, PRG_PATH)
+print("\n")
+MakeCollections(PRG_PATH)
diff --git a/preinstall b/preinstall
new file mode 100755
index 0000000..fee8bdf
--- /dev/null
+++ b/preinstall
@@ -0,0 +1,33 @@
+#!python
+import os
+from subprocess import run
+
+
+class RequiredPackages:
+ def __init__(self, bins):
+ self.required = bins
+ self.to_be_installed = []
+ self.locate()
+
+ def locate(self):
+ for bin in self.required:
+ if os.path.isfile(bin[1]):
+ continue
+ else:
+ self.to_be_installed.append(bin[0])
+ return self.to_be_installed
+
+
+# Package List
+
+package_list = [["gcc", "/usr/bin/gcc"]]
+
+packages, required_packages = "", RequiredPackages(package_list)
+for package in required_packages.to_be_installed:
+ packages = packages + package + " "
+try:
+ ret = run(["sudo", "pacman", "-S", packages[0:-1]])
+ print(ret)
+except Exception as e:
+ ret = run(["pacman", "-S", packages[0:-1]])
+ print(ret)
diff --git a/preview_050.png b/preview_050.png
new file mode 100644
index 0000000..cfb8303
Binary files /dev/null and b/preview_050.png differ
diff --git a/preview_1_050.png b/preview_1_050.png
new file mode 100644
index 0000000..fa01995
Binary files /dev/null and b/preview_1_050.png differ
diff --git a/pyproject.toml b/pyproject.toml
old mode 100644
new mode 100755
diff --git a/requirements.txt b/requirements.txt
old mode 100644
new mode 100755
index dfb1cd5..749a3dd
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,7 +12,6 @@ pre-commit
isort
django
toml
-uwsgi
django-debug-toolbar
psycopg2-binary
prompt_toolkit
diff --git a/src/__init__.py b/src/__init__.py
old mode 100644
new mode 100755
diff --git a/src/backend/empty_bookshelf.sql b/src/backend/empty_bookshelf.sql
old mode 100644
new mode 100755
diff --git a/src/backend/lib/display.py b/src/backend/lib/display.py
old mode 100644
new mode 100755
index 41e1bfd..cefcb9d
--- a/src/backend/lib/display.py
+++ b/src/backend/lib/display.py
@@ -11,7 +11,10 @@ class TerminalDisplay:
self.term = True
self.w, self.y = os.get_terminal_size()[0], os.get_terminal_size()[1]
self.home = os.environ["HOME"]
- self.user = os.environ["USER"]
+ try:
+ self.user = os.environ["USER"]
+ except KeyError:
+ self.user = None
self.version = "0.4.0"
self.slogan = "The Installer Initiative"
self.green = "\033[1;32m"
diff --git a/src/backend/lib/storage.py b/src/backend/lib/storage.py
index e193b88..953d8ec 100755
--- a/src/backend/lib/storage.py
+++ b/src/backend/lib/storage.py
@@ -1,12 +1,7 @@
#!/usr/bin/python
-import sqlite3
+import re
import psycopg2
-from psycopg2 import Error
-
-from .config import Config
-
-# db_pointer = Config().catalogue_db
class Storage:
@@ -31,7 +26,6 @@ class Storage:
try:
self.cursor.execute(_q)
except Exception as e:
- breakpoint()
if e.pgcode == "42501":
_q = """ALTER TABLE public.books OWNER to pyshelf;"""
self.close()
@@ -102,3 +96,39 @@ class Storage:
"""
self.db.close()
return True
+
+ def make_collections(self):
+ _title_regx = re.compile(r"^[0-9][0-9]*|-|\ \B")
+ _q = "SELECT id,file_name FROM books"
+ self.cursor.execute(_q)
+ _set = self.cursor.fetchall()
+ for book in _set:
+ path = self.config.book_path + "/"
+ _collections = []
+ _pathing = book[1].split(path)[1].split("/")
+ _pathing.pop(0)
+ _pathing.pop(-1)
+ for _p in _pathing:
+ _s = _p.replace("'", "")
+ _x = re.sub(_title_regx, "", _s)
+ _s = _x.strip()
+ _q_x = """
+ SELECT id FROM collections where collection='%s'\
+ AND book_id_id=%s
+ """ % (
+ _s,
+ book[0],
+ )
+ try:
+ self.cursor.execute(_q_x)
+ if len(self.cursor.fetchall()) < 1:
+ self.cursor.execute(
+ """INSERT INTO collections\
+ (collection, book_id_id) VALUES ('%s',%s)"""
+ % (_s, book[0])
+ )
+ except Exception as e:
+ print(e)
+ _collections.append(_p)
+ self.db.commit()
+ self.close()
diff --git a/src/backend/pyShelf_MakeCollections.py b/src/backend/pyShelf_MakeCollections.py
new file mode 100755
index 0000000..0f16549
--- /dev/null
+++ b/src/backend/pyShelf_MakeCollections.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+import os
+import sys
+import time
+
+from .lib.config import Config
+from .lib.library import Catalogue
+from .lib.pyShelf import InitFiles
+from .lib.storage import Storage
+
+sys.path.append(os.path.abspath("."))
+
+
+def MakeCollections(root):
+ _t1 = time.time()
+ config = Config(root) # Get configuration settings
+ # InitFiles(config.file_array) # Initialize file system
+ _storage = Storage(config)
+ _storage.make_collections()
+ _t2 = time.time()
+ scan_time = round(_t2 - _t1)
+ print("Collections Made.")
+ print("Time %s seconds" % scan_time)
diff --git a/src/backend/pyShelf_ScanLibrary.py b/src/backend/pyShelf_ScanLibrary.py
index 9acbf3d..84b62e5 100755
--- a/src/backend/pyShelf_ScanLibrary.py
+++ b/src/backend/pyShelf_ScanLibrary.py
@@ -19,7 +19,6 @@ def execute_scan(root):
_t1 = time.time()
config = Config(root) # Get configuration settings
InitFiles(config.file_array) # Initialize file system
-
Storage(config).check_ownership()
catalogue = Catalogue(config) # Open the Catalogue
catalogue.import_books()
diff --git a/src/frontend/settings.py b/src/frontend/settings.py
index f4d9128..6fe29bb 100755
--- a/src/frontend/settings.py
+++ b/src/frontend/settings.py
@@ -33,8 +33,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = "@(9b9jslgg41u1u=mr)-2*-n2x0vef0zsy39*z@sz18&tvow18"
# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = False
-
+DEBUG = TEMPLATE_DEBUG = True
+if DEBUG is True:
+ from pudb.remote import set_trace
ALLOWED_HOSTS = CONFIG.allowed_hosts
diff --git a/src/frontend/urls.py b/src/frontend/urls.py
index 5852873..22252e0 100755
--- a/src/frontend/urls.py
+++ b/src/frontend/urls.py
@@ -27,6 +27,11 @@ urlpatterns = [
path("search/", views.search, name="search"),
path("search/", views.search, name="search"),
path("search//<_set>", views.search, name="search"),
+ path(
+ "show_collection/<_collection>/<_colset>",
+ views.show_collection,
+ name="show_collection",
+ ),
]
if settings.DEBUG:
import debug_toolbar
diff --git a/src/interface/migrations/0001_initial.py b/src/interface/migrations/0001_initial.py
old mode 100644
new mode 100755
diff --git a/src/interface/migrations/0002_auto_20200101_0445.py b/src/interface/migrations/0002_auto_20200101_0445.py
old mode 100644
new mode 100755
diff --git a/src/interface/migrations/0003_auto_20200101_0447.py b/src/interface/migrations/0003_auto_20200101_0447.py
old mode 100644
new mode 100755
diff --git a/src/interface/migrations/0004_collections.py b/src/interface/migrations/0004_collections.py
new file mode 100755
index 0000000..35f7c37
--- /dev/null
+++ b/src/interface/migrations/0004_collections.py
@@ -0,0 +1,37 @@
+# Generated by Django 3.0.2 on 2020-02-04 20:22
+
+import django.db.models.deletion
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("interface", "0003_auto_20200101_0447"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name="Collections",
+ fields=[
+ (
+ "id",
+ 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={"db_table": "collections",},
+ ),
+ ]
diff --git a/src/interface/models.py b/src/interface/models.py
index 929eed2..2f07909 100755
--- a/src/interface/models.py
+++ b/src/interface/models.py
@@ -30,15 +30,35 @@ class Books(models.Model):
progress = models.IntegerField(null=True)
file_name = models.CharField(max_length=255, null=False)
+ def generic_search(self, query):
+ try:
+ results = Books.objects.annotate(
+ search=SearchVector("title", "file_name", "author"),
+ ).filter(search=query)
+ except Exception as e:
+ raise
+ return results
+
+
+class Collections(models.Model):
+ class Meta:
+ db_table = "collections"
+
+ def __str__(self):
+ return self.collection
+
+ collection = models.CharField(max_length=255)
+ book_id = models.ForeignKey(Books, on_delete=models.PROTECT)
+
def get_absolute_url(self):
"""Returns the url to access a particular instance of MyModelName."""
return reverse("model-detail-view", args=[str(self.id)])
def generic_search(self, query):
try:
- results = Books.objects.annotate(
- search=SearchVector("author", "title", "file_name"),
- ).filter(search=query)
+ results = Books.objects.annotate(search=SearchVector("collection"),).filter(
+ search=query
+ )
except Exception as e:
raise
return results
diff --git a/src/interface/static/admin/css/autocomplete.css b/src/interface/static/admin/css/autocomplete.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/base.css b/src/interface/static/admin/css/base.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/changelists.css b/src/interface/static/admin/css/changelists.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/dashboard.css b/src/interface/static/admin/css/dashboard.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/fonts.css b/src/interface/static/admin/css/fonts.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/forms.css b/src/interface/static/admin/css/forms.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/login.css b/src/interface/static/admin/css/login.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/responsive.css b/src/interface/static/admin/css/responsive.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/responsive_rtl.css b/src/interface/static/admin/css/responsive_rtl.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/rtl.css b/src/interface/static/admin/css/rtl.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/vendor/select2/LICENSE-SELECT2.md b/src/interface/static/admin/css/vendor/select2/LICENSE-SELECT2.md
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/vendor/select2/select2.css b/src/interface/static/admin/css/vendor/select2/select2.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/vendor/select2/select2.min.css b/src/interface/static/admin/css/vendor/select2/select2.min.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/css/widgets.css b/src/interface/static/admin/css/widgets.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/fonts/LICENSE.txt b/src/interface/static/admin/fonts/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/fonts/README.txt b/src/interface/static/admin/fonts/README.txt
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/fonts/Roboto-Bold-webfont.woff b/src/interface/static/admin/fonts/Roboto-Bold-webfont.woff
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/fonts/Roboto-Light-webfont.woff b/src/interface/static/admin/fonts/Roboto-Light-webfont.woff
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/fonts/Roboto-Regular-webfont.woff b/src/interface/static/admin/fonts/Roboto-Regular-webfont.woff
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/LICENSE b/src/interface/static/admin/img/LICENSE
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/README.txt b/src/interface/static/admin/img/README.txt
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/calendar-icons.svg b/src/interface/static/admin/img/calendar-icons.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/gis/move_vertex_off.svg b/src/interface/static/admin/img/gis/move_vertex_off.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/gis/move_vertex_on.svg b/src/interface/static/admin/img/gis/move_vertex_on.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-addlink.svg b/src/interface/static/admin/img/icon-addlink.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-alert.svg b/src/interface/static/admin/img/icon-alert.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-calendar.svg b/src/interface/static/admin/img/icon-calendar.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-changelink.svg b/src/interface/static/admin/img/icon-changelink.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-clock.svg b/src/interface/static/admin/img/icon-clock.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-deletelink.svg b/src/interface/static/admin/img/icon-deletelink.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-no.svg b/src/interface/static/admin/img/icon-no.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-unknown-alt.svg b/src/interface/static/admin/img/icon-unknown-alt.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-unknown.svg b/src/interface/static/admin/img/icon-unknown.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-viewlink.svg b/src/interface/static/admin/img/icon-viewlink.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/icon-yes.svg b/src/interface/static/admin/img/icon-yes.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/inline-delete.svg b/src/interface/static/admin/img/inline-delete.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/search.svg b/src/interface/static/admin/img/search.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/selector-icons.svg b/src/interface/static/admin/img/selector-icons.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/sorting-icons.svg b/src/interface/static/admin/img/sorting-icons.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/tooltag-add.svg b/src/interface/static/admin/img/tooltag-add.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/img/tooltag-arrowright.svg b/src/interface/static/admin/img/tooltag-arrowright.svg
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/SelectBox.js b/src/interface/static/admin/js/SelectBox.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/SelectFilter2.js b/src/interface/static/admin/js/SelectFilter2.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/actions.js b/src/interface/static/admin/js/actions.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/actions.min.js b/src/interface/static/admin/js/actions.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/admin/DateTimeShortcuts.js b/src/interface/static/admin/js/admin/DateTimeShortcuts.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/admin/RelatedObjectLookups.js b/src/interface/static/admin/js/admin/RelatedObjectLookups.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/autocomplete.js b/src/interface/static/admin/js/autocomplete.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/calendar.js b/src/interface/static/admin/js/calendar.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/cancel.js b/src/interface/static/admin/js/cancel.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/change_form.js b/src/interface/static/admin/js/change_form.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/collapse.js b/src/interface/static/admin/js/collapse.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/collapse.min.js b/src/interface/static/admin/js/collapse.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/core.js b/src/interface/static/admin/js/core.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/inlines.js b/src/interface/static/admin/js/inlines.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/inlines.min.js b/src/interface/static/admin/js/inlines.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/jquery.init.js b/src/interface/static/admin/js/jquery.init.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/popup_response.js b/src/interface/static/admin/js/popup_response.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/prepopulate.js b/src/interface/static/admin/js/prepopulate.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/prepopulate.min.js b/src/interface/static/admin/js/prepopulate.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/prepopulate_init.js b/src/interface/static/admin/js/prepopulate_init.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/timeparse.js b/src/interface/static/admin/js/timeparse.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/urlify.js b/src/interface/static/admin/js/urlify.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/jquery/LICENSE.txt b/src/interface/static/admin/js/vendor/jquery/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/jquery/jquery.js b/src/interface/static/admin/js/vendor/jquery/jquery.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/jquery/jquery.min.js b/src/interface/static/admin/js/vendor/jquery/jquery.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/LICENSE.md b/src/interface/static/admin/js/vendor/select2/LICENSE.md
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/af.js b/src/interface/static/admin/js/vendor/select2/i18n/af.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ar.js b/src/interface/static/admin/js/vendor/select2/i18n/ar.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/az.js b/src/interface/static/admin/js/vendor/select2/i18n/az.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/bg.js b/src/interface/static/admin/js/vendor/select2/i18n/bg.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/bn.js b/src/interface/static/admin/js/vendor/select2/i18n/bn.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/bs.js b/src/interface/static/admin/js/vendor/select2/i18n/bs.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ca.js b/src/interface/static/admin/js/vendor/select2/i18n/ca.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/cs.js b/src/interface/static/admin/js/vendor/select2/i18n/cs.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/da.js b/src/interface/static/admin/js/vendor/select2/i18n/da.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/de.js b/src/interface/static/admin/js/vendor/select2/i18n/de.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/dsb.js b/src/interface/static/admin/js/vendor/select2/i18n/dsb.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/el.js b/src/interface/static/admin/js/vendor/select2/i18n/el.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/en.js b/src/interface/static/admin/js/vendor/select2/i18n/en.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/es.js b/src/interface/static/admin/js/vendor/select2/i18n/es.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/et.js b/src/interface/static/admin/js/vendor/select2/i18n/et.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/eu.js b/src/interface/static/admin/js/vendor/select2/i18n/eu.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/fa.js b/src/interface/static/admin/js/vendor/select2/i18n/fa.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/fi.js b/src/interface/static/admin/js/vendor/select2/i18n/fi.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/fr.js b/src/interface/static/admin/js/vendor/select2/i18n/fr.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/gl.js b/src/interface/static/admin/js/vendor/select2/i18n/gl.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/he.js b/src/interface/static/admin/js/vendor/select2/i18n/he.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/hi.js b/src/interface/static/admin/js/vendor/select2/i18n/hi.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/hr.js b/src/interface/static/admin/js/vendor/select2/i18n/hr.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/hsb.js b/src/interface/static/admin/js/vendor/select2/i18n/hsb.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/hu.js b/src/interface/static/admin/js/vendor/select2/i18n/hu.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/hy.js b/src/interface/static/admin/js/vendor/select2/i18n/hy.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/id.js b/src/interface/static/admin/js/vendor/select2/i18n/id.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/is.js b/src/interface/static/admin/js/vendor/select2/i18n/is.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/it.js b/src/interface/static/admin/js/vendor/select2/i18n/it.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ja.js b/src/interface/static/admin/js/vendor/select2/i18n/ja.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ka.js b/src/interface/static/admin/js/vendor/select2/i18n/ka.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/km.js b/src/interface/static/admin/js/vendor/select2/i18n/km.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ko.js b/src/interface/static/admin/js/vendor/select2/i18n/ko.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/lt.js b/src/interface/static/admin/js/vendor/select2/i18n/lt.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/lv.js b/src/interface/static/admin/js/vendor/select2/i18n/lv.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/mk.js b/src/interface/static/admin/js/vendor/select2/i18n/mk.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ms.js b/src/interface/static/admin/js/vendor/select2/i18n/ms.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/nb.js b/src/interface/static/admin/js/vendor/select2/i18n/nb.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ne.js b/src/interface/static/admin/js/vendor/select2/i18n/ne.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/nl.js b/src/interface/static/admin/js/vendor/select2/i18n/nl.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/pl.js b/src/interface/static/admin/js/vendor/select2/i18n/pl.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ps.js b/src/interface/static/admin/js/vendor/select2/i18n/ps.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/pt-BR.js b/src/interface/static/admin/js/vendor/select2/i18n/pt-BR.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/pt.js b/src/interface/static/admin/js/vendor/select2/i18n/pt.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ro.js b/src/interface/static/admin/js/vendor/select2/i18n/ro.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/ru.js b/src/interface/static/admin/js/vendor/select2/i18n/ru.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/sk.js b/src/interface/static/admin/js/vendor/select2/i18n/sk.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/sl.js b/src/interface/static/admin/js/vendor/select2/i18n/sl.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/sq.js b/src/interface/static/admin/js/vendor/select2/i18n/sq.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/sr-Cyrl.js b/src/interface/static/admin/js/vendor/select2/i18n/sr-Cyrl.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/sr.js b/src/interface/static/admin/js/vendor/select2/i18n/sr.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/sv.js b/src/interface/static/admin/js/vendor/select2/i18n/sv.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/th.js b/src/interface/static/admin/js/vendor/select2/i18n/th.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/tk.js b/src/interface/static/admin/js/vendor/select2/i18n/tk.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/tr.js b/src/interface/static/admin/js/vendor/select2/i18n/tr.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/uk.js b/src/interface/static/admin/js/vendor/select2/i18n/uk.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/vi.js b/src/interface/static/admin/js/vendor/select2/i18n/vi.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/zh-CN.js b/src/interface/static/admin/js/vendor/select2/i18n/zh-CN.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/i18n/zh-TW.js b/src/interface/static/admin/js/vendor/select2/i18n/zh-TW.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/select2.full.js b/src/interface/static/admin/js/vendor/select2/select2.full.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/select2/select2.full.min.js b/src/interface/static/admin/js/vendor/select2/select2.full.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/xregexp/LICENSE.txt b/src/interface/static/admin/js/vendor/xregexp/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/xregexp/xregexp.js b/src/interface/static/admin/js/vendor/xregexp/xregexp.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/admin/js/vendor/xregexp/xregexp.min.js b/src/interface/static/admin/js/vendor/xregexp/xregexp.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/css/main.css b/src/interface/static/css/main.css
index 3c58dff..060213a 100755
--- a/src/interface/static/css/main.css
+++ b/src/interface/static/css/main.css
@@ -1,49 +1,56 @@
-body{
+body {
margin: 0px;
padding: 0px;
background-color: #DCDCDD;
color: #fff;
overflow-x: hidden;
}
-#app{
+
+#app {
display: grid;
grid-template-areas: "app_header"
- "app_body"
- "app_footer";
+ "app_body"
+ "app_footer";
grid-template-rows: auto auto auto;
- max-height: 100%;
+ /*max-height: 100%;*/
}
-.clear{
- clear: both;
+
+.clear {
+ clear: both;
}
-.app_header{
+
+.app_header {
grid-area: app_header;
margin: 0px;
display: grid;
grid-template-areas:
- "title slogan subhdr"
- "nav_left_top nav_center_top nav_right_top";
+ "title slogan subhdr"
+ "nav_left_top nav_center_top nav_right_top";
align-items: center;
background-color: #2b2b2b;
padding: 4px 0px 4px;
grid-auto-columns: auto;
}
-.nav_left_top{
- grid-area: nav_left_top;
- display: flex;
- justify-content: left;
+
+.nav_left_top {
+ grid-area: nav_left_top;
+ display: flex;
+ justify-content: left;
}
-.nav_center_top{
- grid-area: nav_center_top;
- display: flex;
- justify-content: center;
+
+.nav_center_top {
+ grid-area: nav_center_top;
+ display: flex;
+ justify-content: center;
}
-.nav_right_top{
- grid-area: nav_right_top;
- display: flex;
- justify-content: right;
+
+.nav_right_top {
+ grid-area: nav_right_top;
+ display: flex;
+ justify-content: flex-end;
}
-.app_hdr{
+
+.app_hdr {
grid-area: title;
margin: 0px 0px 5px 0px;
font-family: 'Gruppo', cursive;
@@ -51,32 +58,91 @@ body{
text-align: start;
padding: 0px 0px 0px 5px;
}
-.shadow{
+
+.shadow {
text-shadow: #4c5c68 -5px 3px 5px;
}
-.app_subhdr{
+
+.app_subhdr {
grid-area: subhdr;
margin: 0px 5px;
font-family: 'Gruppo', cursive;
font-size: 18px;
text-align: end;
}
-.app_slogan{
- grid-area: slogan;
- margin: 0;
- font-size: 18px;
- font-family: 'Gruppo', cursive;
- text-align: center;
+
+.app_slogan {
+ grid-area: slogan;
+ margin: 0;
+ font-size: 18px;
+ font-family: 'Gruppo', cursive;
+ text-align: center;
}
-.app_body{
+
+.app_body {
display: grid;
grid-area: app_body;
grid-template-rows: auto;
- grid-template-areas: "shelf";
- justify-items: center;
+ grid-template-areas: "nav_l shelf";
+ grid-template-columns: 15vw 85vw;
background-color: dimgray;
}
-.app_footer{
+
+.nav_l {
+ display: grid;
+ grid-area: nav_l;
+ font-family: 'Gruppo', cursive;
+ font-size: 20px;
+ max-height: 500px;
+ overflow-y: scroll;
+ padding: 0px 10px;
+}
+
+.popover{
+ display: none;
+ z-index: 100;
+ background-color: #000;
+ /*min-width: 200px;*/
+ min-height: 30px;
+ position: fixed;
+ text-align: center;
+ font-weight: bold;
+ align-items: center;
+ justify-content:center;
+ justify-items: center;
+ padding: 0px 10px;
+}
+.nav_l_hdr {
+ text-align: center;
+ padding: 5px;
+ background-color: #292f35;
+ border-bottom: 2px solid #000;
+}
+
+.nav_l_0 {
+ background-color: #2b2b2b;
+ padding: 5px;
+ text-align: center;
+ border-bottom: 1px solid #000;
+}
+
+.nav_l_1 {
+ padding: 5px;
+ text-align: center;
+ border-bottom: 1px solid #000;
+}
+.nav_link {}
+#vert-nav {
+ list-style: None;
+ padding: 0px;
+ margin: 10px 0px;
+ border-left: 5px solid #292f35;
+ border-right: 5px solid #292f35;
+}
+
+.vert-nav-item {}
+
+.app_footer {
grid-area: app_footer;
display: grid;
grid-template-areas: "python_badge gplv3_badge contact";
@@ -88,112 +154,127 @@ body{
font-family: Audiowide, cursive;
font-size: 15px;
}
-.web_footer_link{
- text-decoration: none;
- color: #a5a3a3;
+
+.web_footer_link {
+ text-decoration: none;
+ color: #a5a3a3;
}
-.copyright{
- grid-area: gplv3_badge;
- display: grid;
- align-content: center;
- font-family: Audiowide, cursive;
- font-size: 9px;
- justify-self: left;
+
+.copyright {
+ grid-area: gplv3_badge;
+ display: grid;
+ align-content: center;
+ font-family: Audiowide, cursive;
+ font-size: 9px;
+ justify-self: left;
}
-.footer_contact{
- grid-area: contact;
- display: inline-grid;
- align-content: center;
- justify-items: right;
- font-size: 12px;
+
+.footer_contact {
+ grid-area: contact;
+ display: inline-grid;
+ align-content: center;
+ justify-items: right;
+ font-size: 12px;
}
-.nav_top{
+
+.nav_top {
grid-area: nav_top;
display: grid;
grid-template-areas: "left center right";
grid-template-columns: auto auto auto;
}
-.navbar{
- list-style-type: none;
-}
-.left_align{
-display: flex;
-justify-content: left;
-}
-.center_align{
-display: flex;
-justify-content:center;
-}
-.right_align{
-display: flex;
-justify-content: right;
-}
-.top{
+.navbar {
+ list-style-type: none;
}
-.inline{
+.left_align {
+ display: flex;
+ justify-content: left;
}
-.inline_txt{
+.center_align {
+ display: flex;
+ justify-content: center;
}
-.button{
+.right_align {
+ display: flex;
+ justify-content: right;
}
-.discord-button{
- max-width: 78px;
- max-height: 26px;
-}
-.nav_button{
- background-color:darkgray;
- border-radius: 5px;
- border: 1px solid #999;
- min-width: 110px;
- margin: 0px 5px 0px 0px;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-.nav_search{
- margin: 0px 5px 0px 0px;
- border-radius: 5px;
- border: 1px solid #999;
-}
-.search{
+.top {}
+
+.inline {}
+
+.inline_txt {}
+
+.button {}
+
+.discord-button {
+ max-width: 78px;
+ max-height: 26px;
}
-.search_details{
- display: flex;
- justify-content: center;
- margin: 0px 0px 5px 0px;
+
+.nav_button {
+ background-color: darkgray;
+ border-radius: 5px;
+ border: 1px solid #999;
+ min-width: 110px;
+ margin: 0px 5px 0px 0px;
+ padding-top: 2px;
+ padding-bottom: 2px;
}
-.shelf{
+
+.nav_search {
+ margin: 0px 5px 0px 0px;
+ border-radius: 5px;
+ border: 1px solid #999;
+}
+
+.search {}
+
+.search_details {
+ display: flex;
+ justify-content: center;
+ margin: 0px 0px 5px 0px;
+}
+
+.shelf {
grid-area: shelf;
margin: 0px 0px;
padding: 10px 0px 10px;
list-style-type: none;
+ overflow-y: scroll;
+ overflow-x: hidden;
}
-.shelf_contents{
-}
-.right_col{
+
+.shelf_contents {}
+
+.right_col {
grid-area: right_col
}
-.python_logo{
- grid-area: python_badge;
- display: grid;
- align-content: center;
+
+.python_logo {
+ grid-area: python_badge;
+ display: grid;
+ align-content: center;
}
-p{
- margin: 0px;
+
+p {
+ margin: 0px;
}
-#python_logo{
+
+#python_logo {
height: 37px;
width: 91px;
}
-#book_shelf{
+
+#book_shelf {
display: grid;
- grid-template-columns: 25% 25% 25% 25%;
+ grid-template-columns: 21% 21% 21% 21%;
list-style-type: none;
font-family: 'Audiowide', cursive;
font-size: 25px;
@@ -201,22 +282,26 @@ p{
margin: 0px;
min-width: 99vw;
}
-.shelf_item{
+
+.shelf_item {
display: grid;
background-color: burlywood;
margin: 0 10px 10px 10px;
- max-width: 23vw;
- max-height: 75vh;
+ max-width: 20vw;
+ max-height: 70vh;
text-align: center;
}
-.book_thumb{
- width: 23vw;
- height: 50vh;
+
+.book_thumb {
+ width: 20vw;
+ height: 70vh;
}
-a.book_link{
+
+a.book_link {
text-decoration: none;
}
-a.nav_link{
- text-decoration: none;
- color: #fff;
+
+a.nav_link {
+ text-decoration: none;
+ color: #fff;
}
diff --git a/src/interface/static/debug_toolbar/css/print.css b/src/interface/static/debug_toolbar/css/print.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/css/toolbar.css b/src/interface/static/debug_toolbar/css/toolbar.css
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/ajax-loader.gif b/src/interface/static/debug_toolbar/img/ajax-loader.gif
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/back.png b/src/interface/static/debug_toolbar/img/back.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/back_hover.png b/src/interface/static/debug_toolbar/img/back_hover.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/close.png b/src/interface/static/debug_toolbar/img/close.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/close_hover.png b/src/interface/static/debug_toolbar/img/close_hover.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/djdt_vertical.png b/src/interface/static/debug_toolbar/img/djdt_vertical.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/img/indicator.png b/src/interface/static/debug_toolbar/img/indicator.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/js/redirect.js b/src/interface/static/debug_toolbar/js/redirect.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/js/toolbar.js b/src/interface/static/debug_toolbar/js/toolbar.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/js/toolbar.profiling.js b/src/interface/static/debug_toolbar/js/toolbar.profiling.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/js/toolbar.sql.js b/src/interface/static/debug_toolbar/js/toolbar.sql.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/debug_toolbar/js/toolbar.timer.js b/src/interface/static/debug_toolbar/js/toolbar.timer.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/discord_logo_color.png b/src/interface/static/img/discord_logo_color.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/gpl-125x28.png b/src/interface/static/img/gpl-125x28.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/gpl-150x33.png b/src/interface/static/img/gpl-150x33.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/gpl-175x39.png b/src/interface/static/img/gpl-175x39.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/gpl.png b/src/interface/static/img/gpl.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/gplv3-or-later.png b/src/interface/static/img/gplv3-or-later.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/open-source-150x25.png b/src/interface/static/img/open-source-150x25.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/open-source-175x29.png b/src/interface/static/img/open-source-175x29.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/open-source-200x33.png b/src/interface/static/img/open-source-200x33.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/open-source.png b/src/interface/static/img/open-source.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/pyShelf_frontend_0_1_0.png b/src/interface/static/img/pyShelf_frontend_0_1_0.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/img/pyShelf_frontend_0_1_0_thumb.png b/src/interface/static/img/pyShelf_frontend_0_1_0_thumb.png
old mode 100644
new mode 100755
diff --git a/src/interface/static/js/jquery-3.4.1.min.js b/src/interface/static/js/jquery-3.4.1.min.js
old mode 100644
new mode 100755
diff --git a/src/interface/static/js/pyshelf_ux.js b/src/interface/static/js/pyshelf_ux.js
old mode 100644
new mode 100755
index fcadd24..64374cf
--- a/src/interface/static/js/pyshelf_ux.js
+++ b/src/interface/static/js/pyshelf_ux.js
@@ -1,15 +1,54 @@
$(document).ready(function(){
- $(".search_submit").click(function(){
- var query = $('.nav_search').val();
- console.log(query);
- window.location.href = '/search/'+query;
- })
- $('.nav_search').on('keypress', function (e) {
- if(e.which === 13){
- $(this).attr("disabled", "disabled");
- var query = $('.nav_search').val();
- window.location.href = '/search/'+query;
- $(this).removeAttr("disabled");
- }
- });
+ function customlog(outstream) {
+ /* Gather my variables and output them */
+ for (var i = 0; i < outstream.length; i++){
+ console.log(">> "+outstream[i]);
+ };
+ };
+ /* Initialize ui variables */
+ var outstream = []; // put customlog messages here
+ var win_height = window.innerHeight; // Get the displays height
+ var win_width = window.innwerWidth; // Get the displays width
+ var scr_height = window.outerHeight;
+ var scr_width = window.outerWidth;
+ var hdr_height = $('.app_hdr').height(); // Get our header height
+ var ftr_height = $('.app_footer').height(); // Get our footer height
+ var nav_width = $('.nav_l').width(); // Get the width of our nav items
+ var cmp_height = window.screen.availHeight;
+ var max_height = win_height - (hdr_height + ftr_height) - (scr_height - win_height); // Set our available height
+ customlog([cmp_height]);
+ $(".search_submit").click(function(){
+ var query = $('.nav_search').val();
+ console.log(query);
+ window.location.href = '/search/'+query;
+ });
+ $('.nav_search').on('keypress', function (e) {
+ if(e.which === 13){
+ $(this).attr("disabled", "disabled");
+ var query = $('.nav_search').val();
+ window.location.href = '/search/'+query;
+ $(this).removeAttr("disabled");
+ }
+ });
+ $('#app').css("height", max_height);
+ $('.nav_l').css("max-height", max_height);
+ $('div.shelf').css("max-height", max_height);
+ $('.nav_link').on('mouseover', function (e){
+ var popover_str = $(this).attr('alt');
+ x = $(this).offset().left
+ y = $(this).offset().top
+ $('.popover').html(popover_str);
+ $('.popover').css('left', x+nav_width);
+ $('.popover').css('top', y);
+ $('.popover').css('display','flex');
+ });
+ $('.nav_link').on('mouseout', function (e){
+ var popover_str = $(this).attr('alt');
+ x = $(this).offset().left
+ y = $(this).offset().top
+ $('.popover').html(popover_str);
+ $('.popover').css('left', x);
+ $('.popover').css('top', y);
+ $('.popover').css('display','none');
+ });
})
diff --git a/src/interface/templates/index.html b/src/interface/templates/index.html
index a7fd6be..d8ea54b 100755
--- a/src/interface/templates/index.html
+++ b/src/interface/templates/index.html
@@ -1,41 +1,43 @@
{% load filters %}
+
-
-
-
-
-pyShelf E-Book Server
-
-
-
-
-
-
+
+
+
+
+ pyShelf E-Book Server
+
+
+
+
+
+
+
-