evg4b / pb-dropbox-downloader

DropBox client for PocketBook reader written on Go.
https://pb-dropbox-downloader.netlify.app
MIT License
6 stars 1 forks source link
go golang pocketbook

PocketBook Dropbox downloader

DropBox client for PocketBook reader written on Go.

GitHub Workflow Status GitHub license GitHub go.mod Go version Go Report Card Codecov

How to install

  1. Download and unarchive last version from Releases page.
  2. Copy pb-dropbox-downloader.app to /applications folder on your reader. (This folder can be hidden. To see it use this link.)
  3. Fill configuration from config.example.json or generate it on this site, and save it as pb-dropbox-downloader-config.json.
  4. Copy pb-dropbox-downloader-config.json to /system/config folder on reader (The system folder can be hidden too).
  5. Turn on your book reader, go to application > pb-dropbox-downloader

How to build

Requirements: task v3, golang, docker. golang-ci-lint

Use task for run, build and test application:

task # to run application (on local machine)
task lint # to lint code
task build-cli # to build cli .app file for reader
task build # to build .app file for reader with UI
task test # to run all tests in docker container
task test-local # to run all tests on local machine

Custom build

You can build application with custom ldflags flags.

Available flags :

CLI version

powershell:

$env:GOOS = 'linux'
$env:GOARCH = 'arm'
$env:GOARM = '5'
go build -ldflags="-s -w -X <your custom fdflegs>" -o pb-dropbox-downloader.app .

bash:

GOOS=linux GOARCH=arm GOARM=5 go build -ldflags="-s -w -X <your custom fdflegs>" -o pb-dropbox-downloader.app .

UI version (docker required)

docker run --rm -v ${PWD}:/app 5keeve/pocketbook-go-sdk:6.3.0-b288-v1 build -v -tags=UI -ldflags="-s -w -X <your custom fdflegs>" -o pb-dropbox-downloader.app .

Testing:

Currently this application testes only on next devices:

  1. Pocketbook 624
  2. Reader book 2 (this device has no application item in menu, but you can find and run program from gallery)