vault backup: 2025-02-10 11:33:51
This commit is contained in:
parent
044a80ab4a
commit
f636f3825d
@ -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]]
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for 2024-09-09
|
||||
|
||||
## Files
|
||||
@ -1,8 +1,9 @@
|
||||
|
||||
# Table of Contents for ME 2016 - Nonlinear Dynamical Systems 1
|
||||
|
||||
## Subdirectories
|
||||
- [[2024-09-09/!TOC]]
|
||||
- [[images/!TOC]]
|
||||
- [[2024-09-09/README - 2024-09-09]]
|
||||
- [[images/README - images]]
|
||||
|
||||
## Files
|
||||
- [[2024-08-26]]
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for images
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for ME 2046 - Digital Control Theory
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for ME 2085 - Graduate Seminar
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for ME 2150 - High Assurance Cyber-Physical Systems
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for ME 3100 - Engineering Research and Leadership Management
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for NUCE 2100 - Fundamentals of Nuclear Engineering
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for NUCE 2103 - Integration of Plant Systems with the Reactor Core
|
||||
|
||||
## Files
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
# Table of Contents for NUCE 2113 - Radiation Detection and Measurement
|
||||
|
||||
## Files
|
||||
66
300s School/README - ..md
Normal file
66
300s School/README - ..md
Normal 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]]
|
||||
|
||||
@ -1,64 +1,82 @@
|
||||
#!/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:
|
||||
# - A header with the directory name.
|
||||
# - A list of immediate subdirectories (alphabetically sorted) as links to that subdirectory’s own !TOC.
|
||||
# - A list of immediate files (alphabetically sorted) as links.
|
||||
# ------------------------------------------------------------------
|
||||
# Author: ChatGPT
|
||||
# Generated on: $(date '+%Y-%m-%d')
|
||||
#
|
||||
# IMPORTANT:
|
||||
# - This script assumes that folder and file names do not include newline characters.
|
||||
# - It uses bash arrays and assumes GNU coreutils are available.
|
||||
# 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.
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# 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="."
|
||||
find . -type f \( -iname "!TOC.md" -o -iname "README.md" \) -delete
|
||||
|
||||
# Recursively find every directory starting from base_dir.
|
||||
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
|
||||
echo "# Table of Contents for $(basename "$dir")" > "$toc"
|
||||
echo "" >> "$toc"
|
||||
# Write the header into the README file, including author attribution and date.
|
||||
{
|
||||
# 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)
|
||||
# Find immediate subdirectories (depth 1) in the current directory.
|
||||
while IFS= read -r -d '' subdir; do
|
||||
# Save only the basename of the subdirectory
|
||||
subdirs+=( "$(basename "$subdir")" )
|
||||
done < <(find "$dir" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||
|
||||
if [ ${#subdirs[@]} -gt 0 ]; then
|
||||
# Sort the subdirectory names alphabetically
|
||||
# Sort subdirectory names alphabetically.
|
||||
sorted_subdirs=($(printf "%s\n" "${subdirs[@]}" | sort))
|
||||
echo "## Subdirectories" >> "$toc"
|
||||
echo "## Subdirectories" >> "$readme"
|
||||
for sub in "${sorted_subdirs[@]}"; do
|
||||
# Link to the !TOC file inside the subdirectory
|
||||
echo "- [[${sub}/!TOC]]" >> "$toc"
|
||||
# Link to the subdirectory's README file.
|
||||
# The link format: [[Subfolder/README - Subfolder]]
|
||||
echo "- [[${sub}/README - ${sub}]]" >> "$readme"
|
||||
done
|
||||
echo "" >> "$toc"
|
||||
echo "" >> "$readme"
|
||||
fi
|
||||
|
||||
#################
|
||||
# Process 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
|
||||
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
|
||||
# Sort the file names alphabetically
|
||||
# Sort file names alphabetically.
|
||||
sorted_files=($(printf "%s\n" "${files[@]}" | sort))
|
||||
echo "## Files" >> "$toc"
|
||||
echo "## Files" >> "$readme"
|
||||
for f in "${sorted_files[@]}"; do
|
||||
echo "- [[${f}]]" >> "$toc"
|
||||
echo "- [[${f}]]" >> "$readme"
|
||||
done
|
||||
echo "" >> "$toc"
|
||||
echo "" >> "$readme"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user