Giter Site home page Giter Site logo

iq-scm / openbooks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evan-buss/openbooks

0.0 0.0 0.0 44.76 MB

Search and Download eBooks

Home Page: https://evan-buss.github.io/openbooks/

License: MIT License

Shell 0.56% Go 54.16% TypeScript 44.50% HTML 0.43% Dockerfile 0.35%

openbooks's Introduction

openbooks

NOTE: Going forward only the latest release will be supported. If you encounter any issues, be sure you are using the latest version.

Docker Pulls

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

openbooks screenshot

Getting Started

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.
  • 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:

cd cmd/openbooks
go build -tags webview

Why / How

  • I wrote this as an easier way to search and download books from irchighway.net. It handles all the extraction and data processing for you. You just have to click the book you want. Hopefully you find it much easier than the IRC interface.
  • It was also interesting to learn how the IRC and DCC protocols work and write custom implementations.

Technology

  • Backend
    • Golang
    • Chi
    • gorilla/websocket
    • Archiver (extract files from various archive formats)
  • Frontend
    • React.js
    • TypeScript
    • Redux / Redux Toolkit
    • Mantine UI / @emotion/react
    • Framer Motion

openbooks's People

Contributors

cvoegele avatar dependabot[bot] avatar evan-buss avatar hackmonker avatar kab1r avatar kastem34 avatar ncryptedv1 avatar paulaylingdev avatar smartboy84 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.