{"id":19204554,"url":"https://github.com/openttd/nml","last_synced_at":"2025-04-04T08:02:25.734Z","repository":{"id":34568303,"uuid":"143336929","full_name":"OpenTTD/nml","owner":"OpenTTD","description":"NewGRF Meta Language ","archived":false,"fork":false,"pushed_at":"2025-04-01T02:45:01.000Z","size":18376,"stargazers_count":48,"open_issues_count":30,"forks_count":35,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-04T07:36:01.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenTTD.png","metadata":{"files":{"readme":"README.md","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":"2018-08-02T19:31:12.000Z","updated_at":"2025-03-31T17:58:22.000Z","dependencies_parsed_at":"2023-02-17T10:15:34.500Z","dependency_job_id":"315a1022-9fd8-431e-8efb-8f47c1072ed6","html_url":"https://github.com/OpenTTD/nml","commit_stats":{"total_commits":2615,"total_committers":39,"mean_commits":67.05128205128206,"dds":0.6669216061185468,"last_synced_commit":"f756c76b61b5f6d4ef895867d91c8f3905333f62"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fnml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fnml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fnml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenTTD%2Fnml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenTTD","download_url":"https://codeload.github.com/OpenTTD/nml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142053,"owners_count":20890652,"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","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":[],"created_at":"2024-11-09T13:08:42.284Z","updated_at":"2025-04-04T08:02:25.715Z","avatar_url":"https://github.com/OpenTTD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NML NewGRF meta language\n\nNML is a a python-based compiler, capable of compiling NML files (along\nwith their associated language, sound and graphic files) into grf\nand / or nfo files.\n\nThe documentation about the language can be found on\nhttp://newgrf-specs.tt-wiki.net/wiki/NML:Main\n\nNML is licensed under the GNU General Public License version 2, or at\nyour option, any later version. For more information, see [LICENSE](https://github.com/OpenTTD/nml/blob/master/LICENSE)\n(GPL version 2), or later versions at http://www.gnu.org/licenses/.\n\n## Table of Contents\n\n1. [Contact](#1-contact)\n2. [Dependencies](#2-dependencies)\n    * 2.1 [Required dependencies](#21-required-dependencies)\n    * 2.2 [Optional dependencies](#22-optional-dependencies)\n3. [Installation](#3-installation)\n4. [Usage](#4-usage)\n5. [Reporting bugs and contributing](#5-reporting-bugs-and-contributing)\n    * 5.1 [Reporting bugs](#51-reporting-bugs)\n    * 5.2 [Making an NML release](#52-making-an-nml-release)\n\n## 1) Contact\n\n- [issue tracker / source repository](https://github.com/OpenTTD/nml)\n- IRC chat using #openttd on irc.oftc.net [more info about our irc channel](https://wiki.openttd.org/Irc)\n\n## 2) Dependencies\n\n### 2.1) Required dependencies\n\nNML requires the following 3rd party packages to run:\n\n- `python`\n  Minimal version is 3.5. Python 2 is not supported.\n- `python image library`\n  For install options see https://pillow.readthedocs.io/en/stable/installation.html\n  Minimal version is 3.4. Older versions are not supported.\n- `ply`\n  Downloadable from http://www.dabeaz.com/ply/\n\n### 2.2) Optional dependencies\n\nTo install NML you'll need these 3rd party packages:\n\n- gcc (or possibly another c++ compiler).\n  Needed to compile the cython version of the lz77 module for grf encoding.\n\nRunning `make test` requires these code formatters and checkers. You don't need these to use NML, only to test or help improve it.\n\n- `flake8`\n  Minimal version is 3.7.\n- `black`\n\n## 3) Installation\n\nThe easiest way to install NML is by using pip:\n\n```bash\npip3 install nml\n```\n\nIn order to install NML from a source checkout run:\n\n```bash\npython setup.py install\n```\n\nIf you want to install the package manually copy 'nmlc' to any directory\nin your path and the directory 'nml' to any directory in your python path.\n\n## 4) Usage\n\nUsage: nmlc [options] `\u003cfilename\u003e`.\n\nWhere `\u003cfilename\u003e` is the nml file to parse.\n\nOptions:\n\n```\n    --version             show program's version number and exit\n    -h, --help            show this help message and exit\n    -d, --debug           write the AST to stdout\n    -s, --stack           Dump stack when an error occurs\n    --grf=\u003cfile\u003e          write the resulting grf to \u003cfile\u003e\n    --md5=\u003cfile\u003e          Write an md5sum of the resulting grf to \u003cfile\u003e\n    --nfo=\u003cfile\u003e          write nfo output to \u003cfile\u003e\n    -M                    output a rule suitable for make describing the\n                          graphics dependencies of the main grf file (requires\n                          input file or --grf)\n    --MF=\u003cfile\u003e           When used with -M, specifies a file to write the\n                          dependencies to\n    --MT=\u003cfile\u003e           target of the rule emitted by dependency generation\n                          (requires -M)\n    -c                    crop extraneous transparent blue from real sprites\n    -u                    save uncompressed data in the grf file\n    --nml=\u003cfile\u003e          write optimized nml to \u003cfile\u003e\n    -o \u003cfile\u003e, --output=\u003cfile\u003e\n                          write output(nfo/grf) to \u003cfile\u003e\n    -t \u003cfile\u003e, --custom-tags=\u003cfile\u003e\n                          Load custom tags from \u003cfile\u003e [default:\n                          custom_tags.txt]\n    -l \u003cdir\u003e, --lang-dir=\u003cdir\u003e\n                          Load language files from directory \u003cdir\u003e [default:\n                          lang]\n    --default-lang=\u003cfile\u003e\n                          The default language is stored in \u003cfile\u003e [default:\n                          english.lng]\n    --start-sprite=\u003cnum\u003e  Set the first sprite number to write (do not use\n                          except when you output nfo that you want to include in\n                          other files)\n    -p \u003cpalette\u003e, --palette=\u003cpalette\u003e\n                          Force nml to use the palette \u003cpal\u003e [default: ANY].\n                          Valid values are 'DOS', 'WIN', 'ANY'\n    --quiet               Disable all warnings. Errors will be printed normally.\n    -n, --no-cache        Disable caching of sprites in .cache[index] files,\n                          which may reduce compilation time.\n    --cache-dir=\u003cdir\u003e     Cache files are stored in directory \u003cdir\u003e [default:\n                          .nmlcache]\n    --clear-orphaned      Remove unused/orphaned items from cache files.\n    --verbosity=\u003clevel\u003e   Set the verbosity level for informational output.\n                          [default: 3, max: 4]\n```\n\n## 5) Reporting bugs and contributing\n\n### 5.1) Reporting bugs\n\nIf you find any bugs with NML, please let us know via the [GitHub issue tracker](https://github.com/OpenTTD/nml/issues).\nPlease make sure that you're using the latest available version before reporting a bug. You can check the [issue tracker](https://github.com/OpenTTD/nml/issues) to see if the bug you've found is already reported (or fixed!).\n\nIf you have bug fixes or other patches for NML, please also share those with us via the [GitHub pull request page](https://github.com/OpenTTD/nml/pulls).\n\n### 5.2) Making an NML release\n\n1. Check that all relevant PRs are approved and merged.\n2. Decide what the version number will be.\n3. Update the changelog.\nThis is done manually, and commits are grouped by type.\nThe audience is NewGRF authors and downstream package maintainers, so don't list commits that don't affect those audiences.\nFor large releases and/or if there are deprecations or nml syntax changes, provide more detailed release notes.\nExample: https://github.com/OpenTTD/nml/blob/master/docs/changelog.txt\n4. Publish a new release using the release tool in the GitHub project: https://github.com/OpenTTD/nml/releases/new\n5. GitHub Actions will build the release, publish to PyPI (the Python package index) and also to the GitHub release.\n6. GitHub Actions will publish the Windows binary to the GitHub release.\n7. (Optional) announce the release in places such as https://www.tt-forums.net/viewforum.php?f=68\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenttd%2Fnml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenttd%2Fnml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenttd%2Fnml/lists"}