Track bundled vendor runtime sources
This commit is contained in:
40
vendor/social-auto-upload/skills/bilibili-upload/scripts/examples/bilibili_cli_template.py
vendored
Normal file
40
vendor/social-auto-upload/skills/bilibili-upload/scripts/examples/bilibili_cli_template.py
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from conf import BASE_DIR
|
||||
from utils.constant import VideoZoneTypes
|
||||
|
||||
|
||||
def main() -> None:
|
||||
account = "account_a"
|
||||
# account_name is user-defined. One account_name maps to one account file.
|
||||
# You can prepare multiple account names and run them in parallel.
|
||||
cli_path = Path(BASE_DIR) / "sau_cli.py"
|
||||
command = [
|
||||
sys.executable,
|
||||
str(cli_path),
|
||||
"bilibili",
|
||||
"upload-video",
|
||||
"--account",
|
||||
account,
|
||||
"--file",
|
||||
str(Path(BASE_DIR) / "videos" / "demo.mp4"),
|
||||
"--title",
|
||||
"Bilibili CLI Demo",
|
||||
"--desc",
|
||||
"Bilibili CLI Demo",
|
||||
"--tid",
|
||||
str(VideoZoneTypes.SPORTS_FOOTBALL.value),
|
||||
"--tags",
|
||||
"足球,测试",
|
||||
"--schedule",
|
||||
"2026-03-26 16:00",
|
||||
]
|
||||
subprocess.run(command, check=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
21
vendor/social-auto-upload/skills/bilibili-upload/scripts/examples/bilibili_commands.ps1
vendored
Normal file
21
vendor/social-auto-upload/skills/bilibili-upload/scripts/examples/bilibili_commands.ps1
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# 登录
|
||||
# 建议由用户自己在本地真实终端里执行。
|
||||
# 如果终端二维码显示不完整,可以打开当前目录下的 qrcode.png 扫码。
|
||||
$account = "account_a"
|
||||
# account_name is user-defined. One account_name maps to one account file.
|
||||
# You can prepare multiple account names and run them in parallel.
|
||||
|
||||
sau bilibili login --account $account
|
||||
|
||||
# 校验
|
||||
sau bilibili check --account $account
|
||||
|
||||
# 上传视频
|
||||
sau bilibili upload-video `
|
||||
--account $account `
|
||||
--file .\videos\demo.mp4 `
|
||||
--title "Bilibili CLI Demo" `
|
||||
--desc "Bilibili CLI Demo" `
|
||||
--tid 249 `
|
||||
--tags 足球,测试 `
|
||||
--schedule "2026-03-26 16:00"
|
||||
21
vendor/social-auto-upload/skills/bilibili-upload/scripts/examples/bilibili_commands.sh
vendored
Normal file
21
vendor/social-auto-upload/skills/bilibili-upload/scripts/examples/bilibili_commands.sh
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# login
|
||||
# Run this in a local interactive terminal.
|
||||
# If the terminal QR code is incomplete, open ./qrcode.png and scan that image.
|
||||
account="account_a"
|
||||
# account_name is user-defined. One account_name maps to one account file.
|
||||
# You can prepare multiple account names and run them in parallel.
|
||||
|
||||
sau bilibili login --account "$account"
|
||||
|
||||
# check
|
||||
sau bilibili check --account "$account"
|
||||
|
||||
# upload video
|
||||
sau bilibili upload-video \
|
||||
--account "$account" \
|
||||
--file ./videos/demo.mp4 \
|
||||
--title "Bilibili CLI Demo" \
|
||||
--desc "Bilibili CLI Demo" \
|
||||
--tid 249 \
|
||||
--tags 足球,测试 \
|
||||
--schedule "2026-03-26 16:00"
|
||||
Reference in New Issue
Block a user