Open-AutoTools 0.0.3rc2__py3-none-any.whl → 0.0.3rc4__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: Open-AutoTools
3
- Version: 0.0.3rc2
3
+ Version: 0.0.3rc4
4
4
  Summary: A suite of automated tools accessible via CLI with a simple `autotools` command
5
5
  Home-page: https://github.com/BabylooPro/Open-AutoTools
6
6
  Author: BabylooPro
@@ -49,6 +49,8 @@ Requires-Dist: setuptools>=40.8.0
49
49
  Requires-Dist: language-tool-python>=2.7.1
50
50
  Requires-Dist: spacy>=3.7.2
51
51
  Requires-Dist: beautifulsoup4>=4.12.0
52
+ Requires-Dist: halo>=0.0.31
53
+ Requires-Dist: ffmpeg-python>=0.2.0
52
54
  Provides-Extra: test
53
55
  Requires-Dist: pytest>=7.4.0; extra == "test"
54
56
  Requires-Dist: pytest-cov>=4.1.0; extra == "test"
@@ -66,7 +68,19 @@ Dynamic: summary
66
68
 
67
69
  # Open-AutoTools
68
70
 
69
- Open-AutoTools is an innovative project developed in Python, specifically designed to offer a suite of automated tools directly accessible via the terminal. This project aims to simplify and automate daily tasks for developers and terminal users. It is designed to be used as a set of CLI commands, making its features directly accessible from the user's terminal.
71
+ [PYPI_BADGE]: https://badge.fury.io/py/Open-AutoTools.svg
72
+ [PYPI_URL]: https://pypi.org/project/Open-AutoTools/
73
+ [PYTHON_BADGE]: https://img.shields.io/badge/Python-3.11-blue.svg
74
+ [PYTHON_URL]: https://www.python.org/downloads/
75
+ [CHANGELOG_BADGE]: https://img.shields.io/badge/CHANGELOG-red.svg
76
+ [CHANGELOG_URL]: CHANGELOG.md
77
+ [TODO_BADGE]: https://img.shields.io/badge/TODO-purple.svg
78
+ [TODO_URL]: TODO.md
79
+ [TOTAL_STABILITY]: https://img.shields.io/badge/Total%20Stability-73%25-yellow
80
+
81
+ [![PyPI][PYPI_BADGE]][PYPI_URL] [![Python][PYTHON_BADGE]][PYTHON_URL] [![CHANGELOG][CHANGELOG_BADGE]][CHANGELOG_URL] [![TODO][TODO_BADGE]][TODO_URL] ![Total Stability][TOTAL_STABILITY]
82
+
83
+ Open-AutoTools is a comprehensive Python CLI toolkit that streamlines everyday developer tasks through a collection of powerful command-line utilities. Each tool is designed to enhance productivity directly from your terminal.
70
84
 
71
85
  https://github.com/BabylooPro/Open-AutoTools/assets/35376790/d57f2b9d-55f8-4368-bb40-c0010eb9d49a
72
86
 
@@ -99,7 +113,7 @@ pip install -e .
99
113
 
100
114
  ## Key Features
101
115
 
102
- ### AutoCaps
116
+ ### AutoCaps ![Stability][AUTOCAPS_EFF]
103
117
 
104
118
  - **Description:** Converts any text entered by the user to uppercase.
105
119
  - **Usage:**
@@ -111,7 +125,7 @@ pip install -e .
111
125
  YOUR TEXT HERE.
112
126
  ```
113
127
 
114
- ### AutoLower
128
+ ### AutoLower ![Stability][AUTOLOWER_EFF]
115
129
 
116
130
  - **Description:** Converts any text entered by the user to lowercase.
117
131
  - **Usage:**
@@ -123,7 +137,7 @@ pip install -e .
123
137
  your text here.
124
138
  ```
125
139
 
126
- ### AutoPassword
140
+ ### AutoPassword ![Stability][AUTOPASSWORD_EFF]
127
141
 
128
142
  - **Description:** Generates secure random passwords and encryption keys with customizable options.
129
143
  - **Usage:**
@@ -134,62 +148,18 @@ pip install -e .
134
148
  ~ ❯ autopassword --password-key "your-password" --analyze
135
149
  ```
136
150
  - **Options:**
137
- - `--length, -l`: Set password length (default: 12)
138
- - `--no-uppercase`: Exclude uppercase letters
139
- - `--no-numbers`: Exclude numbers
140
- - `--no-special`: Exclude special characters
141
- - `--min-special`: Minimum number of special characters (default: 1)
142
- - `--min-numbers`: Minimum number of numbers (default: 1)
143
- - `--gen-key`: Generate a random encryption key
144
- - `--password-key`: Generate an encryption key from a password
145
- - `--analyze`: Show password strength analysis
146
-
147
- These examples demonstrate how the terminal will display the results after executing each command, providing a straightforward way for users to understand the immediate effects of these commands.
148
-
149
- ### AutoTranslate
150
-
151
- - **Description:** Translates text between languages with automatic source language detection.
152
- - **Usage:**
153
-
154
- ```
155
- ~ ❯ autotranslate "Bonjour le monde" --to en
156
- Hello world
157
151
 
158
- ~ autotranslate "Hello world" --to fr --copy
159
- Bonjour le monde
160
- // Result also copied to clipboard
161
-
162
- ~ autotranslate "こんにちは" --to en --detect
163
- [Detected: ja] Hello
164
-
165
- ~ autotranslate --list-languages
166
- // Shows all supported languages
167
- ```
168
-
169
- - **Options:**
170
- - `--to`: Target language code (default: en)
171
- - `--from`: Source language code (default: auto-detect)
172
- - `--copy`: Copy translation to clipboard
173
- - `--detect`: Show detected source language
174
- - `--list-languages`: Show all supported language codes and names
175
-
176
- ### AutoSpell (unreleased)
177
-
178
- - **Description:** Checks and corrects spelling in text with multi-language support.
179
- - **Usage:**
180
- ```
181
- ~ ❯ autospell "Your text with misspellings"
182
- ~ ❯ autospell --lang fr "Votre texte avec des fautes"
183
- ~ ❯ autospell --file document.txt
184
- ```
185
- - **Options:**
186
- - `--lang`: Language code (default: en)
187
- - `--file`: Input from file
188
- - `--copy`: Copy corrected text to clipboard
189
- - `--suggest`: Show alternative suggestions
190
- - `--interactive`: Interactive correction mode
152
+ - `--length, -l`: Set password length (default: 12)
153
+ - `--no-uppercase, -u`: Exclude uppercase letters
154
+ - `--no-numbers, -n`: Exclude numbers
155
+ - `--no-special, -s`: Exclude special characters
156
+ - `--min-special, -m`: Minimum number of special characters (default: 1)
157
+ - `--min-numbers, -d`: Minimum number of numbers (default: 1)
158
+ - `--analyze, -a`: Show password strength analysis
159
+ - `--gen-key, -g`: Generate a random encryption key
160
+ - `--password-key, -p`: Generate an encryption key from password
191
161
 
192
- ### AutoDownload
162
+ ### AutoDownload ![Stability][AUTODOWNLOAD_EFF]
193
163
 
194
164
  - **Description:** Downloads videos from YouTube and files from other sources.
195
165
  - **Usage:**
@@ -205,81 +175,40 @@ These examples demonstrate how the terminal will display the results after execu
205
175
 
206
176
  - **Options:**
207
177
 
208
- - `--format`: Choose output format (mp4 or mp3)
209
- - `--quality`: Select video quality (best, 1440p, 1080p, 720p, 480p, 360p, 240p)
178
+ - `--format, -f`: Choose output format (mp4 or mp3)
179
+ - `--quality, -q`: Select video quality (best, 1440p, 1080p, 720p, 480p, 360p, 240p)
210
180
 
211
181
  - **Features:**
212
182
 
213
183
  - Automatic bot detection bypass
214
- - Browser cookie integration
215
- - Progress tracking
184
+ - Mobile API integration for better Stability
185
+ - Progress tracking with detailed status
216
186
  - Multiple quality options
217
187
  - MP3 audio extraction
218
188
  - Downloads to user's Downloads folder
219
189
  - Supports both YouTube and general file downloads
190
+ - File existence checks with user prompts
220
191
 
221
192
  - **Setup Requirements:**
222
193
 
223
- - Chrome browser installed and configured:
224
-
225
- ```bash
226
- # First time setup:
227
- 1. Open Chrome and sign in to YouTube
228
- 2. Make sure you're logged into your Google account
229
- 3. Accept YouTube's terms of service in browser
230
- ```
231
-
232
- - **Troubleshooting:**
233
-
234
- - If downloads fail with "Sign in to confirm you're not a bot":
235
-
236
- 1. Open YouTube in Chrome
237
- 2. Sign in if not already
238
- 3. Solve any CAPTCHA if prompted
239
- 4. Try download again
240
-
241
- - If you get cookie errors:
242
- 1. Clear Chrome cookies
243
- 2. Sign in to YouTube again
244
- 3. Wait a few minutes before downloading
245
-
194
+ - No special setup required
246
195
  - **Technical Requirements:**
247
- - Chrome browser (for cookie and session handling)
248
- - Active YouTube/Google account
249
196
  - Internet connection
250
197
  - Sufficient storage space
251
198
  - yt-dlp library (automatically installed)
199
+ - FFmpeg (required for format conversion)
252
200
 
253
- > **Note:** The tool uses your Chrome browser's cookies to authenticate with YouTube. This is required to bypass YouTube's bot detection and download restrictions.
201
+ > **Note:** The tool uses YouTube's mobile API for better compatibility and reliability.
254
202
 
255
- ### AutoIP
203
+ ### AutoIP ![Stability][AUTOIP_EFF]
256
204
 
257
205
  - **Description:** Displays network information including IP addresses, connectivity tests, speed tests, and more.
258
206
  - **Usage:**
259
207
 
260
208
  ```bash
261
- # Display IP addresses
262
209
  ~ ❯ autoip
263
-
264
- # Run speed test
265
210
  ~ ❯ autoip --speed
266
-
267
- # Test connectivity
268
- ~ ❯ autoip --test
269
-
270
- # Show location info
271
211
  ~ ❯ autoip --location
272
-
273
- # Monitor network traffic
274
- ~ ❯ autoip --monitor
275
-
276
- # Check common ports
277
- ~ ❯ autoip --ports
278
-
279
- # Show DNS servers
280
- ~ ❯ autoip --dns
281
-
282
- # Hide IP display and only show tests
283
212
  ~ ❯ autoip --no-ip --test --speed
284
213
  ```
285
214
 
@@ -288,6 +217,7 @@ These examples demonstrate how the terminal will display the results after execu
288
217
  - `--test, -t`: Run connectivity tests to popular services
289
218
  - `--speed, -s`: Run internet speed test
290
219
  - `--monitor, -m`: Monitor real-time network traffic
220
+ - `--interval, -i`: Monitoring interval in seconds
291
221
  - `--ports, -p`: Check status of common ports
292
222
  - `--dns, -d`: Show DNS server configuration
293
223
  - `--location, -l`: Show IP geolocation information
@@ -297,11 +227,82 @@ These examples demonstrate how the terminal will display the results after execu
297
227
  - Local and public IP detection (IPv4 & IPv6)
298
228
  - Internet speed testing
299
229
  - Network connectivity checks
230
+ - Monitoring interval (10 seconds)
300
231
  - Real-time traffic monitoring
301
232
  - Port scanning
302
233
  - DNS server information
303
234
  - IP geolocation
304
235
 
236
+ ### AutoTranslate ![Stability][AUTOTRANSLATE_EFF]
237
+
238
+ - **Description:** Translates text between languages with automatic source language detection.
239
+ - **Usage:**
240
+
241
+ ```
242
+ ~ ❯ autotranslate "Bonjour le monde" --to en
243
+ Hello world
244
+
245
+ ~ ❯ autotranslate "Hello world" --to fr --copy
246
+ Bonjour le monde
247
+ // Result also copied to clipboard
248
+
249
+ ~ ❯ autotranslate "こんにちは" --to en --detect
250
+ [Detected: ja] Hello
251
+
252
+ ~ ❯ autotranslate --list-languages
253
+ // Shows all supported languages
254
+ ```
255
+
256
+ - **Options:**
257
+ - `--to`: Target language code (default: en)
258
+ - `--from`: Source language code (default: auto-detect)
259
+ - `--copy`: Copy translation to clipboard
260
+ - `--detect`: Show detected source language
261
+ - `--list-languages`: Show all supported language codes and names
262
+ - `--output, -o`: Save translation to file
263
+
264
+ ### AutoSpell (unreleased) ![Stability][AUTOSPELL_EFF]
265
+
266
+ - **Description:** Checks and corrects spelling in text with multi-language support.
267
+ - **Usage:**
268
+ ```
269
+ ~ ❯ autospell "Your text with misspellings"
270
+ ~ ❯ autospell --lang fr "Votre texte avec des fautes"
271
+ ~ ❯ autospell --fix "Text to autocorrect"
272
+ ```
273
+ - **Options:**
274
+ - `--lang, -l`: Language code (default: auto)
275
+ - `--fix, -f`: Auto-fix text and copy to clipboard
276
+ - `--copy, -c`: Copy result to clipboard
277
+ - `--list-languages`: Show supported languages
278
+ - `--json, -j`: Output results as JSON
279
+ - `--ignore, -i`: Error types to ignore (spelling/grammar/style/punctuation)
280
+ - `--interactive, -n`: Interactive mode - confirm each correction
281
+ - `--output, -o`: Save corrections to file
282
+
283
+ ### Test Suite (DEVELOPMENT ONLY)
284
+
285
+ - **Description:** Run the test suite for Open-AutoTools
286
+ - **Usage:**
287
+ ```bash
288
+ ~ ❯ autotools test
289
+ ```
290
+ - **Options:**
291
+
292
+ - `--unit, -u`: Run only unit tests
293
+ - `--integration, -i`: Run only integration tests
294
+ - `--no-cov`: Disable coverage report
295
+ - `--html`: Generate HTML coverage report
296
+ - `--module, -m`: Test specific module (e.g., autocaps, autolower)
297
+
305
298
  ## License
306
299
 
307
300
  This project is licensed under the MIT License. For more details, see the [LICENSE](LICENSE) file.
301
+
302
+ [AUTOCAPS_EFF]: https://img.shields.io/badge/Stability-99%25-success
303
+ [AUTOLOWER_EFF]: https://img.shields.io/badge/Stability-99%25-success
304
+ [AUTOPASSWORD_EFF]: https://img.shields.io/badge/Stability-90%25-success
305
+ [AUTOTRANSLATE_EFF]: https://img.shields.io/badge/Stability-25%25-red
306
+ [AUTOSPELL_EFF]: https://img.shields.io/badge/Stability-25%25-red
307
+ [AUTODOWNLOAD_EFF]: https://img.shields.io/badge/Stability-75%25-yellow
308
+ [AUTOIP_EFF]: https://img.shields.io/badge/Stability-95%25-success
@@ -1,31 +1,44 @@
1
1
  autotools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- autotools/cli.py,sha256=FczekeSEiPjjbfw-tBT2alYbEVaHLVC7skN4QjTjKN4,23432
2
+ autotools/cli.py,sha256=WBFH0NZwUW3QpoB_dOW-Ukpul_klc8PJSptfALewU04,3538
3
3
  autotools/autocaps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ autotools/autocaps/commands.py,sha256=YIoSRTjfwpupbUl5r4P6LH6PXrTBcehf9gZwOOKxv9I,477
4
5
  autotools/autocaps/core.py,sha256=NnOacVp0kMoq__KHWi5UMcApSuq6Iyo5bFxN40dRw7U,253
5
6
  autotools/autocaps/tests/__init__.py,sha256=CckydfM7SZdXtW3pLgAeRdrC60sovNx_v59nyFvslFo,23
6
7
  autotools/autocaps/tests/test_autocaps_core.py,sha256=fzpci_sK7L1fSf_IJ1paJ__bmnHwC9OUOD7ftd3w07c,1672
7
8
  autotools/autocaps/tests/test_autocaps_integration.py,sha256=Qe2hzVEvzf0-INp14oTTrHi0RiRDCE2fxo9abVNcd_E,1435
8
9
  autotools/autodownload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- autotools/autodownload/core.py,sha256=rd-jWYiNduRC9VUfl-jGBe13NhhmjeL07FGqdp_Eii8,8358
10
+ autotools/autodownload/commands.py,sha256=WBG4o5716zQ63t23k-qJLNv41L58RnL2XTvNl_TsK-w,1442
11
+ autotools/autodownload/core.py,sha256=hM7RzNhUlhWFjVhMI3e3PSnpzQN21wYUZmgM9mmLsyg,14429
10
12
  autotools/autoip/__init__.py,sha256=T_5hz9G4reFPXDucdzRoMFPYlAKwTPt9TejOpkRPgn0,23
13
+ autotools/autoip/commands.py,sha256=c4s22yb7aharRAwOmD37Kgbj6rm05XNBtCVyxU7rc7M,1425
11
14
  autotools/autoip/core.py,sha256=Q3dzLstZQruwYkSbCSlKQNmKVGCyNpo1DGst5VFtHLU,10123
12
15
  autotools/autoip/tests/__init__.py,sha256=CckydfM7SZdXtW3pLgAeRdrC60sovNx_v59nyFvslFo,23
13
16
  autotools/autoip/tests/test_autoip_core.py,sha256=Q8865qqhopcGBzS4mIlDlEzxu-mTIbZxpgJyzIyuQXc,2153
14
17
  autotools/autoip/tests/test_autoip_integration.py,sha256=-vS2gnY8ZfT-tfY2FRbUtTzY0lcIBtVZHbPbWsKyueo,2746
15
18
  autotools/autolower/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ autotools/autolower/commands.py,sha256=Od_5hWGjFr8CLApmtMnoM5QhNRe1ttWy2qLi7S9hTts,480
16
20
  autotools/autolower/core.py,sha256=vjM2ognA3tDCbv10a9vta9WPuAiqTPjOXZ1JHL_b-nk,260
17
21
  autotools/autolower/tests/__init__.py,sha256=CckydfM7SZdXtW3pLgAeRdrC60sovNx_v59nyFvslFo,23
18
22
  autotools/autolower/tests/test_autolower_core.py,sha256=ChkS3qZgXz75iLfC9EXVH_kMd-sjaxpRKFjaxKoBnxo,1694
19
23
  autotools/autolower/tests/test_autolower_integration.py,sha256=M2yN1Ym7kGulys62-IwKq-uWn7CFvI3sCnoo-e3CTaA,1446
20
24
  autotools/autopassword/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
21
- autotools/autopassword/core.py,sha256=GQrd-QGWpgxuq6Nf28URcTZRku8Gji1NfpbecXAsIF0,3146
25
+ autotools/autopassword/commands.py,sha256=lyNM833UXCcafqnBa0ojxpdgPPEUadO-t2HrAP4UIaM,3137
26
+ autotools/autopassword/core.py,sha256=3aeXJaF7yYvHAH0VkVxGxaKawxgZDlSoI5lUcDCu264,3193
22
27
  autotools/autospell/__init__.py,sha256=jkpkiE7pksBgllXKfkNpYYvqtlm8vN0h4kXnQOqcb_U,60
28
+ autotools/autospell/commands.py,sha256=SG_kP9xAOj7H2jnXXq7auwRALt5ml6r0oz8dKnE5z04,5956
23
29
  autotools/autospell/core.py,sha256=WPvi9Xs6uF3dte_g2I9oHfTjCV1-NasrJElLP9bbC8U,8103
24
30
  autotools/autotranslate/__init__.py,sha256=6BxuZqhyQhfsZ5x7DkB1BAEpC08GT_5l5bl0AY_eLpU,64
31
+ autotools/autotranslate/commands.py,sha256=6M1D27mrk41uWTLgwGeO-HTUtq0iiHFrptIb1BM7A-s,1794
25
32
  autotools/autotranslate/core.py,sha256=H2f90IWr_jNGiJD3XAv-20i5sRGM-VDYWrYt65EDEkI,1836
26
- Open_AutoTools-0.0.3rc2.dist-info/LICENSE,sha256=SpbSRxNWos2l0-geleCa6d0L9G_bOsZRkY4rB9OduJ0,1069
27
- Open_AutoTools-0.0.3rc2.dist-info/METADATA,sha256=UdpA1NEK1ilsER2aLOBwTlAUdqsZlSJ6NYcjif314n0,9120
28
- Open_AutoTools-0.0.3rc2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
29
- Open_AutoTools-0.0.3rc2.dist-info/entry_points.txt,sha256=QLIsUk6vHo0wAYDk1K74kIuYunJMwWe2xbwQhJXLoKo,312
30
- Open_AutoTools-0.0.3rc2.dist-info/top_level.txt,sha256=x5ZRvdQw7DQnVmR0YDqVSAuuS94KTHDmk6uIeW7YOPw,10
31
- Open_AutoTools-0.0.3rc2.dist-info/RECORD,,
33
+ autotools/test/__init__.py,sha256=_xWAfk2kKSboEOW9fVUlmNfVHAx-qGYWFb8dxCz8g1w,48
34
+ autotools/test/commands.py,sha256=ZDSl-BCCeH1CsGjpQr_b6x3cMEGK8dSgNdPDqXgSxpw,4846
35
+ autotools/utils/__init__.py,sha256=2uAirI6ZbOwSFPSg5wuEjA0gMWf1XBJ4yP_WcGeND7M,183
36
+ autotools/utils/loading.py,sha256=cRh8rvNLT4B2aVgWq7flg8bNpnp1XlNBV3_cvxjfm8E,439
37
+ autotools/utils/updates.py,sha256=ZGS8pAVxvy5ORuey_zrBWdA0_hKNmEcwzJ-6c22x4Yo,1140
38
+ autotools/utils/version.py,sha256=sHwkZ8MNTKQdTntV1B-8QInbMnMtR7Xr3DAY5-wf5-0,3027
39
+ Open_AutoTools-0.0.3rc4.dist-info/LICENSE,sha256=SpbSRxNWos2l0-geleCa6d0L9G_bOsZRkY4rB9OduJ0,1069
40
+ Open_AutoTools-0.0.3rc4.dist-info/METADATA,sha256=QspEAu8ipTWu606dWGmKdy1FYRxBTOp5nNH7JRZEemA,10086
41
+ Open_AutoTools-0.0.3rc4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
42
+ Open_AutoTools-0.0.3rc4.dist-info/entry_points.txt,sha256=QLIsUk6vHo0wAYDk1K74kIuYunJMwWe2xbwQhJXLoKo,312
43
+ Open_AutoTools-0.0.3rc4.dist-info/top_level.txt,sha256=x5ZRvdQw7DQnVmR0YDqVSAuuS94KTHDmk6uIeW7YOPw,10
44
+ Open_AutoTools-0.0.3rc4.dist-info/RECORD,,
@@ -0,0 +1,17 @@
1
+ import click
2
+ from .core import autocaps_transform
3
+ from ..utils.loading import LoadingAnimation
4
+ from ..utils.updates import check_for_updates
5
+
6
+ @click.command()
7
+ @click.argument('text', nargs=-1)
8
+ def autocaps(text):
9
+ """Convert text to UPPERCASE."""
10
+ with LoadingAnimation():
11
+ result = autocaps_transform(" ".join(text))
12
+ click.echo(result)
13
+
14
+ # UPDATE CHECK AT THE END
15
+ update_msg = check_for_updates()
16
+ if update_msg:
17
+ click.echo(update_msg)
@@ -0,0 +1,38 @@
1
+ import click
2
+ import sys
3
+ from .core import download_youtube_video, download_file, validate_youtube_url
4
+ from ..utils.loading import LoadingAnimation
5
+ from ..utils.updates import check_for_updates
6
+
7
+ @click.command()
8
+ @click.argument('url')
9
+ @click.option('--format', '-f', type=click.Choice(['mp4', 'mp3'], case_sensitive=False),
10
+ default='mp4', help='Output file format (mp4 for video, mp3 for audio)')
11
+ @click.option('--quality', '-q', type=click.Choice(['best', '2160p', '1440p', '1080p', '720p', '480p', '360p', '240p'],
12
+ case_sensitive=False), default='best', help='Video quality (mp4 only)')
13
+ def autodownload(url, format, quality):
14
+ """Download videos from YouTube or files from any URL.
15
+
16
+ Supports YouTube video download with quality selection and format conversion (mp4/mp3).
17
+
18
+ For non-YouTube URLs, downloads the file directly."""
19
+
20
+ loading = LoadingAnimation()
21
+
22
+ if "youtube.com" in url or "youtu.be" in url:
23
+ with loading:
24
+ if not validate_youtube_url(url):
25
+ click.echo("Invalid YouTube URL", err=True)
26
+ sys.exit(1)
27
+
28
+ if not download_youtube_video(url, format, quality):
29
+ sys.exit(1)
30
+ else:
31
+ with loading:
32
+ if not download_file(url):
33
+ sys.exit(1)
34
+
35
+ # UPDATE CHECK AT THE END
36
+ update_msg = check_for_updates()
37
+ if update_msg:
38
+ click.echo(update_msg)