CherryPy App that serves dynamic content for Project Gutenberg
 
 
Go to file
eric ee7f082c01 whoops 2020-01-08 13:55:09 -05:00
templates whoops 2020-01-08 13:55:09 -05:00
test facilitate testing on localhost for CloudStorage 2019-04-24 13:35:56 -04:00
.gitignore Initial commit 2019-03-28 09:32:22 -04:00
BaseFormatter.py Twitter cards don't support relative urls 2019-08-16 14:35:22 -04:00
BaseSearcher.py fix thumb url at source 2019-09-10 15:31:09 -04:00
BibrecPage.py use relative urls 2019-09-03 15:11:38 -04:00
CherryPy.conf added exception handling to clean_up method 2019-08-15 13:03:51 -04:00
CherryPyApp.py don't save sessions for 404's 2019-08-01 19:40:23 -04:00
CloudStorage.py stop using buitins as global 2019-07-26 11:54:24 -04:00
ConnectionPool.py initial commit 2019-03-28 09:45:03 -04:00
CoverPages.py initial commit 2019-03-28 09:45:03 -04:00
Dropbox.py always close cloudstorage sessions 2019-06-19 15:03:16 -04:00
DublinCoreI18n.py stop using buitins as global 2019-07-26 11:54:24 -04:00
Formatters.py stop using buitins as global 2019-07-26 11:54:24 -04:00
GDrive.py always close cloudstorage sessions 2019-06-19 15:03:16 -04:00
HTMLFormatter.py not all files have filetype 2019-09-14 12:51:34 -04:00
Icons.py remove G+ 2019-09-03 13:25:56 -04:00
JSONFormatter.py initial commit 2019-03-28 09:45:03 -04:00
LICENSE Initial commit 2019-03-28 09:32:22 -04:00
MSDrive.py always close cloudstorage sessions 2019-06-19 15:03:16 -04:00
OPDSFormatter.py initial commit 2019-03-28 09:45:03 -04:00
Page.py stop using buitins as global 2019-07-26 11:54:24 -04:00
Pipfile point author link at authorlist 2020-01-07 13:58:25 -05:00
Pipfile.lock point author link at authorlist 2020-01-07 13:58:25 -05:00
QRCodePage.py initial commit 2019-03-28 09:45:03 -04:00
README.md errata 2019-04-20 14:34:09 -04:00
SearchPage.py stop using buitins as global 2019-07-26 11:54:24 -04:00
Sitemap.py initial commit 2019-03-28 09:45:03 -04:00
StartPage.py stop using buitins as global 2019-07-26 11:54:24 -04:00
SuggestionsPage.py initial commit 2019-03-28 09:45:03 -04:00
SupportedLocales.py initial commit 2019-03-28 09:45:03 -04:00
TemplatedPage.py initial commit 2019-03-28 09:45:03 -04:00
Test.py separate keys and 2019-04-20 14:34:53 -04:00
Timer.py initial commit 2019-03-28 09:45:03 -04:00
UserAgents.py initial commit 2019-03-28 09:45:03 -04:00
__init__.py initial commit 2019-03-28 09:45:03 -04:00
autocat3.service In autocat3.service: 2020-01-04 22:29:55 -05:00
configuring.txt Updated service to automatically restart. Adjusted documentation. 2019-10-09 22:39:52 -04:00
diagnostics.py fix permissions 2019-09-09 12:58:29 -04:00
errors.py fix permissions 2019-09-09 12:58:29 -04:00
i18n_tool.py initial commit 2019-03-28 09:45:03 -04:00
sessions.py fix sessions.py 2019-08-19 22:26:18 -04:00
test.conf even test app credentials 2019-04-20 14:32:58 -04:00

README.md

autocat3_original

Introduction

autocat3 is a python-based application used for supporting Project Gutenberg. CherryPy is used as the web framwork which is easy to develop. If mainly implemented the search functionality and rate limiter. Also return results pages based on templates.

How it works.

Currently, the dev environment and production environment share the same server login1. The production version of autocat3 is on gutenberg2. This application in this repository is on gutenberg1.

Previously, the old version of autocat3 relies on dependencies installed directly on the system. To make it more flexible and easy to deploy, we tend to use virtual env rather than the previous method. To use virtual env, we use pipenv instead of using pip and virtual env separately.

The virtual env directory is on the default directory while we run pipenv --three. So it's not in this directory. (we are only using python3 for this project because CherryPy will discard the python2 in the future).

To start the service/application, we use systemd to do that. the autocat3.service file is written under /etc/systemd/systemdirectory. To start:

  1. make sure sudo systemctl daemon-reload everytime we edit the systemd unit file
  2. sudo systemctl start autocat3.service to start service
  3. sudo systemctl stop autocat3.service to stop service
  4. sudo systemctl status autocat3.service to check the running status of the service

How to install

Currently, we use the following steps to deploy autocat3 on a different server.

  1. Create Virtual env: pipenv --three to create a virtual env for current working directory(current project)
  2. Install packages/python modules: pipenv install to install all the packages in the Pipfile. If there is a requirements.txt file output from pip freeze, the command will automatically add the package names into Pipfile and install the packages and keep them in the Popfile for later use.
  3. lock the packages: pipenv lock to be used to produce deterministic builds.
  4. Check the virtual env path: pipenv --venv
  5. Start virtual env: pipenv shell

Copyright 2009-2010 by Marcello Perathoner