haroldtreen / Epub Press
Licence: gpl-3.0
📚 Web service for creating ebooks from collections of websites.
Stars: ✠156
Programming Languages
javascript
184084 projects - #8 most used programming language
epub-press
Backend server for EpubPress.
For clients, see epub-press-clients.
Setup
git clone https://github.com/haroldtreen/epub-press
cd epub-press
npm install
Usage
Docker Setup
- Install Docker
docker-compose up
You'll also want to run database migrations if it's your first time running the service:
npx sequelize-cli db:migrate
EpubPress will be running at http://localhost:3000
.
Development Setup
- Install Docker
docker-compose up postgres
npm start
You'll also want to run database migrations if it's your first time running the service:
npx sequelize-cli db:migrate
EpubPress will be running at http://localhost:3000
and reload upon file changes.
To build a version of EpubPress that talks to a local server, see epub-press-chrome.
Tests
npm run test:integration # Test API + full article extraction
npm run test:models # Test models
npm run test:unit # Test regular JS
npm run test # Test all of the above
Changes should be accompanied by tests. All tests located in /tests
.
API Documentation
API Documentation is here.
Simple workflow
$ # create a book
$ curl http://localhost:3000/api/v1/books \
-H "Content-Type: application/json" \
-X POST \
-d '{
"title": "A title",
"description": "A description",
"author": "An author",
"genre": "ebooks",
"coverPath": "https://via.placeholder.com/600x800.jpg?text=A%20Cover",
"urls": [
"https://epub.press"
]
}'
{"id":"RXyGKmTq7"}
$ # download the book
$ curl -o book.ebub http://localhost:3000/api/v1/books/RXyGKmTq7/download
$ ls
book.ebub
Environment variables
Name | Default | Description |
---|---|---|
MAIL_SERVER_HOST |
Hostname of SMTP mail server | |
MAIL_SERVER_PORT |
Port of SMTP mail server | |
MAIL_SERVER_USERNAME |
Username for SMTP authentication | |
MAIL_SERVER_PASSWORD |
Password for SMTP authentication | |
MAIL_SENDER_ADDRESS |
[email protected] | Sender email address |
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].