twitter-threading icon indicating copy to clipboard operation
twitter-threading copied to clipboard

Support passing a folder containing YAML files

Open haltakov opened this issue 3 years ago • 3 comments

The goal would be to have a folder, where you can always put your threads' YAML files. The script would then look through all files and schedule them for the date in the file.

The idea is to enable the following workflow:

  1. Create a separate repo containing all the thread YAML files. When I want to post a new one, I just add a new file there.
  2. I have the scheduling script running permanently looking at the folder containing all YAML files and automatically posts the relevant ones.
  3. There is another script that pulls the repo at regular intervals (or maybe with a hook?) to load the new YAMLs.

haltakov avatar Sep 19 '20 21:09 haltakov

What do you think about this workflow? If you like it, I can implement it and create a PR.

haltakov avatar Sep 19 '20 21:09 haltakov

Love it!

A couple of notes.

We can have a new attribute in the YAML file called when that represents the date/time when the thread will be posted. If the attribute is not present, we should ignore that thread. This way we can have drafts.

Of course, we should algo ignore any threads with a when value in the past.

svpino avatar Sep 22 '20 20:09 svpino

Yeah, exactly! OK, I'll try to find time to implement it tomorrow and will share the PR.

haltakov avatar Sep 22 '20 20:09 haltakov