Takes Ghost blog subscriptions and pushes them to a Castopod server.
This leverages a database connection - Ghost recommends mysql as its supported database type, but it can technically work with any compliant driver that implements Go's database/sql
interfaces.
This is compatible with Ghost v5.87.1 and Castopod v1.12.3. Compatibility with any other version is not guaranteed.
See examples/simple/README.md
.
First and foremost, you must manage the Redis cache separately from this application. Castopod stores data in Redis (if available) and updates to the database will not be reflected. One easy way to manage this is to purge the Redis cache whenever this application runs:
export REDIS_PASSWORD=your_password_goes_here
redis-cli FLUSHALL
If you're running it in a container, do the following immediately after using this library:
podman exec -it castopod-redis redis-cli -a your_password_goes_here FLUSHALL
Additionally, Please verify the output of this application before using it. Stability is never guaranteed. Make backups.
In order to keep dependencies to zero (see go.mod
- it only uses the standard library), this Go module is structured as a library that can be imported by any application.
This has the benefit of not requiring any specific SQL driver - it accepts SQL rows themselves from the database/sql
package. You can use any compliant driver, such as sqlite or postgres - although I haven't tried anything aside from mysql, so tread carefully.
The ghosttocastopod
package is the primary library for this module. Its unit test coverage is currently at 82.5%
and at this time, I do not intend to get it higher. The core business logic is well-tested; everything else remaining is not worth unit testing.
Here is a list of all tested Ghost versions that are known to work:
- v5.87.1
Here is a list of all tested Castopod versions that are known to work:
- v1.12.3
If any database migrations that modify the tables used by this library occur upstream, this application will likely break.