adjust files to allow more auto-generation
This commit is contained in:
21
parse.sh
Executable file
21
parse.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
target="$1"
|
||||
|
||||
cd "$(dirname "$target")"
|
||||
|
||||
fileName="$(basename "$target")"
|
||||
sectionName="$(basename -s .md "$target" | tr '_' ' ')"
|
||||
|
||||
printf "\n\n# $sectionName\n"
|
||||
|
||||
while read -r line; do
|
||||
echo "$line" | grep -q '^.so ' && \
|
||||
file="$(echo "$line" | grep '^.so ' | cut -d' ' -f2 )" && \
|
||||
[ -e "$file" ] && \
|
||||
echo '```graph' && \
|
||||
cat "$file" | graph-easy --boxart && \
|
||||
echo '```' || \
|
||||
echo "$line"
|
||||
done < "$fileName"
|
||||
|
Reference in New Issue
Block a user