示例#1
0
    """
    lines = [
        '',
        fill_character * linewidth,
        f' {title} '.center(linewidth, fill_character),
    ]
    return '\n'.join(lines)


# Configure directories
ref_dir = pathlib.Path('../references')
gen_dir = ref_dir.joinpath('generated')
gen_dir.mkdir(exist_ok=True)

# Read and process manuscript
text = get_text('../sections')
refs = sorted(get_references_from_text(text))

# Warn about non-failing misformatted references
warn_refs = get_brackets_without_reference(text)
if warn_refs:
    print(get_divider('References Warning'))
    print('Potentially misformatted references detected:')
    print('\n'.join(warn_refs))

# Failing references
bad_refs = list(filter(None, map(validate_reference, refs)))
if bad_refs:
    print(get_divider('References Error'))
    print('Misformatted references detected:')
    print('\n'.join(bad_refs))
        fill_character * linewidth,
        f' {title} '.center(linewidth, fill_character),
    ]
    return '\n'.join(lines)


# Manuscript statistics
stats = collections.OrderedDict()

# Configure directories
ref_dir = pathlib.Path('../references')
gen_dir = ref_dir.joinpath('generated')
gen_dir.mkdir(exist_ok=True)

# Read and process manuscript
text = get_text('../content')
refs = sorted(get_references_from_text(text))

# Warn about non-failing misformatted references
warn_refs = get_brackets_without_reference(text)
if warn_refs:
    print(get_divider('References Warning'))
    print('Potentially misformatted references detected:')
    print('\n'.join(warn_refs))

# Failing references
bad_refs = list(filter(None, map(validate_reference, refs)))
if bad_refs:
    print(get_divider('References Error'))
    print('Misformatted references detected:')
    print('\n'.join(bad_refs))
示例#3
0
        fill_character * linewidth,
        f' {title} '.center(linewidth, fill_character),
    ]
    return '\n'.join(lines)


# Manuscript statistics
stats = collections.OrderedDict()

# Configure directories
ref_dir = pathlib.Path('../literature-review/references')
gen_dir = ref_dir.joinpath('generated')
gen_dir.mkdir(exist_ok=True)

# Read and process manuscript
text = get_text('../literature-review/sections')
refs = sorted(get_references_from_text(text))

# Warn about non-failing misformatted references
warn_refs = get_brackets_without_reference(text)
if warn_refs:
    print(get_divider('References Warning'))
    print('Potentially misformatted references detected:')
    print('\n'.join(warn_refs))

# Failing references
bad_refs = list(filter(None, map(validate_reference, refs)))
if bad_refs:
    print(get_divider('References Error'))
    print('Misformatted references detected:')
    print('\n'.join(bad_refs))