You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
foormea d77ad24d78 README.md edited online with Bitbucket 6 years ago
dock fix 6 years ago
.gitignore new initial commit 6 years ago
README.md README.md edited online with Bitbucket 6 years ago

README.md

WordPress to HFR (forum.hardware.fr) converter

Still plenty of work to do, really ugly in some places

A flask route that does the following:

  • Receive webhooks from WordPress.
  • Convert the WordPress blogpost's HTML into BBcode.
  • Post the resulting BBcode to an HFR topic.

Setup

  • WordPress must be set up to send the hook publish_post with fields post_content, post_name, and post_url to the URL defined by your network setup. Go to https://<your-blog.wordpress.com>/wp-admin > Settings > Webhooks.
  • This is packaged as a Docker container meant to be used together with the Letsencrypt nginx proxy companion or linuxserver.io letsencrypt image. This could easily be adjusted to run on a GCP Cloud Function or similar. WordPress doesn't require https so this could also easily run as a standalone service at home without much setup.
  • Look through source files for extra info.

What works, what doesn't

  • Simple HTML tags should all work (note: this is HFR-centric, HFR doesn't support a number of BBcode tags, hence the questionable translation table compared with other BBcode implementations).
  • The code is ugly in some places and might explode anytime.
  • Colours are not supported yet.

Be careful of...

  • HFR's agressive anti-spam. Possibly a good idea to adjust the code to not post when doing tests, or edit a post (instead of posting). To edit: modify POST to /bdd.php and pass a numreponse arg to payload with a post that belongs to you.