← 返回
沟通协作 中文

OneDrive Integration

Copy large/long files to OneDrive for sharing when the user is on Telegram or WhatsApp and wants to view a full document or long file. Use to place files int...
当用户在 Telegram 或 WhatsApp 上想查看完整文档或长文件时,将大型/长文件复制到 OneDrive 进行共享。用于将文件放入...
moodykong
沟通协作 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,061
下载
💾 22
安装
1
版本
#latest

概述

onedrive-integration

Goal

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.

Prerequisites

command -v python3
python3 --version

Configuration (portable)

Machine-specific config lives alongside the skill:

  • Example (do not edit): ~/.openclaw/skills/onedrive-integration/config.env.example
  • Real (machine-specific): ~/.openclaw/skills/onedrive-integration/config.env

Keys:

  • ONEDRIVE_ROOT (required) — e.g. /mnt/c/Users//OneDrive
  • ONEDRIVE_SUBDIR (optional) — default openclaw

If config is missing/unset, do not guess—ask Boss to confirm the correct OneDrive folder, then write config.env.

Initialization / installation / onboarding

Preferred (chat-first)

Because the primary interface is chat (Telegram), the preferred onboarding flow is:

  1. Ask Boss to confirm the correct OneDrive root folder.
  2. Write the real config file: config.env.
  3. Run a smoke test by copying a small temp file.

Optional (terminal)

If you are running in a real terminal, you can use the interactive onboarding script:

~/.openclaw/skills/onedrive-integration/scripts/onboard.sh

How it works

Copy requested file(s) into:

  • ${ONEDRIVE_ROOT}/${ONEDRIVE_SUBDIR}/ (defaults to openclaw/)

During copy, rename files to include their source path to avoid collisions.

Rename rules

  • Convert absolute path into a safe filename:
  • strip leading /
  • replace path separators (/ and \\) with -
  • lowercase
  • replace any non [a-z0-9._-] with -
  • collapse multiple -

Examples:

  • /home/miles/folder1/file1.mdwsl-home-miles-folder1-file1.md
  • /mnt/c/Users//folder1/file1.mdc-users--folder1-file1.md

Implementation

Canonical executable lives inside the skill folder:

  • ~/.openclaw/skills/onedrive-integration/scripts/copy_to_onedrive.py

Run:

~/.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:

  • creates ${ONEDRIVE_ROOT}/${ONEDRIVE_SUBDIR}/ if missing
  • copies files (preserve timestamps)
  • prints the destination paths (no secrets)

Notes

  • If the request is a browser-only document (no local file), download it to a temp path first, then copy.
  • If ONEDRIVE_ROOT is unset, do not guess—ask for confirmation.

Executables / bin placement

  • Keep the canonical script inside the skill folder.
  • Optional: symlink into a common PATH dir (only if you want a short command):
mkdir -p ~/.local/bin
ln -sf ~/.openclaw/skills/onedrive-integration/scripts/copy_to_onedrive.py ~/.local/bin/copy-to-onedrive

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 12:12 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,583
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113 📥 52,399
productivity

Task Father

moodykong
基于文件的长期任务状态机生成器(注册表、任务文件夹、生命周期状态、队列文件和 Cron 规格)
★ 0 📥 1,942