Skip to main content

CLI tool for uploading Obsidian Markdown documents to Feishu cloud documents

Project description

obshare-cli

A command-line interface tool for uploading Obsidian Markdown documents to Feishu cloud documents.

PyPI version Python License: MIT

Installation

pip install obshare-cli

Optional: Mermaid Support

For Mermaid diagram rendering, install Puppeteer:

npm install -g puppeteer

Configuration

First, configure your Feishu credentials:

# Set App ID
obshare-cli config set-app-id "cli_xxx"

# Set App Secret
obshare-cli config set-app-secret "xxx"

# Set User ID
obshare-cli config set-user-id "xxx"

# Set Folder Token
obshare-cli config set-folder "fldcnxxx"

# Show current configuration
obshare-cli config show

# Test connection
obshare-cli config test

Usage

Upload a Document

# Basic upload
obshare-cli upload document.md

# Upload with JSON output (for AI agents)
obshare-cli upload document.md --json

# Upload with permissions
obshare-cli upload document.md --public --allow-copy --allow-download

View Upload History

obshare-cli list history
obshare-cli list history --json

Set Document Permissions

obshare-cli permission set <token> --public --allow-copy --allow-download

Delete a Document

obshare-cli delete <token>

JSON Output Example

{
  "success": true,
  "document": {
    "title": "My Note",
    "token": "doxcnAbcDefGhi",
    "url": "https://feishu.cn/docx/doxcnAbcDefGhi"
  },
  "permissions": {
    "isPublic": false,
    "allowCopy": false,
    "allowCreateCopy": false
  },
  "uploadTime": "2024-01-15T10:30:00Z"
}

Features

  • Upload Markdown documents to Feishu
  • Support for YAML frontmatter
  • Support for Obsidian Callouts
  • Support for Mermaid diagrams (converted to images)
  • Support for embedded images (Obsidian ![[image.png]] and Markdown ![](image.png))
  • Configurable document permissions
  • Upload history tracking
  • JSON output mode for AI/CLI integration

Requirements

  • Python 3.8+
  • Node.js >= 16 (optional, for Mermaid rendering)

Development

# Clone the repository
git clone https://github.com/SuShuHeng/obshare-cli.git
cd obshare-cli

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Build package
python -m build

License

MIT License - see LICENSE for details.

Author

SuShuHeng (code.sushuheng@gmail.com)

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obshare_cli-0.1.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obshare_cli-0.1.0-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file obshare_cli-0.1.0.tar.gz.

File metadata

  • Download URL: obshare_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for obshare_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b1d3de2acca7caf6f308be3a882520174b0b93e4d116232b355bf95ece7b867
MD5 113a7e21ab861ae8e23fe5ff2f129bfe
BLAKE2b-256 c6612b3c5959988a2f91ab142c0524eac57430d2d657b5d604737fa567c453bd

See more details on using hashes here.

File details

Details for the file obshare_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: obshare_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for obshare_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2bdc6db06b40b3331a8591cf6dab23001201662884b85d42efea443ca96d0e9
MD5 0d10af465ff9598c762e216009434c51
BLAKE2b-256 5e133ffa70d474b2145c9c184b0f63f8fa265c398f7c235bc62793b1c0124a6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page