vault backup: 2025-02-10 11:33:51

This commit is contained in:
Dane Sabo 2025-02-10 11:33:51 -05:00
parent 044a80ab4a
commit f636f3825d
13 changed files with 123 additions and 94 deletions

View File

@ -1,65 +0,0 @@
# Table of Contents for .
## Subdirectories
- [[ME/!TOC]]
- [[2016/!TOC]]
- [[-/!TOC]]
- [[Nonlinear/!TOC]]
- [[Dynamical/!TOC]]
- [[Systems/!TOC]]
- [[1/!TOC]]
- [[ME/!TOC]]
- [[2046/!TOC]]
- [[-/!TOC]]
- [[Digital/!TOC]]
- [[Control/!TOC]]
- [[Theory/!TOC]]
- [[ME/!TOC]]
- [[2085/!TOC]]
- [[-/!TOC]]
- [[Graduate/!TOC]]
- [[Seminar/!TOC]]
- [[ME/!TOC]]
- [[2150/!TOC]]
- [[-/!TOC]]
- [[High/!TOC]]
- [[Assurance/!TOC]]
- [[Cyber-Physical/!TOC]]
- [[Systems/!TOC]]
- [[ME/!TOC]]
- [[3100/!TOC]]
- [[-/!TOC]]
- [[Engineering/!TOC]]
- [[Research/!TOC]]
- [[and/!TOC]]
- [[Leadership/!TOC]]
- [[Management/!TOC]]
- [[NUCE/!TOC]]
- [[2100/!TOC]]
- [[-/!TOC]]
- [[Fundamentals/!TOC]]
- [[of/!TOC]]
- [[Nuclear/!TOC]]
- [[Engineering/!TOC]]
- [[NUCE/!TOC]]
- [[2103/!TOC]]
- [[-/!TOC]]
- [[Integration/!TOC]]
- [[of/!TOC]]
- [[Plant/!TOC]]
- [[Systems/!TOC]]
- [[with/!TOC]]
- [[the/!TOC]]
- [[Reactor/!TOC]]
- [[Core/!TOC]]
- [[NUCE/!TOC]]
- [[2113/!TOC]]
- [[-/!TOC]]
- [[Radiation/!TOC]]
- [[Detection/!TOC]]
- [[and/!TOC]]
- [[Measurement/!TOC]]
## Files
- [[reddup.sh]]

View File

@ -1,3 +1,4 @@
# Table of Contents for 2024-09-09 # Table of Contents for 2024-09-09
## Files ## Files

View File

@ -1,8 +1,9 @@
# Table of Contents for ME 2016 - Nonlinear Dynamical Systems 1 # Table of Contents for ME 2016 - Nonlinear Dynamical Systems 1
## Subdirectories ## Subdirectories
- [[2024-09-09/!TOC]] - [[2024-09-09/README - 2024-09-09]]
- [[images/!TOC]] - [[images/README - images]]
## Files ## Files
- [[2024-08-26]] - [[2024-08-26]]

View File

@ -1,3 +1,4 @@
# Table of Contents for images # Table of Contents for images
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for ME 2046 - Digital Control Theory # Table of Contents for ME 2046 - Digital Control Theory
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for ME 2085 - Graduate Seminar # Table of Contents for ME 2085 - Graduate Seminar
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for ME 2150 - High Assurance Cyber-Physical Systems # Table of Contents for ME 2150 - High Assurance Cyber-Physical Systems
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for ME 3100 - Engineering Research and Leadership Management # Table of Contents for ME 3100 - Engineering Research and Leadership Management
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for NUCE 2100 - Fundamentals of Nuclear Engineering # Table of Contents for NUCE 2100 - Fundamentals of Nuclear Engineering
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for NUCE 2103 - Integration of Plant Systems with the Reactor Core # Table of Contents for NUCE 2103 - Integration of Plant Systems with the Reactor Core
## Files ## Files

View File

@ -1,3 +1,4 @@
# Table of Contents for NUCE 2113 - Radiation Detection and Measurement # Table of Contents for NUCE 2113 - Radiation Detection and Measurement
## Files ## Files

66
300s School/README - ..md Normal file
View File

@ -0,0 +1,66 @@
# 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]]
## Files
- [[reddup.sh]]

View File

@ -1,64 +1,82 @@
#!/bin/bash #!/bin/bash
# This script recursively creates a table-of-contents file named !TOC.md in every directory # ------------------------------------------------------------------
# under the current folder (e.g., your school folder). Each !TOC.md file will include: # Author: ChatGPT
# - A header with the directory name. # Generated on: $(date '+%Y-%m-%d')
# - A list of immediate subdirectories (alphabetically sorted) as links to that subdirectorys own !TOC.
# - A list of immediate files (alphabetically sorted) as links.
# #
# IMPORTANT: # This script deletes existing README files matching "README - *.md"
# - This script assumes that folder and file names do not include newline characters. # and then recursively creates a table-of-contents README file in
# - It uses bash arrays and assumes GNU coreutils are available. # 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 subdirectorys 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.
# ------------------------------------------------------------------
# Set the base directory. Change "." if needed. # Delete any existing README files matching "README - *.md"
find . -type f -name 'README - *.md' -delete
# Set the base directory (change "." if necessary)
base_dir="." base_dir="."
find . -type f \( -iname "!TOC.md" -o -iname "README.md" \) -delete
# Recursively find every directory starting from base_dir. # Recursively find every directory starting from base_dir.
find "$base_dir" -type d -print0 | while IFS= read -r -d '' dir; do find "$base_dir" -type d -print0 | while IFS= read -r -d '' dir; do
toc="$dir/!TOC.md" # Get the folder's base name (tolerant of spaces)
base=$(basename "$dir")
# Define the path for the README file. Format: "README - {Folder Name}.md"
readme="$dir/README - ${base}.md"
# Write header into !TOC.md # Write the header into the README file, including author attribution and date.
echo "# Table of Contents for $(basename "$dir")" > "$toc" {
echo "" >> "$toc" # echo "Generated by ChatGPT on $(date '+%Y-%m-%d')"
echo ""
echo "# Table of Contents for ${base}"
echo ""
} > "$readme"
######################### #########################
# Process Subdirectories # Process Subdirectories
######################### #########################
subdirs=() subdirs=()
# Find immediate subdirectories (depth 1) # Find immediate subdirectories (depth 1) in the current directory.
while IFS= read -r -d '' subdir; do while IFS= read -r -d '' subdir; do
# Save only the basename of the subdirectory
subdirs+=( "$(basename "$subdir")" ) subdirs+=( "$(basename "$subdir")" )
done < <(find "$dir" -mindepth 1 -maxdepth 1 -type d -print0) done < <(find "$dir" -mindepth 1 -maxdepth 1 -type d -print0)
if [ ${#subdirs[@]} -gt 0 ]; then if [ ${#subdirs[@]} -gt 0 ]; then
# Sort the subdirectory names alphabetically # Sort subdirectory names alphabetically.
sorted_subdirs=($(printf "%s\n" "${subdirs[@]}" | sort)) sorted_subdirs=($(printf "%s\n" "${subdirs[@]}" | sort))
echo "## Subdirectories" >> "$toc" echo "## Subdirectories" >> "$readme"
for sub in "${sorted_subdirs[@]}"; do for sub in "${sorted_subdirs[@]}"; do
# Link to the !TOC file inside the subdirectory # Link to the subdirectory's README file.
echo "- [[${sub}/!TOC]]" >> "$toc" # The link format: [[Subfolder/README - Subfolder]]
echo "- [[${sub}/README - ${sub}]]" >> "$readme"
done done
echo "" >> "$toc" echo "" >> "$readme"
fi fi
################# #################
# Process Files # Process Files
################# #################
files=() files=()
# Find immediate files (depth 1), excluding the !TOC.md file itself. # Find immediate files (depth 1), excluding the generated README file.
while IFS= read -r -d '' file; do while IFS= read -r -d '' file; do
files+=( "$(basename "$file")" ) files+=( "$(basename "$file")" )
done < <(find "$dir" -mindepth 1 -maxdepth 1 -type f ! -iname "!TOC.md" -print0) done < <(find "$dir" -mindepth 1 -maxdepth 1 -type f ! -path "$readme" -print0)
if [ ${#files[@]} -gt 0 ]; then if [ ${#files[@]} -gt 0 ]; then
# Sort the file names alphabetically # Sort file names alphabetically.
sorted_files=($(printf "%s\n" "${files[@]}" | sort)) sorted_files=($(printf "%s\n" "${files[@]}" | sort))
echo "## Files" >> "$toc" echo "## Files" >> "$readme"
for f in "${sorted_files[@]}"; do for f in "${sorted_files[@]}"; do
echo "- [[${f}]]" >> "$toc" echo "- [[${f}]]" >> "$readme"
done done
echo "" >> "$toc" echo "" >> "$readme"
fi fi
done done