diff --git a/300s School/' b/300s School/' new file mode 100644 index 00000000..aed4a093 --- /dev/null +++ b/300s School/' @@ -0,0 +1,83 @@ + +#!/bin/bash +# ------------------------------------------------------------------ +# Author: ChatGPT +# Generated on: $(date '+%Y-%m-%d') +# +# This script deletes existing README files matching "README - *.md" +# and then recursively creates a table-of-contents README file in +# each directory. The file is named "README - {Folder Name}.md". +# +# Each README includes: +# - An author/date header. +# - A header with the folder's name. +# - An alphabetically sorted list of immediate subdirectories, +# with links to that subdirectory’s own README. +# - An alphabetically sorted list of immediate files (excluding +# the generated README). +# +# It is written to handle blank spaces in file and folder names. +# ------------------------------------------------------------------ + +# Delete any existing README files matching "README - *.md" +find . -type f -name 'README - *.md' -delete + +# Set the base directory (change "." if necessary) +base_dir="." + +# Recursively find every directory starting from base_dir. +find "$base_dir" -type d -print0 | while IFS= read -r -d '' dir; do + # Get the folder's base name (handles spaces correctly) + base=$(basename "$dir") + # Define the path for the README file: "README - {Folder Name}.md" + readme="$dir/README - ${base}.md" + + # Write the header into the README file, including author/date attribution. + { + echo "Generated by ChatGPT on $(date '+%Y-%m-%d')" + echo "" + echo "# Table of Contents for ${base}" + echo "" + } > "$readme" + + ######################### + # Process Subdirectories + ######################### + subdirs=() + # Find immediate subdirectories (depth 1) in the current directory. + while IFS= read -r -d '' subdir; do + subdirs+=( "$(basename "$subdir")" ) + done < <(find "$dir" -mindepth 1 -maxdepth 1 -type d -print0) + + if [ ${#subdirs[@]} -gt 0 ]; then + # Sort subdirectory names alphabetically while preserving spaces. + mapfile -t sorted_subdirs < <(printf "%s\n" "${subdirs[@]}" | sort) + echo "## Subdirectories" >> "$readme" + for sub in "${sorted_subdirs[@]}"; do + # Link to the subdirectory's README file. + # The link format: [[Subfolder/README - Subfolder]] + echo "- [[${sub}/README - ${sub}]]" >> "$readme" + done + echo "" >> "$readme" + fi + + ################# + # Process Files + ################# + files=() + # Find immediate files (depth 1), excluding the generated README file. + while IFS= read -r -d '' file; do + files+=( "$(basename "$file")" ) + done < <(find "$dir" -mindepth 1 -maxdepth 1 -type f ! -path "$readme" -print0) + + if [ ${#files[@]} -gt 0 ]; then + # Sort file names alphabetically while preserving spaces. + mapfile -t sorted_files < <(printf "%s\n" "${files[@]}" | sort) + echo "## Files" >> "$readme" + for f in "${sorted_files[@]}"; do + echo "- [[${f}]]" >> "$readme" + done + echo "" >> "$readme" + fi +done + diff --git a/300s School/ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/README - 2024-09-09.md b/300s School/ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/README - 2024-09-09.md index 9ad83de7..c03a5238 100644 --- a/300s School/ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/README - 2024-09-09.md +++ b/300s School/ME 2016 - Nonlinear Dynamical Systems 1/2024-09-09/README - 2024-09-09.md @@ -1,3 +1,4 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for 2024-09-09 diff --git a/300s School/ME 2016 - Nonlinear Dynamical Systems 1/README - ME 2016 - Nonlinear Dynamical Systems 1.md b/300s School/ME 2016 - Nonlinear Dynamical Systems 1/README - ME 2016 - Nonlinear Dynamical Systems 1.md index c5d5bacf..e07b5c61 100644 --- a/300s School/ME 2016 - Nonlinear Dynamical Systems 1/README - ME 2016 - Nonlinear Dynamical Systems 1.md +++ b/300s School/ME 2016 - Nonlinear Dynamical Systems 1/README - ME 2016 - Nonlinear Dynamical Systems 1.md @@ -1,3 +1,4 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for ME 2016 - Nonlinear Dynamical Systems 1 @@ -6,49 +7,19 @@ - [[images/README - images]] ## Files -- [[2024-08-26]] -- [[Python]] -- [[Introduction.md]] -- [[2024-09-09]] -- [[Example.py]] -- [[2024-09-09]] -- [[Frameworks]] -- [[and]] -- [[Review.md]] -- [[2024-09-16]] -- [[Plane]] -- [[Diagrams.md]] -- [[2024-09-18]] -- [[Homework]] -- [[1.md]] -- [[2024-09-23]] -- [[More]] -- [[Phase]] -- [[Plane]] -- [[Stuff.md]] -- [[2024-09-30]] -- [[Limit]] -- [[Cycles.md]] -- [[2024-10-28]] -- [[Stability.md]] -- [[2024-11-11]] -- [[Nonlinear]] -- [[3D]] -- [[Phenomena.md]] -- [[2024-11-18]] -- [[Volume]] -- [[Contraction.md]] -- [[2024-12-02]] -- [[Delay]] -- [[Differential]] -- [[Equation.md]] +- [[2024-08-26 Python Introduction.md]] +- [[2024-09-09 Example.py]] +- [[2024-09-09 Frameworks and Review.md]] +- [[2024-09-16 Plane Diagrams.md]] +- [[2024-09-18 Homework 1.md]] +- [[2024-09-23 More Phase Plane Stuff.md]] +- [[2024-09-30 Limit Cycles.md]] +- [[2024-10-28 Stability.md]] +- [[2024-11-11 Nonlinear 3D Phenomena.md]] +- [[2024-11-18 Volume Contraction.md]] +- [[2024-12-02 Delay Differential Equation.md]] - [[ME2016_MEMS1016___Mini_Project_1.pdf]] -- [[Mini]] -- [[Project.md]] +- [[Mini Project.md]] - [[reddup]] -- [[To]] -- [[Do]] -- [[-]] -- [[ME]] -- [[2016.md]] +- [[To Do - ME 2016.md]] diff --git a/300s School/ME 2016 - Nonlinear Dynamical Systems 1/images/README - images.md b/300s School/ME 2016 - Nonlinear Dynamical Systems 1/images/README - images.md index 4565a602..83f646ff 100644 --- a/300s School/ME 2016 - Nonlinear Dynamical Systems 1/images/README - images.md +++ b/300s School/ME 2016 - Nonlinear Dynamical Systems 1/images/README - images.md @@ -1,27 +1,12 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for images ## Files -- [[How]] -- [[do]] -- [[we]] -- [[deal]] -- [[with]] -- [[nonlinearities?.png]] -- [[LINE]] -- [[Systems]] -- [[in]] -- [[the]] -- [[Plane.png]] -- [[Mode]] -- [[Diagram.png]] -- [[Nonlinear]] -- [[Planar]] -- [[Systems.png]] -- [[Pasted]] -- [[image]] -- [[20240923133628.png]] -- [[Pasted]] -- [[image]] -- [[20240923133900.png]] +- [[How do we deal with nonlinearities?.png]] +- [[LINE Systems in the Plane.png]] +- [[Mode Diagram.png]] +- [[Nonlinear Planar Systems.png]] +- [[Pasted image 20240923133628.png]] +- [[Pasted image 20240923133900.png]] diff --git a/300s School/ME 2046 - Digital Control Theory/README - ME 2046 - Digital Control Theory.md b/300s School/ME 2046 - Digital Control Theory/README - ME 2046 - Digital Control Theory.md index 708221eb..f89079e0 100644 --- a/300s School/ME 2046 - Digital Control Theory/README - ME 2046 - Digital Control Theory.md +++ b/300s School/ME 2046 - Digital Control Theory/README - ME 2046 - Digital Control Theory.md @@ -1,18 +1,10 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for ME 2046 - Digital Control Theory ## Files -- [[2025-01-09]] -- [[Sampling]] -- [[Theory.md]] -- [[2025-01-16]] -- [[The]] -- [[Z]] -- [[Transform.md]] -- [[Homework]] -- [[1.md]] -- [[!Things]] -- [[That]] -- [[Need]] -- [[Done.md]] +- [[2025-01-09 Sampling Theory.md]] +- [[2025-01-16 The Z Transform.md]] +- [[Homework 1.md]] +- [[!Things That Need Done.md]] diff --git a/300s School/ME 2085 - Graduate Seminar/README - ME 2085 - Graduate Seminar.md b/300s School/ME 2085 - Graduate Seminar/README - ME 2085 - Graduate Seminar.md index fb083539..fdfb590e 100644 --- a/300s School/ME 2085 - Graduate Seminar/README - ME 2085 - Graduate Seminar.md +++ b/300s School/ME 2085 - Graduate Seminar/README - ME 2085 - Graduate Seminar.md @@ -1,107 +1,13 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for ME 2085 - Graduate Seminar ## Files -- [[2024-08-29]] -- [[Fatigue-]] -- [[and]] -- [[Toughness-Based]] -- [[Process]] -- [[Windows]] -- [[in]] -- [[Additively]] -- [[Manufactured]] -- [[Materials]] -- [[-]] -- [[John]] -- [[Lewandowski.md]] -- [[2024-09-05]] -- [[Model-Based]] -- [[Design]] -- [[of]] -- [[Coatings]] -- [[for]] -- [[Gas]] -- [[Turbine]] -- [[Engines]] -- [[-]] -- [[R.]] -- [[Wesley]] -- [[Jackson.md]] -- [[2024-09-12]] -- [[(OHARA]] -- [[STUDENT]] -- [[CENTER]] -- [[DINING]] -- [[ROOM)]] -- [[Overview]] -- [[of]] -- [[NSF]] -- [[&]] -- [[Research]] -- [[Funding]] -- [[Opportunities]] -- [[-]] -- [[Ronald]] -- [[D.]] -- [[Joslin.md]] -- [[2024-10-03]] -- [[Materials]] -- [[Design]] -- [[in]] -- [[Nuclear]] -- [[Systems]] -- [[and]] -- [[Additive]] -- [[Manufacturing]] -- [[to]] -- [[Overcome]] -- [[Design]] -- [[Challenges]] -- [[-]] -- [[Peter]] -- [[Hosemann.md]] -- [[2024-10-31]] -- [[Net]] -- [[Zero]] -- [[Pathways]] -- [[in]] -- [[the]] -- [[US]] -- [[Energy]] -- [[System]] -- [[-]] -- [[Timothy]] -- [[Lieuwen.md]] -- [[2024-11-21]] -- [[Tensor]] -- [[Networks]] -- [[for]] -- [[Non-Equilibrium]] -- [[Quantum]] -- [[Many-Body]] -- [[Systems]] -- [[-]] -- [[Michael]] -- [[Zwolak.md]] -- [[2024-12-03]] -- [[Oxide]] -- [[Particle]] -- [[Dynamics]] -- [[at]] -- [[the]] -- [[Melt]] -- [[Pool]] -- [[Scale]] -- [[in]] -- [[Laser]] -- [[Poweder]] -- [[bed]] -- [[Fusion]] -- [[Additive]] -- [[Manufacturing]] -- [[-]] -- [[Sneha]] -- [[Prabha]] -- [[Narra.md]] +- [[2024-08-29 Fatigue- and Toughness-Based Process Windows in Additively Manufactured Materials - John Lewandowski.md]] +- [[2024-09-05 Model-Based Design of Coatings for Gas Turbine Engines - R. Wesley Jackson.md]] +- [[2024-09-12 (OHARA STUDENT CENTER DINING ROOM) Overview of NSF & Research Funding Opportunities - Ronald D. Joslin.md]] +- [[2024-10-03 Materials Design in Nuclear Systems and Additive Manufacturing to Overcome Design Challenges - Peter Hosemann.md]] +- [[2024-10-31 Net Zero Pathways in the US Energy System - Timothy Lieuwen.md]] +- [[2024-11-21 Tensor Networks for Non-Equilibrium Quantum Many-Body Systems - Michael Zwolak.md]] +- [[2024-12-03 Oxide Particle Dynamics at the Melt Pool Scale in Laser Poweder bed Fusion Additive Manufacturing - Sneha Prabha Narra.md]] diff --git a/300s School/ME 2150 - High Assurance Cyber-Physical Systems/README - ME 2150 - High Assurance Cyber-Physical Systems.md b/300s School/ME 2150 - High Assurance Cyber-Physical Systems/README - ME 2150 - High Assurance Cyber-Physical Systems.md index e1a2704a..02a0b977 100644 --- a/300s School/ME 2150 - High Assurance Cyber-Physical Systems/README - ME 2150 - High Assurance Cyber-Physical Systems.md +++ b/300s School/ME 2150 - High Assurance Cyber-Physical Systems/README - ME 2150 - High Assurance Cyber-Physical Systems.md @@ -1,43 +1,15 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for ME 2150 - High Assurance Cyber-Physical Systems ## Files -- [[2025-01-09]] -- [[Syllabus]] -- [[and]] -- [[Introduction.md]] -- [[2025-01-14]] -- [[Microkernels.md]] -- [[2025-01-16]] -- [[HACMS]] -- [[Program]] -- [[Overview.md]] -- [[Capabilities]] -- [[Tutorials.md]] -- [[Investigating]] -- [[seL4]] -- [[with]] -- [[Docker.md]] -- [[ME]] -- [[2150]] -- [[-]] -- [[High-Assurance]] -- [[Cyber-Physical]] -- [[Systems]] -- [[Homework]] -- [[1]] -- [[Complete.md]] -- [[ME]] -- [[2150]] -- [[-]] -- [[High-Assurance]] -- [[Cyber-Physical]] -- [[Systems]] -- [[Homework]] -- [[1.md]] +- [[2025-01-09 Syllabus and Introduction.md]] +- [[2025-01-14 Microkernels.md]] +- [[2025-01-16 HACMS Program Overview.md]] +- [[Capabilities Tutorials.md]] +- [[Investigating seL4 with Docker.md]] +- [[ME 2150 - High-Assurance Cyber-Physical Systems Homework 1 Complete.md]] +- [[ME 2150 - High-Assurance Cyber-Physical Systems Homework 1.md]] - [[press.png]] -- [[!Things]] -- [[That]] -- [[Need]] -- [[Done.md]] +- [[!Things That Need Done.md]] diff --git a/300s School/ME 3100 - Engineering Research and Leadership Management/README - ME 3100 - Engineering Research and Leadership Management.md b/300s School/ME 3100 - Engineering Research and Leadership Management/README - ME 3100 - Engineering Research and Leadership Management.md index aea064d9..f44ab5f4 100644 --- a/300s School/ME 3100 - Engineering Research and Leadership Management/README - ME 3100 - Engineering Research and Leadership Management.md +++ b/300s School/ME 3100 - Engineering Research and Leadership Management/README - ME 3100 - Engineering Research and Leadership Management.md @@ -1,34 +1,13 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for ME 3100 - Engineering Research and Leadership Management ## Files -- [[1.]] -- [[Goals]] -- [[and]] -- [[Outcomes.md]] -- [[2.]] -- [[State]] -- [[of]] -- [[the]] -- [[Art]] -- [[and]] -- [[Limits]] -- [[of]] -- [[Current]] -- [[Practice.md]] -- [[3.]] -- [[Research]] -- [[Approach.md]] -- [[4.]] -- [[Metrics]] -- [[of]] -- [[Success.md]] -- [[5.]] -- [[Research]] -- [[Impact.md]] -- [[6.]] -- [[Risks]] -- [[and]] -- [[Contingencies.md]] +- [[1. Goals and Outcomes.md]] +- [[2. State of the Art and Limits of Current Practice.md]] +- [[3. Research Approach.md]] +- [[4. Metrics of Success.md]] +- [[5. Research Impact.md]] +- [[6. Risks and Contingencies.md]] - [[ERLM_Structure_of_Objectives_Page.pdf]] diff --git a/300s School/NUCE 2100 - Fundamentals of Nuclear Engineering/README - NUCE 2100 - Fundamentals of Nuclear Engineering.md b/300s School/NUCE 2100 - Fundamentals of Nuclear Engineering/README - NUCE 2100 - Fundamentals of Nuclear Engineering.md index 1ad949a4..040ae739 100644 --- a/300s School/NUCE 2100 - Fundamentals of Nuclear Engineering/README - NUCE 2100 - Fundamentals of Nuclear Engineering.md +++ b/300s School/NUCE 2100 - Fundamentals of Nuclear Engineering/README - NUCE 2100 - Fundamentals of Nuclear Engineering.md @@ -1,83 +1,32 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for NUCE 2100 - Fundamentals of Nuclear Engineering ## Files -- [[2024-08-27]] -- [[Introduction.md]] -- [[2024-09-03]] -- [[Homework]] -- [[1.md]] -- [[2024-09-03]] -- [[Homework]] -- [[1.pdf]] -- [[2024-09-03]] -- [[Module]] -- [[2.md]] -- [[2024-09-10]] -- [[Homework]] -- [[2.md]] -- [[2024-09-10]] -- [[Module]] -- [[3.md]] -- [[2024-09-17]] -- [[Homework]] -- [[3.md]] -- [[2024-09-17]] -- [[Module]] -- [[5]] -- [[Nuclear]] -- [[Fission]] -- [[Basics.md]] -- [[2024-09-24]] -- [[Homework]] -- [[4.md]] -- [[2024-09-24]] -- [[Week]] -- [[5.md]] -- [[2024-10-01]] -- [[Homework]] -- [[5.md]] -- [[2024-10-01]] -- [[Project]] -- [[Topic]] -- [[and]] -- [[Description.md]] -- [[2024-10-08]] -- [[Midterm]] -- [[.md]] -- [[2024-10-29]] -- [[Homework]] -- [[6.md]] -- [[2024-11-05]] -- [[Homework]] -- [[7.md]] -- [[2024-11-12]] -- [[Homework]] -- [[8.md]] -- [[2024-11-19]] -- [[Homework]] -- [[9.md]] -- [[2024-12-03]] -- [[Homework]] -- [[10.md]] -- [[2024-12-10]] -- [[Project]] -- [[Paper]] -- [[and]] -- [[Presentation.md]] +- [[2024-08-27 Introduction.md]] +- [[2024-09-03 Homework 1.md]] +- [[2024-09-03 Homework 1.pdf]] +- [[2024-09-03 Module 2.md]] +- [[2024-09-10 Homework 2.md]] +- [[2024-09-10 Module 3.md]] +- [[2024-09-17 Homework 3.md]] +- [[2024-09-17 Module 5 Nuclear Fission Basics.md]] +- [[2024-09-24 Homework 4.md]] +- [[2024-09-24 Week 5.md]] +- [[2024-10-01 Homework 5.md]] +- [[2024-10-01 Project Topic and Description.md]] +- [[2024-10-08 Midterm .md]] +- [[2024-10-29 Homework 6.md]] +- [[2024-11-05 Homework 7.md]] +- [[2024-11-12 Homework 8.md]] +- [[2024-11-19 Homework 9.md]] +- [[2024-12-03 Homework 10.md]] +- [[2024-12-10 Project Paper and Presentation.md]] - [[HW2.md]] - [[HW2.pdf]] - [[HW2v2.md]] -- [[Pasted]] -- [[image]] -- [[20240827190612.png]] -- [[Pasted]] -- [[image]] -- [[20240827193439.png]] -- [[Pasted]] -- [[image]] -- [[20240827195025.png]] -- [[Project]] -- [[and]] -- [[Presentation.md]] +- [[Pasted image 20240827190612.png]] +- [[Pasted image 20240827193439.png]] +- [[Pasted image 20240827195025.png]] +- [[Project and Presentation.md]] diff --git a/300s School/NUCE 2103 - Integration of Plant Systems with the Reactor Core/README - NUCE 2103 - Integration of Plant Systems with the Reactor Core.md b/300s School/NUCE 2103 - Integration of Plant Systems with the Reactor Core/README - NUCE 2103 - Integration of Plant Systems with the Reactor Core.md index 498c2775..e462fb89 100644 --- a/300s School/NUCE 2103 - Integration of Plant Systems with the Reactor Core/README - NUCE 2103 - Integration of Plant Systems with the Reactor Core.md +++ b/300s School/NUCE 2103 - Integration of Plant Systems with the Reactor Core/README - NUCE 2103 - Integration of Plant Systems with the Reactor Core.md @@ -1,9 +1,7 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for NUCE 2103 - Integration of Plant Systems with the Reactor Core ## Files -- [[NUCE]] -- [[2103]] -- [[Final]] -- [[Exam.md]] +- [[NUCE 2103 Final Exam.md]] diff --git a/300s School/NUCE 2113 - Radiation Detection and Measurement/README - NUCE 2113 - Radiation Detection and Measurement.md b/300s School/NUCE 2113 - Radiation Detection and Measurement/README - NUCE 2113 - Radiation Detection and Measurement.md index cf007237..ddccbe6c 100644 --- a/300s School/NUCE 2113 - Radiation Detection and Measurement/README - NUCE 2113 - Radiation Detection and Measurement.md +++ b/300s School/NUCE 2113 - Radiation Detection and Measurement/README - NUCE 2113 - Radiation Detection and Measurement.md @@ -1,15 +1,10 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for NUCE 2113 - Radiation Detection and Measurement ## Files -- [[Laboratory]] -- [[1.md]] -- [[Laboratory]] -- [[2.md]] -- [[Laboratory]] -- [[3.md]] -- [[!Things]] -- [[That]] -- [[Need]] -- [[Done.md]] +- [[Laboratory 1.md]] +- [[Laboratory 2.md]] +- [[Laboratory 3.md]] +- [[!Things That Need Done.md]] diff --git a/300s School/README - ..md b/300s School/README - ..md index 0f113a8b..9201a469 100644 --- a/300s School/README - ..md +++ b/300s School/README - ..md @@ -1,66 +1,18 @@ +Generated by ChatGPT on 2025-02-10 # Table of Contents for . ## Subdirectories -- [[ME/README - ME]] -- [[2016/README - 2016]] -- [[-/README - -]] -- [[Nonlinear/README - Nonlinear]] -- [[Dynamical/README - Dynamical]] -- [[Systems/README - Systems]] -- [[1/README - 1]] -- [[ME/README - ME]] -- [[2046/README - 2046]] -- [[-/README - -]] -- [[Digital/README - Digital]] -- [[Control/README - Control]] -- [[Theory/README - Theory]] -- [[ME/README - ME]] -- [[2085/README - 2085]] -- [[-/README - -]] -- [[Graduate/README - Graduate]] -- [[Seminar/README - Seminar]] -- [[ME/README - ME]] -- [[2150/README - 2150]] -- [[-/README - -]] -- [[High/README - High]] -- [[Assurance/README - Assurance]] -- [[Cyber-Physical/README - Cyber-Physical]] -- [[Systems/README - Systems]] -- [[ME/README - ME]] -- [[3100/README - 3100]] -- [[-/README - -]] -- [[Engineering/README - Engineering]] -- [[Research/README - Research]] -- [[and/README - and]] -- [[Leadership/README - Leadership]] -- [[Management/README - Management]] -- [[NUCE/README - NUCE]] -- [[2100/README - 2100]] -- [[-/README - -]] -- [[Fundamentals/README - Fundamentals]] -- [[of/README - of]] -- [[Nuclear/README - Nuclear]] -- [[Engineering/README - Engineering]] -- [[NUCE/README - NUCE]] -- [[2103/README - 2103]] -- [[-/README - -]] -- [[Integration/README - Integration]] -- [[of/README - of]] -- [[Plant/README - Plant]] -- [[Systems/README - Systems]] -- [[with/README - with]] -- [[the/README - the]] -- [[Reactor/README - Reactor]] -- [[Core/README - Core]] -- [[NUCE/README - NUCE]] -- [[2113/README - 2113]] -- [[-/README - -]] -- [[Radiation/README - Radiation]] -- [[Detection/README - Detection]] -- [[and/README - and]] -- [[Measurement/README - Measurement]] +- [[ME 2016 - Nonlinear Dynamical Systems 1/README - ME 2016 - Nonlinear Dynamical Systems 1]] +- [[ME 2046 - Digital Control Theory/README - ME 2046 - Digital Control Theory]] +- [[ME 2085 - Graduate Seminar/README - ME 2085 - Graduate Seminar]] +- [[ME 2150 - High Assurance Cyber-Physical Systems/README - ME 2150 - High Assurance Cyber-Physical Systems]] +- [[ME 3100 - Engineering Research and Leadership Management/README - ME 3100 - Engineering Research and Leadership Management]] +- [[NUCE 2100 - Fundamentals of Nuclear Engineering/README - NUCE 2100 - Fundamentals of Nuclear Engineering]] +- [[NUCE 2103 - Integration of Plant Systems with the Reactor Core/README - NUCE 2103 - Integration of Plant Systems with the Reactor Core]] +- [[NUCE 2113 - Radiation Detection and Measurement/README - NUCE 2113 - Radiation Detection and Measurement]] ## Files +- [[']] - [[reddup.sh]] diff --git a/300s School/reddup.sh b/300s School/reddup.sh index 30474e71..5042b668 100755 --- a/300s School/reddup.sh +++ b/300s School/reddup.sh @@ -26,14 +26,14 @@ base_dir="." # Recursively find every directory starting from base_dir. find "$base_dir" -type d -print0 | while IFS= read -r -d '' dir; do - # Get the folder's base name (tolerant of spaces) + # Get the folder's base name (handles spaces correctly) base=$(basename "$dir") - # Define the path for the README file. Format: "README - {Folder Name}.md" + # Define the path for the README file: "README - {Folder Name}.md" readme="$dir/README - ${base}.md" - # Write the header into the README file, including author attribution and date. + # Write the header into the README file, including author/date attribution. { -# echo "Generated by ChatGPT on $(date '+%Y-%m-%d')" + echo "Generated by ChatGPT on $(date '+%Y-%m-%d')" echo "" echo "# Table of Contents for ${base}" echo "" @@ -49,8 +49,8 @@ find "$base_dir" -type d -print0 | while IFS= read -r -d '' dir; do done < <(find "$dir" -mindepth 1 -maxdepth 1 -type d -print0) if [ ${#subdirs[@]} -gt 0 ]; then - # Sort subdirectory names alphabetically. - sorted_subdirs=($(printf "%s\n" "${subdirs[@]}" | sort)) + # Sort subdirectory names alphabetically while preserving spaces. + mapfile -t sorted_subdirs < <(printf "%s\n" "${subdirs[@]}" | sort) echo "## Subdirectories" >> "$readme" for sub in "${sorted_subdirs[@]}"; do # Link to the subdirectory's README file. @@ -70,8 +70,8 @@ find "$base_dir" -type d -print0 | while IFS= read -r -d '' dir; do done < <(find "$dir" -mindepth 1 -maxdepth 1 -type f ! -path "$readme" -print0) if [ ${#files[@]} -gt 0 ]; then - # Sort file names alphabetically. - sorted_files=($(printf "%s\n" "${files[@]}" | sort)) + # Sort file names alphabetically while preserving spaces. + mapfile -t sorted_files < <(printf "%s\n" "${files[@]}" | sort) echo "## Files" >> "$readme" for f in "${sorted_files[@]}"; do echo "- [[${f}]]" >> "$readme"