Python readmemaker.ReadmeMaker() Examples

The following are 9 code examples of readmemaker.ReadmeMaker(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module readmemaker , or try the search function .
Example #1
Source File: make_readme.py    From sqlitebiter with MIT License 6 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )
    maker.examples_dir_name = "usage"

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")
    maker.write_introduction_file("feature.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))
    maker.write_file(maker.doc_page_root_dir_path.joinpath("funding.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{:s}.rtfd.io/".format(PROJECT_NAME.lower())])

    return 0 
Example #2
Source File: make_readme.py    From pathvalidate with MIT License 6 votes vote down vote up
def main() -> int:
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")

    maker.write_introduction_file("feature.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{}.rtfd.io/".format(PROJECT_NAME)])

    return 0 
Example #3
Source File: make_readme.py    From DateTimeRange with MIT License 6 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://datetimerange.rtfd.io/"])

    return 0 
Example #4
Source File: make_readme.py    From pytablewriter with MIT License 6 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")
    maker.write_introduction_file("feature.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{:s}.rtfd.io/".format(PROJECT_NAME)])

    maker.write_file(maker.doc_page_root_dir_path.joinpath("related.rst"))

    return 0 
Example #5
Source File: make_readme.py    From pingparsing with MIT License 6 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )
    maker.examples_dir_name = "usage"

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))
    maker.write_introduction_file("supported_environment.txt")
    maker.write_file(maker.doc_page_root_dir_path.joinpath("introduction/premise.txt"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{:s}.rtfd.io/".format(PROJECT_NAME)])

    return 0 
Example #6
Source File: make_readme.py    From SimpleSQLite with MIT License 5 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")
    maker.write_introduction_file("feature.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{:s}.rtfd.io/".format(PROJECT_NAME.lower())])

    maker.write_chapter("Related Project")
    maker.write_lines(
        [
            "- `sqlitebiter <https://github.com/thombashi/sqlitebiter>`__: "
            "CLI tool to convert CSV/Excel/HTML/JSON/LTSV/Markdown/TSV/Google-Sheets "
            "SQLite database by using SimpleSQLite"
        ]
    )

    return 0 
Example #7
Source File: make_readme.py    From pytablereader with MIT License 5 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")
    maker.write_introduction_file("feature.txt")

    write_examples(maker)

    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{:s}.rtfd.io/".format(PROJECT_NAME)])

    maker.write_chapter("Related Project")
    maker.write_lines(
        [
            "- `pytablewriter <https://github.com/thombashi/pytablewriter>`__",
            "    - Tabular data loaded by ``pytablereader`` can be written "
            "another tabular data format with ``pytablewriter``.",
        ]
    )

    return 0 
Example #8
Source File: make_readme.py    From pathvalidate with MIT License 5 votes vote down vote up
def write_examples(maker: ReadmeMaker) -> None:
    maker.set_indent_level(0)
    maker.write_chapter("Examples")

    example_root = Path("pages").joinpath("examples")
    maker.inc_indent_level()

    maker.write_chapter("Sanitize a filename")
    maker.write_file(example_root.joinpath("sanitize_filename_code.txt"))

    maker.write_chapter("Sanitize a filepath")
    maker.write_file(example_root.joinpath("sanitize_filepath_code.txt"))

    maker.write_chapter("Validate a filename")
    maker.write_file(example_root.joinpath("validate_filename_code.txt"))

    maker.write_chapter("Check a filename")
    maker.write_file(example_root.joinpath("is_valid_filename_code.txt"))

    maker.write_chapter("filename/filepath validator for argparse")
    maker.write_file(example_root.joinpath("argparse_validator.txt"))

    maker.write_chapter("filename/filepath sanitizer for argparse")
    maker.write_file(example_root.joinpath("argparse_sanitizer.txt"))

    maker.write_chapter("filename/filepath validator for click")
    maker.write_file(example_root.joinpath("click_validator.txt"))

    maker.write_chapter("filename/filepath sanitizer for click")
    maker.write_file(example_root.joinpath("click_sanitizer.txt"))

    maker.write_chapter("For more information")
    maker.write_lines(
        [
            "More examples can be found at ",
            "https://{}.rtfd.io/en/latest/pages/examples/index.html".format(PROJECT_NAME),
        ]
    ) 
Example #9
Source File: make_readme.py    From tcconfig with MIT License 5 votes vote down vote up
def main():
    maker = ReadmeMaker(
        PROJECT_NAME,
        OUTPUT_DIR,
        is_make_toc=True,
        project_url="https://github.com/thombashi/{}".format(PROJECT_NAME),
    )
    maker.examples_dir_name = "usage"

    maker.write_chapter("Summary")
    maker.write_introduction_file("summary.txt")
    maker.write_introduction_file("badges.txt")
    maker.write_introduction_file("feature.txt")

    maker.write_lines([".. image:: docs/gif/tcset_example.gif"])

    write_examples(maker)

    maker.write_lines([])
    maker.write_file(maker.doc_page_root_dir_path.joinpath("installation.rst"))

    maker.set_indent_level(0)
    maker.write_chapter("Documentation")
    maker.write_lines(["https://{:s}.rtfd.io/".format(PROJECT_NAME)])

    maker.write_chapter("Troubleshooting")
    maker.write_lines(
        ["https://{:s}.rtfd.io/en/latest/pages/troubleshooting.html".format(PROJECT_NAME)]
    )

    maker.write_chapter("Docker image")
    maker.write_lines(["https://hub.docker.com/r/thombashi/tcconfig/"])

    return 0