summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readme.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..ec26acd
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,28 @@
+The file hierarchy for problem data is below. Comments indicate the global
+variables and functions that can be defined in each file. Only the ID is
+necessary. See existing problems for examples.
+
+<language>
+├── common.py # id, hint_type, hint() [language-specific]
+├── en.py # name, description, hint [language-specific]
+├── sl.py # name, description, hint [language-specific]
+└── problems
+    └── <group>
+ ├── common.py # id, number
+ ├── en.py # name, description
+ ├── sl.py # name, description
+    └── <problem>
+       ├── common.py # id, number, test(), hint_type, hint() [problem-specific]
+       ├── en.py # name, plan, hint [problem-specific]
+       └── sl.py # name, plan, hint [problem-specific]
+
+To add a problem, create the necessary files. Pick an unused problem ID from
+the relevant range below:
+
+ Prolog: 10000-19999
+ Python: 20000-29999
+ Robot: 30000-39999
+
+Running scripts/build_web_resources.py in the codeq-server repo will generate
+JSON files for all problems, and insert new problems, groups and languages in
+the database.