webpage2md


Namewebpage2md JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryConvert HTML files and web pages to Markdown format
upload_time2025-02-19 14:01:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2024 Neal Caren 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 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 converter html html-to-markdown markdown scraping web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # webpage2md

A command-line tool to convert HTML files and web pages to Markdown format.

## Features

- Convert local HTML files to Markdown
- Convert web pages to Markdown
- Support for multiple input files
- Custom output directory and filename options
- Automatic installation of required dependencies
- Uses Playwright for reliable web scraping
- Uses Pandoc for high-quality HTML to Markdown conversion

## Installation

```bash
pip install webpage2md
```

## Usage

### As a Python Package

```python
from webpage2md import convert_html, convert_url

# Convert HTML string to markdown
html = '<h1>Hello World</h1>'
markdown = convert_html(html)

# Convert webpage to markdown
markdown = convert_url('https://example.com')
```

### Command Line Usage

Basic usage:
```bash
webpage2md example.html                  # Convert local file
webpage2md https://example.com          # Convert web page
webpage2md file1.html file2.html        # Convert multiple files
```

Options:
```bash
webpage2md -o output_dir/ file.html     # Specify output directory
webpage2md -n custom_name.md file.html  # Specify output filename
webpage2md --stdout file.html           # Print to stdout
webpage2md -q file.html                 # Quiet mode
webpage2md -v file.html                 # Verbose mode
```

For help:
```bash
webpage2md --help
```

## Requirements

- Python 3.7+
- Playwright (automatically installed)
- Pandoc (automatically installed)

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "webpage2md",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "converter, html, html-to-markdown, markdown, scraping, web",
    "author": null,
    "author_email": "Neal Caren <neal.caren@unc.edu>",
    "download_url": "https://files.pythonhosted.org/packages/5d/33/6f0fa69b6a8715dbb3fbbc2aa5edf84796b2390a0e45d7790947a4000a76/webpage2md-1.0.0.tar.gz",
    "platform": null,
    "description": "# webpage2md\n\nA command-line tool to convert HTML files and web pages to Markdown format.\n\n## Features\n\n- Convert local HTML files to Markdown\n- Convert web pages to Markdown\n- Support for multiple input files\n- Custom output directory and filename options\n- Automatic installation of required dependencies\n- Uses Playwright for reliable web scraping\n- Uses Pandoc for high-quality HTML to Markdown conversion\n\n## Installation\n\n```bash\npip install webpage2md\n```\n\n## Usage\n\n### As a Python Package\n\n```python\nfrom webpage2md import convert_html, convert_url\n\n# Convert HTML string to markdown\nhtml = '<h1>Hello World</h1>'\nmarkdown = convert_html(html)\n\n# Convert webpage to markdown\nmarkdown = convert_url('https://example.com')\n```\n\n### Command Line Usage\n\nBasic usage:\n```bash\nwebpage2md example.html                  # Convert local file\nwebpage2md https://example.com          # Convert web page\nwebpage2md file1.html file2.html        # Convert multiple files\n```\n\nOptions:\n```bash\nwebpage2md -o output_dir/ file.html     # Specify output directory\nwebpage2md -n custom_name.md file.html  # Specify output filename\nwebpage2md --stdout file.html           # Print to stdout\nwebpage2md -q file.html                 # Quiet mode\nwebpage2md -v file.html                 # Verbose mode\n```\n\nFor help:\n```bash\nwebpage2md --help\n```\n\n## Requirements\n\n- Python 3.7+\n- Playwright (automatically installed)\n- Pandoc (automatically installed)\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2024 Neal Caren\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Convert HTML files and web pages to Markdown format",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/nealcaren/webpage2md"
    },
    "split_keywords": [
        "converter",
        " html",
        " html-to-markdown",
        " markdown",
        " scraping",
        " web"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "67f71a40b12dbe44622e18780ed748864c32a0647ef61ed1e51ba708ced563ce",
                "md5": "379d52b158b6d50cab891870df040cac",
                "sha256": "138c9297991bb50473e328345043140df8ee2b7247a62c24a705b7e4436c50f2"
            },
            "downloads": -1,
            "filename": "webpage2md-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "379d52b158b6d50cab891870df040cac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7170,
            "upload_time": "2025-02-19T14:01:31",
            "upload_time_iso_8601": "2025-02-19T14:01:31.963929Z",
            "url": "https://files.pythonhosted.org/packages/67/f7/1a40b12dbe44622e18780ed748864c32a0647ef61ed1e51ba708ced563ce/webpage2md-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5d336f0fa69b6a8715dbb3fbbc2aa5edf84796b2390a0e45d7790947a4000a76",
                "md5": "134d1ec91cb36f67fd1ddb45003cd486",
                "sha256": "4870dd9d0fd4305d0b2fe8850752bedb1749104d05df7f52950e3415eac3d280"
            },
            "downloads": -1,
            "filename": "webpage2md-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "134d1ec91cb36f67fd1ddb45003cd486",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11172,
            "upload_time": "2025-02-19T14:01:34",
            "upload_time_iso_8601": "2025-02-19T14:01:34.051544Z",
            "url": "https://files.pythonhosted.org/packages/5d/33/6f0fa69b6a8715dbb3fbbc2aa5edf84796b2390a0e45d7790947a4000a76/webpage2md-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-19 14:01:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nealcaren",
    "github_project": "webpage2md",
    "github_not_found": true,
    "lcname": "webpage2md"
}
        
Elapsed time: 1.43504s