Track bundled vendor runtime sources
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled

This commit is contained in:
2026-07-07 10:05:50 +08:00
parent fbe179ab53
commit 52636c91ae
2111 changed files with 1850012 additions and 14 deletions

View 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", "xiaohongshu", "login", "--account", account, "--headless"],
["sau", "xiaohongshu", "check", "--account", account],
[
"sau",
"xiaohongshu",
"upload-video",
"--account",
account,
"--file",
"videos/demo.mp4",
"--title",
"Xiaohongshu video from Python",
"--desc",
"Xiaohongshu video description from Python",
"--tags",
"cli,video",
"--thumbnail",
"videos/demo.png",
"--headless",
],
[
"sau",
"xiaohongshu",
"upload-note",
"--account",
account,
"--images",
"videos/1.png",
"videos/2.png",
"--title",
"Xiaohongshu note title from Python",
"--note",
"Xiaohongshu note from Python",
"--tags",
"cli,note",
"--headless",
],
]
for command in commands:
run_command(command)
if __name__ == "__main__":
main()

View 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 xiaohongshu login --account $account --headless
sau xiaohongshu check --account $account
sau xiaohongshu upload-video `
--account $account `
--file $video `
--title "Xiaohongshu video from PowerShell" `
--desc "Xiaohongshu video description from PowerShell" `
--tags "cli,video" `
--thumbnail $thumbnail `
--headless
sau xiaohongshu upload-note `
--account $account `
--images $noteImages `
--title "Xiaohongshu note title from PowerShell" `
--note "Xiaohongshu note from PowerShell" `
--tags "cli,note" `
--headless

View 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 xiaohongshu login --account "$account" --headless
sau xiaohongshu check --account "$account"
sau xiaohongshu upload-video \
--account "$account" \
--file "$video" \
--title "Xiaohongshu video from bash" \
--desc "Xiaohongshu video description from bash" \
--tags "cli,video" \
--thumbnail "$thumbnail" \
--headless
sau xiaohongshu upload-note \
--account "$account" \
--images "videos/1.png" "videos/2.png" \
--title "Xiaohongshu note title from bash" \
--note "Xiaohongshu note from bash" \
--tags "cli,note" \
--headless