Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tissue Research JKU
Tissue Research Doc
Commits
08a26d09
Commit
08a26d09
authored
Mar 07, 2022
by
Sabina Köfler
Browse files
Remove TOC removal
parent
05712671
Pipeline
#1540
passed with stage
in 2 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
quick-start-guides/convert_to_pdf.sh
View file @
08a26d09
...
...
@@ -91,19 +91,19 @@ select_latex_engine
# Compile documents
echo
-e
"
\n
Beginning conversion...
\n
"
search1
=
"
\[\[
_TOC_
\]\]
"
search2
=
"## Inhalt"
# find . -iname "*.md" -o -iname "*.mdown" -o -iname "*.markdown" | while read -r file; do # find -iname finds <pattern> case insensitive
for
file
in
"
${
files
[@]
}
"
;
do
echo
"File:"
${
file
}
# remove the line that renders the table of contents in markdown and copy file to /PDFs
if
!
grep
-q
"
$search1
"
$file
;
then
continue
else
echo
-e
"Found search string in
$file
\n
Will make a copy"
sed
"/
$search1
/d;/
$search2
/d"
$file
>
./
$pdf_dir
/
$file
fi
done
#
search1="\[\[_TOC_\]\]"
#
search2="## Inhalt"
#
# find . -iname "*.md" -o -iname "*.mdown" -o -iname "*.markdown" | while read -r file; do # find -iname finds <pattern> case insensitive
#
for file in "${files[@]}"; do
#
echo "File:" ${file}
#
# remove the line that renders the table of contents in markdown and copy file to /PDFs
#
if ! grep -q "$search1" $file; then
#
continue
#
else
#
echo -e "Found search string in $file\n Will make a copy"
#
sed "/$search1/d;/$search2/d" $file > ./$pdf_dir/$file
#
fi
#
done
find ./
$pdf_dir
-iname
"*.md"
|
while
read
-r
file
;
do
echo
-e
"
\n
Found files to convert
$file
"
...
...
@@ -123,4 +123,4 @@ find ./$pdf_dir -iname "*.md" | while read -r file; do
echo
-e
"File created
\n
"
done
echo
-e
"
\n
All files complete!"
\ No newline at end of file
echo
-e
"
\n
All files complete!"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment