mobile-strings-converter


Namemobile-strings-converter JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/HenestrosaConH/mobile-strings-converter
SummaryA Python package that converts Android & iOS strings files to any supported file type.
upload_time2023-03-19 12:35:35
maintainer
docs_urlNone
authorJosé Carlos López
requires_python>=3.8
licenseMIT
keywords android strings.xml strings converter csv xlsx yaml html json ods pdf md ios localizable.strings
VCS
bugtrack_url
requirements arabic_reshaper python-bidi fpdf2 gspread lingua-language-detector openpyxl protobuf PyYAML
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div id="top"></div>

<!-- PROJECT SHIELDS -->
<!--
*** I am using markdown "reference style" links for readability.
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
*** See the bottom of this document for the declaration of the reference variables
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->

<!-- PROJECT LOGO -->
<br />
<div align="center">
    <img src="docs/icon.png" alt="Logo" width="156" height="156" style="margin-bottom:-40px">
    <h2 align="center">Mobile strings converter</h2>
    <p align="center">
        A Python package that converts Android & iOS strings files to any supported file type.
        <br />
        <br />
        <a href="https://pypi.org/project/mobile-strings-converter/">
          <img alt="PyPI version" src="https://img.shields.io/pypi/v/mobile-strings-converter" />
        </a>
        <a href="https://pypi.org/project/mobile-strings-converter/">
          <img alt="Python versions support" src="https://img.shields.io/pypi/pyversions/mobile-strings-converter" />
        </a>
        <br />
        <a href="https://github.com/HenestrosaConH/mobile-strings-converter/actions/workflows/build.yaml">
          <img alt="GitHub action: Build" src="https://github.com/HenestrosaConH/mobile-strings-converter/actions/workflows/build.yaml/badge.svg" />
        </a>
        <a href="https://codecov.io/gh/HenestrosaConH/mobile-strings-converter/">
          <img alt="Codecov" src="https://codecov.io/gh/HenestrosaConH/mobile-strings-converter/branch/main/graph/badge.svg" />
        </a>
        <a href="https://github.com/HenestrosaConH/mobile-strings-converter/blob/main/LICENSE">
          <img alt="License" src="https://img.shields.io/github/license/HenestrosaConH/mobile-strings-converter" />
        </a>
        <br />
        <a href="https://github.com/HenestrosaConH/mobile-strings-converter/graphs/contributors">
          <img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/HenestrosaConH/mobile-strings-converter" />
        </a>
        <a href="https://github.com/HenestrosaConH/mobile-strings-converter/issues">
          <img alt="Issues" src="https://img.shields.io/github/issues/HenestrosaConH/mobile-strings-converter" />
        </a>
        <a href="https://github.com/HenestrosaConH/mobile-strings-converter/pulls">
          <img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/HenestrosaConH/mobile-strings-converter" />
        </a>
        <br />
        <br />
        <a href="https://github.com/HenestrosaConH/mobile-strings-converter/issues/new/choose">Report Bug</a> · <a href="https://github.com/HenestrosaConH/mobile-strings-converter/issues/new/choose">Request Feature</a> · <a href="https://github.com/HenestrosaConH/mobile-strings-converter/discussions">Ask Question</a>
    </p>
</div>

<!-- TABLE OF CONTENTS -->

## Table of Contents

- [About the Project](#about-the-project)
  - [Project Structure](#project-structure)
  - [Built With](#built-with)
- [Release Files](#release-files)
- [Usage](#usage)
  - [To Execute the Script](#to-execute-the-script)
  - [To Import the Package Into Your Project](#to-import-the-package-into-your-project)
  - [To Open the Code](#to-open-the-code)
- [Notes](#notes)
  - [List of Indic Languages Supported by PDF files](#list-of-indic-languages-supported-by-pdf-files)
  - [List of Languages Not Supported by PDF files](#list-of-languages-not-supported-by-pdf-files)
- [Roadmap](#roadmap)
- [Contributing](#contributing)
- [License](#license)
- [Authors](#authors)
- [Acknowledgments](#acknowledgments)
- [Support](#support)

<!-- ABOUT THE PROJECT -->

## About the Project

I tried to do the whole process of converting a strings resource file into a spreadsheet in Google Sheets by hand and, even though you can do it with the option **Data > Split text to columns**, 
it involves wasting your time generating the spreadsheet manually. Due to that, I decided to build a time-efficient solution, which consists on running a Python script in order to achieve that with any file type.

Moreover, not only this script can be executed on its own, it also can be installed as a package via **PyPI** (more information [here](#to-import-the-package-into-your-project) about how to install it).

The file types supported by the package are the following:
- Android strings format (`*.xml`)
- CSV
- Google Sheets support
- HTML
- iOS strings format (`*.strings`)
- JSON
- MD
- ODS
- PDF
- XLSX
- YAML

<!-- PROJECT STRUCTURE -->

### Project Structure

#### Root directories:

- `.github/workflows`: GitHub workflows. It also includes the templates for issues and pull requests, as well as the `depandabot.yml` file for Dependabot configuration.
- `docs`: Contains files related to the documentation of the project.
- `src/mobile_strings_converter`:  Contains the source code files.
- `tests`: Contains unit tests to ensure the correct functionality of the package. It also includes the `files` directory, which contains a few demo files in different formats to use in the unit tests.

#### Root files:

- `.gitignore`: File used by the version control system Git to specify files or directories that should be ignored by Git when tracking changes to a project.
- `.pre-commit-config.yaml`: Configuration file used by **pre-commit**, a tool that runs checks (such as linting, testing, or formatting) on the code before you commit changes to version control. The file specifies which checks pre-commit should run and how it should run them.
- `LICENSE`: Project license, which is [MIT](https://opensource.org/license/mit/).
- `poetry.lock`: File generated by **Poetry**, a package manager for Python, that contains the exact versions of all packages used by a project. The file is used to ensure that all members of a development team are using the same versions of packages, even if different versions are available in the package repository.
- `pyproject.toml`: Configuration file used by **Poetry**. It specifies the metadata for a Python project, including the project name, version, description, author, license and dependencies.
- `README.md`: What you are reading right now.
- `requirements.txt`: Lists the names and versions of each package used to build this project. To install the requirements, execute `pip install -r requirements.txt`.
- `requirements-dev.txt`: Lists the names and versions of each package used in the development stage of this project. To install the requirements, execute `pip install -r requirements-dev.txt`.


<!-- BUILT WITH -->

### Built With

- [openpyxl](https://pypi.org/project/openpyxl/): To generate ODS and XLSX files.
- [gspread](https://pypi.org/project/gspread/): To generate spreadsheets in Google Sheets.
- [protobuf](https://pypi.org/project/oauth2client/): Used by `google.oauth2.credentials` to authenticate to the user's Google account in order to create the spreadsheet in Google Sheets. 
- [PyYAML](https://pypi.org/project/PyYAML/): To generate YAML files.
- [arabic-reshaper](https://pypi.org/project/arabic-reshaper/) and [python-bidi](https://pypi.org/project/python-bidi/): To add arabic characters support for PDF files.
- [fpdf2](https://pypi.org/project/fpdf2/): To generate PDF files.
- [lingua-language-detector](https://pypi.org/project/lingua-language-detector/): To recognize the **value** language when writing a PDF in order to know what font to use.  

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- RELEASE FILES -->

## Release Files

| File                                                                                                                                                         | Description                                                                                                 | Size      |
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:----------|
| [mobile-strings-converter.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter.zip)             | Standard language support for PDF files (over 100 languages, including RTL)                                 | 0.32 MB   |
| [mobile-strings-converter-indic.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-indic.zip) | PDF file support for Indic languages ([see list](#list-of-indic-languages-supported-by-pdf-files))          | 1.40 MB   |
| [mobile-strings-converter-zh-ja.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-zh-ja.zip) | PDF file support for Japanese and Chinese (simplified and traditional)                                      | 7.17 MB   |
| [mobile-strings-converter-ko.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-ko.zip)       | PDF file support for Korean                                                                                 | 0.46 MB   |
| [mobile-strings-converter-th.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-th.zip)       | PDF file support for Thai                                                                                   | 0.37 MB   |
| [mobile-strings-converter-all.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-all.zip)     | PDF file support for almost all languages ([see exceptions](#list-of-languages-not-supported-by-pdf-files)) | 8.43 MB   |

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- USAGE -->

## Usage

### To Execute The Script

1. Download the [release](#release-files) that is best suited to your needs.
2. Open the command line and run `pip install -r path/to/requirements.txt` to install the required packages to execute the script.
3. Example of a basic command to convert a `.xml` or `.strings` file to another file type: 
    ```
    path/to/python path/to/mobile_strings_converter.py path/to/<*.xml | *.strings> -o path/to/*.<SUPPORTED FILE TYPE EXTENSION>
    ```

#### To Generate a Spreadsheet in Google Sheets

Before going further into running the commands to do so, please note that you will have to generate a `service_account.json` file. You can do the following to get one:

1. Go to the [Google Cloud Console](https://console.cloud.google.com/).
2. Create a new project or select an existing project.
3. Go to the **APIs & Services** page, click on **Dashboard** and then click on **Enable APIs and Services**.
4. Search for **Google Sheets API** and enable it.
5. Go to the **Credentials** page, click on **Create credentials**, and then choose **Service account**.
6. Give your service account a name and select a role. For this purpose, you can select **Project -> Editor**.
7. Click on the **Create key** button, select the JSON format and download the `service_account.json` file.
8. Share your Google Sheets file with the email address that is specified in the **client_email** field in the `service_account.json` file.

Alternatively, you can create an XLSX file and open it in Google Sheets if you do not want to go through the hassle of generating the `service_account.json` file.

Once you have generated the `service_account.json` file, you can generate a spreadsheet in Google Sheets by running the following command:
```
path/to/python path/to/mobile_strings_converter.py path/to/<strings.xml | Localizable.strings> -gs <SHEET NAME> -c path/to/service_account.json 
```

If you want to generate an output file along with the spreadsheet, run this:
```
path/to/python path/to/mobile_strings_converter.py path/to/<strings.xml | Localizable.strings> -gs <SHEET NAME> -c path/to/service_account.json -o path/to/strings.<SUPPORTED FILE TYPE EXTENSION>
```

#### Script flags

- `-h`, `--help`: Show help
- `-o`, `--output-filepath`: Output filepath where you want to store the converted file. Its extension can be any of the file types listed [here](#about-the-project).
- `-g`, `--google-sheets` <spreadsheet name>: Creates a spreadsheet in Google Sheets with the name passed as argument.
- `-c`, `--credentials` <`service_account.json` filepath>: Mandatory if you want to generate a spreadsheet in your Google account.
- `-p`, `--print-comments`: If present, indicates that commented strings will be printed in the output file.

### To Import the Package Into Your Project

1. Run `pip install mobile-strings-converter`
2. Import the package and the wrapper function with this line of code: `from mobile_strings_converter import convert_strings`.

### To Open the Code

1. Clone the project with the `git clone https://github.com/HenestrosaConH/mobile-strings-converter.git` command.
2. Open it in your favourite IDE (mine is [PyCharm](https://www.jetbrains.com/pycharm/))

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- NOTES -->

## Notes

### List of Indic Languages Supported by PDF files

- Hindi
- Marathu
- Oriya
- Tibetan
- Gujarati
- Telugu
- Tamil
- Punjabi

### List of Languages Not Supported by PDF files

- **Bengali** (not possible to print correctly using [fpdf2](https://pypi.org/project/fpdf2/))
- **Dhivehi** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Kannada** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Khmer** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Lao** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Malayalam** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Meiteilon (manipuri)** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Myanmar burmese** (not possible to print correctly using [fpdf2](https://pypi.org/project/fpdf2/))
- **Odia (Oriya)** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Sinhala** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))
- **Tigrinya** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- ROADMAP -->

## Roadmap

- [ ] Add support for multiple `.xml`/`.strings` files input.
- [ ] Add support for converting a file (not `.xml` nor `.strings`) to a strings resource file.
- [ ] Make a web version.

You can propose a new feature creating an [issue](https://github.com/HenestrosaConH/mobile-strings-converter/new/choose).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Please, read the [CONTRIBUTING.md](https://github.com/HenestrosaConH/mobile-strings-converter/blob/main/.github/CONTRIBUTING.md) file, where you can find more detailed information about how to contribute to the project.

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- LICENSE -->

## License

Distributed under the MIT License. See `LICENSE` for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- AUTHORS -->

## Authors

- HenestrosaConH <henestrosaconh@gmail.com> (José Carlos López Henestrosa)

See also the list of [contributors](https://github.com/HenestrosaConH/mobile-strings-converter/contributors) who participated in this project.

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- ACKNOWLEDGMENTS -->

## Acknowledgments

I have made use of the following resources to make this project:

- [Best-README-Template](https://github.com/othneildrew/Best-README-Template/)
- [Img Shields](https://shields.io)
- [How to create a Python package](https://mathspp.com/blog/how-to-create-a-python-package-in-2022#how-to-create-a-python-package)
- [Icon created by Midjourney](https://www.midjourney.com/app/)

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- SUPPORT -->

## Support

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/U7U5J6COZ)

<p align="right">(<a href="#top">back to top</a>)</p>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HenestrosaConH/mobile-strings-converter",
    "name": "mobile-strings-converter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "android,strings.xml,strings,converter,csv,xlsx,yaml,html,json,ods,pdf,md,ios,Localizable.strings",
    "author": "Jos\u00e9 Carlos L\u00f3pez",
    "author_email": "henestrosaconh@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/14/a4/37d6b50535292b5e90a721dd75b23d9277afb41da6528d72851b270b8e78/mobile_strings_converter-0.1.1.tar.gz",
    "platform": null,
    "description": "<div id=\"top\"></div>\n\n<!-- PROJECT SHIELDS -->\n<!--\n*** I am using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n-->\n\n<!-- PROJECT LOGO -->\n<br />\n<div align=\"center\">\n    <img src=\"docs/icon.png\" alt=\"Logo\" width=\"156\" height=\"156\" style=\"margin-bottom:-40px\">\n    <h2 align=\"center\">Mobile strings converter</h2>\n    <p align=\"center\">\n        A Python package that converts Android & iOS strings files to any supported file type.\n        <br />\n        <br />\n        <a href=\"https://pypi.org/project/mobile-strings-converter/\">\n          <img alt=\"PyPI version\" src=\"https://img.shields.io/pypi/v/mobile-strings-converter\" />\n        </a>\n        <a href=\"https://pypi.org/project/mobile-strings-converter/\">\n          <img alt=\"Python versions support\" src=\"https://img.shields.io/pypi/pyversions/mobile-strings-converter\" />\n        </a>\n        <br />\n        <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/actions/workflows/build.yaml\">\n          <img alt=\"GitHub action: Build\" src=\"https://github.com/HenestrosaConH/mobile-strings-converter/actions/workflows/build.yaml/badge.svg\" />\n        </a>\n        <a href=\"https://codecov.io/gh/HenestrosaConH/mobile-strings-converter/\">\n          <img alt=\"Codecov\" src=\"https://codecov.io/gh/HenestrosaConH/mobile-strings-converter/branch/main/graph/badge.svg\" />\n        </a>\n        <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/blob/main/LICENSE\">\n          <img alt=\"License\" src=\"https://img.shields.io/github/license/HenestrosaConH/mobile-strings-converter\" />\n        </a>\n        <br />\n        <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/graphs/contributors\">\n          <img alt=\"GitHub Contributors\" src=\"https://img.shields.io/github/contributors/HenestrosaConH/mobile-strings-converter\" />\n        </a>\n        <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/issues\">\n          <img alt=\"Issues\" src=\"https://img.shields.io/github/issues/HenestrosaConH/mobile-strings-converter\" />\n        </a>\n        <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/pulls\">\n          <img alt=\"GitHub pull requests\" src=\"https://img.shields.io/github/issues-pr/HenestrosaConH/mobile-strings-converter\" />\n        </a>\n        <br />\n        <br />\n        <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/issues/new/choose\">Report Bug</a> \u00b7 <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/issues/new/choose\">Request Feature</a> \u00b7 <a href=\"https://github.com/HenestrosaConH/mobile-strings-converter/discussions\">Ask Question</a>\n    </p>\n</div>\n\n<!-- TABLE OF CONTENTS -->\n\n## Table of Contents\n\n- [About the Project](#about-the-project)\n  - [Project Structure](#project-structure)\n  - [Built With](#built-with)\n- [Release Files](#release-files)\n- [Usage](#usage)\n  - [To Execute the Script](#to-execute-the-script)\n  - [To Import the Package Into Your Project](#to-import-the-package-into-your-project)\n  - [To Open the Code](#to-open-the-code)\n- [Notes](#notes)\n  - [List of Indic Languages Supported by PDF files](#list-of-indic-languages-supported-by-pdf-files)\n  - [List of Languages Not Supported by PDF files](#list-of-languages-not-supported-by-pdf-files)\n- [Roadmap](#roadmap)\n- [Contributing](#contributing)\n- [License](#license)\n- [Authors](#authors)\n- [Acknowledgments](#acknowledgments)\n- [Support](#support)\n\n<!-- ABOUT THE PROJECT -->\n\n## About the Project\n\nI tried to do the whole process of converting a strings resource file into a spreadsheet in Google Sheets by hand and, even though you can do it with the option **Data > Split text to columns**, \nit involves wasting your time generating the spreadsheet manually. Due to that, I decided to build a time-efficient solution, which consists on running a Python script in order to achieve that with any file type.\n\nMoreover, not only this script can be executed on its own, it also can be installed as a package via **PyPI** (more information [here](#to-import-the-package-into-your-project) about how to install it).\n\nThe file types supported by the package are the following:\n- Android strings format (`*.xml`)\n- CSV\n- Google Sheets support\n- HTML\n- iOS strings format (`*.strings`)\n- JSON\n- MD\n- ODS\n- PDF\n- XLSX\n- YAML\n\n<!-- PROJECT STRUCTURE -->\n\n### Project Structure\n\n#### Root directories:\n\n- `.github/workflows`: GitHub workflows. It also includes the templates for issues and pull requests, as well as the `depandabot.yml` file for Dependabot configuration.\n- `docs`: Contains files related to the documentation of the project.\n- `src/mobile_strings_converter`:  Contains the source code files.\n- `tests`: Contains unit tests to ensure the correct functionality of the package. It also includes the `files` directory, which contains a few demo files in different formats to use in the unit tests.\n\n#### Root files:\n\n- `.gitignore`: File used by the version control system Git to specify files or directories that should be ignored by Git when tracking changes to a project.\n- `.pre-commit-config.yaml`: Configuration file used by **pre-commit**, a tool that runs checks (such as linting, testing, or formatting) on the code before you commit changes to version control. The file specifies which checks pre-commit should run and how it should run them.\n- `LICENSE`: Project license, which is [MIT](https://opensource.org/license/mit/).\n- `poetry.lock`: File generated by **Poetry**, a package manager for Python, that contains the exact versions of all packages used by a project. The file is used to ensure that all members of a development team are using the same versions of packages, even if different versions are available in the package repository.\n- `pyproject.toml`: Configuration file used by **Poetry**. It specifies the metadata for a Python project, including the project name, version, description, author, license and dependencies.\n- `README.md`: What you are reading right now.\n- `requirements.txt`: Lists the names and versions of each package used to build this project. To install the requirements, execute `pip install -r requirements.txt`.\n- `requirements-dev.txt`: Lists the names and versions of each package used in the development stage of this project. To install the requirements, execute `pip install -r requirements-dev.txt`.\n\n\n<!-- BUILT WITH -->\n\n### Built With\n\n- [openpyxl](https://pypi.org/project/openpyxl/): To generate ODS and XLSX files.\n- [gspread](https://pypi.org/project/gspread/): To generate spreadsheets in Google Sheets.\n- [protobuf](https://pypi.org/project/oauth2client/): Used by `google.oauth2.credentials` to authenticate to the user's Google account in order to create the spreadsheet in Google Sheets. \n- [PyYAML](https://pypi.org/project/PyYAML/): To generate YAML files.\n- [arabic-reshaper](https://pypi.org/project/arabic-reshaper/) and [python-bidi](https://pypi.org/project/python-bidi/): To add arabic characters support for PDF files.\n- [fpdf2](https://pypi.org/project/fpdf2/): To generate PDF files.\n- [lingua-language-detector](https://pypi.org/project/lingua-language-detector/): To recognize the **value** language when writing a PDF in order to know what font to use.  \n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- RELEASE FILES -->\n\n## Release Files\n\n| File                                                                                                                                                         | Description                                                                                                 | Size      |\n|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|:----------|\n| [mobile-strings-converter.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter.zip)             | Standard language support for PDF files (over 100 languages, including RTL)                                 | 0.32 MB   |\n| [mobile-strings-converter-indic.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-indic.zip) | PDF file support for Indic languages ([see list](#list-of-indic-languages-supported-by-pdf-files))          | 1.40 MB   |\n| [mobile-strings-converter-zh-ja.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-zh-ja.zip) | PDF file support for Japanese and Chinese (simplified and traditional)                                      | 7.17 MB   |\n| [mobile-strings-converter-ko.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-ko.zip)       | PDF file support for Korean                                                                                 | 0.46 MB   |\n| [mobile-strings-converter-th.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-th.zip)       | PDF file support for Thai                                                                                   | 0.37 MB   |\n| [mobile-strings-converter-all.zip](https://github.com/HenestrosaConH/mobile-strings-converter/releases/latest/download/mobile-strings-converter-all.zip)     | PDF file support for almost all languages ([see exceptions](#list-of-languages-not-supported-by-pdf-files)) | 8.43 MB   |\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- USAGE -->\n\n## Usage\n\n### To Execute The Script\n\n1. Download the [release](#release-files) that is best suited to your needs.\n2. Open the command line and run `pip install -r path/to/requirements.txt` to install the required packages to execute the script.\n3. Example of a basic command to convert a `.xml` or `.strings` file to another file type: \n    ```\n    path/to/python path/to/mobile_strings_converter.py path/to/<*.xml | *.strings> -o path/to/*.<SUPPORTED FILE TYPE EXTENSION>\n    ```\n\n#### To Generate a Spreadsheet in Google Sheets\n\nBefore going further into running the commands to do so, please note that you will have to generate a `service_account.json` file. You can do the following to get one:\n\n1. Go to the [Google Cloud Console](https://console.cloud.google.com/).\n2. Create a new project or select an existing project.\n3. Go to the **APIs & Services** page, click on **Dashboard** and then click on **Enable APIs and Services**.\n4. Search for **Google Sheets API** and enable it.\n5. Go to the **Credentials** page, click on **Create credentials**, and then choose **Service account**.\n6. Give your service account a name and select a role. For this purpose, you can select **Project -> Editor**.\n7. Click on the **Create key** button, select the JSON format and download the `service_account.json` file.\n8. Share your Google Sheets file with the email address that is specified in the **client_email** field in the `service_account.json` file.\n\nAlternatively, you can create an XLSX file and open it in Google Sheets if you do not want to go through the hassle of generating the `service_account.json` file.\n\nOnce you have generated the `service_account.json` file, you can generate a spreadsheet in Google Sheets by running the following command:\n```\npath/to/python path/to/mobile_strings_converter.py path/to/<strings.xml | Localizable.strings> -gs <SHEET NAME> -c path/to/service_account.json \n```\n\nIf you want to generate an output file along with the spreadsheet, run this:\n```\npath/to/python path/to/mobile_strings_converter.py path/to/<strings.xml | Localizable.strings> -gs <SHEET NAME> -c path/to/service_account.json -o path/to/strings.<SUPPORTED FILE TYPE EXTENSION>\n```\n\n#### Script flags\n\n- `-h`, `--help`: Show help\n- `-o`, `--output-filepath`: Output filepath where you want to store the converted file. Its extension can be any of the file types listed [here](#about-the-project).\n- `-g`, `--google-sheets` <spreadsheet name>: Creates a spreadsheet in Google Sheets with the name passed as argument.\n- `-c`, `--credentials` <`service_account.json` filepath>: Mandatory if you want to generate a spreadsheet in your Google account.\n- `-p`, `--print-comments`: If present, indicates that commented strings will be printed in the output file.\n\n### To Import the Package Into Your Project\n\n1. Run `pip install mobile-strings-converter`\n2. Import the package and the wrapper function with this line of code: `from mobile_strings_converter import convert_strings`.\n\n### To Open the Code\n\n1. Clone the project with the `git clone https://github.com/HenestrosaConH/mobile-strings-converter.git` command.\n2. Open it in your favourite IDE (mine is [PyCharm](https://www.jetbrains.com/pycharm/))\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- NOTES -->\n\n## Notes\n\n### List of Indic Languages Supported by PDF files\n\n- Hindi\n- Marathu\n- Oriya\n- Tibetan\n- Gujarati\n- Telugu\n- Tamil\n- Punjabi\n\n### List of Languages Not Supported by PDF files\n\n- **Bengali** (not possible to print correctly using [fpdf2](https://pypi.org/project/fpdf2/))\n- **Dhivehi** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Kannada** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Khmer** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Lao** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Malayalam** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Meiteilon (manipuri)** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Myanmar burmese** (not possible to print correctly using [fpdf2](https://pypi.org/project/fpdf2/))\n- **Odia (Oriya)** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Sinhala** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n- **Tigrinya** (not recognized by [lingua-language-detector](https://pypi.org/project/lingua-language-detector/))\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- ROADMAP -->\n\n## Roadmap\n\n- [ ] Add support for multiple `.xml`/`.strings` files input.\n- [ ] Add support for converting a file (not `.xml` nor `.strings`) to a strings resource file.\n- [ ] Make a web version.\n\nYou can propose a new feature creating an [issue](https://github.com/HenestrosaConH/mobile-strings-converter/new/choose).\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- CONTRIBUTING -->\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\nPlease, read the [CONTRIBUTING.md](https://github.com/HenestrosaConH/mobile-strings-converter/blob/main/.github/CONTRIBUTING.md) file, where you can find more detailed information about how to contribute to the project.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- LICENSE -->\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n<!-- AUTHORS -->\n\n## Authors\n\n- HenestrosaConH <henestrosaconh@gmail.com> (Jos\u00e9 Carlos L\u00f3pez Henestrosa)\n\nSee also the list of [contributors](https://github.com/HenestrosaConH/mobile-strings-converter/contributors) who participated in this project.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- ACKNOWLEDGMENTS -->\n\n## Acknowledgments\n\nI have made use of the following resources to make this project:\n\n- [Best-README-Template](https://github.com/othneildrew/Best-README-Template/)\n- [Img Shields](https://shields.io)\n- [How to create a Python package](https://mathspp.com/blog/how-to-create-a-python-package-in-2022#how-to-create-a-python-package)\n- [Icon created by Midjourney](https://www.midjourney.com/app/)\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- SUPPORT -->\n\n## Support\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/U7U5J6COZ)\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package that converts Android & iOS strings files to any supported file type.",
    "version": "0.1.1",
    "split_keywords": [
        "android",
        "strings.xml",
        "strings",
        "converter",
        "csv",
        "xlsx",
        "yaml",
        "html",
        "json",
        "ods",
        "pdf",
        "md",
        "ios",
        "localizable.strings"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f9f8742e478c1a72ae895747ae3cc805ae999bce3d75a4a10bbbce8a2d487e2",
                "md5": "281c09b6f58c311cc94117f8f6c94e8d",
                "sha256": "dfe0ba0213331d7bef31387fa0b1599b2543c150181468212a7ab1da6c32dd63"
            },
            "downloads": -1,
            "filename": "mobile_strings_converter-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "281c09b6f58c311cc94117f8f6c94e8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8729622,
            "upload_time": "2023-03-19T12:35:31",
            "upload_time_iso_8601": "2023-03-19T12:35:31.825222Z",
            "url": "https://files.pythonhosted.org/packages/3f/9f/8742e478c1a72ae895747ae3cc805ae999bce3d75a4a10bbbce8a2d487e2/mobile_strings_converter-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14a437d6b50535292b5e90a721dd75b23d9277afb41da6528d72851b270b8e78",
                "md5": "4c6bfe6f8f56e38e7b22097f49401dfd",
                "sha256": "64e69d4794d6097fe4a7814000ae4ff8cc092282742de3acd462f724380a55ec"
            },
            "downloads": -1,
            "filename": "mobile_strings_converter-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4c6bfe6f8f56e38e7b22097f49401dfd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8679757,
            "upload_time": "2023-03-19T12:35:35",
            "upload_time_iso_8601": "2023-03-19T12:35:35.094211Z",
            "url": "https://files.pythonhosted.org/packages/14/a4/37d6b50535292b5e90a721dd75b23d9277afb41da6528d72851b270b8e78/mobile_strings_converter-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-19 12:35:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "HenestrosaConH",
    "github_project": "mobile-strings-converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "arabic_reshaper",
            "specs": [
                [
                    "~=",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "python-bidi",
            "specs": [
                [
                    "~=",
                    "0.4.2"
                ]
            ]
        },
        {
            "name": "fpdf2",
            "specs": [
                [
                    "~=",
                    "2.6.1"
                ]
            ]
        },
        {
            "name": "gspread",
            "specs": [
                [
                    "~=",
                    "5.7.2"
                ]
            ]
        },
        {
            "name": "lingua-language-detector",
            "specs": [
                [
                    "~=",
                    "1.3.2"
                ]
            ]
        },
        {
            "name": "openpyxl",
            "specs": [
                [
                    "~=",
                    "3.1.1"
                ]
            ]
        },
        {
            "name": "protobuf",
            "specs": [
                [
                    "~=",
                    "4.22.0"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "~=",
                    "6.0"
                ]
            ]
        }
    ],
    "lcname": "mobile-strings-converter"
}
        
Elapsed time: 0.06907s