web/scripts
2020-09-04 12:42:27 -05:00
..
vagrant Rearrange filesystem layout, and add configuration files 2019-08-23 19:47:30 -05:00
deploy-ebook-to-www Add --no-epubcheck option to deploy-ebook-to-www script 2020-08-29 14:43:10 -05:00
generate-opds.php Change OPDS feed to show number of ebooks in each subject category, and a 'related' link back to the ebook's SE homepage 2020-07-09 13:15:52 -05:00
generate-rss.php Close all void HTML tags and remove HTML entities 2020-09-04 12:42:27 -05:00
go-avif Add support for AVIF covers, and multiple image source sets in covers 2020-08-06 17:03:39 -05:00
README.md Add --weburl parameter. 2019-06-20 16:21:26 -05:00
rebuild-library-cache 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
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
sync-ebooks Also skip non-git directories 2020-08-01 11:51:06 -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 don't 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. 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. For instance, to use this script inside the included Vagrant VM, which uses the www-data group, use deploy-ebook-to-www --group www-data /path/to/ebook.

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.orgis hardcoded in a few places, even whenSITE_URLis changed to a custom URL, so for testing, it may be more convenient to simply use /etc/hosts or a similar mechanism to resolvestandardebooks.orgto127.0.0.1`.