From 536b56cbe865af4db21aba62fab93a924b3e7fb8 Mon Sep 17 00:00:00 2001 From: Moritz Schubotz <wiki@physikerwelt.de> Date: Sat, 17 Nov 2018 20:38:12 +0100 Subject: [PATCH] Test create issue on undefined reference --- src/tex/allRefs.tex | 1 + support/compile.sh | 1 + support/issue.py | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tex/allRefs.tex b/src/tex/allRefs.tex index e119f48..020cfa8 100755 --- a/src/tex/allRefs.tex +++ b/src/tex/allRefs.tex @@ -12,5 +12,6 @@ mincitenames=2, This document is supposed to use \verb \nocite{*} \verb to cite all bibtex entries. However, currently some bibtex entries simply do not work. Thus only selected bibtex entries are printed. \nocite{*} +\cite{undefinedReference} \printbibliography%[keyword=mathml] \end{document} diff --git a/support/compile.sh b/support/compile.sh index 8233427..7e71362 100755 --- a/support/compile.sh +++ b/support/compile.sh @@ -5,3 +5,4 @@ cd src/tex latexmk cp allRefs.pdf ../../main.pdf cd ../.. +python3 support/issue.sh diff --git a/support/issue.py b/support/issue.py index f22689b..cb97ed9 100644 --- a/support/issue.py +++ b/support/issue.py @@ -28,7 +28,7 @@ else: if __name__ == '__main__': try: - logfilename = '../src/tex/allRefs.log' + logfilename = 'src/tex/allRefs.log' if len(sys.argv) == 3: extra_file_ext = sys.argv[2].split(" ") data = open(logfilename, 'rb').read() @@ -46,14 +46,14 @@ if __name__ == '__main__': for warn in warnings: matchObj = re.match( r'(.*?).tex:(\d+): Package natbib Warning: Citation `(.*?)\' on page (\d+) undefined on input line (\d+).', warn, re.M|re.I) if matchObj: - label = "\n- [ ] [" + matchObj.group(3) + "](https://github.com/usnistgov/DRMF/blob/drmf/" + matchObj.group(1) + ".tex#L" + matchObj.group(2) + ")" + label = "\n- [ ] [" + matchObj.group(3) + "](https://github.com/ag-gipp/bib/blob/src/tex/" + matchObj.group(1) + ".tex#L" + matchObj.group(2) + ")" if (lastfile != matchObj.group(1) ): issue_content += "\n## " + matchObj.group(1) + " \n" lastfile = matchObj.group(1); issue_content += label unrefs[matchObj.group(3)] = label # od = collections.OrderedDict(sorted(unrefs.items())) - if token: + if (token and issue_content): g = Github(token) repo = g.get_repo("ag-gipp/bib") repo.create_issue("Issue title", issue_content) -- GitLab