Metadata-Version: 2.1
Name: staticwordpress
Version: 0.0.3
Summary: Python Package for Converting WordPress Installation to a Static Website
Home-page: https://github.com/serpwings/static-wordpress
Download-URL: https://github.com/serpwings/static-wordpress/releases/v0.0.3.tar.gz
Author: Faisal Shahzad
Author-email: info@serpwings.com
License: GPLv3+
Keywords: wordpress,static-site-generators,search-engines,seo
Classifier: Development Status :: 1 - Planning
Classifier: Environment :: Console
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: System
Classifier: Topic :: System :: Archiving
Classifier: Topic :: System :: Archiving :: Backup
Classifier: Topic :: System :: Archiving :: Mirroring
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: pyyaml
Requires-Dist: requests
Requires-Dist: beautifulsoup4
Requires-Dist: lxml
Requires-Dist: GitPython
Requires-Dist: PyGithub
Requires-Dist: PyYAML
Provides-Extra: all
Requires-Dist: mkdocs-gen-files ; extra == 'all'
Requires-Dist: pyqt5 ; extra == 'all'
Requires-Dist: wheel ; extra == 'all'
Requires-Dist: mkdocstrings[python] ; extra == 'all'
Requires-Dist: setuptools ; extra == 'all'
Requires-Dist: python-language-server[all] ; extra == 'all'
Requires-Dist: pytest ; extra == 'all'
Requires-Dist: twine ; extra == 'all'
Requires-Dist: black ; extra == 'all'
Requires-Dist: mkdocs ; extra == 'all'
Requires-Dist: pytest-cov ; extra == 'all'
Requires-Dist: pymdown-extensions ; extra == 'all'
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: python-language-server[all] ; extra == 'dev'
Requires-Dist: setuptools ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: mkdocs ; extra == 'dev'
Requires-Dist: mkdocs-gen-files ; extra == 'dev'
Requires-Dist: mkdocstrings[python] ; extra == 'dev'
Requires-Dist: pymdown-extensions ; extra == 'dev'
Provides-Extra: gui
Requires-Dist: pyqt5 ; extra == 'gui'

# static-wordpress

Python Package for Converting WordPress Installation to a Static Website.


## How to Install static-wordpress?

### Windows Installer

We provide an ``exe`` file of ``staticwordpress`` for the convenice of users. Please download the latest version from [release section](https://github.com/serpwings/static-wordpress/releases).


### Source Code

- Clone or download this repository to your computer.
- Create a virtual environment using ``python -m .venv venv``
- Navigate to the downloaded directory and then install all required dependencies using ``pip install -e .``
- Once all dependencies are met, then start **staticwordpress** by typing ``staticwordpress`` on commandline.

## Development

This package is available at ``pypi`` and you can install it with ``pip install staticwordpress`` command. It will also install required additional libraries/Python Packages automatically.

Once installed, you can implement customized workflows. Here is an example of post processing simply-static-zip file. 

```python
from staticwordpress.core.workflow import Workflow
from staticwordpress.core.constants import SOURCE, HOST

swp = Workflow()
swp.create_project(
        project_name_="simply-static-zip-deploy",
        wp_user_=env_wp_user, # your wordpress username
        wp_api_token_=env_wp_api_token, # wordpress xml api token
        src_url_=env_src_url, # source url where WordPress is hosted
        dst_url_=env_dst_url, # destination url where you want to host Static version
        output_folder_=env_output, # Output folder location, where processed files will be saved
        src_type_=SOURCE.ZIP, # Data Source e.g. ZIP file from Simply Static WordPress Plugin
        host_type_=HOST.NETLIFY, # Host, where you want to deplyo your website.
    )

swp.download_zip_file()
swp.setup_zip_folders()
swp.add_404_page()
swp.add_robots_txt()
swp.add_redirects()
swp.add_search()
```

## Documentation

Detailed documentation of all features is available at [staticwordpress documentation](https://static-wordpress-docs.netlify.app/).

## Contribute

Pull Requests, Feature Suggestions, and collaborations are welcome.

## ICONS

Icons used in this project are obtained from Google [Fonts Material Symbols](https://fonts.google.com/icons?selected=Material+Symbols+Outlined:search:FILL@0;wght@400;GRAD@0;opsz@24) 

## About Us

This work is a collaborative effort of [seowings](https://www.seowings.org/), and [serpwings](https://serpwings.com/).
