v-p-b / rss2bsky.py

RSS to Bluesky - in Python
GNU General Public License v3.0
3 stars 2 forks source link

Documentation improvements #1

Open greggles opened 4 weeks ago

greggles commented 4 weeks ago

I'm exploring this tool and started asking questions and thought I could help with a PR to the README to give a bit more guidance.

  1. How are the requirements installed? I think it's pip install -r requirements.txt but wanted to confirm.
  2. I made an assumption that the config.json.sample should be renamed to config.json and edited. I wonder how the sleep feature works? It seems this lets the script run like a service and it will check for new items every config["sleep"] seconds?
  3. Related to the above, it seems good to add a .gitignore file that would ignore the config.json and maybe some other typical items.

Thanks for providing this script!

v-p-b commented 4 weeks ago

PR's are always welcome! I try to answer your questions:

How are the requirements installed? I think it's pip install -r requirements.txt but wanted to confirm.

This is correct.

I made an assumption that the config.json.sample should be renamed to config.json and edited.

Copying the file under a new name (not renaming) is preferred so the local deployment won't affect the working tree.

I wonder how the sleep feature works? It seems this lets the script run like a service and it will check for new items every config["sleep"] seconds?

Yes, as you can see at the end of the code the configured sleep value is just passed to time.sleep() that accepts the number of seconds as int or float.

Related to the above, it seems good to add a .gitignore file that would ignore the config.json and maybe some other typical items.

I guess this won't hurt, although personally I don't feel the need to exclude such artifacts from Git's view of the world. Maybe can prevent some accidental commits?

greggles commented 2 weeks ago

Maybe can prevent some accidental commits?

Exactly. This is a prime motivation to avoid accidentally committing a secret. It also makes git status a bit easier to read in my experience.

I made some progress on this, but am now blocked on #2. I pushed up the work-in-progress to my fork and will make a PR when it's running.