ysaas 0.1.0__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.
- ysaas-0.1.0/LICENSE +22 -0
- ysaas-0.1.0/PKG-INFO +77 -0
- ysaas-0.1.0/README.md +59 -0
- ysaas-0.1.0/pyproject.toml +31 -0
- ysaas-0.1.0/setup.cfg +4 -0
- ysaas-0.1.0/src/ysaas/__init__.py +3 -0
- ysaas-0.1.0/src/ysaas/__main__.py +3 -0
- ysaas-0.1.0/src/ysaas/cli.py +508 -0
- ysaas-0.1.0/src/ysaas/config.py +195 -0
- ysaas-0.1.0/src/ysaas/db.py +198 -0
- ysaas-0.1.0/src/ysaas/downloader.py +49 -0
- ysaas-0.1.0/src/ysaas/filters.py +39 -0
- ysaas-0.1.0/src/ysaas/models.py +11 -0
- ysaas-0.1.0/src/ysaas/monitor.py +33 -0
- ysaas-0.1.0/src/ysaas/notifier.py +22 -0
- ysaas-0.1.0/src/ysaas/pipeline.py +185 -0
- ysaas-0.1.0/src/ysaas/uploader.py +118 -0
- ysaas-0.1.0/src/ysaas.egg-info/PKG-INFO +77 -0
- ysaas-0.1.0/src/ysaas.egg-info/SOURCES.txt +26 -0
- ysaas-0.1.0/src/ysaas.egg-info/dependency_links.txt +1 -0
- ysaas-0.1.0/src/ysaas.egg-info/entry_points.txt +2 -0
- ysaas-0.1.0/src/ysaas.egg-info/requires.txt +9 -0
- ysaas-0.1.0/src/ysaas.egg-info/top_level.txt +1 -0
- ysaas-0.1.0/tests/test_config.py +58 -0
- ysaas-0.1.0/tests/test_db.py +65 -0
- ysaas-0.1.0/tests/test_filters.py +29 -0
- ysaas-0.1.0/tests/test_pipeline.py +190 -0
- ysaas-0.1.0/tests/test_uploader_helpers.py +42 -0
ysaas-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 hetaaaaaaaansh (Venus77)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
ysaas-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ysaas
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Terminal tool that monitors YouTube channels you have permission to reuse, downloads their Shorts, and uploads them to your own channel.
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: feedparser>=6.0
|
|
10
|
+
Requires-Dist: yt-dlp>=2024.1.0
|
|
11
|
+
Requires-Dist: google-auth-oauthlib>=1.0
|
|
12
|
+
Requires-Dist: google-api-python-client>=2.100
|
|
13
|
+
Requires-Dist: typer>=0.12
|
|
14
|
+
Requires-Dist: rich>=13.0
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# YSAAS
|
|
20
|
+
|
|
21
|
+
A local command-line tool for monitoring YouTube channels, downloading eligible vertical videos, and uploading them to a YouTube channel. Credit and a source link do not grant permission.
|
|
22
|
+
|
|
23
|
+
Uploads by default as **private**. This is a community project, not an official YouTube or Google product.
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
ysaas setup # configuration
|
|
27
|
+
ysaas auth # authorize the upload account(channel)
|
|
28
|
+
ysaas channels add NAME ID # add a permitted source channel
|
|
29
|
+
ysaas channels list # list configured source channels
|
|
30
|
+
ysaas doctor # check setup
|
|
31
|
+
ysaas run # download, then upload
|
|
32
|
+
ysaas status # daily totals and backlog
|
|
33
|
+
ysaas logs # recent local log entries
|
|
34
|
+
ysaas retry # reset failed items
|
|
35
|
+
ysaas menu # interactive command menu
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Per-user Google setup
|
|
40
|
+
|
|
41
|
+
Each user configures their own installation and authorizes uploads to channel they own or manage. The app does not share credentials between users.
|
|
42
|
+
|
|
43
|
+
- **OAuth client JSON:** Create a Google Cloud project, enable YouTube Data API v3, create an OAuth client ID for a Desktop app, and provide that downloaded JSON to `ysaas setup`.
|
|
44
|
+
- **Upload channel:** Setup records the intended channel name or URL as a reminder. `ysaas auth` opens Google sign-in; use the Google account/channel that manages that destination and verify it before granting access. The profile name keeps token files separate. The Data API uploads to the channel associated with the authorized account; the reminder does not route uploads or switch channels within an account.
|
|
45
|
+
- **Source channels:** Add a channel ID, URL, or @handle. Only add channels whose videos you have permission to dowload and reuse.
|
|
46
|
+
|
|
47
|
+
The OAuth client JSON and user token stay in the local config directory and are excluded by `.gitignore`. Never commit them or share a token file. Revoke exposed credentials in Google Cloud.
|
|
48
|
+
|
|
49
|
+
## Requirements
|
|
50
|
+
|
|
51
|
+
Requires Python 3.10+ and [FFmpeg](https://ffmpeg.org/) on PATH.
|
|
52
|
+
|
|
53
|
+
In Google Cloud, enable YouTube Data API v3 and create an OAuth client ID with application type **Desktop app**. The first run opens a browser for consent. Consent-screen or app-verification requirements depend on how the OAuth app is configured and distributed; check Google's current guidance.
|
|
54
|
+
|
|
55
|
+
## Setup, logs, notifications
|
|
56
|
+
|
|
57
|
+
`ysaas setup` creates or edits `config/settings.json` and prompts for:
|
|
58
|
+
|
|
59
|
+
1. The user's OAuth Desktop client JSON. It is copied to the ignored `config/client_secret.json`.
|
|
60
|
+
2. An upload profile name for the local token file, plus the intended upload channel name or URL as a reminder.
|
|
61
|
+
3. Source channel labels and IDs, URLs, or @handles.
|
|
62
|
+
4. An optional Discord webhook URL for alerts. Leave blank to disable notifications.
|
|
63
|
+
|
|
64
|
+
An API key is deliberately not requested because it cannot authorize uploads. Do not paste an API key in place of the OAuth JSON.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
Use `--config PATH` or `YSAAS_CONFIG` to select a different settings file. Logs are written to `logs/ysaas.log` with rotation. Optional Discord alerts report run summaries and stop conditions. Anyone with the webhook URL can post to that channel; keep it in the ignored local settings file. Notification failure does not stop a run.
|
|
68
|
+
|
|
69
|
+
To schedule a daily run, use your operating system's scheduler. Linux/macOS cron example: `0 9 * * * cd /path/to/ysaas && /path/to/ysaas/.venv/bin/ysaas run`.
|
|
70
|
+
|
|
71
|
+
## Settings and limitations
|
|
72
|
+
|
|
73
|
+
`config/settings.example.json` documents defaults for daily caps, retry attempts, backlog threshold, upload privacy, credit text, and deleting local files after upload. Upload privacy defaults to `private`. API quota and account limits depend on current Google policies and the user's Cloud project; check Google Cloud quota rather than relying on a fixed upload/day estimate.
|
|
74
|
+
|
|
75
|
+
YouTube RSS exposes only a limited set of recent videos, so run regularly. “Short” detection uses vertical orientation and configured maximum duration; it does not use YouTube's own Shorts classification. One setup profile authorizes one account/channel context.
|
|
76
|
+
|
|
77
|
+
Settings, OAuth client credentials, tokens, database, logs, downloads, and MP4 files are ignored by Git. Review `git status` and staged files before publishing.
|
ysaas-0.1.0/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# YSAAS
|
|
2
|
+
|
|
3
|
+
A local command-line tool for monitoring YouTube channels, downloading eligible vertical videos, and uploading them to a YouTube channel. Credit and a source link do not grant permission.
|
|
4
|
+
|
|
5
|
+
Uploads by default as **private**. This is a community project, not an official YouTube or Google product.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
ysaas setup # configuration
|
|
9
|
+
ysaas auth # authorize the upload account(channel)
|
|
10
|
+
ysaas channels add NAME ID # add a permitted source channel
|
|
11
|
+
ysaas channels list # list configured source channels
|
|
12
|
+
ysaas doctor # check setup
|
|
13
|
+
ysaas run # download, then upload
|
|
14
|
+
ysaas status # daily totals and backlog
|
|
15
|
+
ysaas logs # recent local log entries
|
|
16
|
+
ysaas retry # reset failed items
|
|
17
|
+
ysaas menu # interactive command menu
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Per-user Google setup
|
|
22
|
+
|
|
23
|
+
Each user configures their own installation and authorizes uploads to channel they own or manage. The app does not share credentials between users.
|
|
24
|
+
|
|
25
|
+
- **OAuth client JSON:** Create a Google Cloud project, enable YouTube Data API v3, create an OAuth client ID for a Desktop app, and provide that downloaded JSON to `ysaas setup`.
|
|
26
|
+
- **Upload channel:** Setup records the intended channel name or URL as a reminder. `ysaas auth` opens Google sign-in; use the Google account/channel that manages that destination and verify it before granting access. The profile name keeps token files separate. The Data API uploads to the channel associated with the authorized account; the reminder does not route uploads or switch channels within an account.
|
|
27
|
+
- **Source channels:** Add a channel ID, URL, or @handle. Only add channels whose videos you have permission to dowload and reuse.
|
|
28
|
+
|
|
29
|
+
The OAuth client JSON and user token stay in the local config directory and are excluded by `.gitignore`. Never commit them or share a token file. Revoke exposed credentials in Google Cloud.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
Requires Python 3.10+ and [FFmpeg](https://ffmpeg.org/) on PATH.
|
|
34
|
+
|
|
35
|
+
In Google Cloud, enable YouTube Data API v3 and create an OAuth client ID with application type **Desktop app**. The first run opens a browser for consent. Consent-screen or app-verification requirements depend on how the OAuth app is configured and distributed; check Google's current guidance.
|
|
36
|
+
|
|
37
|
+
## Setup, logs, notifications
|
|
38
|
+
|
|
39
|
+
`ysaas setup` creates or edits `config/settings.json` and prompts for:
|
|
40
|
+
|
|
41
|
+
1. The user's OAuth Desktop client JSON. It is copied to the ignored `config/client_secret.json`.
|
|
42
|
+
2. An upload profile name for the local token file, plus the intended upload channel name or URL as a reminder.
|
|
43
|
+
3. Source channel labels and IDs, URLs, or @handles.
|
|
44
|
+
4. An optional Discord webhook URL for alerts. Leave blank to disable notifications.
|
|
45
|
+
|
|
46
|
+
An API key is deliberately not requested because it cannot authorize uploads. Do not paste an API key in place of the OAuth JSON.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Use `--config PATH` or `YSAAS_CONFIG` to select a different settings file. Logs are written to `logs/ysaas.log` with rotation. Optional Discord alerts report run summaries and stop conditions. Anyone with the webhook URL can post to that channel; keep it in the ignored local settings file. Notification failure does not stop a run.
|
|
50
|
+
|
|
51
|
+
To schedule a daily run, use your operating system's scheduler. Linux/macOS cron example: `0 9 * * * cd /path/to/ysaas && /path/to/ysaas/.venv/bin/ysaas run`.
|
|
52
|
+
|
|
53
|
+
## Settings and limitations
|
|
54
|
+
|
|
55
|
+
`config/settings.example.json` documents defaults for daily caps, retry attempts, backlog threshold, upload privacy, credit text, and deleting local files after upload. Upload privacy defaults to `private`. API quota and account limits depend on current Google policies and the user's Cloud project; check Google Cloud quota rather than relying on a fixed upload/day estimate.
|
|
56
|
+
|
|
57
|
+
YouTube RSS exposes only a limited set of recent videos, so run regularly. “Short” detection uses vertical orientation and configured maximum duration; it does not use YouTube's own Shorts classification. One setup profile authorizes one account/channel context.
|
|
58
|
+
|
|
59
|
+
Settings, OAuth client credentials, tokens, database, logs, downloads, and MP4 files are ignored by Git. Review `git status` and staged files before publishing.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ysaas"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Terminal tool that monitors YouTube channels you have permission to reuse, downloads their Shorts, and uploads them to your own channel."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
dependencies = [
|
|
13
|
+
"feedparser>=6.0",
|
|
14
|
+
"yt-dlp>=2024.1.0",
|
|
15
|
+
"google-auth-oauthlib>=1.0",
|
|
16
|
+
"google-api-python-client>=2.100",
|
|
17
|
+
"typer>=0.12",
|
|
18
|
+
"rich>=13.0",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
dev = ["pytest>=8.0"]
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
ysaas = "ysaas.cli:app"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.packages.find]
|
|
28
|
+
where = ["src"]
|
|
29
|
+
|
|
30
|
+
[tool.pytest.ini_options]
|
|
31
|
+
testpaths = ["tests"]
|
ysaas-0.1.0/setup.cfg
ADDED