Track bundled vendor runtime sources
This commit is contained in:
62
vendor/social-auto-upload/skills/douyin-upload/scripts/examples/douyin_cli_template.py
vendored
Normal file
62
vendor/social-auto-upload/skills/douyin-upload/scripts/examples/douyin_cli_template.py
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
|
||||
def run_command(command: list[str]) -> None:
|
||||
print("Running:", " ".join(shlex.quote(part) for part in command))
|
||||
subprocess.run(command, check=True)
|
||||
|
||||
|
||||
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.
|
||||
|
||||
commands = [
|
||||
["sau", "douyin", "login", "--account", account, "--headless"],
|
||||
["sau", "douyin", "check", "--account", account],
|
||||
[
|
||||
"sau",
|
||||
"douyin",
|
||||
"upload-video",
|
||||
"--account",
|
||||
account,
|
||||
"--file",
|
||||
"videos/demo.mp4",
|
||||
"--title",
|
||||
"Douyin video from Python",
|
||||
"--desc",
|
||||
"Douyin video description from Python",
|
||||
"--tags",
|
||||
"cli,video",
|
||||
"--thumbnail",
|
||||
"videos/demo.png",
|
||||
"--headless",
|
||||
],
|
||||
[
|
||||
"sau",
|
||||
"douyin",
|
||||
"upload-note",
|
||||
"--account",
|
||||
account,
|
||||
"--images",
|
||||
"videos/1.png",
|
||||
"videos/2.png",
|
||||
"--title",
|
||||
"Douyin note title from Python",
|
||||
"--note",
|
||||
"Douyin note from Python",
|
||||
"--tags",
|
||||
"cli,note",
|
||||
"--headless",
|
||||
],
|
||||
]
|
||||
|
||||
for command in commands:
|
||||
run_command(command)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
28
vendor/social-auto-upload/skills/douyin-upload/scripts/examples/douyin_commands.ps1
vendored
Normal file
28
vendor/social-auto-upload/skills/douyin-upload/scripts/examples/douyin_commands.ps1
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# PowerShell examples for the installed sau CLI.
|
||||
|
||||
# account_name is user-defined. One account_name maps to one account file.
|
||||
# You can prepare multiple account names and run them in parallel.
|
||||
$account = "account_a"
|
||||
$video = "videos/demo.mp4"
|
||||
$thumbnail = "videos/demo.png"
|
||||
$noteImages = @("videos/1.png", "videos/2.png")
|
||||
|
||||
sau douyin login --account $account --headless
|
||||
sau douyin check --account $account
|
||||
|
||||
sau douyin upload-video `
|
||||
--account $account `
|
||||
--file $video `
|
||||
--title "Douyin video from PowerShell" `
|
||||
--desc "Douyin video description from PowerShell" `
|
||||
--tags "cli,video" `
|
||||
--thumbnail $thumbnail `
|
||||
--headless
|
||||
|
||||
sau douyin upload-note `
|
||||
--account $account `
|
||||
--images $noteImages `
|
||||
--title "Douyin note title from PowerShell" `
|
||||
--note "Douyin note from PowerShell" `
|
||||
--tags "cli,note" `
|
||||
--headless
|
||||
29
vendor/social-auto-upload/skills/douyin-upload/scripts/examples/douyin_commands.sh
vendored
Normal file
29
vendor/social-auto-upload/skills/douyin-upload/scripts/examples/douyin_commands.sh
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# account_name is user-defined. One account_name maps to one account file.
|
||||
# You can prepare multiple account names and run them in parallel.
|
||||
account="account_a"
|
||||
video="videos/demo.mp4"
|
||||
thumbnail="videos/demo.png"
|
||||
|
||||
sau douyin login --account "$account" --headless
|
||||
sau douyin check --account "$account"
|
||||
|
||||
sau douyin upload-video \
|
||||
--account "$account" \
|
||||
--file "$video" \
|
||||
--title "Douyin video from bash" \
|
||||
--desc "Douyin video description from bash" \
|
||||
--tags "cli,video" \
|
||||
--thumbnail "$thumbnail" \
|
||||
--headless
|
||||
|
||||
sau douyin upload-note \
|
||||
--account "$account" \
|
||||
--images "videos/1.png" "videos/2.png" \
|
||||
--title "Douyin note title from bash" \
|
||||
--note "Douyin note from bash" \
|
||||
--tags "cli,note" \
|
||||
--headless
|
||||
Reference in New Issue
Block a user