This repository has been archived on 2025-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
trantor/README.md

87 lines
2.3 KiB
Markdown
Raw Normal View History

2017-09-21 21:19:06 +00:00
# Imperial Library of Trantor
The Imperial Library of Trantor (also known as Galactic Library) is a
repository management system of ebooks on ePub format.
You can check out the main development branch from GitLab at:
https://gitlab.com/trantor/
## Dependences
In order to run Trantor, you need to install the following packages:
* Go language
* postgresql (>= 9.6)
## Installation
### Create postgres DB
We can create the DB (using the postgres user) and activate `pg_trgm` extension
for it:
```
$ createdb trantor
$ echo "CREATE EXTENSION pg_trgm;"|psql trantor
```
### For admins ("for developers" below)
Now you can install Trantor itself:
```
$ git clone gitlab.com/trantor/trantor
$ cd trantor
$ go build
```
Generate a random session key:
```
$ base64 /dev/random | head -c 50
2017-09-21 21:19:06 +00:00
```
You can run it (using `/var/lib/trantor` for storage):
```
$ SESSION_KEY=<session> ./trantor -store /var/lib/trantor
2017-09-21 21:19:06 +00:00
```
The first time you run it, the database will be initialized. To initialize an admin user, include the -set-admin-user and -set-admin-pass variables
when you run it. The admin user will be initialized after the first time you run the application with these parameters, so there is no need to
include them on subsequent runs (but no harm in doing so).
```
# $GOPATH/bin/trantor -assets $GOPATH/src/pkg/gitlab.com/trantor/trantor/ -store /var/lib/trantor -set-admin-user 'admin' -set-admin-pass 'MY_ADMIN_PASSWORD'
```
2017-09-21 21:19:06 +00:00
Go to your browser to: http://localhost:8080
### For developers
Now you can compile Trantor:
```
2017-09-21 21:21:09 +00:00
$ go get .
2017-09-21 21:19:06 +00:00
$ go build
```
Now you can run it:
```
$ ./trantor -set-admin-user 'admin' -set-admin-pass 'MY_ADMIN_PASSWORD'
2017-09-21 21:19:06 +00:00
```
Go to your browser to: http://localhost:8080
## Bugs
Please, report bugs in the gitlab issue tracker:
https://gitlab.com/trantor/trantor/issues
## Rights
All the matterial of this project is under WTFPL as described on the LICENSE
file with the exception of:
* css/bootstrap.bundle.min.css css/bootstrap.bundle.min.css.map js/bootstrap.bundle.min.js
js/bootstrap.bundle.min.js.map img/bootstrap-icons.svg
From the bootstrap framework: https://getbootstrap.com/
2017-09-21 21:19:06 +00:00
* img/bright_squares.png
From subtlepatterns: http://subtlepatterns.com/bright-squares/
* css/FredokaOne.ttf css/PTSerif.ttf
From Google Web Fonts: http://www.google.com/webfonts