1
0
Fork 0

Documentation-generating script done mostly, just need to make it detect the files automatically or as input arguments.

This commit is contained in:
wael 2021-09-04 19:50:58 +03:00
parent c4060e8dd2
commit c659257910
1 changed files with 22 additions and 1 deletions

View File

@ -4,6 +4,27 @@
# TODO: create options for generating different file types (pdf, html or utf8 to console/file).
# Prompt user at the start for what type they want.
# Prompt the user for the option they want (pdf/html/utf8).
echo "Please choose an output option: pdf, html or utf8."
select choice in "pdf" "html" "utf8"; do
case $choice in
pdf )
filetype="pdf";
break;;
html )
filetype="html";
break;;
utf8 )
filetype="utf8";
break;;
esac
done
# Debug print.
#echo $filetype
# Get the initial root.
root_directory=$(pwd)
@ -18,7 +39,7 @@ for i in $filepaths; do
# Get the input and output file names.
input_file=$(basename $i)
output_file=$(echo $input_file | sed 's/ms/pdf/')
output_file=$(echo $input_file | sed "s/ms/$filetype/")
# Debug prints.
#echo "current_directory = $current_directory"