From de8f6cbeb8060c87526b04a18b1e454bdbf3a2f9 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 25 Aug 2019 07:10:32 -0600 Subject: [PATCH] Bit of reorg, add missing files --- LICENSE.md | 9 +++++++-- cmd/mothd/instance.go | 2 ++ cmd/mothd/mothd.go | 6 ++++++ cmd/transpile/rfc822.md | 15 +++++++++++++++ cmd/transpile/yaml.md | 22 ++++++++++++++++++++++ {devel => contrib}/mothd.service | 0 {devel => lib/python}/answer_words.txt | 0 {devel => lib/python}/devel-server.py | 0 {devel => lib/python}/mistune.py | 0 {devel => lib/python}/moth.py | 0 {devel => lib/python}/mothballer.py | 0 {devel => lib/python}/package-puzzles.py | 0 {devel => lib/python}/parse.py | 0 {devel => lib/python}/setup.cfg | 0 {devel => lib/python}/update-words.sh | 0 {devel => lib/python}/validate.py | 0 16 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 cmd/transpile/rfc822.md create mode 100644 cmd/transpile/yaml.md rename {devel => contrib}/mothd.service (100%) rename {devel => lib/python}/answer_words.txt (100%) rename {devel => lib/python}/devel-server.py (100%) rename {devel => lib/python}/mistune.py (100%) rename {devel => lib/python}/moth.py (100%) rename {devel => lib/python}/mothballer.py (100%) rename {devel => lib/python}/package-puzzles.py (100%) rename {devel => lib/python}/parse.py (100%) rename {devel => lib/python}/setup.cfg (100%) rename {devel => lib/python}/update-words.sh (100%) rename {devel => lib/python}/validate.py (100%) diff --git a/LICENSE.md b/LICENSE.md index d77eb2a..5810db0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -7,10 +7,15 @@ Copyright © 2015-2016 Neale Pickett > publish, distribute, sublicense, and/or sell copies of the Software, > and to permit persons to whom the Software is furnished to do so, > subject to the following conditions: - +> > The above copyright notice and this permission notice shall be > included in all copies or substantial portions of the Software. - +> +> Except as contained in this notice, the name(s) of the above +> copyright holders shall not be used in advertising or otherwise +> to promote the sale, use or other dealings in this Software +> without prior written authorization. +> > The software is provided "as is", without warranty of any kind, > express or implied, including but not limited to the warranties of > merchantability, fitness for a particular purpose and diff --git a/cmd/mothd/instance.go b/cmd/mothd/instance.go index 0741ca0..162f9ef 100644 --- a/cmd/mothd/instance.go +++ b/cmd/mothd/instance.go @@ -18,9 +18,11 @@ import ( type Instance struct { Base string MothballDir string + PuzzlesDir string StateDir string ThemeDir string AttemptInterval time.Duration + Debug bool categories map[string]*Zipfs update chan bool diff --git a/cmd/mothd/mothd.go b/cmd/mothd/mothd.go index abf02cb..a1a5a0b 100644 --- a/cmd/mothd/mothd.go +++ b/cmd/mothd/mothd.go @@ -29,6 +29,12 @@ func main() { "/mothballs", "Path to read mothballs", ) + flag.StringVar( + &ctx.PuzzlesDir, + "puzzles", + "", + "Path to read puzzle source trees", + ) flag.StringVar( &ctx.StateDir, "state", diff --git a/cmd/transpile/rfc822.md b/cmd/transpile/rfc822.md new file mode 100644 index 0000000..e972932 --- /dev/null +++ b/cmd/transpile/rfc822.md @@ -0,0 +1,15 @@ +Author: neale +Answer: moo + +A MOTH file +=========== + +This is a moth file, woo wo! + +# A MOTH file + +* moo +* moo +* moo +* squeak + diff --git a/cmd/transpile/yaml.md b/cmd/transpile/yaml.md new file mode 100644 index 0000000..3fdaeee --- /dev/null +++ b/cmd/transpile/yaml.md @@ -0,0 +1,22 @@ +--- +pre: + authors: + - neale +answers: + - moo +--- + +A YAML MOTH file +=========== + +This is a moth file, woo wo! + +With YAML metadata! + +# A MOTH file + +* moo +* moo +* moo +* + diff --git a/devel/mothd.service b/contrib/mothd.service similarity index 100% rename from devel/mothd.service rename to contrib/mothd.service diff --git a/devel/answer_words.txt b/lib/python/answer_words.txt similarity index 100% rename from devel/answer_words.txt rename to lib/python/answer_words.txt diff --git a/devel/devel-server.py b/lib/python/devel-server.py similarity index 100% rename from devel/devel-server.py rename to lib/python/devel-server.py diff --git a/devel/mistune.py b/lib/python/mistune.py similarity index 100% rename from devel/mistune.py rename to lib/python/mistune.py diff --git a/devel/moth.py b/lib/python/moth.py similarity index 100% rename from devel/moth.py rename to lib/python/moth.py diff --git a/devel/mothballer.py b/lib/python/mothballer.py similarity index 100% rename from devel/mothballer.py rename to lib/python/mothballer.py diff --git a/devel/package-puzzles.py b/lib/python/package-puzzles.py similarity index 100% rename from devel/package-puzzles.py rename to lib/python/package-puzzles.py diff --git a/devel/parse.py b/lib/python/parse.py similarity index 100% rename from devel/parse.py rename to lib/python/parse.py diff --git a/devel/setup.cfg b/lib/python/setup.cfg similarity index 100% rename from devel/setup.cfg rename to lib/python/setup.cfg diff --git a/devel/update-words.sh b/lib/python/update-words.sh similarity index 100% rename from devel/update-words.sh rename to lib/python/update-words.sh diff --git a/devel/validate.py b/lib/python/validate.py similarity index 100% rename from devel/validate.py rename to lib/python/validate.py