From a86e5bc5fd6f5af786bfb793102c47c2afe641fa Mon Sep 17 00:00:00 2001 From: Sheri Gilley Date: Mon, 25 Mar 2024 18:45:06 -0500 Subject: [PATCH] cleaning up --- GitHub/docs_dashboard-h.py | 26 +++++++++++++++++--------- GitHub/jumps.html | 9 +++++++++ GitHub/top.html | 6 ++++++ docs/dashboard.html | 30 +++++++++++++++--------------- docs/index.html | 12 +++++------- docs/styles.css | 29 ++++++++++++----------------- 6 files changed, 64 insertions(+), 48 deletions(-) create mode 100644 GitHub/jumps.html create mode 100644 GitHub/top.html diff --git a/GitHub/docs_dashboard-h.py b/GitHub/docs_dashboard-h.py index e3493f0..0516854 100644 --- a/GitHub/docs_dashboard-h.py +++ b/GitHub/docs_dashboard-h.py @@ -31,17 +31,25 @@ def write_html(notebooks): row = f'{status}{file}\n' rows_by_extension[extension].append(row) + # read the top part of the html file from top.html + script_dir = os.path.dirname(os.path.realpath(__file__)) # Get the directory that the script is in + with open(os.path.join(script_dir,'top.html'), 'r') as top_file: + top_contents = top_file.read() + with open(os.path.join(script_dir,'jumps.html'), 'r') as jumps: + jumps = jumps.read() with open(html_file, 'w') as file: - file.write('\n\nCode snippets dashboard\n\n\n\n') - file.write('') - file.write('Jump to:\n\n\n\n\n\n\n') + file.write('\n\nCode snippets dashboard\n') + file.write(top_contents) + file.write('

Code snippets dashboard

\n') + file.write(jumps) for extension in sorted(rows_by_extension.keys()): - rows = rows_by_extension[extension] - file.write(f'

{extension}

\n') - file.write('\n') - for row in rows: - file.write(row) - file.write('
\n') + rows = rows_by_extension[extension] + if extension != '': + file.write(f'

{extension}

\n') + file.write('\n') + for row in rows: + file.write(row) + file.write('
\n') file.write('\n') # This is the main function diff --git a/GitHub/jumps.html b/GitHub/jumps.html new file mode 100644 index 0000000..fe87c61 --- /dev/null +++ b/GitHub/jumps.html @@ -0,0 +1,9 @@ +
+ Jump to: + + + + + + +
\ No newline at end of file diff --git a/GitHub/top.html b/GitHub/top.html new file mode 100644 index 0000000..d9b5326 --- /dev/null +++ b/GitHub/top.html @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/docs/dashboard.html b/docs/dashboard.html index 12829f1..d380a2b 100644 --- a/docs/dashboard.html +++ b/docs/dashboard.html @@ -1,21 +1,21 @@ Code snippets dashboard - - - -Jump to: - - - - - - - -

.ipynb

+ + + +

Code snippets dashboard

+
+ Jump to: + + + + + + +

.ipynb

diff --git a/docs/index.html b/docs/index.html index 940838e..b6fffb5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,14 +2,14 @@ Azure Machine Learning code snippets + - - - + + +

Azure Machine Learning code snippets

Find the workflow and file for a code snippet

Enter your code snippet here (including ~/azureml-) to find the workflow and file in the AzureML examples repository. @@ -20,8 +20,6 @@

Find the workflow and file for a code snippet

-

Dashboard

- View the dashboard to see the status of all code snippets.
environment.ipynb environment.ipynb
model.ipynb model.ipynb