Compare commits

...

2 Commits

Author SHA1 Message Date
4638efb0eb add todos: file checking in md2tex.py 2024-10-07 01:21:35 +02:00
e7397c00ce rename md and tx to more speaking names 2024-10-07 01:16:30 +02:00
2 changed files with 17 additions and 11 deletions

View File

@ -99,3 +99,7 @@ s=4: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 -> 16,01.02,15 14,03.04,13 12,05.06,
- [ ] 2. translate (with gpt?) sowas von python - [ ] 2. translate (with gpt?) sowas von python
- Please analyze the following parallel text and create a detailed bilingual word pair list. Ensure that every significant word or phrase from the original language is included, even common connectors or conjunctions. Additionally, provide multiple English translations for each entry where applicable and order the list alphabetically (where ɛ comes after e and ɔ comes after o). Here's the text: [insert text]. - Please analyze the following parallel text and create a detailed bilingual word pair list. Ensure that every significant word or phrase from the original language is included, even common connectors or conjunctions. Additionally, provide multiple English translations for each entry where applicable and order the list alphabetically (where ɛ comes after e and ɔ comes after o). Here's the text: [insert text].
- [ ] make standard design https://en.wikipedia.org/wiki/Book_design - [ ] make standard design https://en.wikipedia.org/wiki/Book_design
- [ ] for rewrite of mkparallel.sh
- [ ] check if file available, if not, dont use
- [ ] check if md2parallel is available
- [ ] ultimately include md2XXX.sh into md2tex.py

View File

@ -23,22 +23,23 @@ if ! [[ -x $CONVERTER ]] ; then echo "$CONVERTER not executable! Exiting ..." &&
WD=$PWD WD=$PWD
TMPDIR=$(mktemp -d) TMPDIR=$(mktemp -d)
PATH=$PATH:$WD PATH=$PATH:$WD
pushd $TMPDIR > /dev/null pushd $TMPDIR # > /dev/null
# CONVERT MD TO TEX # CONVERT MD TO TEX
for tex in $( echo "$INFILES" | grep '.md$' ) for md in $( echo "$INFILES" | grep '.md$' )
do do
if [[ -f $WD/$tex ]] if [[ -f $WD/$md ]]
then then
# create parent dir if necassary # create parent dir if necassary
mkdir -p $(dirname $tex) md_no_parent=$( echo $md | sed 's@\.\./@@g' )
md=$( echo $tex | sed "s/.md/.tex/" ) mkdir -p $(dirname $md_no_parent)
$CONVERTER $WD/$tex > $md tex=$( echo $md_no_parent | sed "s/\.md$/\.tex/" )
echo "converted $tex to $md" $CONVERTER $WD/$md > $tex
echo "converted $md to $tex"
else else
if [[ $tex == *.md ]] if [[ $md == *.md ]]
then then
echo "$WD/$tex does not exist!!!" echo "$WD/$md does not exist!!!"
fi fi
fi fi
done done
@ -156,11 +157,12 @@ for input in $INFILES
do do
if [[ $input == *.md ]] if [[ $input == *.md ]]
then then
tex=$( echo $input | sed 's/\.md$/\.tex/' | sed 's@\.\./@@g' )
if [[ $first_lang == "true" ]] ; then if [[ $first_lang == "true" ]] ; then
echo '\pagesinclude' "{ $( echo $input | sed 's/.md/.tex/' ) }" >> $PROJECT.tex echo '\pagesinclude' "{ $tex }" >> $PROJECT.tex
first_lang="false" first_lang="false"
else else
echo "{ $( echo $input | sed 's/.md/.tex/' ) }" >> $PROJECT.tex echo "{ $tex }" >> $PROJECT.tex
echo '\clearpage' >> $PROJECT.tex echo '\clearpage' >> $PROJECT.tex
fi fi
else else