コード例 #1
0
def process_file(filename, outdir):
    citations = CitationSet()
    for (key, ref, val) in read_citations(filename):
        citations.add(key, format_ref(ref) + untexify(decode_utf(val)))

    testId = os.path.splitext(os.path.basename(filename))[0]
    citations.write_mapfile(os.path.join(outdir, '%s_map.txt' % testId))
    citations.write_nlm(os.path.join(outdir, '%s.xml' % testId))
    citations.write_txt(os.path.join(outdir, '%s.txt' % testId))
コード例 #2
0
def process_file(filename, outdir):
    citations = CitationSet()
    for (key, ref, val) in read_citations(filename):
        citations.add(key, format_ref(ref) + untexify(decode_utf(val)))

    testId = os.path.splitext(os.path.basename(filename))[0]
    citations.write_mapfile(os.path.join(outdir, '%s_map.txt' % testId))
    citations.write_nlm(os.path.join(outdir, '%s.xml' % testId))
    citations.write_txt(os.path.join(outdir, '%s.txt' % testId))
コード例 #3
0
def get_mixed_citations(filename, parsing_fun):
    for (no,ref,val) in read_citations(filename):
        yield (no, format_ref(ref) + untexify(parsing_fun(decode_utf(val))))
コード例 #4
0
def get_mixed_citations(filename, parsing_fun):
    for (no, ref, val) in read_citations(filename):
        yield (no, format_ref(ref) + untexify(parsing_fun(decode_utf(val))))