diff --git a/CONTRIBUTE.md b/CONTRIBUTING.md similarity index 55% rename from CONTRIBUTE.md rename to CONTRIBUTING.md index e46caf6..1ab44ad 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ To raise a new feature request, please go through the following steps: - Be willing to provide more details if asked for them and help testing the feature ## Bug Reports -Bugs in this application are scarce. If there are any, there most likely features ;-) +Bugs in this application are scarce. If there are any, they're most likely features ;-) Please go follow these steps to submit a bug: - Check if this bug has previously been reported - Add [Bug] at the beginning of the issue title @@ -29,28 +29,33 @@ Please go follow these steps to submit a bug: 2) Turn off all remove functions but one where you expect a removal (example: REMOVE_STALLED: True and the rest on False) 3) Let it run until the supposed remove should be trigged 4) Paste the full logs to a pastebin -- If helpful: Paste a screenshot of qbit and the affected *arr app to a pasteimg -- Be willing to provide more details if asked for them and help testing the bug fix +5) Share your settings (docker-compose or config.conf) +6) Optional: If helpful, share screenshots showing the problem (from your arr-app or qbit) +7) Be responsive and provide more details if asked for them, and help testing the bug fix ### Code Contributions Code contributions are very welcome - thanks for helping improve this app! -1) Please always branch out from the "dev" branch, not from the "main" branch -2) Please test your code locally -3) Please only commit code that you have written yourself and is not owned by anybody else -4) Please create a PR against the "dev" branch -5) Once I have reviewed it, I will merge it and it will create teh "dev" image -6) Please help testing that the dev image works, before we then commit it to the "latest" image (from main branch) +1) Always branch out from the "dev" branch, not from the "main" branch +2) Test your code locally +3) Only commit code that you have written yourself and is not owned by anybody else +4) Create a PR against the "dev" branch +5) Be responsive to code review +5) Once the code is reviewed and OK, it will be merged to dev branch, which will create the "dev"-docker image +6) Help testing that the dev image works +7= Finally, we will then commit the change to the main branch, which will create the "latest"-docker image You do not need to know about how to create docker images to contribute here. To get started: -1) Clone the git repository to your local machine -2) Create a virtual python environment (python3 -m venv venv) -3) Activate the virtual environment (source venv/bin/activate) -4) Install python libraries (pip install -r docker/requirements.txt) +1) Create a fork of decluttarr +2) Clone the git repository from the dev branch to your local machine `git clone -b dev https://github.com/yourName/decluttarr` +2) Create a virtual python environment (`python3 -m venv venv`) +3) Activate the virtual environment (`source venv/bin/activate`) +4) Install python libraries (`pip install -r docker/requirements.txt`) 5) Adjust the config/config.conf to your needs 6) Adjust the code in the files as needed -7) Run the script (python3 main.py) -8) Create a PR once you are ready - +7) Run the script (`python3 main.py`) +8) Push your changes to your own git repo +9) Test the dev-image it creates automatically +10) Create the PR from your repo to ManiMatter/decluttarr (dev branch) diff --git a/main.py b/main.py index a60f3db..e3b1718 100644 --- a/main.py +++ b/main.py @@ -49,17 +49,20 @@ async def main(settingsDict): # Check outdated upgradeChecks(settingsDict) - # Display current settings when loading script + # Welcome Message + showWelcome() + + # Current Settings showSettings(settingsDict) - + # Check Minimum Version and if instances are reachable and retrieve qbit cookie settingsDict = await instanceChecks(settingsDict) # Create qBit protection tag if not existing await createQbitProtectionTag(settingsDict) - # Show Logger settings - showLoggerSettings(settingsDict) + # Show Logger Level + showLoggerLevel(settingsDict) # Start Cleaning while True: diff --git a/src/utils/loadScripts.py b/src/utils/loadScripts.py index 88a9050..a7bb1e1 100644 --- a/src/utils/loadScripts.py +++ b/src/utils/loadScripts.py @@ -51,16 +51,19 @@ async def getProtectedAndPrivateFromQbit(settingsDict): return protectedDownloadIDs, privateDowloadIDs - -def showSettings(settingsDict): - # Prints out the settings - fmt = '{0.days} days {0.hours} hours {0.minutes} minutes' +def showWelcome(): + # Welcome Message logger.info('#' * 50) logger.info('Decluttarr - Application Started!') logger.info('') logger.info('Like this app? Thanks for giving it a ⭐️ on GitHub!') logger.info('https://github.com/ManiMatter/decluttarr/') - logger.info('') + logger.info('') + return + +def showSettings(settingsDict): + # Settings Message + fmt = '{0.days} days {0.hours} hours {0.minutes} minutes' logger.info('*** Current Settings ***') logger.info('Version: %s', settingsDict['IMAGE_TAG']) logger.info('Commit: %s', settingsDict['SHORT_COMMIT_ID']) @@ -205,7 +208,7 @@ async def createQbitProtectionTag(settingsDict): if not settingsDict['TEST_RUN']: await rest_post(url=settingsDict['QBITTORRENT_URL']+'/torrents/createTags', data={'tags': settingsDict['NO_STALLED_REMOVAL_QBIT_TAG']}, headers={'content-type': 'application/x-www-form-urlencoded'}, cookies=settingsDict['QBIT_COOKIE']) -def showLoggerSettings(settingsDict): +def showLoggerLevel(settingsDict): logger.info('#' * 50) if settingsDict['LOG_LEVEL'] == 'INFO': logger.info('LOG_LEVEL = INFO: Only logging changes (switch to VERBOSE for more info)')