sounds like a fun challenge. My thought process is the control flow. To that end:
- script runs
handled by cron
- Script selects files to upload, community to upload to and titles for them.
These are the hardest parts, because it will be the only variable parts. It basically requires user input. I'm thinking perhaps parsing a text file where you input the file name, the community, and the title.
- Script authenticates with lemmy API
I found this really handy "unofficial" API documentation, which includes examples in many different languages, through the official docs.
Unfortunately, it looks like it's going to require a hardcoded password to get the appropriate authorization token.
- script posts to lemmy
We can use the api documentation above to figure out this part too
For other sites like youtube, you can expand on this script and have parts for youtube as well, but you're basically doubling its size and complexity. Personally, I would go for the KISS method instead and just have a separate script & info file.
After work today, I'll see if I can slam out a quick proof of concept in Python