Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit a5388b89 authored by Andreas Wagner's avatar Andreas Wagner
Browse files

Rename executable to module name (tei2zenodo).

parent eb3dd888
config.json
t2zd
tei2zenodo
*.zip
......@@ -37,13 +37,13 @@ Note that, since the XPath library that this service uses only supports basic XP
## Installation \& Setup
There are several ways of obtaining the software. It is not necessary to install it in a particular place, it just needs to find a configuration file (see below) and have sufficient privileges to bind to the port specified in the config. So, if you have it installed and configured, just call `t2zd` (or `sudo t2zd` if necessary) from a command line and that's it.
There are several ways of obtaining the software. It is not necessary to install it in a particular place, it just needs to find a configuration file (see below) and have sufficient privileges to bind to the port specified in the config. So, if you have it installed and configured, just call `tei2zenodo` (or `sudo tei2zenodo` if necessary) from a command line and that's it.
1. The default way of getting the software is downloading an asset on the [releases page](https://gitlab.gwdg.de/rg-mpg-de/tei2zenodo/-/releases). There are precompiled binaries zipped together with a configuration template on that page.
2. The package is maintained as a [Go](https://golang.org/) repository, so if you have Go installed, you can use it to compile and install the software in one single step: with the command `go install gitlab.gwdg.de/rg-mpg-de/tei2zenodo/cmd/t2zd@latest`. This will put the executable in the `$GOPATH/bin` directory, so that, on a standard Go installation, it can be found automatically from whatever directory you're in. However, you will also need to manually download and modify the [config.json](./configs/config.json.tpl) and the [templates directory](./templates)
2. The package is maintained as a [Go](https://golang.org/) repository, so if you have Go installed, you can use it to compile and install the software in one single step: with the command `go install gitlab.gwdg.de/rg-mpg-de/tei2zenodo@latest`. This will put the executable in the `$GOPATH/bin` directory, so that, on a standard Go installation, it can be found automatically from whatever directory you're in. However, you will also need to manually download and modify the [config.json](./configs/config.json.tpl?inline=false) and the [templates directory](./templates)
3. If you want to compile the source code manually yourself, you need the [Go compiler](https://golang.org/) as well. Then, after retrieving the source code, either by cloning the git repository or by using one of the "download source code" options, you can compile it in its main directory with the command `go build -ldflags "-s -w" -o t2zd cmd/t2zd/main.go`. You can even skip the optimization switches (`-ldflags ...`) or the naming part (`-o t2zd`) and just say `go build cmd/t2zd/main.go` (then the command to launch the server would be `main`), but the longer command is the one I recommend and am using most of the time.
3. If you want to compile the source code manually yourself, you need the [Go compiler](https://golang.org/) as well. Then, after retrieving the source code, either by cloning the git repository or by using one of the "download source code" options, you can compile it in its main directory with the command `go build -ldflags "-s -w"`. You can even skip the optimization switches (`-ldflags ...`) and just say `go build`, but the longer command is the one I recommend and am using most of the time.
Interestingly, it is trivial to cross-compile code with Go, in other words, you can compile the software for many different target systems on your system. For instance, you could compile on your Windows Desktop, copy the executable over to your Linux server and run the webservice there. There is a good description of the process and of the various possible combinations of platform and architecture over at [DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04#step-4-%E2%80%94-building-executables-for-different-architectures).
......@@ -66,7 +66,7 @@ The configuration file is a json file that has several sections:
### Root elements
- `ListenSpec` *numeric*: This allows you to specify which port the t2z daemon should be listening on. It defaults to 8081. (If you specify
a port number below 1024, it may be necessary to rund the command with elevated privileges, e.g. `sudo t2zd`.)
a port number below 1024, it may be necessary to rund the command with elevated privileges, e.g. `sudo tei2zenodo`.)
- `Https` *string*: This allows you to take one of three approaches to tls/ssl encryption: (1) either the value is `none` (the default), in which case
you will not have TLS/SSL encryption. Your server will listen to http requests at the port specified in `ListenSpec`. Or (2) the value is
`letsencrypt`, in which case an automatic [Letsencrypt.org](https://letsencrypt.org/) certificate management routine will be used. This requires
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment