Go to file
Greg Gauthier fdc8fbd6f3 Update LICENSE
make it family friendly
2025-03-13 09:13:33 +00:00
cfg add readme;clean up requirements;adjust config script 2025-03-07 20:54:49 +00:00
content initial commit 2025-03-07 20:54:49 +00:00
po initial commit 2025-03-07 20:54:49 +00:00
pw initial commit 2025-03-07 20:54:49 +00:00
.gitignore initial commit 2025-03-07 20:54:49 +00:00
example.toml initial commit 2025-03-07 20:54:49 +00:00
LICENSE Update LICENSE 2025-03-13 09:13:33 +00:00
main.py initial commit 2025-03-07 20:54:49 +00:00
README.md add readme;clean up requirements;adjust config script 2025-03-07 20:54:49 +00:00
requirements.txt add readme;clean up requirements;adjust config script 2025-03-07 20:54:49 +00:00

lunduke-bot

A simple Playwright script in python, to post content from a local directory

Requirements

  • Python~=3.12
  • playwright~=1.50.0

Usage

It's very crude right now, but basically, follow these steps and it should work:

  1. Put a "lunduke.toml" somewhere where you can easily find it (not in the project path). The script will look in ~/.discourse/lunduke.toml by default.
  2. Populate the toml file with entries found in the Example TOML Config
  3. Create your markdown content in the path specified in your TOML config. Make it look like this:
"""
Category = "No Politics"
Title = "Just another draft post"
Draft = true
"""
### This is a test

Just confirming that the draft status still works

The three-double-quote fence at the top is absolutely necessary. That section will get converted into a dictionary to populate the vars needed to make the post. Everything after the fence is just plain markdown, and will render on the site appropriately. Set the "Draft" flag to 'false' if you want to publish your post immediately.

  1. Change the filename in the parser call on line 20 in the main, to your markdown file (this will be automated soon)

  2. It should just work, now. Your mileage may vary.