web/scripts
2025-05-23 11:13:05 -05: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-orphan-users Add script to delete users who have no other connections in the database 2025-01-06 10:56:50 -06:00
delete-unconfirmed-newsletter-subscribers Add Db::QueryBool() and some code style updates 2024-09-15 13:50:13 -05:00
deploy-ebook-to-www In deploy-ebook-to-www, only check for tsp if it's installed 2025-04-14 22:25:54 -05:00
generate-bulk-downloads Handle TIFF files with multiple pages 2025-02-08 12:33:13 -06:00
generate-feeds Add placeholders for ebooks 2024-12-13 11:46:36 -06:00
ingest-fa-payments Update FA login flow to handle new login form 2025-05-12 10:10:34 -05:00
inject-chapter-navigation-footer Make chapter navigation footer script executable 2023-12-23 10:50:18 -06:00
pending-payments-watchdog Add Db::QueryBool() and some code style updates 2024-09-15 13:50:13 -05:00
process-pending-payments Update FA login flow to handle new login form 2025-05-12 10:10:34 -05:00
README.md Normalize contents of webroot variables 2022-07-09 20:09:39 -05:00
rebuild-cache Expand some scripted command arguments 2024-11-25 14:08:14 -06:00
recompute-ebook-downloads Change DownloadCount to mean the total number of downloads including bot downloads 2025-05-23 11:13:05 -05:00
reset-php-fpm-opcache Style tweaks 2024-11-26 11:12:19 -06:00
rotate-www-logs Fix rotate log script 2025-01-18 18:57:25 -06:00
sync-ebooks When creating bare repos, clone with --mirror instead of --bare 2024-05-30 22:34:23 -05:00
update-ebook-database Replace Template::Emit...() functions with more generic function 2024-12-18 13:14:16 -06:00
update-patrons-circle Allow adjustment of Patrons Circle cost 2024-12-05 14:32:46 -06:00
update-project-statuses Fail quietly when updating projects with broken URLs instead of logging 2025-03-15 14:18:48 -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.