When the user needs a full document / long file in Telegram/WhatsApp (where pasting is awkward), copy the file(s) into OneDrive so the user can open/share from there.
command -v python3
python3 --version
Machine-specific config lives alongside the skill:
~/.openclaw/skills/onedrive-integration/config.env.example~/.openclaw/skills/onedrive-integration/config.envKeys:
ONEDRIVE_ROOT (required) — e.g. /mnt/c/Users//OneDrive ONEDRIVE_SUBDIR (optional) — default openclawIf config is missing/unset, do not guess—ask Boss to confirm the correct OneDrive folder, then write config.env.
Because the primary interface is chat (Telegram), the preferred onboarding flow is:
config.env.If you are running in a real terminal, you can use the interactive onboarding script:
~/.openclaw/skills/onedrive-integration/scripts/onboard.sh
Copy requested file(s) into:
${ONEDRIVE_ROOT}/${ONEDRIVE_SUBDIR}/ (defaults to openclaw/)During copy, rename files to include their source path to avoid collisions.
// and \\) with -[a-z0-9._-] with --Examples:
/home/miles/folder1/file1.md → wsl-home-miles-folder1-file1.md/mnt/c/Users//folder1/file1.md → c-users--folder1-file1.md Canonical executable lives inside the skill folder:
~/.openclaw/skills/onedrive-integration/scripts/copy_to_onedrive.pyRun:
~/.openclaw/skills/onedrive-integration/scripts/copy_to_onedrive.py <paths...>
(Reads config.env automatically.)
Optional overrides:
.../copy_to_onedrive.py --onedrive-root "..." --subdir "..." .../copy_to_onedrive.py --config /path/to/config.env The script:
${ONEDRIVE_ROOT}/${ONEDRIVE_SUBDIR}/ if missingONEDRIVE_ROOT is unset, do not guess—ask for confirmation.mkdir -p ~/.local/bin
ln -sf ~/.openclaw/skills/onedrive-integration/scripts/copy_to_onedrive.py ~/.local/bin/copy-to-onedrive
共 1 个版本