{"id":16252194,"url":"https://github.com/jsfehler/py_to_rpy","last_synced_at":"2025-10-12T09:17:04.763Z","repository":{"id":85387945,"uuid":"110476873","full_name":"jsfehler/py_to_rpy","owner":"jsfehler","description":"Convert Python files to Ren'Py files","archived":false,"fork":false,"pushed_at":"2023-04-18T00:32:28.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T21:35:08.298Z","etag":null,"topics":["python","renpy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsfehler.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-12T23:06:37.000Z","updated_at":"2023-12-29T20:08:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ed730b7-4f29-4c58-903d-65b730fd28aa","html_url":"https://github.com/jsfehler/py_to_rpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jsfehler/py_to_rpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfehler%2Fpy_to_rpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfehler%2Fpy_to_rpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfehler%2Fpy_to_rpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfehler%2Fpy_to_rpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsfehler","download_url":"https://codeload.github.com/jsfehler/py_to_rpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfehler%2Fpy_to_rpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010968,"owners_count":26084837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","renpy"],"created_at":"2024-10-10T15:12:46.331Z","updated_at":"2025-10-12T09:17:04.758Z","avatar_url":"https://github.com/jsfehler.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"py_to_rpy\n=========\n\n.. image:: https://api.travis-ci.org/jsfehler/py_to_rpy.svg?branch=master\n    :target: https://travis-ci.org/jsfehler/py_to_rpy\n    :alt: See Build Status on Travis CI\n\nConverts Python files(.py) to Ren'Py files(.rpy).\n\n.rpy files generated by this script are identical to the .py files, except for all the code being placed inside a Ren'Py \"init python\" block.\n\n\nInstallation\n------------\n\npy_to_rpy can be installed via pip:\n\n.. code-block:: console\n\n    pip install git+https://github.com/jsfehler/py_to_rpy.git\n\nUsage\n-----\n\nFrom the command line\n^^^^^^^^^^^^^^^^^^^^^\n\nWhen called from the command line, multiple paths can be specified at once, each separated by a space.\n\n.. code-block:: console\n\n    py_to_rpy file1.py file2.py file3.py\n\n\nFile parsing uses `glob patterns \u003chttps://en.wikipedia.org/wiki/Glob_(programming)\u003e`_, on each path, meaning:\n\n.. code-block:: console\n\n    py_to_rpy my_folder/*.py\n    \nis a valid statement, and will select all the .py files in that folder.\n    \nInto a specific destination\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n    \nBy default, new .rpy files are created next to the .py files.\nHowever, the --dest argument can be used to place them into a new folder.\n\n.. code-block:: console\n\n    py_to_rpy file1.py file2.py file3.py --dest=my_folder\n\nStrict Mode\n~~~~~~~~~~~\n    \nBy default, new .rpy files will preserve renpy imports that were in the .py file. However, these imports are normally unnecessary in .rpy files.\nTo strip them out, use the --strict flag.\n\n.. code-block:: console\n\n    py_to_rpy file1.py file2.py file3.py --strict\n\nThe lines that are stripped are defined in py_to_rpy.json under \"remove\".\n\n.. code-block:: console\n\n    \"remove\": [\n        \"import renpy.exports as renpy\",\n        \"from renpy.\"\n    ]\n\nBy default, the following lines are included under remove: \n\n`import renpy.exports as renpy`\n\n`from renpy.`\n\nThe lines that are removed do not have to match exactly, they only need to start with the declared line.\n\nIgnoring specific lines\n~~~~~~~~~~~~~~~~~~~~~~~\n\nIf there are specific lines you want strict mode to ignore, they can be specified in py_to_rpy.json.\n\n.. code-block:: console\n\n    \"ignore\": [\"from renpy.python import RevertableList\"]\n\nCombining generated rpy files\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nInstead of keeping multiple generated files, the --minify argument can used to instead generate one combined file.\n--minify requires one parameter; the name desired for the combined file.\n\n.. code-block:: console\n\n    py_to_rpy file1.py file2.py file3.py --minify=filename\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsfehler%2Fpy_to_rpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsfehler%2Fpy_to_rpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsfehler%2Fpy_to_rpy/lists"}