Browse Source

readme: included README text; feat: version flag

master
parent
commit
a9ddc5e47e
  1. 1
      .gitignore
  2. 2
      Makefile
  3. 25
      README.md
  4. 15
      src/main.go

1
.gitignore vendored

@ -1,3 +1,4 @@
bin/ bin/
TODO TODO
dela.db dela.db
dela.zip

2
Makefile

@ -6,6 +6,8 @@ all:
cp -r scripts bin && \ cp -r scripts bin && \
cp -r static bin cp -r static bin
portable: clean all
cd bin/ && zip -r dela.zip * && mv dela.zip ..
clean: clean:
rm -rf bin rm -rf bin

25
README.md

@ -1,5 +1,30 @@
# dela (pun интедед) - daily events list application, aka web TODO list # dela (pun интедед) - daily events list application, aka web TODO list
## About
dela is a web TODO list application which can be hosted on your server and accessed via browser. Current capabilities include:
- Password protected account system
- TODO creation
- TODO completion
## Build
```
make
```
or manually compile with `go build` inside the `src` directory, move the binary and put it alongside `pages`, `scripts` and `static` (although the path to the contents can be specified via configuration file).
```
make portable
```
will create a `dela.zip` archive with all the content directories and the binary which are to be freely transported to other machines (of the same OS and architecture, obviously)
## Use
After the first run a configuration file will be put alongside the executable, upon the second launch server will start and the service will be accessible on the specified port.
## License ## License

15
src/main.go

@ -22,10 +22,18 @@ import (
"Unbewohnte/dela/conf" "Unbewohnte/dela/conf"
"Unbewohnte/dela/logger" "Unbewohnte/dela/logger"
"Unbewohnte/dela/server" "Unbewohnte/dela/server"
"flag"
"fmt"
"os" "os"
"path/filepath" "path/filepath"
) )
const Version string = "0.1.0"
var (
printVersion *bool = flag.Bool("version", false, "Print version information and exit")
)
const ConfName string = "conf.json" const ConfName string = "conf.json"
var ( var (
@ -34,6 +42,13 @@ var (
) )
func init() { func init() {
// Parse flags
flag.Parse()
if *printVersion {
fmt.Printf("dela v%s - a web TODO list\n(c) 2023 Kasyanov Nikolay Alexeyevich (Unbewohnte)\n", Version)
os.Exit(0)
}
// Initialize logging // Initialize logging
logger.SetOutput(os.Stdout) logger.SetOutput(os.Stdout)

Loading…
Cancel
Save