aboutsummaryrefslogtreecommitdiff
path: root/doc/store.md
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2016-02-17 14:16:09 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2016-02-17 14:16:09 +0100
commit9bf3718af08ce9503ffa1e0b64a8fdc04d2a9767 (patch)
treed897b5c8c45ac6c2cc145fac205a6084e1372b37 /doc/store.md
parent15b8e005b4280b92701776479e488b7642231a40 (diff)
downloadmark-9bf3718af08ce9503ffa1e0b64a8fdc04d2a9767.tar.gz
mark-9bf3718af08ce9503ffa1e0b64a8fdc04d2a9767.zip
add store documentation and new_store function
Diffstat (limited to 'doc/store.md')
-rw-r--r--doc/store.md80
1 files changed, 80 insertions, 0 deletions
diff --git a/doc/store.md b/doc/store.md
new file mode 100644
index 0000000..eaa99ff
--- /dev/null
+++ b/doc/store.md
@@ -0,0 +1,80 @@
+# Store
+
+The store file is supposed to be the only file used by mark. It is
+used to store the actual data as well as all available and future options.
+
+## Language
+
+The store file is separated in different blocks.
+It is always terminated by "#end#".
+
+### Block
+
++ A Block starts with its name in hashes.
++ Followed by the content of the block.
++ The end of the Block is reached if a new # is found.
+
+Known Blocks are:
+
++ #store# : block to store the actual data
++ #colors# : block to assign colors to mark signs
+
+Example:
+```
+#block#
+foo
+bar
+#otherblock# | #end#
+```
+
+### Block content
+
+The notation of a blocks content is block specific.
+
+#### store content
+
+The store block contains the actual mark data.
+It stores mark bundles representing one year.
+
+A mark bundle starts with the year its representing followed by a colon and a line break.
+This is followed by 12 lines starting with their number [1-12], a colon and
+31 characters representing the (marked) days.
+Every other character then '?' is interpreted as a mark.
+
+**! WARNING !**
+Because not every month has 31 days you can produce not correct results if you
+set your marks manually. But if you use mark to set your marks fore you this
+should not happen.
+
+#### colors content
+
+Every line of the color block is one pair of sign and color separated
+only by a colon.
+
+## Location
+
+The path to the store file is stored in the environment variable $__mark_store.
+
+
+## Example:
+This is a store generated by the __mark\_new\_store function.
+
+
+```
+#colors#
+#store#
+2016:
+1:???????????????????????????????
+2:???????????????????????????????
+3:???????????????????????????????
+4:???????????????????????????????
+5:???????????????????????????????
+6:???????????????????????????????
+7:???????????????????????????????
+8:???????????????????????????????
+9:???????????????????????????????
+10:???????????????????????????????
+11:???????????????????????????????
+12:???????????????????????????????
+#end#
+```