tFix small errors in scripts - flashcard-tools - Tools for working with LaTeX flashcards
HTML git clone git://lumidify.org/flashcard-tools.git
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 8480ba4774c5d109bb466939e34456f7b3dedba3
DIR parent 4be43722c22cd976821bd7ca7a9cc509a491d736
HTML Author: lumidify <nobody@lumidify.org>
Date: Sun, 12 Apr 2020 17:53:10 +0200
Fix small errors in scripts
Diffstat:
M addcard.pl | 2 +-
M tmp_compile.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/addcard.pl b/addcard.pl
t@@ -23,7 +23,7 @@ if (@groups) {
print $fh $ARGV[1];
close $fh;
open $fh, ">", ".cur_card" or die "Fool.\n";
- print $fh $filename;
+ print $fh substr($filename, 11);
close $fh;
system("vi", $filename);
} else {
DIR diff --git a/tmp_compile.sh b/tmp_compile.sh
t@@ -13,7 +13,7 @@ then
exit 1
fi
-meta1=`head -n 1 "flashcards/$1" | tr -d '\n'`
+meta1=`head -n 1 "flashcards/$1" | tr -d '\n' | sed 's/\|.*$//'`
meta2=`sed '2!d' "flashcards/$1" | tr -d '\n'`
body=`tail -n +3 "flashcards/$1"`
echo '\\documentclass[grid,avery5371]{flashcards}' > tmp_compile.tex