bcrg


Namebcrg JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryBallistics reticle generator
upload_time2024-06-03 09:40:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords ballistics reticles lua luascript python python3
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BCRG - Ballistic reticle generator
### Simple tool to generate dynamic ballistics reticles by .lua templates

## Installation
```bash
pip install bcrg
```

## Usage

### As CLI tool
```bash
python -m bcrg 
usage: bcr [-h] [-o OUTPUT] [-W <int>] [-H <int>] [-cx <float>] [-cy <float>] [-z [<int> ...]] [-Z] file

positional arguments:
  file                  Reticle template file in .lua format

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output directory path, defaults to ./
  -W <int>, --width <int>
                        Canvas width (px)
  -H <int>, --height <int>
                        Canvas height (px)
  -cx <float>, --click-x <float>
                        Horizontal click size (cm/100m)
  -cy <float>, --click-y <float>
                        Vertical click size (cm/100m)
  -z [<int> ...], --zoom [<int> ...]
                        Zoom value (int)
  -Z, --zip             Store as .zip

```

### As Imported module
```python
from bcrg import LuaReticleLoader
loader = LuaReticleLoader('my_reticle_template.lua')

# Create 1bit-depth .bmp bytearray
byte_stream = loader.make_bmp(640, 480, 2.27, 2.27, 4, None)
with open("myreticle.bmp", 'b') as f:
    f.write(byte_stream)
```

[//]: # (# Create direct bytearray from lua framebuffer )

[//]: # (byte_stream = loader.make_buf&#40;640, 480, 2.27, 2.27, 4, None&#41;)

### References
* A reticle template have to implement `make_reticle` function, that gets required arguments and have to return `self:to_bmp` or `self:to_bmp_1bit`
* Examples in ./templates dir



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bcrg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "ballistics, reticles, lua, luascript, python, python3",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/93/df/205e1a5ef7ad821a8e43609fe548687d9012024113471e19e875be60c623/bcrg-1.0.0.tar.gz",
    "platform": null,
    "description": "# BCRG - Ballistic reticle generator\n### Simple tool to generate dynamic ballistics reticles by .lua templates\n\n## Installation\n```bash\npip install bcrg\n```\n\n## Usage\n\n### As CLI tool\n```bash\npython -m bcrg \nusage: bcr [-h] [-o OUTPUT] [-W <int>] [-H <int>] [-cx <float>] [-cy <float>] [-z [<int> ...]] [-Z] file\n\npositional arguments:\n  file                  Reticle template file in .lua format\n\noptions:\n  -h, --help            show this help message and exit\n  -o OUTPUT, --output OUTPUT\n                        Output directory path, defaults to ./\n  -W <int>, --width <int>\n                        Canvas width (px)\n  -H <int>, --height <int>\n                        Canvas height (px)\n  -cx <float>, --click-x <float>\n                        Horizontal click size (cm/100m)\n  -cy <float>, --click-y <float>\n                        Vertical click size (cm/100m)\n  -z [<int> ...], --zoom [<int> ...]\n                        Zoom value (int)\n  -Z, --zip             Store as .zip\n\n```\n\n### As Imported module\n```python\nfrom bcrg import LuaReticleLoader\nloader = LuaReticleLoader('my_reticle_template.lua')\n\n# Create 1bit-depth .bmp bytearray\nbyte_stream = loader.make_bmp(640, 480, 2.27, 2.27, 4, None)\nwith open(\"myreticle.bmp\", 'b') as f:\n    f.write(byte_stream)\n```\n\n[//]: # (# Create direct bytearray from lua framebuffer )\n\n[//]: # (byte_stream = loader.make_buf&#40;640, 480, 2.27, 2.27, 4, None&#41;)\n\n### References\n* A reticle template have to implement `make_reticle` function, that gets required arguments and have to return `self:to_bmp` or `self:to_bmp_1bit`\n* Examples in ./templates dir\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Ballistics reticle generator",
    "version": "1.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/o-murphy/bcrg/issues",
        "Homepage": "https://github.com/o-murphy/bcrg",
        "Source": "https://github.com/o-murphy/bcrg"
    },
    "split_keywords": [
        "ballistics",
        " reticles",
        " lua",
        " luascript",
        " python",
        " python3"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea4b8248e62855f55367a7302f168c88f473abdb392e6309ce1aa0f8aa5b742f",
                "md5": "e37efc73c65ca0d65015aa77a8f9a326",
                "sha256": "fd141f7b350b97451155d0c30ee783d1dbfdf06cde9187f6c756346048517dfb"
            },
            "downloads": -1,
            "filename": "bcrg-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e37efc73c65ca0d65015aa77a8f9a326",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 15580,
            "upload_time": "2024-06-03T09:40:31",
            "upload_time_iso_8601": "2024-06-03T09:40:31.499956Z",
            "url": "https://files.pythonhosted.org/packages/ea/4b/8248e62855f55367a7302f168c88f473abdb392e6309ce1aa0f8aa5b742f/bcrg-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93df205e1a5ef7ad821a8e43609fe548687d9012024113471e19e875be60c623",
                "md5": "8102a2020f1c2b048fcf2887dd2bdb7b",
                "sha256": "0d39582da4a98c50207013ca6be8b18244548c4d5ac99fed4ac2092cd4e89efa"
            },
            "downloads": -1,
            "filename": "bcrg-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8102a2020f1c2b048fcf2887dd2bdb7b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 14876,
            "upload_time": "2024-06-03T09:40:33",
            "upload_time_iso_8601": "2024-06-03T09:40:33.413434Z",
            "url": "https://files.pythonhosted.org/packages/93/df/205e1a5ef7ad821a8e43609fe548687d9012024113471e19e875be60c623/bcrg-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-03 09:40:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "o-murphy",
    "github_project": "bcrg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bcrg"
}
        
Elapsed time: 0.74793s