We started with such script
#!/bin/bash
## EXAMPLE:
# sh readme.sh
## CONFIG:
FILE_LIST=".readme.txt"
FILE_OUTPUT="README.md"
CONTENT_LIST=$(cat $FILE_LIST)
# START:
echo "<!-- START: This file is rendered, dont' edit it, just separated parts --> " > $FILE_OUTPUT
for content_file in $CONTENT_LIST
do
echo $content_file
if [ -f $content_file ]
then
echo "<!-- $content_file --> " >> $FILE_OUTPUT
cat $content_file >> $FILE_OUTPUT
fi
done
echo "<!-- END: This file is rendered, dont' edit it, just separated parts --> " >> $FILE_OUTPUT
# END
## TEST readme.md
cat README.md
firefox README.md
Contribution ✍
curl https://raw.githubusercontent.com/flatedit/bash/main/flatedit.sh -o flatedit
./flatedit init
curl https://raw.githubusercontent.com/flatedit/bash/main/flatedit.sh -o flatedit
echo "https://github.com/flatedit/bash.git flatedit" > "flatedit.dev.txt"
./flatedit install flatedit.dev.txt
minsungson/GitHub-cURL: A guide to installing files from GitHub repos in terminal using cURL
./flatedit install
OR
./flatedit
./flatedit init
./flatedit update
./flatedit remove
Contribution ✍
Solutions for development:
Install dependencies after created project
curl https://raw.githubusercontent.com/flatedit/bash/main/flatedit.sh -o flatedit
echo "https://github.com/flatedit/bash.git flatedit" > "flatedit.dev.txt"
./flatedit install flatedit.dev.txt
Install package list after created project
curl https://raw.githubusercontent.com/apipackage/bash/main/apipackage.sh -o apipackage
echo "https://github.com/letwhois/bash apidsl/apidsl/bash letwhois" >> "apipackage.txt"
./apipackage install
Edit documentation with flatedit
echo "#!/bin/bash" > "readme"
echo "./flatedit/readme.sh readme.txt" > "readme"
echo "./DOCS/MENU.md" >> "readme.txt"
echo "./DOCS/ABOUT.md" >> "readme.txt"
echo "./DOCS/FOOT.md" >> "readme.txt"
./flatedit
The config file: .flatedit can be another, e.g. flatedit.txt
Just change the first line in .flatedit on flatedit.txt
flatedit.txt
TODO list of flatedit ✍
- cleaning docs
website ASCIIFlow github lewish/asciiflow: ASCIIFlow
website Textik - ASCII diagrams editor github flatedit/tixi: Ascii charts editor
- scripts
- language