aw-cli 2.1.3__tar.gz → 2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. aw_cli-2.2/.github/workflows/python-publish.yml +32 -0
  2. aw_cli-2.2/.gitignore +90 -0
  3. aw_cli-2.2/.pre-commit-config.yaml +34 -0
  4. {aw_cli-2.1.3 → aw_cli-2.2}/PKG-INFO +37 -68
  5. {aw_cli-2.1.3 → aw_cli-2.2}/README.md +27 -46
  6. aw_cli-2.2/disclaimer.md +5 -0
  7. aw_cli-2.2/pyproject.toml +31 -0
  8. {aw_cli-2.1.3/awcli → aw_cli-2.2/src/aw_cli}/anilist.py +7 -7
  9. aw_cli-2.2/src/aw_cli/anime.py +344 -0
  10. {aw_cli-2.1.3/awcli → aw_cli-2.2/src/aw_cli}/arg_parser.py +15 -14
  11. aw_cli-2.2/src/aw_cli/download.py +111 -0
  12. aw_cli-2.2/src/aw_cli/history.py +146 -0
  13. aw_cli-2.2/src/aw_cli/providers/__init__.py +12 -0
  14. aw_cli-2.2/src/aw_cli/providers/animeunity.py +157 -0
  15. aw_cli-2.2/src/aw_cli/providers/animeworld.py +122 -0
  16. aw_cli-2.2/src/aw_cli/providers/local.py +52 -0
  17. aw_cli-2.2/src/aw_cli/providers/provider.py +168 -0
  18. aw_cli-2.2/src/aw_cli/run.py +560 -0
  19. aw_cli-2.2/src/aw_cli/update.py +55 -0
  20. aw_cli-2.2/src/aw_cli/utilities.py +107 -0
  21. aw_cli-2.2/tests/__init__.py +0 -0
  22. aw_cli-2.2/tests/empty +25 -0
  23. aw_cli-2.2/tests/search_dragonball +216 -0
  24. aw_cli-2.2/tests/search_onepiece +127 -0
  25. aw_cli-2.2/tests/test_anime.py +61 -0
  26. aw_cli-2.2/tests/test_history.py +295 -0
  27. aw_cli-2.2/tests/theeminenceinshadowep13 +499 -0
  28. aw_cli-2.2/uv.lock +557 -0
  29. aw_cli-2.1.3/aw_cli.egg-info/PKG-INFO +0 -191
  30. aw_cli-2.1.3/aw_cli.egg-info/SOURCES.txt +0 -18
  31. aw_cli-2.1.3/aw_cli.egg-info/dependency_links.txt +0 -1
  32. aw_cli-2.1.3/aw_cli.egg-info/entry_points.txt +0 -2
  33. aw_cli-2.1.3/aw_cli.egg-info/requires.txt +0 -6
  34. aw_cli-2.1.3/aw_cli.egg-info/top_level.txt +0 -1
  35. aw_cli-2.1.3/awcli/anime.py +0 -113
  36. aw_cli-2.1.3/awcli/run.py +0 -768
  37. aw_cli-2.1.3/awcli/utilities.py +0 -268
  38. aw_cli-2.1.3/awcli/version.py +0 -1
  39. aw_cli-2.1.3/setup.cfg +0 -4
  40. aw_cli-2.1.3/setup.py +0 -28
  41. aw_cli-2.1.3/tests/test_anime.py +0 -65
  42. aw_cli-2.1.3/tests/test_utilities.py +0 -75
  43. {aw_cli-2.1.3 → aw_cli-2.2}/LICENSE +0 -0
  44. {aw_cli-2.1.3/awcli → aw_cli-2.2/src/aw_cli}/__init__.py +0 -0
@@ -0,0 +1,32 @@
1
+ name: "Upload python package"
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ # Publish on any tag starting with a `v`, e.g., v0.1.0
7
+ - v*
8
+
9
+ jobs:
10
+ run:
11
+ runs-on: ubuntu-latest
12
+ environment:
13
+ name: pypi
14
+ permissions:
15
+ id-token: write
16
+ contents: read
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v5
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v6
22
+ - name: Install Python 3.13
23
+ run: uv python install 3.13
24
+ - name: Build
25
+ run: uv build
26
+ # Check that basic features work and we didn't miss to include crucial files
27
+ #- name: Smoke test (wheel)
28
+ # run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
29
+ #- name: Smoke test (source distribution)
30
+ # run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
31
+ - name: Publish
32
+ run: uv publish
aw_cli-2.2/.gitignore ADDED
@@ -0,0 +1,90 @@
1
+ ### Python ###
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # Environments
8
+ .env
9
+ .venv
10
+ env/
11
+ venv/
12
+ ENV/
13
+ env.bak/
14
+ venv.bak/
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ share/python-wheels/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+ MANIFEST
35
+
36
+ # Unit test / coverage reports
37
+ htmlcov/
38
+ .tox/
39
+ .nox/
40
+ .coverage
41
+ .coverage.*
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+ *.cover
46
+ *.py,cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+ cover/
50
+
51
+ # pyenv:
52
+ .python-version
53
+
54
+ # pytype static type analyzer
55
+ .pytype/
56
+
57
+
58
+ # PyCharm
59
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
60
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
61
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
62
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
63
+ #.idea/
64
+
65
+ # LSP config files
66
+ pyrightconfig.json
67
+
68
+ ### VisualStudioCode ###
69
+ .vscode/*
70
+ # !.vscode/settings.json
71
+ # !.vscode/tasks.json
72
+ # !.vscode/launch.json
73
+ # !.vscode/extensions.json
74
+ # !.vscode/*.code-snippets
75
+
76
+ # Local History for Visual Studio Code
77
+ .history/
78
+
79
+ # Built Visual Studio Code Extensions
80
+ *.vsix
81
+
82
+ ### VisualStudioCode Patch ###
83
+ # Ignore all local history of files
84
+ .history
85
+ .ionide
86
+
87
+ ### Aw-cli
88
+ history.json
89
+ config.toml
90
+ aw-cronologia.csv
@@ -0,0 +1,34 @@
1
+ repos:
2
+ # Hook standard per la pulizia del codice
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v6.0.0
5
+ hooks:
6
+ - id: check-yaml
7
+ - id: end-of-file-fixer
8
+ - id: trailing-whitespace
9
+
10
+ # Hook per pyright (type checker)
11
+ - repo: local
12
+ hooks:
13
+ - id: pyright
14
+ name: pyright
15
+ entry: uv run pyright
16
+ language: system
17
+ types: [python]
18
+
19
+
20
+ # Hook per pytest (esegue i test)
21
+ - repo: local
22
+ hooks:
23
+ - id: pytest
24
+ name: pytest
25
+ entry: uv run pytest # Esegue pytest usando l'ambiente gestito da uv
26
+ language: system
27
+ types: [python]
28
+ pass_filenames: false # Esegue tutti i test, non solo i file modificati
29
+
30
+ # Hook opzionale per mantenere uv.lock aggiornato
31
+ - repo: https://github.com/astral-sh/uv-pre-commit
32
+ rev: 0.9.2
33
+ hooks:
34
+ - id: uv-lock
@@ -1,33 +1,23 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aw-cli
3
- Version: 2.1.3
4
- Summary: guarda anime dal terminale e molto altro!
5
- Home-page: https://github.com/fexh10/aw-cli
6
- Author: fexh10
7
- License: GPL-3.0
8
- Requires-Python: >3.10
9
- Description-Content-Type: text/markdown
3
+ Version: 2.2
4
+ Summary: Guarda anime dal terminale e molto altro!
5
+ License-Expression: GPL-3.0
10
6
  License-File: LICENSE
11
- Requires-Dist: requests
12
- Requires-Dist: pySmartDL
13
- Requires-Dist: wheel
14
- Requires-Dist: regex
15
- Requires-Dist: toml
16
- Requires-Dist: pip-system-certs
17
- Dynamic: author
18
- Dynamic: description
19
- Dynamic: description-content-type
20
- Dynamic: home-page
21
- Dynamic: license
22
- Dynamic: license-file
23
- Dynamic: requires-dist
24
- Dynamic: requires-python
25
- Dynamic: summary
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: httpx>=0.28.1
9
+ Requires-Dist: pip-system-certs>=5.2
10
+ Requires-Dist: regex>=2025.9.18
11
+ Requires-Dist: toml>=0.10.2
12
+ Requires-Dist: wheel>=0.45.1
13
+ Description-Content-Type: text/markdown
26
14
 
27
15
  # aw-cli
28
16
  <h3 align="center">
29
17
 
30
- Guarda anime dal terminale e molto altro!<br /> Gli anime vengono presi da <a href="https://www.animeworld.tv/">AnimeWorld</a>
18
+ Guarda anime dal terminale e molto altro!
19
+
20
+ Gli anime vengono presi da [Animeworld](https://www.animeworld.ac/) e [Animeunity](https://www.animeunity.so/)
31
21
 
32
22
  </h3>
33
23
 
@@ -41,75 +31,59 @@ https://github.com/fexh10/aw-cli/assets/90156014/88e1c2e2-bb7f-4002-8784-26f7086
41
31
  - [Indice](#indice)
42
32
  - [Installazione](#installazione)
43
33
  - [Problemi noti](#problemi-noti)
44
- - [Disinstallazione](#disinstallazione)
45
34
  - [Utilizzo](#utilizzo)
46
35
  - [Crediti](#crediti)
47
36
 
48
37
 
49
38
  ## Installazione
50
39
 
51
- Lo script funziona sia con [MPV](https://mpv.io/installation/) che con [VLC](https://www.videolan.org/vlc/index.it.html). <br />
40
+ Lo script funziona sia con [MPV](https://mpv.io/installation/) che con [VLC](https://www.videolan.org/vlc/index.it.html).
52
41
 
53
- È richiesta l'installazione di [fzf](https://github.com/junegunn/fzf?tab=readme-ov-file#installation).<br />
42
+ È richiesta l'installazione di [fzf](https://github.com/junegunn/fzf?tab=readme-ov-file#installation).
54
43
 
55
- <details><summary><b>Linux, MacOS</b></summary>
56
- È possibile installare aw-cli da pip:
44
+ <details><summary><b>Linux, MacOS, Windows WSL</b></summary>
45
+
46
+ È consigliato installare `aw-cli` tramite [uv](https://github.com/astral-sh/uv):
57
47
 
58
48
  ```
59
- python3 -m pip install aw-cli
49
+ uv tool install aw-cli
60
50
  ```
61
- </details>
62
51
 
63
- <details><summary><b>Windows</b></summary>
64
- Attualmente, Windows presenta due versioni: la più recente, progettata per funzionare su WSL (Windows Subsystem for Linux), e una versione Legacy compatibile con PowerShell. La versione Legacy non riceverà ulteriori aggiornamenti, mentre l'altra sarà mantenuta costantemente.
65
-
66
- <br>
67
-
68
- <details><summary><b>Ultima Versione</b></summary>
69
- L'ultima versione per Windows richiede installare <a href="https://learn.microsoft.com/it-it/windows/wsl/install">WSL</a>:
52
+ In alternativa, è possibile usare [pipx](https://pipx.pypa.io/latest/installation/):
70
53
 
71
54
  ```
72
- wsl --install
55
+ pipx install aw-cli
73
56
  ```
74
57
 
75
- Il programma dovrà essere installato e avviato da WSL:
58
+ </details>
59
+
60
+ <details><summary><b>Windows</b></summary>
61
+
62
+ Il supporto per Windows è mantenuto solamente tramite WSL. Nel caso si voglia usare Powershell, è possibile installare la versione Legacy, che non riceverà più aggiornamenti. È necessario avere [git](https://www.git-scm.com/download/win) e [uv](https://github.com/astral-sh/uv):
76
63
 
77
64
  ```
78
- python3 -m pip install aw-cli
65
+ uv tool install git+https://github.com/fexh10/aw-cli.git@winLegacy
79
66
  ```
80
67
 
81
- </details>
82
- <details><summary><b>Versione Legacy</b></summary>
83
- Per installare la versione Legacy, è necessario avere <a href="https://www.git-scm.com/download/win">git</a>.
84
-
68
+ In alternativa è possibile usare [pipx](https://pipx.pypa.io/latest/installation/):
85
69
 
86
70
  ```
87
- python3 -m pip install git+https://github.com/fexh10/aw-cli.git@winLegacy
71
+ pipx install git+https://github.com/fexh10/aw-cli.git@winLegacy
88
72
  ```
89
73
 
90
74
  </details>
91
75
  </details>
92
76
 
93
77
  <details><summary><b>Android</b></summary>
94
- Android richiede l'installazione di <a href="https://github.com/termux/termux-app/releases/tag/v0.118.0">termux</a>. <br>
78
+
79
+ Android richiede l'installazione di [Termux](https://github.com/termux/termux-app/releases).
95
80
 
96
81
  ```
97
82
  pkg update && pkg upgrade
98
- pkg install python python-pip fzf
99
- python3 -m pip install aw-cli
83
+ pkg install python3 fzf uv
84
+ uv tool install aw-cli
100
85
  ```
101
- </details>
102
-
103
- <details><summary><b>iOS</b></summary>
104
- La versione per iOS richiede <a href="https://apps.apple.com/it/app/ish-shell/id1436902243">iSH</a> e <a href="https://apps.apple.com/it/app/vlc-media-player/id650377962">VLC</a>.
105
86
 
106
- ```
107
- apk update
108
- apk upgrade
109
- apk add python3 python3-dev py3-pip gcc musl-dev git
110
- python3 -m pip install git+https://github.com/fexh10/aw-cli.git@iosCompatibility
111
- ```
112
- Nota che la velocità di download e caricamento molto bassa è un problema di iSH e non di aw-cli.
113
87
  </details>
114
88
 
115
89
  ## Problemi noti
@@ -152,12 +126,6 @@ Nota che la velocità di download e caricamento molto bassa è un problema di iS
152
126
  trust anchor SSL.com-TLS-T-ECC-R2.pem
153
127
  ```
154
128
 
155
- ## Disinstallazione
156
-
157
- ```
158
- python3 -m pip uninstall aw-cli
159
- ```
160
-
161
129
  ## Utilizzo
162
130
  ```
163
131
  usage: aw-cli [-h] [-v] [-c [{r}]] [-l [{a,s,d,t}]] [-i] [-s] [-d] [-o] [-p] [-u [UPDATE]] [-a]
@@ -172,7 +140,7 @@ Opzioni:
172
140
  -c [{r}], --cronologia [{r}]
173
141
  continua a guardare un anime dalla cronologia. 'r' per rimuovere un anime (opzionale)
174
142
  -l [{a,s,d,t}], --lista [{a,s,d,t}]
175
- lista degli ultimi anime usciti su AnimeWorld. a = all, s = sub, d = dub, t = tendenze. Default 'a'
143
+ lista degli ultimi anime usciti. Filtri: a = all, s = sub, d = dub, t = tendenze. Default 'a'
176
144
  -i, --info visualizza le informazioni e la trama di un anime
177
145
  -s, --syncplay usa syncplay per guardare un anime insieme ai tuoi amici
178
146
  -d, --download scarica gli episodi che preferisci
@@ -186,6 +154,7 @@ Configurazione:
186
154
  ```
187
155
 
188
156
  ## Crediti
189
- Progetto ispirato a <a href="https://github.com/pystardust/ani-cli">ani-cli</a>.
190
157
 
191
- Un ringraziamento speciale a <a href="https://github.com/axtrat">axtrat</a> per l'aiuto nella realizzazione del progetto.
158
+ Progetto ispirato a [ani-cli](https://github.com/pystardust/ani-cli).
159
+
160
+ Un ringraziamento speciale a [axtrat](https://github.com/axtrat) per l'aiuto nella realizzazione del progetto.
@@ -1,7 +1,9 @@
1
1
  # aw-cli
2
2
  <h3 align="center">
3
3
 
4
- Guarda anime dal terminale e molto altro!<br /> Gli anime vengono presi da <a href="https://www.animeworld.tv/">AnimeWorld</a>
4
+ Guarda anime dal terminale e molto altro!
5
+
6
+ Gli anime vengono presi da [Animeworld](https://www.animeworld.ac/) e [Animeunity](https://www.animeunity.so/)
5
7
 
6
8
  </h3>
7
9
 
@@ -15,75 +17,59 @@ https://github.com/fexh10/aw-cli/assets/90156014/88e1c2e2-bb7f-4002-8784-26f7086
15
17
  - [Indice](#indice)
16
18
  - [Installazione](#installazione)
17
19
  - [Problemi noti](#problemi-noti)
18
- - [Disinstallazione](#disinstallazione)
19
20
  - [Utilizzo](#utilizzo)
20
21
  - [Crediti](#crediti)
21
22
 
22
23
 
23
24
  ## Installazione
24
25
 
25
- Lo script funziona sia con [MPV](https://mpv.io/installation/) che con [VLC](https://www.videolan.org/vlc/index.it.html). <br />
26
+ Lo script funziona sia con [MPV](https://mpv.io/installation/) che con [VLC](https://www.videolan.org/vlc/index.it.html).
27
+
28
+ È richiesta l'installazione di [fzf](https://github.com/junegunn/fzf?tab=readme-ov-file#installation).
26
29
 
27
- È richiesta l'installazione di [fzf](https://github.com/junegunn/fzf?tab=readme-ov-file#installation).<br />
30
+ <details><summary><b>Linux, MacOS, Windows WSL</b></summary>
28
31
 
29
- <details><summary><b>Linux, MacOS</b></summary>
30
- È possibile installare aw-cli da pip:
32
+ È consigliato installare `aw-cli` tramite [uv](https://github.com/astral-sh/uv):
31
33
 
32
34
  ```
33
- python3 -m pip install aw-cli
35
+ uv tool install aw-cli
34
36
  ```
35
- </details>
36
-
37
- <details><summary><b>Windows</b></summary>
38
- Attualmente, Windows presenta due versioni: la più recente, progettata per funzionare su WSL (Windows Subsystem for Linux), e una versione Legacy compatibile con PowerShell. La versione Legacy non riceverà ulteriori aggiornamenti, mentre l'altra sarà mantenuta costantemente.
39
37
 
40
- <br>
41
-
42
- <details><summary><b>Ultima Versione</b></summary>
43
- L'ultima versione per Windows richiede installare <a href="https://learn.microsoft.com/it-it/windows/wsl/install">WSL</a>:
38
+ In alternativa, è possibile usare [pipx](https://pipx.pypa.io/latest/installation/):
44
39
 
45
40
  ```
46
- wsl --install
41
+ pipx install aw-cli
47
42
  ```
48
43
 
49
- Il programma dovrà essere installato e avviato da WSL:
44
+ </details>
45
+
46
+ <details><summary><b>Windows</b></summary>
47
+
48
+ Il supporto per Windows è mantenuto solamente tramite WSL. Nel caso si voglia usare Powershell, è possibile installare la versione Legacy, che non riceverà più aggiornamenti. È necessario avere [git](https://www.git-scm.com/download/win) e [uv](https://github.com/astral-sh/uv):
50
49
 
51
50
  ```
52
- python3 -m pip install aw-cli
51
+ uv tool install git+https://github.com/fexh10/aw-cli.git@winLegacy
53
52
  ```
54
53
 
55
- </details>
56
- <details><summary><b>Versione Legacy</b></summary>
57
- Per installare la versione Legacy, è necessario avere <a href="https://www.git-scm.com/download/win">git</a>.
58
-
54
+ In alternativa è possibile usare [pipx](https://pipx.pypa.io/latest/installation/):
59
55
 
60
56
  ```
61
- python3 -m pip install git+https://github.com/fexh10/aw-cli.git@winLegacy
57
+ pipx install git+https://github.com/fexh10/aw-cli.git@winLegacy
62
58
  ```
63
59
 
64
60
  </details>
65
61
  </details>
66
62
 
67
63
  <details><summary><b>Android</b></summary>
68
- Android richiede l'installazione di <a href="https://github.com/termux/termux-app/releases/tag/v0.118.0">termux</a>. <br>
64
+
65
+ Android richiede l'installazione di [Termux](https://github.com/termux/termux-app/releases).
69
66
 
70
67
  ```
71
68
  pkg update && pkg upgrade
72
- pkg install python python-pip fzf
73
- python3 -m pip install aw-cli
69
+ pkg install python3 fzf uv
70
+ uv tool install aw-cli
74
71
  ```
75
- </details>
76
72
 
77
- <details><summary><b>iOS</b></summary>
78
- La versione per iOS richiede <a href="https://apps.apple.com/it/app/ish-shell/id1436902243">iSH</a> e <a href="https://apps.apple.com/it/app/vlc-media-player/id650377962">VLC</a>.
79
-
80
- ```
81
- apk update
82
- apk upgrade
83
- apk add python3 python3-dev py3-pip gcc musl-dev git
84
- python3 -m pip install git+https://github.com/fexh10/aw-cli.git@iosCompatibility
85
- ```
86
- Nota che la velocità di download e caricamento molto bassa è un problema di iSH e non di aw-cli.
87
73
  </details>
88
74
 
89
75
  ## Problemi noti
@@ -126,12 +112,6 @@ Nota che la velocità di download e caricamento molto bassa è un problema di iS
126
112
  trust anchor SSL.com-TLS-T-ECC-R2.pem
127
113
  ```
128
114
 
129
- ## Disinstallazione
130
-
131
- ```
132
- python3 -m pip uninstall aw-cli
133
- ```
134
-
135
115
  ## Utilizzo
136
116
  ```
137
117
  usage: aw-cli [-h] [-v] [-c [{r}]] [-l [{a,s,d,t}]] [-i] [-s] [-d] [-o] [-p] [-u [UPDATE]] [-a]
@@ -146,7 +126,7 @@ Opzioni:
146
126
  -c [{r}], --cronologia [{r}]
147
127
  continua a guardare un anime dalla cronologia. 'r' per rimuovere un anime (opzionale)
148
128
  -l [{a,s,d,t}], --lista [{a,s,d,t}]
149
- lista degli ultimi anime usciti su AnimeWorld. a = all, s = sub, d = dub, t = tendenze. Default 'a'
129
+ lista degli ultimi anime usciti. Filtri: a = all, s = sub, d = dub, t = tendenze. Default 'a'
150
130
  -i, --info visualizza le informazioni e la trama di un anime
151
131
  -s, --syncplay usa syncplay per guardare un anime insieme ai tuoi amici
152
132
  -d, --download scarica gli episodi che preferisci
@@ -160,6 +140,7 @@ Configurazione:
160
140
  ```
161
141
 
162
142
  ## Crediti
163
- Progetto ispirato a <a href="https://github.com/pystardust/ani-cli">ani-cli</a>.
164
143
 
165
- Un ringraziamento speciale a <a href="https://github.com/axtrat">axtrat</a> per l'aiuto nella realizzazione del progetto.
144
+ Progetto ispirato a [ani-cli](https://github.com/pystardust/ani-cli).
145
+
146
+ Un ringraziamento speciale a [axtrat](https://github.com/axtrat) per l'aiuto nella realizzazione del progetto.
@@ -0,0 +1,5 @@
1
+ ### Disclaimer
2
+ Questo progetto è offerto senza alcuna garanzia o responsabilità.
3
+ Questo progetto deve essere utilizzato a rischio e pericolo dell'utente.
4
+ Tutti i contenuti di questo progetto sono accessibili dal publicco su Internet.
5
+ L'autore e i contributori non sono responsabili per eventuali danni causati dall'utilizzo delle informazioni e del codice contenuti in questo progetto.
@@ -0,0 +1,31 @@
1
+ [project]
2
+ name = "aw-cli"
3
+ dynamic = ["version"]
4
+ description = "Guarda anime dal terminale e molto altro!"
5
+ readme = "README.md"
6
+ license = "GPL-3.0"
7
+ requires-python = ">=3.10"
8
+ dependencies = [
9
+ "httpx>=0.28.1",
10
+ "pip-system-certs>=5.2",
11
+ "regex>=2025.9.18",
12
+ "toml>=0.10.2",
13
+ "wheel>=0.45.1",
14
+ ]
15
+
16
+ [project.scripts]
17
+ aw-cli = "aw_cli.run:main"
18
+
19
+ [build-system]
20
+ requires = ["hatchling", "hatch-vcs"]
21
+ build-backend = "hatchling.build"
22
+
23
+ [tool.hatch.version]
24
+ source = "vcs"
25
+
26
+ [dependency-groups]
27
+ dev = [
28
+ "pre-commit>=4.3.0",
29
+ "pyright>=1.1.406",
30
+ "pytest>=8.4.2",
31
+ ]
@@ -1,4 +1,4 @@
1
- import requests
1
+ import httpx
2
2
 
3
3
  class TokenError(Exception):
4
4
  pass
@@ -10,8 +10,8 @@ def updateAnilist(token, id_anilist: int, ep: int, status_list: str, score: floa
10
10
  Args:
11
11
  id_anilist (int): l'id dell'anime su AniList.
12
12
  ep (int): il numero dell'episodio visualizzato.
13
- voto (float): il voto dell'anime.
14
13
  status_list (str): lo stato dell'anime per l'utente. Se è in corso verrà impostato su "CURRENT", se completato su "COMPLETED".
14
+ score (float): il voto dell'anime.
15
15
  favourite (bool): se True, aggiunge l'anime ai preferiti.
16
16
  """
17
17
  query = """
@@ -61,7 +61,7 @@ def getAnilistUserId(token) -> int:
61
61
  """
62
62
 
63
63
  header_anilist = {'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json', 'Accept': 'application/json'}
64
- risposta = requests.post('https://graphql.anilist.co',headers=header_anilist,json={'query' : query})
64
+ risposta = httpx.post('https://graphql.anilist.co', headers=header_anilist, json={'query': query})
65
65
  if risposta.status_code != 200:
66
66
  raise TokenError("Errore: Token AniList sbagliato")
67
67
 
@@ -98,8 +98,8 @@ def getAnimePrivateRating(token, user_id, id_anime: int) -> (float | None):
98
98
  'Authorization': f'Bearer {token}',
99
99
  'Content-Type': 'application/json', 'Accept': 'application/json'
100
100
  }
101
-
102
- risposta = requests.post('https://graphql.anilist.co',headers=header_anilist, json={'query': query, 'variables': var})
101
+
102
+ risposta = httpx.post('https://graphql.anilist.co', headers=header_anilist, json={'query': query, 'variables': var})
103
103
  if risposta.status_code != 200:
104
104
  return None
105
105
 
@@ -117,7 +117,7 @@ def requestModifyAnilist(token, query: str, var: dict):
117
117
  """
118
118
 
119
119
  header_anilist = {'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json', 'Accept': 'application/json'}
120
- risposta = requests.post('https://graphql.anilist.co',headers=header_anilist,json={'query' : query, 'variables' : var})
121
-
120
+ risposta = httpx.post('https://graphql.anilist.co', headers=header_anilist, json={'query': query, 'variables': var})
121
+
122
122
  if risposta.status_code != 200:
123
123
  print("Impossibile aggiornare AniList!")