Type something to search...
OpenBooks

OpenBooks

OpenBooks

1.7k 55
01 May, 2024
  Go

What is Openbooks ?

Openbooks allows you to download ebooks from irc.irchighway.net quickly and easily.


Install Openbooks

Binary

  1. Download the latest release for your platform from the releases page.
  2. Run the binary
    • Linux users may have to run chmod +x [binary name] to make it executable
  3. ./openbooks --help
    • This will display all possible configuration values and introduce the two modes; CLI or Server.

Docker

  • Basic config
    • docker run -p 8080:80 evanbuss/openbooks
  • Config to persist all eBook files to disk
    • docker run -p 8080:80 -v /home/evan/Downloads/openbooks:/books evanbuss/openbooks --persist

Setting the Base Path

OpenBooks server doesn’t have to be hosted at the root of your webserver. The basepath value allows you to host it behind a reverse proxy. The base path value must have opening and closing forward slashes (default ”/”).

  • Docker
    • docker run -p 8080:80 -e BASE_PATH=/openbooks/ evanbuss/openbooks
  • Binary
    • ./openbooks server --basepath /openbooks/

Usage

For a complete list of features use the --help flags on all subcommands. For example openbooks cli --help or openbooks cli download --help. There are two modes; Server or CLI. In CLI mode you interact and download books through a terminal interface. In server mode the application runs as a web application that you can visit in your browser.

Double clicking the executable will open the UI in your browser. In the future it may use webviews to provide a “native-like” desktop application.


Development

Install the dependencies

  • go get
  • cd server/app && npm install
  • cd ../..
  • go run main.go

Build the React SPA and compile binaries for multiple platforms.

  • Run ./build.sh
  • This will install npm packages, build the React app, and compile the executable.

Build the go binary (if you haven’t changed the frontend)

  • go build

Mock Development Server

  • The mock server allows you to debug responses and requests to simplified IRC / DCC servers that mimic the responses received from IRC Highway.
  • Terminal window
    cd cmd/mock_server
    go run .
    # Another Terminal
    cd cmd/openbooks
    go run . server --server localhost --log

Desktop App

Compile OpenBooks with experimental webview support:

Terminal window
cd cmd/openbooks
go build -tags webview