summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-12-02 16:07:01 +0100
committerstuebinm2021-12-02 16:07:01 +0100
commit79ec579b3295bf7bc24bfb878759e1ba906d2e98 (patch)
tree0aa784470ea46d92fc949f5b1c4ae3de71dd2157
parent7d8c66b4c3ffd610ef0da98c3f2ff8626f1c8af6 (diff)
update readme for badges
-rw-r--r--Readme.md24
1 files changed, 22 insertions, 2 deletions
diff --git a/Readme.md b/Readme.md
index ceb582b..d76c70f 100644
--- a/Readme.md
+++ b/Readme.md
@@ -6,7 +6,9 @@ additionally suggest changes to improve accessability.
Optionally, it can also *adjust* maps — e.g. to automatically insert property
values or help enforce an event's map policies — and then write them out again,
-copying all needed assets and minifying the map's json.
+copying all needed assets and minifying the map's json. This is used to simulate
+a `bbbRoom` property (via `openWebsite`), collect and remove badge tokens before
+maps are published, and to resolve special-schema URIs (e.g. `world://`).
## Usage
``` sh
@@ -94,13 +96,14 @@ should conform to the following schema (here defined in a quasi-haskell syntax):
type Output =
{ severity :: Level
-- ^ the maximum Lint level that occurred
+ , badges :: List Badge
+ -- ^ a list of badges occurring in any of the maps
, result :: Result
-- ^ detailed lints in a structured way
, resultText :: String
-- ^ all lints in a human-readable text block
}
-
-- | A detailed description of which errors occurred
type Result =
{ mapLints :: Map FilePath MapLint
@@ -157,5 +160,22 @@ type Lint =
-- ^ a human-readable (single-line) message
}
+type Badge =
+ { type :: AreaType
+ -- ^ type of the badge's area
+ , token :: String
+ -- ^ this badge's token
+ , x :: Number
+ -- ^ x position on the map
+ , y :: Number
+ -- ^ y position on the map
+ , width :: Maybe Number
+ -- ^ width of the rectangle/ellipse (not present if type=point)
+ , height :: Maybe Number
+ -- ^ height of the rectangle/ellipse (not present if type=point)
+ }
+
+-- | types of "areas" for badges, encoded as lower-cased strings
+data AreaType = Point | Rectangle | Ellipse
```