Skip to content

Commit

Permalink
Added dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
pablouser1 committed Dec 29, 2023
1 parent a64d67b commit a50c9c9
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: 'plugin.video.filmin'
directory: '..'
filename: 'filmin-kodi-release.zip'
exclusions: '*.git* .editorconfig'
exclusions: '*.git* .editorconfig tools'
- name: Create Release
uses: ncipollo/release-action@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__pycache__
/.vscode
/tests.py
.venv
api_m.py
22 changes: 22 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Herramientas de desarrollo
En esta carpeta encontrarás diferentes utilidades

## Dependencias
Antes de emepezar, instala las dependencias de Python con:

```bash
pip3 install -r requirements.txt
```

## Checker
Puedes ejecutar manualmente los tests con el comando
```bash
kodi-addon-checker ..
```

NOTA: Usamos el path `..` para ir al directorio raíz donde está el addon

## Api
Puedes ejecutar la API manualmente copiando el script `api_m.example.py` a `api_m.py`.

Aquí puedes hacer todas las pruebas que quieras sin tener que usar Kodi
10 changes: 10 additions & 0 deletions tools/api_m.example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import sys
sys.path.append('..') # Add parent path to searchable list

from resources.lib.api import Api

DOMAIN = "es"

api = Api(DOMAIN)

# .. You can keep testing the api here
15 changes: 15 additions & 0 deletions tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
certifi==2023.11.17
charset-normalizer==3.3.2
colorama==0.4.6
elementpath==4.1.5
idna==3.6
kodi-addon-checker==0.0.31
mando==0.7.1
packaging==23.2
Pillow==10.1.0
polib==1.2.0
radon==6.0.1
requests==2.31.0
six==1.16.0
urllib3==2.1.0
xmlschema==2.5.1
4 changes: 4 additions & 0 deletions tools/xbmc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ISO_639_1 = 0

def getLanguage(format: int = 0, region: bool = False) -> str:
return "es_ES"
3 changes: 3 additions & 0 deletions tools/xbmcgui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Dialog:
def ok(self, header: str, msg: str):
print("--- {0} --- {1}".format(header, msg))

0 comments on commit a50c9c9

Please sign in to comment.