Paper to Bilibili
This is the sole full-pipeline orchestration identity. It composes these promoted packages plus the retained managed Rednote workflow:
paper-to-beamer: paper and MinerU content to compiled 16:10 SUSTech Beamer slides.
paper-video-cover: optional poster generation for reference; the normal video cover remains the generated cover artifact.
paper-slides-to-video: physical-page render, narration extraction, TTS, landscape assembly, cover, and Bilibili metadata.
rednote-video-uploader (managed): required portrait video generation.
paper-bilibili-uploader: fail-closed validation, dry-run, upload, and durable receipt.
Outputs use $PP_ROOT/论文分享/<VENUE YEAR - SHORT>/ with md_output/, slides-beamer/, and video/.
Modes and phases
slides: paper to compiled slides
When an entry has a nonempty arxiv_id (or the user provided an arXiv link) and no source exists on disk (no root PDF, no paper_src/ with .tex), download the TeX source first:
python \
"<SKILLS_DIR>/paper-download-arxiv-paper-source/scripts/download_source.py" \
"<arxiv_id>" --output "<paper_dir>"
The downloader creates <paper_dir>/arXiv-<id>.tar.gz + <paper_dir>/paper_src/; then follow skill://paper-to-beamer Phase 1 onward (Phase 1's move step is skipped since the paper dir already exists). For PDF_ONLY output, copy the PDF to the paper dir root (the pdf_downloaded gate requires a root PDF).
Follow skill://paper-to-beamer for content authoring. Required gates before continuing:
slides-beamer/main.tex contains the paper-specific narrative from paper information and motivation through methods, experiments, limitations, takeaways, references, Q&A, and 3–8 useful appendix slides.
- The document uses the SUSTech 16:10 template (
aspectratio=1610).
slides-beamer/main.pdf is nonempty, with no undefined controls or severe overflow.
The batch CLI only scans and persists disk evidence for this agent-authored phase; it does not fabricate slides.
Narration authoring gate
Copy the compiled TeX to video/main_with_narration.tex and add exactly one nonempty % NARRATION: entry per physical PDF page. Narration is polished Simplified Chinese with English technical terms inline. It expands the technical argument rather than reading bullets, avoids visual-only references such as “本页” or “如图所示”, and covers appendix pages too.
The transition from slides_done to narrations_done occurs only when both the compiled slides and nonempty annotated TeX exist.
video: narrated landscape and portrait artifacts
python <SKILLS_DIR>/paper-to-bilibili/scripts/batch.py video "<PAPERS_JSON>"
For each narrations_done paper, the orchestrator calls the sibling paper-slides-to-video full command. After child success it rescans and atomically persists video_done. It then calls the managed rednote-video-uploader/scripts/portrait_video.py, rescans, validates cover and Bilibili metadata, and atomically persists upload_ready. Child failures propagate and never advance state.
Quality gates are exact frame/text/MP3 cardinality, nonempty narration and audio for every physical page, a nonempty landscape MP4, a nonempty portrait MP4, a nonempty cover, and schema-valid Bilibili metadata.
bilibili: validate or upload
Always review a dry-run first:
python <SKILLS_DIR>/paper-to-bilibili/scripts/batch.py bilibili "<PAPERS_JSON>" --dry-run
Dry-run delegates to the promoted uploader and must leave upload_ready unchanged. Remove --dry-run only after review. There is no default upload timeout; an operator may opt in with --upload-timeout SECONDS.
Normal uploads require P1 landscape then P2 portrait. Metadata uses singular tag, a positive tid, valid copyright/source fields, a structured description, and a nonempty cover. A paper becomes uploaded only when video/upload_result.json is valid and contains a matching BV URL plus ISO-8601 timestamp.
State contract
batch.py rescans the disk with this exact precedence:
- valid
upload_result.json → uploaded
- nonempty landscape + nonempty portrait + cover + schema-valid
video_meta.json → upload_ready
- nonempty landscape →
video_done
- compiled slides + nonempty annotated TeX →
narrations_done
- compiled slides →
slides_done
- MinerU Markdown →
mineru_done
- source PDF or extracted TeX source (paper_src/ containing .tex) →
pdf_downloaded
- otherwise →
pending
Every successful child command is followed by a rescan and atomic replacement of the input JSON. State changes are printed as STATE <paper>: <old> -> <new>. Dry-run validates and delegates but never invents a new state. A failed child preserves the last grounded state and its exit code is propagated.
Batch input
papers.json is an array of objects with a nonempty absolute dir_path; dir_name, arxiv_id, pdf_path, and descriptive fields may accompany it. The orchestrator records _status in each object.
Prerequisites
- Python 3.10+ (if
python is not on PATH, use py -3).
- Dependencies are declared in
pyproject.toml (currently none at runtime); install the project with uv sync --project <SKILLS_DIR>/paper-to-bilibili when adding any.
<SKILLS_DIR> is the directory containing the installed skill folders (e.g. ~/.claude/skills, ~/.codex/skills, .omp/skills); sibling skills (paper-slides-to-video, paper-bilibili-uploader, paper-download-arxiv-paper-source) must be installed next to this one so sibling resolution stays project-local and deterministic.
PAPER_PYTHON (optional): interpreter used to launch sibling CLIs; defaults to the interpreter running batch.py.
Related skills
- skill://paper-bilibili-uploader
- skill://paper-download-arxiv-paper-source
- skill://paper-slides-to-video
- skill://paper-to-beamer
- skill://paper-video-cover
- skill://rednote-video-uploader
Полный текст лицензии (Apache-2.0)
Copyright (c) 2026 杨昊波 (Haobo Yang)
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the
copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control with
that entity. For the purposes of this definition, "control" means (i) the
power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
(50%) or more of the outstanding shares, or (iii) beneficial ownership of
such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that is
included in or attached to the work (an example is provided in the Appendix
below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as a
whole, an original work of authorship. For the purposes of this License,
Derivative Works shall not include works that remain separable from, or
merely link (or bind by name) to the interfaces of, the Work and Derivative
Works thereof.
"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or Legal
Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic,
verbal, or written communication sent to the Licensor or its representatives,
including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by,
or on behalf of, the Licensor for the purpose of discussing and improving the
Work, but excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
reproduce, prepare Derivative Works of, publicly display, publicly perform,
sublicense, and distribute the Work and such Derivative Works in Source or
Object form.
3. Grant of Patent License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
section) patent license to make, have made, use, offer to sell, sell, import,
and otherwise transfer the Work, where such license applies only to those
patent claims licensable by such Contributor that are necessarily infringed
by their Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You institute
patent litigation against any entity (including a cross-claim or counterclaim
in a lawsuit) alleging that the Work or a Contribution incorporated within
the Work constitutes direct or contributory patent infringement, then any
patent licenses granted to You under this License for that Work shall
terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications, and in
Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a
copy of this License; and
(b) You must cause any modified files to carry prominent notices stating
that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from
the Source form of the Work, excluding those notices that do not pertain to
any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding
those notices that do not pertain to any part of the Derivative Works, in at
least one of the following places: within a NOTICE text file distributed as
part of the Derivative Works; within the Source form or documentation, if
provided along with the Derivative Works; or, within a display generated by
the Derivative Works, if and wherever such third-party notices normally
appear. The contents of the NOTICE file are for informational purposes only
and do not modify the License. You may add Your own attribution notices
within Derivative Works that You distribute, alongside or as an addendum to
the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may
provide additional or different license terms and conditions for use,
reproduction, or distribution of Your modifications, or for any such
Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated in
this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without any
additional terms or conditions. Notwithstanding the above, nothing herein
shall supersede or modify the terms of any separate license agreement you may
have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names,
trademarks, service marks, or product names of the Licensor, except as
required for reasonable and customary use in describing the origin of the
Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
writing, Licensor provides the Work (and each Contributor provides its
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied, including, without limitation, any
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
the appropriateness of using or redistributing the Work and assume any risks
associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in
tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to
in writing, shall any Contributor be liable to You for damages, including any
direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability
to use the Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all other
commercial damages or losses), even if such Contributor has been advised of
the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work
or Derivative Works thereof, You may choose to offer, and charge a fee for,
acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such
obligations, You may act only on Your own behalf and on Your sole
responsibility, not on behalf of any other Contributor, and only if You agree
to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification
within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SUPPLEMENTARY PERMISSION — Additional permission (not part of the Apache License 2.0 text above)
论文分享场合补充许可:在论文分享、组会汇报、课堂展示、个人学习等**非分发**场合
(不对外发布、传播或进行商业分发)使用本软件,免于 Apache-2.0 第 4 条关于保留
版权声明与许可文本的义务,可自由使用、修改。分发行为(含公开传播)仍按上述
Apache License 2.0 条款执行。
Paper-sharing supplementary permission: use of this software in non-distribution
contexts (internal group meetings, classroom presentation, personal study — no
public release or commercial distribution) is exempt from the Apache-2.0
Section 4 obligations to retain copyright notices and license text. Distribution
(including public dissemination) remains governed by the Apache License 2.0 above.