Skip to content

Commit

Permalink
Move global_boxes.json somewhere more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
lurch committed Feb 26, 2023
1 parent 2aec6de commit 74c4a7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
File renamed without changes.
7 changes: 3 additions & 4 deletions scripts/create_output_index_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
def change_file_ext(filename, extension):
return os.path.splitext(filename)[0] + '.' + extension

def get_global_subitems():
scripts_dir = os.path.dirname(__file__)
json_path = os.path.join(scripts_dir, "global_boxes.json")
def get_global_subitems(src_dir):
json_path = os.path.join(src_dir, "global_boxes.json")
with open(json_path) as json_fh:
items = json.load(json_fh)
return items
Expand Down Expand Up @@ -48,7 +47,7 @@ def build_tab_from_json(tab, adoc_dir, img_dir):
output_json = sys.argv[2]
input_dir = sys.argv[3]
images_dir = sys.argv[4]
global_subitems = get_global_subitems()
global_subitems = get_global_subitems(os.path.join(input_dir, '..'))
with open(input_json) as json_fh:
data = json.load(json_fh)
found_default_tab = False
Expand Down

0 comments on commit 74c4a7f

Please sign in to comment.