Skip to content

Commit

Permalink
add combined notes
Browse files Browse the repository at this point in the history
  • Loading branch information
madjin committed May 9, 2024
1 parent 6a5028e commit e86ae60
Show file tree
Hide file tree
Showing 72 changed files with 2,414 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions notes/combine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Create a temporary file to store the combined notes
temp_file=$(mktemp)

# Use find to search for text files recursively in subdirectories
find . -type f -name "*.txt" | while read -r file; do
# Get the basename of the parent directory
parent_dir=$(basename "$(dirname "$file")")

# Get the basename of the file (without the extension)
base=$(basename -s .txt "$file")

# Add the header line to the temporary file
echo -e "\n------------------------------\n" >> "$temp_file"
echo "# $parent_dir $base" >> "$temp_file"
echo -e "\n------------------------------\n" >> "$temp_file"

# Append the content of the original file to the temporary file
cat "$file" >> "$temp_file"
done

# Append the content of the temporary file to the output file
cat "$temp_file" >> "combined_notes.txt"

# Clean up the temporary file
rm "$temp_file"
2,387 changes: 2,387 additions & 0 deletions notes/combined_notes.txt

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e86ae60

Please sign in to comment.