Skip to main content

DJI DSP Tools for Python

Project description

DJI DSP 工具

简介

本工具提供了一些处理 DSP 文件的常用工具,包括

  • 编解码工具 dsp-codec
  • and more

安装

使用 PyPI 安装

运行命令

pip install dspy_tool

若您网络条件不佳,建议使用清华源安装

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple dspy_tool

使用源码安装

需要您提前安装 Python, Git 以及 flit

  1. 克隆本项目或下载 zip 文件
    克隆命令
    Using SSH
    git clone git@github.com:RMYC-Lab/dspy-tool.git
    
    or using HTTPS
    git clone https://github.com/RMYC-Lab/dspy-tool.git
    
  2. 进入项目文件夹
    cd dji-dsp-tools
    
  3. 安装
    flit install
    

DSP 编解码工具 dsp-codec

命令 python -m dspy_tool.cli.dsp_codec 或者

dsp-codec input [--output OUTPUT] [--file-name FILE_NAME]
          [--std-out] [--raw] [--delete-comments]
          [--title TITLE] [--creator CREATOR]
          [-h] [--version]

参数

  • input: 输入文件路径 (.dsp.py 格式文件)
  • -o OUTPUT, --output OUTPUT: 输出文件夹路径
  • -f FILE_NAME, --file-name FILE_NAME: 输出文件名
    若为空,则会根据输入文件名及当前时间生成输出文件名
  • -s, --std-out: 输出到标准输出 (打印到屏幕上)
    Update in verison 0.1.1: 现在会直接 return 解码后的字符以方便其他程序使用
  • -r, --raw: 输出为原始数据 (DSP 解码后 xml 文件)
  • --dc, --delete-comments: 删除图形化块注释 (以 #block 开头)
  • --pc, --process-chinese: 处理中文字符
    将会将 .dsp 文件的 xx_xx_xx 格式的字符转换为中文字符 (实际为 utf-8 编码)
  • -t TITLE, --title TITLE: 设置文件标题
  • -c CREATOR, --creator CREATOR: 设置文件创建者
  • --debug: 输出调试信息
  • -h, --help: 显示帮助信息
  • -v, --version: 显示版本信息

DSP 文件管理器 dsp-fm

命令 python -m dspy_tool.cli.file_manager 或者

dsp-fm [--dsp-dirs] [--add ADD] [--remove REMOVE] [--list] [--tui] [--version] [-h] 

参数

  • --dsp-dirs, -d: 显示 DSP 文件夹列表
  • --add ADD, -a ADD: 添加 DSP 文件夹
  • --remove REMOVE, -r REMOVE: 移除 DSP 文件夹
  • --list, -l: 列出 DSP 文件夹列表
  • --tui, -t: 使用 TUI 显示 DSP 文件夹列表
    进入后程序将自动扫描 DSP 文件夹列表中的文件并显示
    并在右方显示 Python 代码
    快捷键:
    • C: 复制选中的 Python 代码到剪贴板
    • D: 解密选中的文件 且在 Windows 资源管理器中打开
    • S: 切换界面风格
    • O: 在 Windows 资源管理器中打开选中的文件夹
    • Q: 退出 TUI
  • --version, -v: 显示版本信息
  • -h, --help: 显示帮助信息

常见问题 Q&A

  1. Q: 为什么我安装不了?
    A: 请检查你的 Python 版本,本工具需要 Python 3.8 或以上版本

  2. Q: 提示找不到文件?
    A: 请检查你的环境变量是否配置正确,或者使用 python -m dspy_tool.cli.TOOL_NAME 命令

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

dspy_tool-0.1.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

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

dspy_tool-0.1.1-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file dspy_tool-0.1.1.tar.gz.

File metadata

  • Download URL: dspy_tool-0.1.1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for dspy_tool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1b9e242a94f62c2d1ef6018fa870b0ee09fbc3a82050d68e9dcb9e41c4b72b2e
MD5 cc316239b47c9e6588a48460ac698094
BLAKE2b-256 0e48a7194c65c932d28803b7feccad5765e70a0d5fbfb67d12100000b59073aa

See more details on using hashes here.

File details

Details for the file dspy_tool-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dspy_tool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for dspy_tool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a29de26749dfec0fcba5aef9aa249b8989a763c10e212a3d392dc99a0c010eac
MD5 007798137053afcaf933fcd11254c574
BLAKE2b-256 db1fe5b151aa25c098332388900415c2d8b1fd7e0102a8eacac57e2d9be17141

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