$ show xiaoyaDev/xiaoya-alist
This repository is a Bash-driven, Docker-centric deployment and maintenance toolchain for the xiaoya-alist personal media stack. The actual product is an interactive installer/manager: main.sh dispatches to the monolithic all_in_one.sh, which provides numbered menus for installing, updating, uninstalling, and configuring AList, Emby, Jellyfin, TVBox, Portainer, Onelist, Auto_Symlink, CasaOS, cron containers, and cloud-drive token helpers. It is a CLI application, not a library or data pipeline; the primary data flows are downloading and extracting large media metadata archives (all.mp4, config.mp4, 115.mp4, etc.) with 7z/wget/aria2c inside xiaoyaliu/glue containers, persisting cloud-drive cookies/tokens, and recreating Docker containers while preserving their original run parameters. Architecturally, the codebase is a large interactive shell script supported by a small base shell library (base/base.sh) and several independent Flask helpers under glue_python/. The Python components implement QR-code OAuth flows for 115, Quark, UC, and Aliyun Drive, plus a reverse-engineered Aliyun TV token service and Emby plugin helpers. External dependencies include Docker, third-party Docker images (amilys/embyserver, xiaoyaliu/glue, ddsderek/*), GitHub/gitee mirrors, and cloud-drive web APIs. The repository also contains GitHub Actions for linting, version scraping, and Docker image publication. Maintenance is active, but the codebase shows notable drift and engineering debt: xiaoya_data_downloader.sh and xiaoya_notify.sh are explicit deprecated stubs, many shell files disable shellcheck, hardcoded endpoints/keys appear in source, and there is no automated runtime test coverage. The main shell script is monolithic and contains duplicated or overloaded function names, making it hard to modify safely. Still, the shell utility library and the standalone token-connector components demonstrate enough isolated utility to be reused in other projects.
The LLM identified 3 files worth highlighting for reuse:
A self-contained cross-platform shell utility library providing OS detection, package-manager abstraction (apt/yum/zypper/apk/pacman), port and path validation, version comparison, and a sedsh wrapper that normalizes macOS vs Linux sed -i differences. It is nearly dependency-free and could be extracted into a new shell project without modification.
Standalone Flask application implementing a QR-code OAuth token flow for Aliyun Drive: it generates a login token, displays a QR code, polls the provider status API, and writes the resulting token to disk. It demonstrates a reusable pattern for headless cloud-drive authorization and can be ported to other providers with minimal changes.
A small isolated HTTP service that decrypts Aliyun TV refresh tokens using AES and proxies a reverse-engineered extscreen API endpoint. It shows non-obvious token-handling and crypto-interface craftsmanship, and its standalone Docker packaging makes it easy to extract and adapt for other token-refresh integrations.