|
||
---|---|---|
cfg | ||
content | ||
po | ||
pw | ||
.gitignore | ||
example.toml | ||
LICENSE | ||
main.py | ||
README.md | ||
requirements.txt |
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:
- 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. - Populate the toml file with entries found in the Example TOML Config
- 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.
-
Change the filename in the parser call on line 20 in the main, to your markdown file (this will be automated soon)
-
It should just work, now. Your mileage may vary.