The Imperial Library of Trantor (also known as Galactic Library) is a repository management system of ebooks on ePub format.
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.
Find a file
2020-04-11 17:58:03 +00:00
css List of tags in the editor 2017-02-05 01:27:32 +00:00
img Add bitcoin QR-code 2016-12-23 02:50:11 -05:00
js Remove unused Chart.js 2017-06-07 21:59:46 +00:00
lib Use xml marshaling to create the rss feed 2020-04-11 16:54:32 +00:00
templates Fix tag url in opds 2020-04-11 17:58:03 +00:00
.gitignore Tools are not in the repo anymore, remove them from gitignore 2015-04-27 20:33:28 -04:00
description.json Add description.json following the ahmia proposal 2014-09-14 00:54:52 -05:00
go.mod Update to pg v9 2019-11-06 06:53:41 +00:00
go.sum Update to pg v9 2019-11-06 06:53:41 +00:00
key.asc Update gpg key and robots to disallow /download/ 2019-01-16 18:02:13 +00:00
LICENSE Move templates 2012-08-15 15:11:52 +02:00
logger.xml Add logger config 2014-02-11 12:59:58 +01:00
main.go Take the hostname from the request 2020-02-20 23:56:21 +00:00
opensearch.xml Basic OPDS support 2015-01-17 09:58:21 -06:00
README.md Provide command line variables for initializing an admin user. Previously to get admin access on a fresh install I had to create a user in the web interface (to make sure the password hash/salt is properly setup) then manually change the role in the database to 'admin' using a postgresql client. This was a pain in the ass, and I think there really needs to be an easy way to create the admin user on the initial deployment. This solution fixes this, and adds documentation to the README file on how to use those variables. 2019-11-25 06:58:44 +09:30
robots.txt Update gpg key and robots to disallow /download/ 2019-01-16 18:02:13 +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:

# go get gitlab.com/trantor/trantor

You can run it (using /var/lib/trantor for storage):

# $GOPATH/bin/trantor -assets $GOPATH/src/pkg/gitlab.com/trantor/trantor/ -store /var/lib/trantor

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'

Go to your browser to: http://localhost:8080

For developers

Now you can compile Trantor:

$ go get .
$ go build

Now you can run it:

$ ./trantor  -set-admin-user 'admin' -set-admin-pass 'MY_ADMIN_PASSWORD'

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: