本文整理匯總了Python中readmemaker.ReadmeMaker方法的典型用法代碼示例。如果您正苦於以下問題:Python readmemaker.ReadmeMaker方法的具體用法?Python readmemaker.ReadmeMaker怎麽用?Python readmemaker.ReadmeMaker使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類readmemaker
的用法示例。
在下文中一共展示了readmemaker.ReadmeMaker方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例2: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例3: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例4: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例5: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例6: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例7: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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
示例8: write_examples
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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),
]
)
示例9: main
# 需要導入模塊: import readmemaker [as 別名]
# 或者: from readmemaker import ReadmeMaker [as 別名]
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