Integration Flarum -> Ghost API (Python script)

Hey Community,

I wanted to share an exciting integration script that automates the process of posting Ghost blog articles to Flarum forum. This integration allows for seamless content sharing and updates between the two platforms, enhancing our community experience.

Key Features:

  • Automated Updates: The script automatically fetches new posts from the Ghost blog and creates corresponding topics on the Flarum forum.
  • Tag Support: Posts on Flarum are tagged with relevant identifiers for easy categorization and searchability.
  • Discord Notifications: Receive real-time notifications on Discord for successful updates or any encountered errors.

How It Works:

  1. The script retrieves posts from the Ghost API.
  2. For each new post, it creates a formatted topic on the Flarum forum.
  3. Discord notifications are sent to keep everyone informed about the integration status.

Get Involved:

  • Try It Out: You can find the script GitHub.
  • Provide Feedback: Share your thoughts, suggestions, or report any issues you encounter.
  • Contribute: If you’re a Python enthusiast, feel free to contribute to the script’s development.

Installation Guide:

  1. Obtain API keys for Ghost and Flarum.
  2. Replace placeholder values in the script with your API keys and webhook URL.
  3. Customize the Flarum tags and other settings according to your forum structure.
  4. Run the script periodically using a scheduler like Cron.

Let’s make our community even more connected and efficient with this Ghost to Flarum integration! If you have any questions, ideas, or feedback, feel free to jump into the discussion below.

Happy integrating!

1 Like

UPDATE

Add configuration checks for Ghost and Flarum APIs

Enhance the script by adding configuration checks to ensure the validity of the Ghost and Flarum API configurations. The changes include:

  1. Added a new function check_ghost_config to verify the Ghost API configuration before attempting to fetch posts.
  2. Modified the get_ghost_posts function to include the check_ghost_config call.
  3. Added a new function check_flarum_config to verify the Flarum API configuration before attempting to create a new post.
  4. Modified the create_flarum_post function to include the check_flarum_config call.

Now, the script will raise exceptions with appropriate error messages if the API configurations are incorrect, preventing further execution in such cases.

1 Like

UPDATE

  • Added information about necessary python packages that need to be installed using pip.
  • Added examples dir - feature image and content

If someone need more examples for use, feel free to comment or open an issue on GitHub - AnimaVillis/ghostflarumintegration