Skip to content

Commit 24b63d3

Browse files
authored
Merge pull request #194 from sofa-framework/hugtalbot-patch-10
[GitHub] Add the SofaGLFW README to describe the new GUI
2 parents 0a49083 + 753a214 commit 24b63d3

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

script/pipeline.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def onerror(func, path, exc_info):
3131
def download_guidelines_file(cloned_doc_folder):
3232
url = 'https://raw.githubusercontent.com/sofa-framework/sofa/master/GUIDELINES.md'
3333
response = requests.get(url)
34-
contributing_filepath = os.path.join(cloned_doc_folder, "40_Programming_with_SOFA", "01_Guidelines.md")
34+
guidelines_filepath = os.path.join(cloned_doc_folder, "40_Programming_with_SOFA", "01_Guidelines.md")
3535
if response.status_code == 200:
36-
with open(contributing_filepath, 'wb') as file:
36+
with open(guidelines_filepath, 'wb') as file:
3737
file.write(response.content)
38-
print(f'File {contributing_filepath} downloaded successfully.')
38+
print(f'File {guidelines_filepath} downloaded successfully.')
3939
else:
4040
print(f'Failed to download file. Status code: {response.status_code}')
4141

@@ -52,6 +52,18 @@ def download_contributing_file(cloned_doc_folder):
5252
print(f'Failed to download file. Status code: {response.status_code}')
5353

5454

55+
def download_SofaGLFW_file(cloned_doc_folder):
56+
url = 'https://raw.githubusercontent.com/sofa-framework/SofaGLFW/master/README.md'
57+
response = requests.get(url)
58+
sofaglfw_filepath = os.path.join(cloned_doc_folder, "15_Using_SOFA", "11_runSofa_with_ImGui.md")
59+
if response.status_code == 200:
60+
with open(sofaglfw_filepath, 'wb') as file:
61+
file.write(response.content)
62+
print(f'File {sofaglfw_filepath} downloaded successfully.')
63+
else:
64+
print(f'Failed to download file. Status code: {response.status_code}')
65+
66+
5567
if __name__ == "__main__":
5668
tmp_folder = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "tmp")
5769

@@ -68,8 +80,10 @@ def download_contributing_file(cloned_doc_folder):
6880
branch='master')
6981
print("Finished to clone the doc...")
7082

83+
# Download and include pages as doc pages : GUIDELINES.md, CONTRIBUTING.md, README.md
7184
download_guidelines_file(cloned_doc_folder)
7285
download_contributing_file(cloned_doc_folder)
86+
download_SofaGLFW_file(cloned_doc_folder)
7387

7488
auto_doc_folder = os.path.join(tmp_folder, "auto_doc")
7589
print("Generate the doc...")

0 commit comments

Comments
 (0)