Skip to content

Commit

Permalink
move static stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Dec 14, 2023
1 parent 883864e commit ee05866
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sphinx:
extra_extensions:
- sphinxcontrib.mermaid
config: # Additional configuration for Sphinx
html_static_path: ['_static', '_static/models'] # Indicating that '_static/models' should be included
html_static_path: ['models'] # Indicating that '_static/models' should be included


only_build_toc_files: true
Expand Down
14 changes: 7 additions & 7 deletions build_examples.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# run the tools/make_model_formats.py script on the _static/models directory
python tools/make_model_formats.py _static/models
# run the tools/make_model_formats.py script on the models directory
python tools/make_model_formats.py models

# for each filename in the examples/ directory, look for a corresponding .ttl file in the
# _static/models directory. If it exists, run the tools/make_count_table.py script as
# python tools/make_count_table.py _static/models/<filename>.ttl > examples/<filename>.md
# models directory. If it exists, run the tools/make_count_table.py script as
# python tools/make_count_table.py models/<filename>.ttl > examples/<filename>.md
for filename in examples/*.md; do
# check if the .ttl file exists in the _static/models directory, making
# check if the .ttl file exists in the models directory, making
# sure to get the basename of the filename (i.e. strip the directory)
# yello text
echo -e "\e[33m=> Checking for .ttl file for $filename\e[0m"
# make the _static/models/<filename>.ttl filename
ttl_filename="_static/models/$(basename "${filename%.md}.ttl")"
# make the models/<filename>.ttl filename
ttl_filename="models/$(basename "${filename%.md}.ttl")"
if [ ! -f "$ttl_filename" ]; then
echo -e "\e[31m No .ttl file found for $filename\e[0m"
continue
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/generate-queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def replace_section_in_markdown(file_path, header, new_content):
encoded_query += raw_query.replace('\n', ' ')

query_url = f"{base_url}?query={urllib.parse.quote_plus(encoded_query)}"
# add a url parameter which points to models.open223.info/_static/models/<key>.ttl
query_url += f"&url=https://models.open223.info/_static/models/{key}.ttl"
# add a url parameter which points to models.open223.info/models/<key>.ttl
query_url += f"&url=https://models.open223.info/models/{key}.ttl"


# Add a row to the markdown table
Expand Down

0 comments on commit ee05866

Please sign in to comment.