Use sau dayu; do not write a separate set of web publishing logic. First run sau dayu --help. For specific parameters, refer to upload-video --help、upload-article --help and verify --help . Run the repository environment in the project root directory; on Windows, when the command is not added to PATH, use .\.venv\Scripts\sau.exe. Do not rely on fixed test accounts or local paths.
Account and Input
- When using an existing account, run
sau dayu check --account <本地账号名>. On first use or when login has expired, runsau dayu login --account <本地账号名> --expected-name "用户指定的大鱼号名称"and have the user log in in the opened Chrome. The CLI binds the publishing entity and rejects the wrong account. - Videos must provide
--file、--title、--thumbnail、--category、--source. Videos must be at least 5 seconds; titles 5–60 characters (English counts as half a character); covers at most 5 MB. Select the category from the CLI's choices; do not guess categories outside the page. - Articles must provide
--title、--content-file、--source. Titles 5–50 characters (English counts as half a character, rounded up); the body is a UTF-8 HTML/Markdown/TXT file, up to 20,000 characters. Put long text in a file; do not concatenate it into the command line. Images use local paths; relative paths start from the directory containing the body file, and each image is at most 5 MB. - The information source must be selected according to the actual content:
无需标注、AI生成、虚构演绎、营销信息、转载、个人观点、不适宜未成年人. Reposts must also provide--source-url "https://原文地址"; other sources do not pass an original link.
Commands
sau dayu upload-video --account <本地账号名> --file "视频.mp4" --title "用户的视频标题" --category "科技" --source "无需标注" --thumbnail "封面.jpg"
sau dayu upload-article --account <本地账号名> --title "用户的文章标题" --content-file "文章.html" --source "无需标注" --cover-indices 1
The above will actually publish; the materials, entity, and publishing intent follow the authorization the user has already given. To only request a preparation check, add --prepare-only: it uploads materials, fills the form, and saves local screenshots, but does not publish and does not save a recoverable draft.
Using Markdown for the first time requires Node.js 22+ and running sau article setup. In the article command, pass --content-file "文章.md" --theme modern; theme options are default/grace/simple/modern/plain, default default. Do not pass --themefor HTML/TXT. You can first use sau article render --content-file "文章.md" --theme modern --output "预览.html" to render locally. Dayu uses compatible layout, preserving text color, background, and approximate font size; rounded corners, exact fonts, and spacing are not guaranteed to match. Before final publishing, the server-side theme preview will be checked.
Videos optionally include --desc, comma-separated --tags; articles optionally include --author、--cover-indices 1 or --cover-indices 1 3 2. Cover indices start from 1 in the order of images in the body, and the three covers must be different. Articles have no category or tag fields. Vertical covers, material libraries, document import, body videos, and independent draft saving are not yet integrated; do not claim the command already supports them.
Scheduling
Add --schedule "YYYY-MM-DD HH:MM"only when the user requests scheduling; if not passed, it publishes immediately by default. The time is always interpreted as **Beijing Time Asia/Shanghai (UTC+8)**, and must be between 2 hours after the current time and within 7 days, with minutes as a multiple of 5. Videos and articles use the same parameter. Explain the time zone to the user; if the specific time is missing or ambiguous, clarify the time first, and do not arbitrarily round it or change it to immediate publishing. Reserve time for upload and processing; the range will still be validated when filling the form.
After the platform confirms this work and the saved scheduled time, the scheduling is successful; do not wait for the scheduled time, review, or public access, and do not describe "scheduling successful" as "already public." Platform review may delay the actual public time.
Results and Interruptions
Keep the result file and work ID from the command output. Publication is complete immediately only after final business confirmation of success; under review also means submission succeeded; scheduled publication must confirm the original work and the scheduled time.
If submission times out or the result is unknown,query only the original work; do not re-run upload or confirm publication:
sau dayu verify --account <本地账号名> --result "本次结果文件.json" --timeout 60
The result file helps verify the title, body, work, and scheduled time. You can also query by ID:sau dayu verify --account <本地账号名> --type article --content-id "作品ID"(for videos use --type video). If there is no queryable ID, report the specific error and ask the user to check the backend; do not guess failure and resend.
Only when the user explicitly requests verification of public content/playback, add --publicto the query command; title or full body verification should use the original result file. Public checks may wait for review or for the scheduled time and are not part of the default publication completion criteria.
Example scripts
scripts/examples/ are copyable examples, not runtime dependencies. Before running, first check the current CLI's --help, replace the account, materials, and body; these commands may create real works.
dayu_commands.ps1:PowerShelldayu_commands.sh:Bashdayu_cli_template.py:Python subprocess