Python Library for Static WordPress (Autmated Crawling, Post-Processing and Hosting)
Find a file
2023-10-06 23:20:47 +02:00
.github/workflows Included tests/CI 2023-09-25 23:19:33 +02:00
docs fixed typos in readme files 2023-09-24 03:11:27 +02:00
src/staticwordpress fix for redirection plugin error #39 2023-10-06 23:19:27 +02:00
tests FIX Repo URL 2023-09-24 23:25:31 +02:00
.gitignore converted to python package with GUI 2023-09-24 01:30:40 +02:00
LICENSE converted to python package with GUI 2023-09-24 01:30:40 +02:00
MANIFEST.in converted to python package with GUI 2023-09-24 01:30:40 +02:00
mkdocs.yml FIX Repo URL 2023-09-24 23:25:31 +02:00
netlify.toml converted to python package with GUI 2023-09-24 01:30:40 +02:00
pyproject.toml converted to python package with GUI 2023-09-24 01:30:40 +02:00
README.md updated status badges 2023-09-25 23:36:46 +02:00
requirements.txt converted to python package with GUI 2023-09-24 01:30:40 +02:00
runtime.txt intial commit 2023-03-05 18:59:16 +01:00
setup.cfg converted to python package with GUI 2023-09-24 01:30:40 +02:00
setup.py FIX Repo URL 2023-09-24 23:25:31 +02:00
ss_script.py Disabled redirects #39 2023-10-06 22:35:22 +02:00

static-wordpress

Python Package for Converting WordPress Installation to a Static Website.

build_Tests license status pypi_version supported_python_versions

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.

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.

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.

Contribute

Pull Requests, Feature Suggestions, and collaborations are welcome.

ICONS

Icons used in this project are obtained from Google Fonts Material Symbols

About Us

This work is a collaborative effort of seowings, and serpwings.