Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

import json 

from os.path import join, realpath, dirname 

 

from jsonschema import Draft7Validator 

 

dir_path = dirname(realpath(__file__)) 

schema_dir = join(dir_path, "json_schemas") 

 

with open(join(schema_dir, "useful_links.json"), "r") as f: 

USEFUL_LINKS_SCHEMA = json.load(f) 

Draft7Validator.check_schema(USEFUL_LINKS_SCHEMA) 

 

with open(join(schema_dir, "photos.json"), "r") as f: 

PHOTOS_SCHEMA = json.load(f) 

Draft7Validator.check_schema(PHOTOS_SCHEMA) 

 

with open(join(schema_dir, "definitions.json"), "r") as f: 

DEFINITIONS_SCHEMA = json.load(f) 

Draft7Validator.check_schema(DEFINITIONS_SCHEMA) 

 

with open(join(schema_dir, "theme.json"), "r") as f: 

THEME_SCHEMA = json.load(f) 

Draft7Validator.check_schema(THEME_SCHEMA) 

 

with open(join(schema_dir, "recommendation_list_content.json"), "r") as f: 

RECOMMENDATION_LIST_CONTENT_SCHEMA = json.load(f) 

Draft7Validator.check_schema(RECOMMENDATION_LIST_CONTENT_SCHEMA)