File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 6
6
7
7
from bs4 import BeautifulSoup
8
8
9
- build_dir = sys .argv [1 ]
10
- print (f"Build directory: { build_dir } " )
11
9
12
10
json_file_path = "tutorials-review-data.json"
13
- #build_dir = "_build/html" # for testing after _build/html is created
14
11
15
12
# paths to skip from the post-processing script
16
13
paths_to_skip = [
@@ -143,18 +140,19 @@ def process_json_file(json_file_path):
143
140
print (f"Warning: <h1> tag not found in { html_file_path } " )
144
141
145
142
146
- process_json_file (json_file_path )
147
- print (
148
- f"Finished processing JSON file. Please check the output for any warnings. "
149
- "Pages like `nlp/index.html` are generated only during the full `make docs` "
150
- "or `make html` build. Warnings about these files when you run `make html-noplot` "
151
- "can be ignored."
152
- )
153
-
154
143
def main ():
155
144
if len (sys .argv ) < 2 :
156
145
print ("Error: Build directory not provided. Exiting." )
157
146
exit (1 )
147
+ build_dir = sys .argv [1 ]
148
+ print (f"Build directory: { build_dir } " )
149
+ process_json_file (json_file_path )
150
+ print (
151
+ "Finished processing JSON file. Please check the output for any warnings. "
152
+ "Pages like `nlp/index.html` are generated only during the full `make docs` "
153
+ "or `make html` build. Warnings about these files when you run `make html-noplot` "
154
+ "can be ignored."
155
+ )
158
156
159
157
if __name__ == "__main__" :
160
158
main ()
You can’t perform that action at this time.
0 commit comments