ppt2txt


Nameppt2txt JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryA pure python based utility to extract text from PPT files.
upload_time2023-10-08 15:45:14
maintainer
docs_urlNone
authorMattia Mancassola
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Mattia Mancassola 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 python ppt binary extract parse
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ppt2txt

A pure python based utility to extract text from PPT files.

The code is based on the official documentation for MS-PPT files available at [https://msopenspecs.azureedge.net/files/MS-PPT/%5bMS-PPT%5d.pdf](https://msopenspecs.azureedge.net/files/MS-PPT/%5bMS-PPT%5d.pdf).

## How to install?

```bash
pip install ppt2txt
```

## How to run?

- From command line:
```bash
ppt2txt file.ppt -o output_dir
```

- From python:
```python
import ppt2txt

# extract content
parsed_ppt_dict = ppt2txt.process("file.ppt") 
```

## Output

`parsed_ppt_dict` is a dictionary with the following structure:

```json
{
    "filename": "file.ppt",
    "slides": 4,
    "content": {
        "0": "Text from the first record",
        "1": "Text from the second record"
    }
}
```

where:
- `filename` is the name of the input file
- `slides` is the number of slides
- `content` is a dictionary containing an element for each record of type text found in the document

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ppt2txt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "python,ppt,binary,extract,parse",
    "author": "Mattia Mancassola",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/6d/c2/5a4b032934eb4c5518f269f9b18ef6453e0fe877c8642edda541013089ee/ppt2txt-0.1.0.tar.gz",
    "platform": null,
    "description": "# ppt2txt\n\nA pure python based utility to extract text from PPT files.\n\nThe code is based on the official documentation for MS-PPT files available at [https://msopenspecs.azureedge.net/files/MS-PPT/%5bMS-PPT%5d.pdf](https://msopenspecs.azureedge.net/files/MS-PPT/%5bMS-PPT%5d.pdf).\n\n## How to install?\n\n```bash\npip install ppt2txt\n```\n\n## How to run?\n\n- From command line:\n```bash\nppt2txt file.ppt -o output_dir\n```\n\n- From python:\n```python\nimport ppt2txt\n\n# extract content\nparsed_ppt_dict = ppt2txt.process(\"file.ppt\") \n```\n\n## Output\n\n`parsed_ppt_dict` is a dictionary with the following structure:\n\n```json\n{\n    \"filename\": \"file.ppt\",\n    \"slides\": 4,\n    \"content\": {\n        \"0\": \"Text from the first record\",\n        \"1\": \"Text from the second record\"\n    }\n}\n```\n\nwhere:\n- `filename` is the name of the input file\n- `slides` is the number of slides\n- `content` is a dictionary containing an element for each record of type text found in the document\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Mattia Mancassola  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": "A pure python based utility to extract text from PPT files.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/mett29/ppt2txt"
    },
    "split_keywords": [
        "python",
        "ppt",
        "binary",
        "extract",
        "parse"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "713c9d8e82b6ea753f35c543a615d0dd27521688669d7ea5a7ce6850a25070e0",
                "md5": "2d8d6a11cfbfb78357857237e82e71d3",
                "sha256": "3c5535d9a3af1c048814bffbefef62677dfc5c9e051a1e690db2b011448c9198"
            },
            "downloads": -1,
            "filename": "ppt2txt-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d8d6a11cfbfb78357857237e82e71d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5786,
            "upload_time": "2023-10-08T15:45:12",
            "upload_time_iso_8601": "2023-10-08T15:45:12.702392Z",
            "url": "https://files.pythonhosted.org/packages/71/3c/9d8e82b6ea753f35c543a615d0dd27521688669d7ea5a7ce6850a25070e0/ppt2txt-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6dc25a4b032934eb4c5518f269f9b18ef6453e0fe877c8642edda541013089ee",
                "md5": "ed21311babf234a0a42573c77e506791",
                "sha256": "bc9401f1859475a09657a453577063f396d0157b1d379d755ac6e49fdafd1e8a"
            },
            "downloads": -1,
            "filename": "ppt2txt-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ed21311babf234a0a42573c77e506791",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4766,
            "upload_time": "2023-10-08T15:45:14",
            "upload_time_iso_8601": "2023-10-08T15:45:14.206083Z",
            "url": "https://files.pythonhosted.org/packages/6d/c2/5a4b032934eb4c5518f269f9b18ef6453e0fe877c8642edda541013089ee/ppt2txt-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-08 15:45:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mett29",
    "github_project": "ppt2txt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ppt2txt"
}
        
Elapsed time: 0.47106s