dashtable-ext


Namedashtable-ext JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryExtension for doakey3/DashTable
upload_time2023-05-17 03:55:03
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License Copyright (c) 2023 Abdullah Al Muaz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords table extension dashtable
VCS
bugtrack_url
requirements dashtable
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dashtable-ext

Shitty Extension to doakey3/DashTable

## Installation

```zsh
$ pip install -U dashtable-ext
```

### RST 2 ASCII:

```rst
+-----------+-----------+-----------------------+
| Heading 1 | Heading 2 | Heading 3             |
|           +-----------+-----------+-----------+
|           | Heading 4 | Heading 5 | Heading 6 |
+===========+-----------+-----------+-----------+
| A         | B         | C                     |
|           +-----------+                       |
|           | D         |                       |
|           +-----------+-----------+-----------+
|           | E         | F         | G         |
+-----------+-----------+-----------+-----------+
| H                     | I         | J         |
+-----------------------+-----------+           |
| K                     | L         |           |
|                       +-----------+-----------+
|                       | M         | N         |
+-----------------------+-----------+-----------+
```

```py
from dashtable.ext import rst2ascii, PresetStyle
import dashtable

with open("table.html", "r") as f:
    html = f.read()

table = dashtable.html2rst(html)
print(rst2ascii(table = table, preset=PresetStyle.thin_thick_rounded))
```

Output:

```bash
╭───────────┬───────────┬───────────────────────╮
│ Heading 1 │ Heading 2 │ Heading 3             │
│           ├───────────┼───────────┬───────────┤
│           │ Heading 4 │ Heading 5 │ Heading 6 │
├━━━━━━━━━━━┼───────────┼───────────┴───────────┤
│ A         │ B         │ C                     │
│           ├───────────┤                       │
│           │ D         │                       │
│           ├───────────┼───────────┬───────────┤
│           │ E         │ F         │ G         │
├───────────┴───────────┼───────────┼───────────┤
│ H                     │ I         │ J         │
├───────────────────────┼───────────┤           │
│ K                     │ L         │           │
│                       ├───────────┼───────────┤
│                       │ M         │ N         │
╰───────────────────────┴───────────┴───────────╯
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dashtable-ext",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "table,extension,dashtable",
    "author": "",
    "author_email": "Abdullah Al Muaz <abdullahalmuaz15@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/b8/13dedb372e651d7f660013e9c6122cc59536754df4d15ba822899827c42f/dashtable-ext-1.0.0.tar.gz",
    "platform": null,
    "description": "# dashtable-ext\n\nShitty Extension to doakey3/DashTable\n\n## Installation\n\n```zsh\n$ pip install -U dashtable-ext\n```\n\n### RST 2 ASCII:\n\n```rst\n+-----------+-----------+-----------------------+\n| Heading 1 | Heading 2 | Heading 3             |\n|           +-----------+-----------+-----------+\n|           | Heading 4 | Heading 5 | Heading 6 |\n+===========+-----------+-----------+-----------+\n| A         | B         | C                     |\n|           +-----------+                       |\n|           | D         |                       |\n|           +-----------+-----------+-----------+\n|           | E         | F         | G         |\n+-----------+-----------+-----------+-----------+\n| H                     | I         | J         |\n+-----------------------+-----------+           |\n| K                     | L         |           |\n|                       +-----------+-----------+\n|                       | M         | N         |\n+-----------------------+-----------+-----------+\n```\n\n```py\nfrom dashtable.ext import rst2ascii, PresetStyle\nimport dashtable\n\nwith open(\"table.html\", \"r\") as f:\n    html = f.read()\n\ntable = dashtable.html2rst(html)\nprint(rst2ascii(table = table, preset=PresetStyle.thin_thick_rounded))\n```\n\nOutput:\n\n```bash\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Heading 1 \u2502 Heading 2 \u2502 Heading 3             \u2502\n\u2502           \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502           \u2502 Heading 4 \u2502 Heading 5 \u2502 Heading 6 \u2502\n\u251c\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 A         \u2502 B         \u2502 C                     \u2502\n\u2502           \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524                       \u2502\n\u2502           \u2502 D         \u2502                       \u2502\n\u2502           \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502           \u2502 E         \u2502 F         \u2502 G         \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 H                     \u2502 I         \u2502 J         \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524           \u2502\n\u2502 K                     \u2502 L         \u2502           \u2502\n\u2502                       \u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502                       \u2502 M         \u2502 N         \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Abdullah Al Muaz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Extension for doakey3/DashTable",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/aurkaxi/dashtable-ext"
    },
    "split_keywords": [
        "table",
        "extension",
        "dashtable"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fd5ccf1859b6cbb36c791e0f5ad563429cefbab77ec12e7bea8f374032d738a",
                "md5": "5e25c6bb63df76c9b7da349657416d07",
                "sha256": "49cb567ec3ef3fcb5911d89504adfe587d27647df486ff180c27a72ca8b46a29"
            },
            "downloads": -1,
            "filename": "dashtable_ext-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e25c6bb63df76c9b7da349657416d07",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5228,
            "upload_time": "2023-05-17T03:55:00",
            "upload_time_iso_8601": "2023-05-17T03:55:00.552175Z",
            "url": "https://files.pythonhosted.org/packages/2f/d5/ccf1859b6cbb36c791e0f5ad563429cefbab77ec12e7bea8f374032d738a/dashtable_ext-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6b813dedb372e651d7f660013e9c6122cc59536754df4d15ba822899827c42f",
                "md5": "a54b96eaa315f66c958709aa8928a122",
                "sha256": "d8f70854cacc33377b498bbc4dcca1244edee289f4d923a45b5ad3c2ceceafd2"
            },
            "downloads": -1,
            "filename": "dashtable-ext-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a54b96eaa315f66c958709aa8928a122",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5139,
            "upload_time": "2023-05-17T03:55:03",
            "upload_time_iso_8601": "2023-05-17T03:55:03.554935Z",
            "url": "https://files.pythonhosted.org/packages/b6/b8/13dedb372e651d7f660013e9c6122cc59536754df4d15ba822899827c42f/dashtable-ext-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-17 03:55:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aurkaxi",
    "github_project": "dashtable-ext",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "dashtable",
            "specs": []
        }
    ],
    "lcname": "dashtable-ext"
}
        
Elapsed time: 0.06435s