Skip to content

Commit

Permalink
Issue warning when footnotes with paragraphs are found
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaus Thoden committed Feb 12, 2018
1 parent a620abf commit 35f283a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion eoaconvert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8; mode: python -*-
# Time-stamp: <2018-02-09 13:22:07 (kthoden)>
# Time-stamp: <2018-02-12 16:42:59 (kthoden)>

# license?
__version__= "1.0"
Expand Down Expand Up @@ -1567,6 +1567,15 @@ def cleanup():
# Pickle the 'data' dictionary using the highest protocol available.
pickle.dump(data_to_pickle, f, pickle.HIGHEST_PROTOCOL)

grep_command = "grep -A1 -B2 'argument of \\\EOAfn;' %s-tralics.log" % options.filename
grep_command_arguments = shlex.split(grep_command)
grep_result = subprocess.Popen(grep_command_arguments, stdout=subprocess.PIPE)
grep_output = grep_result.stdout.read()
if len(grep_output) > 0:
print("\n===\nFootnotes with paragraphs were found. They have to be replaced by the \EOAfnpar command.\n")
print(grep_output.decode("utf-8"))
print("===\n")

print("Removing temporary files.")
cleanup()
print("Done!")
Expand Down

0 comments on commit 35f283a

Please sign in to comment.