How to use the betterbib.__about__ function in betterbib

To help you get started, we’ve selected a few betterbib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / betterbib / betterbib / cli / sync.py View on Github external
def _get_parser():
    parser = argparse.ArgumentParser(
        description="Sync BibTeX files with information from online sources."
    )
    parser.add_argument(
        "-v",
        "--version",
        help="display version information",
        action="version",
        version="betterbib {}, Python {}".format(__about__.__version__, sys.version),
    )
    parser.add_argument(
        "infile",
        nargs="?",
        type=argparse.FileType("r"),
        default=sys.stdin,
        help="input BibTeX file (default: stdin)",
    )
    parser.add_argument(
        "outfile",
        nargs="?",
        type=argparse.FileType("w"),
        default=sys.stdout,
        help="output BibTeX file (default: stdout)",
    )
    parser.add_argument(
github nschloe / betterbib / betterbib / cli / full.py View on Github external
def _get_parser():
    parser = argparse.ArgumentParser(
        description="Sync BibTeX files with information from online sources."
    )
    parser.add_argument(
        "-v",
        "--version",
        help="display version information",
        action="version",
        version="betterbib {}, Python {}".format(__about__.__version__, sys.version),
    )
    parser.add_argument(
        "infile",
        nargs="?",
        type=argparse.FileType("r"),
        default=sys.stdin,
        help="input BibTeX file (default: stdin)",
    )
    parser.add_argument(
        "outfile",
        nargs="?",
        type=argparse.FileType("w"),
        default=sys.stdout,
        help="output BibTeX file (default: stdout)",
    )
    parser.add_argument(
github nschloe / betterbib / betterbib / cli / doi2bibtex.py View on Github external
def _get_version_text():
    return "\n".join(
        [
            "betterbib {} [Python {}.{}.{}]".format(
                __about__.__version__,
                sys.version_info.major,
                sys.version_info.minor,
                sys.version_info.micro,
            ),
            __about__.__copyright__,
        ]
github nschloe / betterbib / betterbib / cli / format.py View on Github external
def _get_parser():
    parser = argparse.ArgumentParser(description="Reformat BibTeX files.")

    parser.add_argument(
        "-v",
        "--version",
        help="display version information",
        action="version",
        version="betterbib {}, Python {}".format(__about__.__version__, sys.version),
    )
    parser.add_argument(
        "infile",
        nargs="?",
        type=argparse.FileType("r"),
        default=sys.stdin,
        help="input BibTeX file (default: stdin)",
    )
    parser.add_argument(
        "outfile",
        nargs="?",
        type=argparse.FileType("w"),
        default=sys.stdout,
        help="output BibTeX file (default: stdout)",
    )
    parser.add_argument(
github nschloe / betterbib / betterbib / cli / dedup_doi.py View on Github external
def _get_parser():
    parser = argparse.ArgumentParser(
        description="Removes one of DOI and URL in a BibTeX file "
        "if both are identical."
    )
    parser.add_argument(
        "-v",
        "--version",
        help="display version information",
        action="version",
        version="betterbib {}, Python {}".format(__about__.__version__, sys.version),
    )
    parser.add_argument(
        "infile",
        nargs="?",
        type=argparse.FileType("r"),
        default=sys.stdin,
        help="input BibTeX file (default: stdin)",
    )
    parser.add_argument(
        "outfile",
        nargs="?",
        type=argparse.FileType("w"),
        default=sys.stdout,
        help="output BibTeX file (default: stdout)",
    )
    parser.add_argument(
github nschloe / betterbib / betterbib / cli / dedup_doi.py View on Github external
def _write(od, out, delimeter_type):
    # Write header to the output file.
    out.write(
        "%comment{{This file was created with betterbib v{}.}}\n\n".format(
            __about__.__version__
        )
    )

    # write the data out sequentially to respect ordering
    for bib_id, d in od.items():
        brace_delimeters = delimeter_type == "curly"
        a = tools.pybtex_to_bibtex_string(d, bib_id, brace_delimeters=brace_delimeters)
        out.write(a + "\n\n")
    return
github nschloe / betterbib / betterbib / cli / journal_abbrev.py View on Github external
def _get_parser():
    parser = argparse.ArgumentParser(description="(Un)abbreviate journal names.")
    parser.add_argument(
        "-v",
        "--version",
        help="display version information",
        action="version",
        version="betterbib {}, Python {}".format(__about__.__version__, sys.version),
    )
    parser.add_argument(
        "infile",
        nargs="?",
        type=argparse.FileType("r"),
        default=sys.stdin,
        help="input BibTeX file (default: stdin)",
    )
    parser.add_argument(
        "outfile",
        nargs="?",
        type=argparse.FileType("w"),
        default=sys.stdout,
        help="output BibTeX file (default: stdout)",
    )
    parser.add_argument(
github nschloe / betterbib / betterbib / cli / doi2bibtex.py View on Github external
def _get_version_text():
    return "\n".join(
        [
            "betterbib {} [Python {}.{}.{}]".format(
                __about__.__version__,
                sys.version_info.major,
                sys.version_info.minor,
                sys.version_info.micro,
            ),
            __about__.__copyright__,
        ]