Name | ya-tagscript JSON |
Version |
1.4.2
JSON |
| download |
home_page | None |
Summary | Yet Another TagScript fork. An easy drop in user-provided Templating system. |
upload_time | 2025-07-18 00:58:54 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | None |
keywords |
tagscript
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ya_tagscript - Yet Another TagScript fork
Current stable version: v1.4.2
## Information
This is a fork of PhenoM4n4n's [TagScript](https://github.com/phenom4n4n/TagScript),
which itself is a fork of JonSnowbd's
[TagScript](https://github.com/JonSnowbd/TagScript), a string templating language.
The main purpose of this fork is to align the Discord-specific blocks with the most
recent Discord and discord.py changes (new username system, etc.).
## What?
TagScript is a drop-in, easy-to-use string interpreter that lets you provide users with
ways of customizing their profiles or chat rooms with interactive text.
For example TagScript comes out of the box with a random block that would let users
provide a template that produces a new result each time its ran, or assign math and
variables for later use.
## Changes in v1
The newly released v1 includes a complete rewrite of the entire parsing and
interpretation performed by the TagScriptInterpreter class. This comes with some subtle
behavioural changes but great care was taken to keep v1 behaviourally similar to v0 and
PhenoM4n4n's fork. Most simple uses *should* behave the same but especially deeply
nested scripts or dynamically assembled ones will most likely require adjustments.
Some documentation examples were also outright wrong, so those were also adjusted to
reflect the actual behaviour of the pre-existing interpreter.
### Oh, no! Behaviour changes?!
To remove the need for dynamically assembled blocks (e.g. command blocks that only
happen under some circumstances), v1 only performs interpretation of branches that were
actually hit (to the best of its ability).
Take this (very bad) password check script:
```tagscript
{if({args}==123):{command:echo password accepted!}|something else}
```
If `{args}` is not in fact equal to `123`, the interpreter WILL NOT interpret the
command block AT ALL. It jumps straight to the `else` section after the `|` and only
interprets that. This means that for any incorrect values of `{args}`, the `echo`
command is NOT included in the list of commands in `response.actions.get("commands")`.
Other blocks with some conditional executions (like `all` or `any`) do the same.
## Installation
Download the latest version through pip:
```
pip install ya_tagscript
```
or
<!--VERSIONED TAG SECTION START-->
```
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.4.2
```
<!--VERSIONED TAG SECTION END-->
Download from a commit:
```
pip install git+https://github.com/MajorTanya/ya_tagscript.git@<COMMIT_HASH>
```
Install for editing/development:
```
git clone https://github.com/MajorTanya/ya_tagscript.git
pip install -e ./ya_tagscript
```
## Dependencies
- `Python>=3.11`
- before v1.4.0, this was effectively `>=3.12` due to an oversight in testing
- after v1.4.0, Python 3.11 is _actually_ supported
- `discord.py>=2.5.0`
- `pyparsing>=3.2.0`
- `python-dateutil>=2.9.0`
Raw data
{
"_id": null,
"home_page": null,
"name": "ya-tagscript",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "tagscript",
"author": null,
"author_email": "MajorTanya <tanya@majortanya.eu>",
"download_url": "https://files.pythonhosted.org/packages/10/c9/bf1a9850433bc862528cc574d33b1f39433133a60992cc58ce45142a331d/ya_tagscript-1.4.2.tar.gz",
"platform": null,
"description": "# ya_tagscript - Yet Another TagScript fork\n\nCurrent stable version: v1.4.2\n\n## Information\n\nThis is a fork of PhenoM4n4n's [TagScript](https://github.com/phenom4n4n/TagScript),\nwhich itself is a fork of JonSnowbd's\n[TagScript](https://github.com/JonSnowbd/TagScript), a string templating language.\n\nThe main purpose of this fork is to align the Discord-specific blocks with the most\nrecent Discord and discord.py changes (new username system, etc.).\n\n## What?\n\nTagScript is a drop-in, easy-to-use string interpreter that lets you provide users with\nways of customizing their profiles or chat rooms with interactive text.\n\nFor example TagScript comes out of the box with a random block that would let users\nprovide a template that produces a new result each time its ran, or assign math and\nvariables for later use.\n\n## Changes in v1\n\nThe newly released v1 includes a complete rewrite of the entire parsing and\ninterpretation performed by the TagScriptInterpreter class. This comes with some subtle\nbehavioural changes but great care was taken to keep v1 behaviourally similar to v0 and\nPhenoM4n4n's fork. Most simple uses *should* behave the same but especially deeply\nnested scripts or dynamically assembled ones will most likely require adjustments.\nSome documentation examples were also outright wrong, so those were also adjusted to\nreflect the actual behaviour of the pre-existing interpreter.\n\n### Oh, no! Behaviour changes?!\n\nTo remove the need for dynamically assembled blocks (e.g. command blocks that only\nhappen under some circumstances), v1 only performs interpretation of branches that were\nactually hit (to the best of its ability).\n\nTake this (very bad) password check script:\n\n```tagscript\n{if({args}==123):{command:echo password accepted!}|something else}\n```\n\nIf `{args}` is not in fact equal to `123`, the interpreter WILL NOT interpret the\ncommand block AT ALL. It jumps straight to the `else` section after the `|` and only\ninterprets that. This means that for any incorrect values of `{args}`, the `echo`\ncommand is NOT included in the list of commands in `response.actions.get(\"commands\")`.\n\nOther blocks with some conditional executions (like `all` or `any`) do the same.\n\n## Installation\n\nDownload the latest version through pip:\n\n```\npip install ya_tagscript\n```\n\nor\n\n<!--VERSIONED TAG SECTION START-->\n\n```\npip install git+https://github.com/MajorTanya/ya_tagscript.git@v1.4.2\n```\n\n<!--VERSIONED TAG SECTION END-->\n\nDownload from a commit:\n\n```\npip install git+https://github.com/MajorTanya/ya_tagscript.git@<COMMIT_HASH>\n```\n\nInstall for editing/development:\n\n```\ngit clone https://github.com/MajorTanya/ya_tagscript.git\npip install -e ./ya_tagscript\n```\n\n## Dependencies\n\n- `Python>=3.11`\n - before v1.4.0, this was effectively `>=3.12` due to an oversight in testing\n - after v1.4.0, Python 3.11 is _actually_ supported\n- `discord.py>=2.5.0`\n- `pyparsing>=3.2.0`\n- `python-dateutil>=2.9.0`\n",
"bugtrack_url": null,
"license": null,
"summary": "Yet Another TagScript fork. An easy drop in user-provided Templating system.",
"version": "1.4.2",
"project_urls": {
"GitHub": "https://github.com/MajorTanya/ya_tagscript",
"Issues": "https://github.com/MajorTanya/ya_tagscript/issues"
},
"split_keywords": [
"tagscript"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "eb9978dda5d76351aa4a301304d11287111dbba7d4d21d3525336a1bbd59524c",
"md5": "0b8ab656d1782e62708b30b03bd8c54c",
"sha256": "d947f6b3c1cf54fea7ab92d8dd90fb87856ac0ec0a41814007a4c62655759e6f"
},
"downloads": -1,
"filename": "ya_tagscript-1.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0b8ab656d1782e62708b30b03bd8c54c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 85243,
"upload_time": "2025-07-18T00:58:53",
"upload_time_iso_8601": "2025-07-18T00:58:53.256516Z",
"url": "https://files.pythonhosted.org/packages/eb/99/78dda5d76351aa4a301304d11287111dbba7d4d21d3525336a1bbd59524c/ya_tagscript-1.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "10c9bf1a9850433bc862528cc574d33b1f39433133a60992cc58ce45142a331d",
"md5": "17c4b02ea57ec48e741776423711a57f",
"sha256": "054b8774fbb1cfbbfc70940cdab716e005991d7cf95853734c370ba4a655b503"
},
"downloads": -1,
"filename": "ya_tagscript-1.4.2.tar.gz",
"has_sig": false,
"md5_digest": "17c4b02ea57ec48e741776423711a57f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 198160,
"upload_time": "2025-07-18T00:58:54",
"upload_time_iso_8601": "2025-07-18T00:58:54.395272Z",
"url": "https://files.pythonhosted.org/packages/10/c9/bf1a9850433bc862528cc574d33b1f39433133a60992cc58ce45142a331d/ya_tagscript-1.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 00:58:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MajorTanya",
"github_project": "ya_tagscript",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ya-tagscript"
}