diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index bbd74e7..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @santiagosayshey \ No newline at end of file diff --git a/.github/workflows/add-issue-to-project.yml b/.github/workflows/add-issue-to-project.yml deleted file mode 100644 index cc56bd2..0000000 --- a/.github/workflows/add-issue-to-project.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Add Issue to Project - -on: - issues: - types: [opened] - -jobs: - add-to-project: - name: Add issue to project - runs-on: ubuntu-latest - steps: - - name: Add to Project - id: add-to-project - uses: actions/add-to-project@v0.5.0 - with: - project-url: https://github.com/orgs/Dictionarry-Hub/projects/1 - github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} - - - name: Get project item ID - id: get-project-item-id - env: - GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - PROJECT_ID: "PVT_kwDOCjbMFM4AjuUh" - ISSUE_NUMBER: ${{ github.event.issue.number }} - run: | - echo "Fetching project item ID for issue number: $ISSUE_NUMBER" - item_id=$(gh api graphql -f query=' - query($project:ID!) { - node(id: $project) { - ... on ProjectV2 { - items(first: 100) { - nodes { - id - content { - ... on Issue { - number - } - } - } - } - } - } - }' -f project=$PROJECT_ID --jq ".data.node.items.nodes[] | select(.content.number == $ISSUE_NUMBER) | .id" -F number=$ISSUE_NUMBER) - if [ -z "$item_id" ]; then - echo "Error: Project item ID not found for issue number $ISSUE_NUMBER" - exit 1 - else - echo "Project item ID found: $item_id" - echo "PROJECT_ITEM_ID=$item_id" >> $GITHUB_OUTPUT - fi - - - name: Set component, type, and status - env: - GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - PROJECT_ITEM_ID: ${{ steps.get-project-item-id.outputs.PROJECT_ITEM_ID }} - run: | - echo "Setting fields for Project Item ID: ${PROJECT_ITEM_ID}" - - # Set component to "Profilarr" - result=$(gh api graphql -f query=' - mutation($project:ID!, $item:ID!, $fieldId:ID!, $value:String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $project - itemId: $item - fieldId: $fieldId - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }' -f project="PVT_kwDOCjbMFM4AjuUh" -f item="${PROJECT_ITEM_ID}" -f fieldId="PVTSSF_lADOCjbMFM4AjuUhzgcCr_E" -f value="48fc49c7") - echo "Set component result: $result" - - # Set status to "Backlog" - result=$(gh api graphql -f query=' - mutation($project:ID!, $item:ID!, $fieldId:ID!, $value:String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $project - itemId: $item - fieldId: $fieldId - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }' -f project="PVT_kwDOCjbMFM4AjuUh" -f item="${PROJECT_ITEM_ID}" -f fieldId="PVTSSF_lADOCjbMFM4AjuUhzgcCn8s" -f value="f75ad846") - echo "Set status result: $result" - - # Get the label of the issue - LABEL=$(gh api repos/Dictionarry-Hub/website/issues/${{ github.event.issue.number }} --jq '.labels[0].name') - echo "Issue label: $LABEL" - - # Convert label to lowercase for comparison - LABEL_LOWER=$(echo "$LABEL" | tr '[:upper:]' '[:lower:]') - - # Set issue type based on label - ISSUE_TYPE_ID=$(case $LABEL_LOWER in - "bug") echo "b760225f" ;; - "improvement") echo "269885d0" ;; - *) echo "" ;; - esac) - - if [ -z "$ISSUE_TYPE_ID" ]; then - echo "No matching issue type for label: $LABEL" - else - echo "Setting issue type to ID: $ISSUE_TYPE_ID" - result=$(gh api graphql -f query=' - mutation($project:ID!, $item:ID!, $fieldId:ID!, $value:String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $project - itemId: $item - fieldId: $fieldId - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }' -f project="PVT_kwDOCjbMFM4AjuUh" -f item="${PROJECT_ITEM_ID}" -f fieldId="PVTSSF_lADOCjbMFM4AjuUhzgcCswQ" -f value="$ISSUE_TYPE_ID") - echo "Set issue type result: $result" - fi \ No newline at end of file diff --git a/.github/workflows/new-branch-created.yml b/.github/workflows/new-branch-created.yml deleted file mode 100644 index 8e5a2a0..0000000 --- a/.github/workflows/new-branch-created.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: Update Issue Status to In Development - -on: - create: - branches: - - '*-*' - -jobs: - update-status: - runs-on: ubuntu-latest - steps: - - name: Extract Issue Number from Branch Name - id: extract-issue-number - run: | - ISSUE_NUMBER=$(echo $GITHUB_REF_NAME | cut -d'-' -f1) - echo "Issue Number extracted: $ISSUE_NUMBER" - echo "ISSUE_NUMBER=$ISSUE_NUMBER" >> $GITHUB_ENV - - - name: Get project item ID - id: get-project-item-id - env: - GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - PROJECT_ID: "PVT_kwDOCjbMFM4AjuUh" - run: | - echo "Fetching project item ID for issue number: $ISSUE_NUMBER" - QUERY=' - query fetchProjectItem($project: ID!) { - node(id: $project) { - ... on ProjectV2 { - items(first: 100) { - nodes { - id - content { - ... on Issue { - number - } - } - } - } - } - } - }' - item_id=$(gh api graphql -f query="$QUERY" -f project=$PROJECT_ID --jq '.data.node.items.nodes[] | select(.content.number == '"$ISSUE_NUMBER"') | .id') - if [ -z "$item_id" ]; then - echo "Error: Project item ID not found for issue number $ISSUE_NUMBER" - exit 1 - else - echo "Project item ID found: $item_id" - echo "PROJECT_ITEM_ID=$item_id" >> $GITHUB_ENV - fi - - - name: Get single select field ID and options - id: get-field-options - env: - GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - PROJECT_ID: "PVT_kwDOCjbMFM4AjuUh" - run: | - echo "Fetching field ID and options for status" - QUERY=' - query($project:ID!) { - node(id: $project) { - ... on ProjectV2 { - fields(first: 100) { - nodes { - ... on ProjectV2SingleSelectField { - id - name - options { - id - name - } - } - } - } - } - } - }' - field_data=$(gh api graphql -f query="$QUERY" -f project=$PROJECT_ID --jq '.data.node.fields.nodes[] | select(.name == "Status")') - field_id=$(echo $field_data | jq -r '.id') - in_development_option_id=$(echo $field_data | jq -r '.options[] | select(.name == "In Development") | .id') - if [ -z "$field_id" ] || [ -z "$in_development_option_id" ]; then - echo "Error: Field ID or In Development option ID not found" - exit 1 - else - echo "Field ID: $field_id" - echo "In Development option ID: $in_development_option_id" - echo "FIELD_ID=$field_id" >> $GITHUB_ENV - echo "IN_DEVELOPMENT_OPTION_ID=$in_development_option_id" >> $GITHUB_ENV - fi - - - name: Set status to In Development - env: - GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - PROJECT_ITEM_ID: ${{ env.PROJECT_ITEM_ID }} - FIELD_ID: ${{ env.FIELD_ID }} - IN_DEVELOPMENT_OPTION_ID: ${{ env.IN_DEVELOPMENT_OPTION_ID }} - run: | - echo "Setting status for Project Item ID: ${PROJECT_ITEM_ID}" - result=$(gh api graphql -f query=' - mutation($project:ID!, $item:ID!, $fieldId:ID!, $value:String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $project - itemId: $item - fieldId: $fieldId - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }' -f project="PVT_kwDOCjbMFM4AjuUh" -f item="${PROJECT_ITEM_ID}" -f fieldId="${FIELD_ID}" -f value="${IN_DEVELOPMENT_OPTION_ID}") - echo "Set status result: $result" diff --git a/.gitignore b/.gitignore deleted file mode 100644 index edadf4a..0000000 --- a/.gitignore +++ /dev/null @@ -1,167 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -config.yml - -exports/ - -config/ -data/ \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 2cde466..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 santiagosayshey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 94f0d79..0000000 --- a/README.md +++ /dev/null @@ -1,329 +0,0 @@ -# Profilarr - -Profilarr is a Python-based tool designed to add import/export/sync/delete functionality to the \*arr suite. It offers a user-friendly way to: -- Export existing custom formats / profiles -- Import new custom formats / profiles -- Sync a master instance of Radarr / Sonarr with other instances -- Delete existing custom formats / quality profiles - -## Discord - -Come join us at https://discord.gg/ZxywYBGRB9 if you need any help or want to talk! - -## ⚠️ Before Continuing - -- **This tool will overwrite any custom formats in your \*arr installation that have the same name.** -- **Always back up your Radarr and Sonarr configurations before using Profilarr to avoid unintended data loss.** (Seriously, do it. Even I've lost data to this tool because I forgot to back up my configs.) - -## 🛠️ Installation - -### Prerequisites - -- Python 3.x installed. You can download it from [python.org](https://www.python.org/downloads/). -- Radarr / Sonarr [Latest Stable] - -### Initial Setup - -#### Step 1: Download Profilarr -1. **Get Profilarr:** - - Option 1: Clone repository (latest changes) - ``` - git clone https://github.com/santiagosayshey/Profilarr.git - ``` - - Option 2: Download latest release (most stable) - - Go to [Releases](https://github.com/santiagosayshey/Profilarr/releases) - - Download the latest `Profilarr-vX.X.X.zip` - - Extract the zip file to your preferred location. - -#### Step 2: Install Profilarr - -1. **Open Your Terminal:** - - **Windows:** Search for `Command Prompt` or `PowerShell` in your start menu. - - **MacOS:** Search for `Terminal`. - - **Linux:** Use your desktop environment's application launcher to find `Terminal`, or press `Ctrl+Alt+T` if that's a shortcut in your Linux distro. - -2. **Navigate to Profilarr Folder:** - - Type `cd path/to/your/folder` and press Enter. Replace `path/to/your/folder` with the actual path to where you extracted Profilarr. This command works the same on Windows, MacOS, and Linux. - -3. **Install Dependencies:** - - Type `pip install -r requirements.txt` and press Enter. This command tells Python to install the necessary software components Profilarr needs to run. The command is the same across all platforms. - -4. **Setup Configuration:** - - Type `python setup.py` and press Enter. This will run a setup script that prepares Profilarr for use by generating a `config.yml` file, essentially Profilarr's settings book. - -#### Step 3: Configure Profilarr - -1. **Edit `config.yml`:** - - Open the `config.yml` file in a text editor. Windows users might use Notepad, MacOS users might use TextEdit, and Linux users can use any text editor like Gedit, Nano, or Vim. - - This file contains different settings that you can adjust to tell Profilarr how to operate. - -2. **Add Master Instance Details:** - - Look for the section related to Radarr/Sonarr. - - Here, enter the URL and API key for your Radarr/Sonarr instances to link Profilarr with your movie/TV series managers. - -3. **Configure Syncing or Exporting (if needed):** - - **Syncing:** For syncing additional Radarr/Sonarr instances, add their URL, API key, and a name for each. - - **Exporting:** To set where Profilarr saves files it creates, adjust the `export_path`. - - **Importing:** If you have settings or lists from other sources, set `import_path` to their location. - -4. **Configure ANSI Color Support (Optional):** - - Profilarr can show colorful text in the terminal. If it's not displaying correctly (like showing `←[94m` instead of colors), you can fix this: - - In the `settings` section, find `ansi_colors: true`. - - Change it to `ansi_colors: false`. This disables colorful output for better compatibility with your terminal's capabilities. - -5. **Save Your Changes:** - - After adjusting these settings, save and close the `config.yml` file. - -#### You're All Set! - -## 🚀 Usage - -- If using Windows, use `python