update README

This commit is contained in:
lingdocs 2022-02-10 10:13:32 +04:00
parent 05971861f6
commit 36bcf7277c
3 changed files with 37 additions and 7 deletions

View File

@ -1,8 +1,14 @@
# RTL EPUB Maker
Easily create EPUB e-book files with proper RTL support
Easily create EPUB e-book files with proper RTL support.
## Running Locally
This is a web app that uses [pandoc](https://pandoc.org) to create .epub files for e-books in RTL languages. Making RTL e-books can be tricky. This tries app tries to simplify the process as much as possible, so that anyone can make them.
[Try it live - RTL EPUB Maker](https://rtl-epub-maker.lingdocs.com)
## Running
You can run this app on your own machine or host it on a server.
### With Node
@ -11,17 +17,39 @@ requires:
- Node.js 12.22.0 or later
- [pandoc](https://pandoc.org/installing.html)
```
To run in dev mode:
```sh
npm install
npm run dev
```
To host in production:
```sh
npm run build
npm run start
```
### With Docker
Or, you can just run the docker image with pandoc and everything included.
If you are using `linux/amd64` architecture you can just run the [the docker image](https://hub.docker.com/r/lingdocs/rtl-epub-maker).
```
```sh
docker compose up
```
App will be served on `http://localhost:3001`
If you are using an architecture other than `linux/amd64` you will need to build your own Docker image.
```sh
docker build . -t rtl-epub-maker
docker run -p 127.0.0.1:3001:3001 rtl-epub-maker
```
## Serving
The app will be served on `http://localhost:3001`. Add a reverse proxy with SSL if you want to serve it to the world.
---
Code is licensed under a [MIT License](https://github.com/lingdocs/rtl-epub-maker/blob/master/LICENSE). Contributions are welcome.

View File

@ -66,7 +66,6 @@ function BookInfoInput({ handleSubmit }: { handleSubmit: (info: { frontmatter: F
});
}
return <div style={{ maxWidth: "500px" }}>
<h4>Book Metadata</h4>
<div className="my-3">
<label htmlFor="cover-file" className="form-label">cover image <span className="text-muted">(.jpg or .png less than 5mb)</span></label>
<input multiple={false} ref={coverRef} className="form-control" type="file" id="cover-file" accept="image/jpeg,image/png"/>

View File

@ -6,6 +6,7 @@ import DocReceiver from "../components/DocReceiver";
import { bookRequest } from "../lib/fetchers";
// TODO: Make Title Required
// TODO: Have author field in there
// TODO: Allow Word File straight w/ images etc upload
// TDOO: Add language selection option (Pashto, Arabic, Farsi, Urdu)
@ -42,6 +43,7 @@ const Home: NextPage = () => {
</Head>
<h1 className="mt-3">RTL EPUB Maker 📚</h1>
<p className="lead mb-4">Easily create EPUB e-book files with proper RTL support (🚧 in progress 👷)</p>
<h4>Book Content</h4>
<DocReceiver handleReceiveText={handleReceiveText}/>
<div className="mt-3">
<label htmlFor="mdTextarea" className="form-label">Markdown Content</label>
@ -50,6 +52,7 @@ const Home: NextPage = () => {
<div style={{ textAlign: "right" }}>
<button type="button" className="btn btn-sm btn-light mt-2" onClick={clearText}>Clear</button>
</div>
<h4>Book Metadata</h4>
<BookInfoInput handleSubmit={handleSubmit} />
<div className="text-center mt-4 text-muted">
<p className="lead">Made by <a className="em-link" href="https://lingdocs.com">LingDocs.com</a></p>