https://github.com/hackersandslackers/ghost-sql-sanitation
:ghost: 🖲 Sanitize Ghost Blog SQL data on a schedule to ensure content quality.
https://github.com/hackersandslackers/ghost-sql-sanitation
blog-maintenance mysql pymysql python3 sql sql-queries
Last synced: 4 months ago
JSON representation
:ghost: 🖲 Sanitize Ghost Blog SQL data on a schedule to ensure content quality.
- Host: GitHub
- URL: https://github.com/hackersandslackers/ghost-sql-sanitation
- Owner: hackersandslackers
- Created: 2019-07-16T18:57:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-09-22T16:48:35.000Z (8 months ago)
- Last Synced: 2025-09-22T18:47:41.969Z (8 months ago)
- Topics: blog-maintenance, mysql, pymysql, python3, sql, sql-queries
- Language: Python
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ghost Blog Data Sanitizer






[](https://github.com/hackersandslackers/ghost-sql-sanitation/issues)
[](https://github.com/hackersandslackers/ghost-sql-sanitation/stargazers)
[](https://github.com/hackersandslackers/ghost-sql-sanitation/network)
Ensure the quality of your blog posts by generating missing meta data, enforcing consistency, and never letting fields go unpopulated. **Ghost Blog Data Sanitizer** is an automated job to protect authors from publishing posts with subpar or missing fields which are critical to SEO.
## Getting Started
Installation is recommended with Pipenv:
```shell
$ git clone https://github.com/hackersandslackers/ghost-sql-sanitation.git
$ cd ghost-sql-sanitation
$ pipenv shell
$ pipenv update
$ python3 main.py
```
Installation via [Poetry](https://python-poetry.org/):
```shell
$ git clone https://github.com/hackersandslackers/bigquery-python-tutorial.git
$ cd ghost-sql-sanitation
$ poetry install
$ poetry run
```
Alternatively, try installing via `setup.py`:
```shell
$ git clone https://github.com/hackersandslackers/ghost-sql-sanitation.git
$ cd ghost-sql-sanitation
$ python3 setup.py run
```
The following environment variables are required to run this script:
* `DATABASE_USERNAME`: User with access to your Ghost blog's database.
* `DATABASE_PASSWORD`: Password for the above user.
* `DATABASE_HOST`: The host name where your database lives (either a managed DB, or publicly accessible local DB)
* `DATABASE_NAME`: The name of the database/schema where your Ghost tables live.
* `DATABASE_PORT`: The port.
* `DATABASE_CERT` _(optional)_: Path to SSL certificate for protected databases.
* `DATABASE_PEM` _(optional)_: See above.
* `DATABASE_KEY` _(optional)_: See above.
* `SQL_FOLDER`: The local folder (in this repo) where your SQL files live.
-----
**Hackers and Slackers** tutorials are free of charge. If you found this tutorial helpful, a [small donation](https://www.buymeacoffee.com/hackersslackers) would be greatly appreciated to keep us in business. All proceeds go towards coffee, and all coffee goes towards more content.