def main(): maker = ReadmeMaker( PROJECT_NAME, OUTPUT_DIR, is_make_toc=True, project_url=f"https://github.com/thombashi/{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_introduction_file("installation.rst") maker.set_indent_level(0) maker.write_chapter("Documentation") maker.write_lines([f"https://{PROJECT_NAME.lower():s}.rtfd.io/"]) 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" ] ) maker.write_file(maker.doc_page_root_dir_path.joinpath("sponsors.rst")) return 0
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_introduction_file("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)]) maker.write_file(maker.doc_page_root_dir_path.joinpath("sponsors.rst")) return 0
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
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
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([ "- `pytablereader <https://github.com/thombashi/pytablereader>`__", " - Tabular data loaded by ``pytablereader`` can be written " "another tabular data format with ``pytablewriter``.", ]) maker.write_chapter("Tasks") maker.write_lines(["https://trello.com/b/kE0XG34y"]) return 0
def main(): maker = ReadmeMaker( PROJECT_NAME, OUTPUT_DIR, is_make_toc=True, project_url=f"https://github.com/thombashi/{PROJECT_NAME}", ) maker.write_chapter("Summary") maker.write_introduction_file("summary.txt") maker.write_introduction_file("badges.txt") maker.write_introduction_file("feature.txt") maker.write_introduction_file("installation.rst") write_examples(maker) maker.write_introduction_file("dependencies.rst") maker.set_indent_level(0) maker.write_chapter("Documentation") maker.write_lines([f"https://{PROJECT_NAME:s}.rtfd.io/"]) maker.write_file(maker.doc_page_root_dir_path.joinpath("related.rst")) maker.write_file(maker.doc_page_root_dir_path.joinpath("sponsors.rst")) return 0
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
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), ])
def write_examples(maker: ReadmeMaker) -> None: maker.set_indent_level(0) maker.write_chapter("Examples") examples_root = Path("pages").joinpath("examples") maker.set_indent_level(1) maker.write_chapter("Write tables") maker.inc_indent_level() maker.write_chapter("Write a Markdown table") maker.write_file( examples_root.joinpath("table_format", "text", "markdown_example.txt")) with maker.indent(): maker.write_chapter("Write a Markdown table with a margin") maker.write_file( examples_root.joinpath("table_format", "text", "markdown_example_with_margin.txt")) with maker.indent(): maker.write_chapter("Write a Markdown table to a stream or a file") maker.write_lines([ "`Refer an example <https://github.com/thombashi/pytablewriter/blob/master/examples/py/stream/configure_stream.py>`__" ]) maker.write_chapter("Write a table to an Excel sheet") maker.write_file( examples_root.joinpath("table_format", "binary", "spreadsheet", "excel_single_example.txt")) maker.write_chapter("Write a Unicode table") maker.write_file( examples_root.joinpath("table_format", "text", "unicode_example.txt")) maker.write_chapter( "Write a table with JavaScript format (as a nested list variable definition)" ) maker.write_file( examples_root.joinpath("table_format", "text", "sourcecode", "javascript_example.txt")) maker.write_chapter( "Write a Markdown table from ``pandas.DataFrame`` instance") maker.write_file( examples_root.joinpath("datasource", "from_pandas_dataframe_example.txt")) maker.write_chapter("Write a markdown table from a space-separated values") maker.write_file( examples_root.joinpath("datasource", "from_ssv_example.txt")) maker.set_indent_level(1) maker.write_chapter("Get rendered tabular text as str") maker.write_file(examples_root.joinpath("output", "dump", "dumps.txt")) maker.set_indent_level(1) maker.write_chapter("Configure table styles") maker.inc_indent_level() maker.write_chapter("Column styles") maker.write_file( examples_root.joinpath("style", "column_style_example.txt")) maker.write_chapter("Style filter") maker.write_file(examples_root.joinpath("style", "theme.txt")) maker.set_indent_level(1) maker.write_chapter("Make tables for specific applications") maker.inc_indent_level() maker.write_chapter("Render a table on Jupyter Notebook") maker.write_file( examples_root.joinpath("jupyter_notebook", "jupyter_notebook_example.txt")) maker.set_indent_level(1) maker.write_chapter("Multibyte character support") maker.inc_indent_level() maker.write_chapter("Write a table using multibyte character") maker.write_file( examples_root.joinpath("multibyte", "multibyte_table_example.txt")) maker.set_indent_level(1) maker.write_chapter("Multi processing") maker.write_file(examples_root.joinpath("customize", "multi_process.txt")) # maker.write_chapter("Create Elasticsearch index and put data") # maker.write_file(examples_root.joinpath("table_format", "elasticsearch_example.txt")) maker.set_indent_level(1) maker.write_chapter("For more information") maker.write_lines([ "More examples are available at ", f"https://{PROJECT_NAME:s}.rtfd.io/en/latest/pages/examples/index.html", ])
def write_examples(maker: ReadmeMaker) -> None: maker.set_indent_level(0) maker.write_chapter("Examples") examples_root = Path("pages").joinpath("examples") maker.set_indent_level(1) maker.write_chapter("Write tables") maker.inc_indent_level() maker.write_chapter("Write a Markdown table") maker.write_file( examples_root.joinpath("table_format", "text", "markdown_example.txt")) maker.inc_indent_level() maker.write_chapter("Write a Markdown table with a margin") maker.write_file( examples_root.joinpath("table_format", "text", "markdown_example_with_margin.txt")) maker.dec_indent_level() maker.write_chapter("Write a reStructuredText table (Grid Tables)") maker.write_file( examples_root.joinpath("table_format", "text", "rst", "rst_grid_table_example.txt")) maker.write_chapter( "Write a table with JavaScript format (as a nested list variable definition)" ) maker.write_file( examples_root.joinpath("table_format", "text", "sourcecode", "javascript_example.txt")) maker.write_chapter("Write a table to an Excel sheet") maker.write_file( examples_root.joinpath("table_format", "binary", "spreadsheet", "exel_single_example.txt")) maker.write_chapter("Write a Unicode table") maker.write_file( examples_root.joinpath("table_format", "text", "unicode_example.txt")) maker.write_chapter( "Write a Markdown table from ``pandas.DataFrame`` instance") maker.write_file( examples_root.joinpath("datasource", "from_pandas_dataframe_example.txt")) maker.write_chapter("Write a markdown table from a space-separated values") maker.write_file( examples_root.joinpath("datasource", "from_ssv_example.txt")) maker.set_indent_level(1) maker.write_chapter("Get rendered tabular text as str") maker.write_file(examples_root.joinpath("output", "dump", "dumps.txt")) maker.set_indent_level(1) maker.write_chapter("Configure table styles") maker.inc_indent_level() maker.write_file(examples_root.joinpath("style", "style_example.txt")) maker.set_indent_level(1) maker.write_chapter("Make tables for specific applications") maker.inc_indent_level() maker.write_chapter("Create Elasticsearch index and put data") maker.write_file( examples_root.joinpath("table_format", "elasticsearch_example.txt")) maker.write_chapter("Render a table on Jupyter Notebook") maker.write_file( examples_root.joinpath("jupyter_notebook", "jupyter_notebook_example.txt")) maker.set_indent_level(1) maker.write_chapter("Multibyte character support") maker.inc_indent_level() maker.write_chapter("Write a table using multibyte character") maker.write_file( examples_root.joinpath("multibyte", "multibyte_table_example.txt")) maker.set_indent_level(1) maker.write_chapter("For more information") maker.write_lines([ "More examples are available at ", "https://{:s}.rtfd.io/en/latest/pages/examples/index.html".format( PROJECT_NAME), ])