web/scripts
2022-11-28 14:18:27 -06:00
..
cavif Update cavif binary to one linked to Ubuntu 18.04 libs 2022-09-19 10:39:20 -05:00
cavif-LICENSE Add cavif LICENSE file as required 2022-09-18 22:08:19 +02:00
delete-unconfirmed-newsletter-subscribers Convert newsletter to use Users table as base 2022-07-04 12:09:49 -05:00
deploy-ebook-to-www Add chapter navigation footer 2022-11-28 14:18:27 -06:00
generate-bulk-downloads chown/chmod files during deploy within their correct scripts, instead of in the parent deploy script 2022-07-13 11:25:06 -05:00
generate-feeds chown/chmod files during deploy within their correct scripts, instead of in the parent deploy script 2022-07-13 11:25:06 -05:00
inject-chapter-navigation-footer Add chapter navigation footer 2022-11-28 14:18:27 -06:00
process-pending-payments Update payment process script for new FA quirk 2022-11-27 22:42:32 -06:00
README.md Normalize contents of webroot variables 2022-07-09 20:09:39 -05:00
rebuild-cache Rebuild web caches immediately on ebook updates 2022-07-14 15:28:57 -05:00
reset-php-fpm-opcache Change the way we deploy ebooks from destroying the entire apcu cache and rebuilding on the next web request, to rebuilding in the background 2020-02-29 22:29:19 -06:00
rotate-www-logs Anonymize web logs after rotating and disable explicit download logging in favor of grepping the regular web logs 2022-03-16 13:04:52 -04:00
sync-ebooks Added to allowed characters in tokens 2022-01-12 08:53:31 -06:00
update-patrons-circle Create cookie-based login and authentication system 2022-07-10 20:53:20 -05:00

sync-ebooks

To use, call this script with the directory where your ebooks go as its last argument. For example sync-ebooks /standardebooks.org/ebooks, or if you want to clone them into this repository, sync-ebooks ebooks. If you want progress output, use -v, and if you want detailed Git progress output use -vv. GitHub allows you to make 60 unauthenticated API requests per hour. If you use unauthenticated API requests for other things, this might not be enough, so to resolve that issue, you can create a new OAuth token at https://github.com/settings/tokens/new and pass it via the --token option. You dont need to give the token any permissions.

deploy-ebook-to-www

To use, call this script with the directories of the books you want to deploy as its arguments. For example, to deploy all ebooks after using sync-ebooks, run deploy-ebook-to-www /standardebooks.org/ebooks/*. To deploy only The Time Machine by H. G. Wells, you would run deploy-ebook-to-www /standardebooks.org/ebooks/h-g-wells_the-time-machine. To output progress information, use -v or --verbose.

The default web root is /standardebooks.org/web/www. If it is located elsewhere, specify it with the --webroot option. For instance, deploy-ebook-to-www --webroot /var/www/html /path/to/ebook. Note that there will be php errors if the Git repositories are not in the ebook directory immediately in the web root. Either keep them there or create a symlink.

The default group is se. to use a different one, specify it with the --group option.

The default URL is https://standardebooks.org. To change it, use the --weburl option. For example, deploy-ebook-to-www --weburl "http://localhost:8080". This option will cause deploy-ebook-to-www to use the specified URL in the generated OPDS and RSS files. Care should be taken however; the URL https://standardebooks.org is hard-coded in a few places, even when SITE_URL is changed to a custom URL, so for testing, it may be more convenient to simply use /etc/hosts or a similar mechanism to resolve standardebooks.org to 127.0.0.1.