citation-style-language 0.8.2-2
“Bibliography formatting with Citation Style Language”
Basename is uppercase README.mdSource references XOR syntax
SHA-256639818e944441cc6eb0e6e8de7e4fa218843f7f5cb4f01e8b8c253472e37c676
Evidence
1from collections import OrderedDict
2import json
3from pathlib import Path
4import re
5import os
6import glob
7import warnings
8
9import luadata
10
11# References:
12# https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Citeproc/BibTeX.hs
13# https://github.com/andras-simonyi/citeproc-el/wiki/BibLaTeX-CSL-mapp …
25:6… 'macros': dict(),
26 })
27
28 if os.path.exists(path):
29 with open(path) as f:
30 self.update(json.load(f))
31 else:
32 warnings.warn(f'Invalid path "{path}".')
33
34 self.texmf_dist = ''
35 if not self.texmf_dist:
36 paths = glob.glob('/usr/local/texlive/*/texmf-dist')
37 if paths:
38 self.texmf_dist = sorted(paths)[-1]
39
40 self.skip …
60:37… :
61 path = file_name
62 else:
63 path = os.popen(f'kpsewhich {file_name}').read().strip()
64 if not os.path.exists(path):
65 warnings.warn(f'Invalid path …
265:12… if category == 'types':
266 csl_fields = csl_data['items']['properties']['type']['enum']
267 # Fix a typo
268 if csl_fields[8] == 'dateset':
269 …
271:18… sl_fields = csl_data['items']['properties'].keys()
272
273 csl_mapped_fields = set()
274
275 for field, value in self[category].items():
276 if 'csl' not in value:
277 print(f'Emp …
Showing the top 5 files — 2 more files (30 regions) not shown.
No evidence locations were recorded for this file. Raw result