Installation on Windows
For easy updating, can you update the pypi entry or add a setup script or toml file?
I'll try to figure it out again (was done before by a dev that is no longer available). For now you can just clone the repo, install the venv and requirements and it should work fine on windows.
Hi again, the readme instructions don't appear to be correct and there's a mix of Windows and unix commands. I understand you want to take the url from the .env "env_example", but even if you manually rename the extension, the script isn't loading the .env values from "env_example.env". I think the use of load_dotenv() and dotenv_values() are incorrect. Unless you add the values from env_example to env separately before you run the script, load_dotenv() will only load values from os.environ. dotenv_values() is empty unless you set the path to "env_example.env"
C:\Users\*\repos\rentry>rentry.py
Traceback (most recent call last):
File "C:\Users\*\repos\rentry\rentry.py", line 11, in <module>
from dotenv import load_dotenv, dotenv_values
ModuleNotFoundError: No module named 'dotenv'
C:\Users\*\repos\rentry>py
Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from dotenv import load_dotenv, dotenv_values
>>> load_dotenv()
False
>>> env = dotenv_values(".env")
>>> env['BASE_PROTOCOL']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'BASE_PROTOCOL'
>>> env
OrderedDict()
>>> env.keys()
odict_keys([])
>>> env = dotenv_values("env_example.env")
>>> env
OrderedDict({'BASE_PROTOCOL': 'https://', 'BASE_URL': 'rentry.co'})
As is users need to manually edit the script and keep a separate env file accessible. I don't really see why dotenv is being used just to fill 2 entries in a dictionary.
I can switch it out for os.getenv