mmg


Namemmg JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://mmg.ryul1206.dev/
SummaryCommand line interface and Python API to generate i18n documents
upload_time2023-10-08 21:34:07
maintainer
docs_urlNone
authorHong-ryul Jung
requires_python>=3.8,<4
licenseMIT
keywords i18n multilingual markdown language cli markdown-generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<div align="center" markdown>
   <img src="https://github.com/ryul1206/multilingual-markdown/assets/19263912/7cfded93-4c64-428a-b027-76a621de92a6" width="500" alt="Multilingual Markdown Generator" />
</div>

<div align="center" markdown>

# [Multilingual Markdown Generator](https://mmg.ryul1206.dev/latest/)

This package provides a command-line interface to manage multilingual contents and generate i18n markdown from a single base file.

[![PyPI - Version](https://img.shields.io/pypi/v/mmg?color)](https://pypi.org/project/mmg/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmg)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/ryul1206/multilingual-markdown)
[![PyPI - License](https://img.shields.io/pypi/l/mmg)](https://github.com/ryul1206/multilingual-markdown/blob/main/LICENSE)

🌏
English |
[**Français**](https://github.com/ryul1206/multilingual-markdown/blob/main/README.fr.md) |
[**ν•œκ΅­μ–΄**](https://github.com/ryul1206/multilingual-markdown/blob/main/README.ko.md) |
[**ζ—₯本θͺž**](https://github.com/ryul1206/multilingual-markdown/blob/main/README.ja.md)

Available in Bash, Zsh, and Windows PowerShell.

</div>

---

**Table of Contents** ⚑

1. [Overview](#overview-)
    1. [How It Works](#how-it-works)
    1. [Features](#features)
1. [Installation](#installation-)
    1. [Linux](#linux)
    1. [macOS](#macos)
    1. [Windows](#windows)
1. [How to Use](#how-to-use-)
1. [Troubleshooting](#troubleshooting-)
1. [Changelog](#changelog-)
1. [Contributors](#contributors-)

## Overview πŸ”Ž

### How It Works

By managing only one Base file, we can reduce the number of errors caused by missing or mismatched translations.
Additionally, thanks to editing in a single file, we can expect convenient translation with the auto-completion function of AI tools such as [Copilot](https://github.com/features/copilot).

Markdown:

<div align="center">
   <img src="https://github.com/ryul1206/multilingual-markdown/assets/19263912/fd88420e-ddd1-403c-a9df-3429ec8095e3" width="800" alt="How It Works: Markdown" />
</div>

Jupyter Notebook:

<div align="center">
   <img src="https://github.com/ryul1206/multilingual-markdown/assets/19263912/ff2ef5d9-da9f-4d91-9618-fb933802bf69" width="900" alt="How It Works: Jupyter Notebook" />
</div>

### Features

Supports the following features:

- **Markdown, Jupyter Notebook(`.ipynb`) as input formats**
- **As-is, HTML, PDF as ouput formats**
- Command-line interface for Bash, Zsh, Windows PowerShell
- Python API
- Recursive traversal mode with `-r` option (As-is, HTML, PDF are all supported)
- Batch processing mode with YAML file (Only `As-is` is supported)
- [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag)
- UTF-8 encoding
- Automatic generation of table of contents with level and emoji options (Markdown and Jupyter Notebook are both supported)
- Base file validation (Check the number of tags of each language)
- Validation only mode for CI/CD (Disable file generation)

## Installation πŸ“¦

### Linux

```sh
pip3 install mmg
```

### macOS

```sh
pip3 install mmg
```

If you have any issues with [WeasyPrint](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#macos), install it with the following command. WeasyPrint is only used to create PDFs.

```sh
brew install weasyprint
```

### Windows

1. MMG uses [WeasyPrint](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#windows) to create PDFs. WeasyPrint requires the GTK library, so download and run the latest [GTK3 installer](https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases). **If you are not interested in creating PDFs, you can skip this step.** Other features of MMG are available without GTK.
2. Install MMG using Pip.

    ```sh
    pip3 install mmg
    ```

## How to Use πŸ’‘

Please refer to the [documentation](https://mmg.ryul1206.dev/latest/) for detailed usage and examples.

```sh
$ mmg --help
Usage: mmg [OPTIONS] [FILE_NAMES]...

  FILE_NAMES: Base file names to convert. `*.base.md` or `*.base.ipynb` are
  available.

  Here are some examples:

      mmg *.base.md

      mmg *.base.ipynb

      mmg *.base.md *.base.ipynb -o pdf --css github-dark

      mmg --recursive

      mmg --recursive --validation-only

      mmg --batch mmg.yml

Options:
  -r, --recursive                 This will search all subfolders based on
                                  current directory.
  -b, --batch FILE                YAML file path for batch conversion.
                                  (Default: None)
  -o, --output-format [as-is|html|pdf]
                                  Output format. (Default: as-is)
  --css TEXT                      CSS file path or preset('github-
                                  light'/'github-dark'). Only for the HTML/PDF
                                  output. (Default: github-light)
  -y, --yes                       This will confirm the conversion without
                                  asking. (Default: False)
  -s, --skip-validation           Skip the health check. (Default: False)
  --validation-only               Only check the health. (Default: False)
  -v, --verbose                   Verbosity level from 0 to 2. --verbose:1,
                                  -v:1, -vv:2 (Default: 0)
  --version                       Show the current version.
  --help                          Show this message and exit.
```

## Troubleshooting πŸ’Š

Please refer to the [troubleshooting](https://mmg.ryul1206.dev/latest/misc/troubleshooting/) page on the website.

## Changelog πŸ“

[CHANGELOG.md](https://github.com/ryul1206/multilingual-markdown/blob/develop/CHANGELOG.md)

## Contributors 🀝

<a href="https://github.com/ryul1206/multilingual-markdown/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=ryul1206/multilingual-markdown" />
</a>

Made with [contrib.rocks](https://contrib.rocks).

If you are interested in how to contribute, please refer to the [contribution guide](https://mmg.ryul1206.dev/latest/contributing/).
            

Raw data

            {
    "_id": null,
    "home_page": "https://mmg.ryul1206.dev/",
    "name": "mmg",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4",
    "maintainer_email": "",
    "keywords": "i18n,multilingual,markdown,language,cli,markdown-generator",
    "author": "Hong-ryul Jung",
    "author_email": "jung.hr.1206@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/17/a9/e169447f907652656e5980bab016a7a2988766f7fc08016c20ca8534b7ef/mmg-2.0.0.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\" markdown>\n   <img src=\"https://github.com/ryul1206/multilingual-markdown/assets/19263912/7cfded93-4c64-428a-b027-76a621de92a6\" width=\"500\" alt=\"Multilingual Markdown Generator\" />\n</div>\n\n<div align=\"center\" markdown>\n\n# [Multilingual Markdown Generator](https://mmg.ryul1206.dev/latest/)\n\nThis package provides a command-line interface to manage multilingual contents and generate i18n markdown from a single base file.\n\n[![PyPI - Version](https://img.shields.io/pypi/v/mmg?color)](https://pypi.org/project/mmg/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmg)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/ryul1206/multilingual-markdown)\n[![PyPI - License](https://img.shields.io/pypi/l/mmg)](https://github.com/ryul1206/multilingual-markdown/blob/main/LICENSE)\n\n\ud83c\udf0f\nEnglish |\n[**Fran\u00e7ais**](https://github.com/ryul1206/multilingual-markdown/blob/main/README.fr.md) |\n[**\ud55c\uad6d\uc5b4**](https://github.com/ryul1206/multilingual-markdown/blob/main/README.ko.md) |\n[**\u65e5\u672c\u8a9e**](https://github.com/ryul1206/multilingual-markdown/blob/main/README.ja.md)\n\nAvailable in Bash, Zsh, and Windows PowerShell.\n\n</div>\n\n---\n\n**Table of Contents** \u26a1\n\n1. [Overview](#overview-)\n    1. [How It Works](#how-it-works)\n    1. [Features](#features)\n1. [Installation](#installation-)\n    1. [Linux](#linux)\n    1. [macOS](#macos)\n    1. [Windows](#windows)\n1. [How to Use](#how-to-use-)\n1. [Troubleshooting](#troubleshooting-)\n1. [Changelog](#changelog-)\n1. [Contributors](#contributors-)\n\n## Overview \ud83d\udd0e\n\n### How It Works\n\nBy managing only one Base file, we can reduce the number of errors caused by missing or mismatched translations.\nAdditionally, thanks to editing in a single file, we can expect convenient translation with the auto-completion function of AI tools such as [Copilot](https://github.com/features/copilot).\n\nMarkdown:\n\n<div align=\"center\">\n   <img src=\"https://github.com/ryul1206/multilingual-markdown/assets/19263912/fd88420e-ddd1-403c-a9df-3429ec8095e3\" width=\"800\" alt=\"How It Works: Markdown\" />\n</div>\n\nJupyter Notebook:\n\n<div align=\"center\">\n   <img src=\"https://github.com/ryul1206/multilingual-markdown/assets/19263912/ff2ef5d9-da9f-4d91-9618-fb933802bf69\" width=\"900\" alt=\"How It Works: Jupyter Notebook\" />\n</div>\n\n### Features\n\nSupports the following features:\n\n- **Markdown, Jupyter Notebook(`.ipynb`) as input formats**\n- **As-is, HTML, PDF as ouput formats**\n- Command-line interface for Bash, Zsh, Windows PowerShell\n- Python API\n- Recursive traversal mode with `-r` option (As-is, HTML, PDF are all supported)\n- Batch processing mode with YAML file (Only `As-is` is supported)\n- [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag)\n- UTF-8 encoding\n- Automatic generation of table of contents with level and emoji options (Markdown and Jupyter Notebook are both supported)\n- Base file validation (Check the number of tags of each language)\n- Validation only mode for CI/CD (Disable file generation)\n\n## Installation \ud83d\udce6\n\n### Linux\n\n```sh\npip3 install mmg\n```\n\n### macOS\n\n```sh\npip3 install mmg\n```\n\nIf you have any issues with [WeasyPrint](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#macos), install it with the following command. WeasyPrint is only used to create PDFs.\n\n```sh\nbrew install weasyprint\n```\n\n### Windows\n\n1. MMG uses [WeasyPrint](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#windows) to create PDFs. WeasyPrint requires the GTK library, so download and run the latest [GTK3 installer](https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases). **If you are not interested in creating PDFs, you can skip this step.** Other features of MMG are available without GTK.\n2. Install MMG using Pip.\n\n    ```sh\n    pip3 install mmg\n    ```\n\n## How to Use \ud83d\udca1\n\nPlease refer to the [documentation](https://mmg.ryul1206.dev/latest/) for detailed usage and examples.\n\n```sh\n$ mmg --help\nUsage: mmg [OPTIONS] [FILE_NAMES]...\n\n  FILE_NAMES: Base file names to convert. `*.base.md` or `*.base.ipynb` are\n  available.\n\n  Here are some examples:\n\n      mmg *.base.md\n\n      mmg *.base.ipynb\n\n      mmg *.base.md *.base.ipynb -o pdf --css github-dark\n\n      mmg --recursive\n\n      mmg --recursive --validation-only\n\n      mmg --batch mmg.yml\n\nOptions:\n  -r, --recursive                 This will search all subfolders based on\n                                  current directory.\n  -b, --batch FILE                YAML file path for batch conversion.\n                                  (Default: None)\n  -o, --output-format [as-is|html|pdf]\n                                  Output format. (Default: as-is)\n  --css TEXT                      CSS file path or preset('github-\n                                  light'/'github-dark'). Only for the HTML/PDF\n                                  output. (Default: github-light)\n  -y, --yes                       This will confirm the conversion without\n                                  asking. (Default: False)\n  -s, --skip-validation           Skip the health check. (Default: False)\n  --validation-only               Only check the health. (Default: False)\n  -v, --verbose                   Verbosity level from 0 to 2. --verbose:1,\n                                  -v:1, -vv:2 (Default: 0)\n  --version                       Show the current version.\n  --help                          Show this message and exit.\n```\n\n## Troubleshooting \ud83d\udc8a\n\nPlease refer to the [troubleshooting](https://mmg.ryul1206.dev/latest/misc/troubleshooting/) page on the website.\n\n## Changelog \ud83d\udcdd\n\n[CHANGELOG.md](https://github.com/ryul1206/multilingual-markdown/blob/develop/CHANGELOG.md)\n\n## Contributors \ud83e\udd1d\n\n<a href=\"https://github.com/ryul1206/multilingual-markdown/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=ryul1206/multilingual-markdown\" />\n</a>\n\nMade with [contrib.rocks](https://contrib.rocks).\n\nIf you are interested in how to contribute, please refer to the [contribution guide](https://mmg.ryul1206.dev/latest/contributing/).",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Command line interface and Python API to generate i18n documents",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://mmg.ryul1206.dev/",
        "Repository": "https://github.com/ryul1206/multilingual-markdown"
    },
    "split_keywords": [
        "i18n",
        "multilingual",
        "markdown",
        "language",
        "cli",
        "markdown-generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "265be42b68babe1f6fd133cbfd86ab4207899920068fe65794bb48c84b1894f0",
                "md5": "3a1b9bf7b58f9958143182f5fb95d2e0",
                "sha256": "9a2ceeb0b5db06b352b4b91936cb75fdd7dbb5ba346afa42d3814231ca3b0158"
            },
            "downloads": -1,
            "filename": "mmg-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3a1b9bf7b58f9958143182f5fb95d2e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4",
            "size": 31983,
            "upload_time": "2023-10-08T21:34:05",
            "upload_time_iso_8601": "2023-10-08T21:34:05.949182Z",
            "url": "https://files.pythonhosted.org/packages/26/5b/e42b68babe1f6fd133cbfd86ab4207899920068fe65794bb48c84b1894f0/mmg-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17a9e169447f907652656e5980bab016a7a2988766f7fc08016c20ca8534b7ef",
                "md5": "9b18fcf68fccdcfc0ecc2e31c30eebb8",
                "sha256": "5b5e322d97b6016c0510fdce5396e402337f0aa97170eee12eaa206222f26268"
            },
            "downloads": -1,
            "filename": "mmg-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9b18fcf68fccdcfc0ecc2e31c30eebb8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4",
            "size": 24920,
            "upload_time": "2023-10-08T21:34:07",
            "upload_time_iso_8601": "2023-10-08T21:34:07.782715Z",
            "url": "https://files.pythonhosted.org/packages/17/a9/e169447f907652656e5980bab016a7a2988766f7fc08016c20ca8534b7ef/mmg-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-08 21:34:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ryul1206",
    "github_project": "multilingual-markdown",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mmg"
}
        
Elapsed time: 0.12966s