Moved example file to own variable

This commit is contained in:
Nox Sluijtman 2022-08-22 10:03:54 +02:00
parent 6f6abcf331
commit a692e8aaa8
2 changed files with 7 additions and 4 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Marty Sluijtman <marty.wanderer@disroot.org>
pkgname=sheet-parser
pkgver=0.1
pkgrel=2
pkgrel=3
pkgdesc="A little D&D character sheet parser written in go"
url="https://gitlab.com/EternalWanderer/sheet-parser"
arch="all"
@ -13,6 +13,7 @@ subpackages="$pkgname-doc
"
source="https://alpine.voidcruiser.nl/src/$pkgname-$pkgver.tar.gz
zsh.completion
example.json
"
options="!check"
@ -27,6 +28,7 @@ package() {
}
sha512sums="
34e0395108bd7ae271791978e402209e68bec4566a1613aed54e52bcbe27024ae610837d2ae67e6cc16e77cac072124d67e673ec38dd7d9ec512ae62cec58a12 sheet-parser-0.1.tar.gz
630320d292ac8464ba273d917a7ad7015ba5a4f5812a5289b4c05115e7cd3a5a08eb7dea80eb6122204ec7bae068362be71647879816a8c3fbe737cf9a45b1e7 sheet-parser-0.1.tar.gz
af0b72e986c5c06fd8d05ccc2819e5fe9d80ed58a2e7fec87f7f1648e26698897268edf64659a9bb27654d8edc2051f0e93501686e8083accc50e7b7359e37fd zsh.completion
71177c48d8337abf048a7eaa924cb2f0ec0fc547f58ea2a2dd64ce4d549b39cfc1aa9cea369cd440fece484d32b8e09fccb9e5d402688b738df274d069b5fc93 example.json
"

View file

@ -13,6 +13,7 @@ import (
var (
path, skillString, saveString, statString string
exampleFile string = "/etc/sheet-parser/example.json"
modifier, diceThrows, surfaces int
X, Y int
char Character
@ -22,8 +23,8 @@ var (
)
func parseFlags() {
flag.StringVar(&path, "file", "/etc/sheet-parser/example.json", "Used to point to character sheet")
flag.StringVar(&path, "f", "stats.json", "Used to point to character sheet")
flag.StringVar(&path, "file", exampleFile, "Used to point to character sheet")
flag.StringVar(&path, "f", exampleFile, "Used to point to character sheet")
flag.StringVar(&skillString, "skill", "", "Skill to parse")
flag.StringVar(&statString, "stat", "", "Stat check")
flag.StringVar(&saveString, "save", "", "Saving throw to... throw")