admin管理员组

文章数量:1614997

remarkable-layers 项目使用教程

remarkable-layers Python module for reading and writing Remarkable Lines files 项目地址: https://gitcode/gh_mirrors/re/remarkable-layers

1. 项目目录结构及介绍

remarkable-layers/
├── fonts/
├── rmlines/
├── samples/
├── scripts/
├── tests/
├── flake8
├── gitignore
├── LICENSE
├── README.md
├── pdf_to_rm_format.gif
├── poetry.lock
├── pyproject.toml
├── requirements.txt

目录结构介绍

  • fonts/: 存放字体文件的目录。
  • rmlines/: 核心模块,用于读取和写入 Remarkable Lines 文件。
  • samples/: 存放示例文件的目录。
  • scripts/: 存放脚本的目录。
  • tests/: 存放测试文件的目录。
  • flake8: Flake8 配置文件。
  • gitignore: Git 忽略文件配置。
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文件。
  • pdf_to_rm_format.gif: PDF 转换为 Remarkable 格式的示例 GIF。
  • poetry.lock: Poetry 锁定文件。
  • pyproject.toml: 项目配置文件。
  • requirements.txt: 项目依赖文件。

2. 项目启动文件介绍

项目中没有明确的“启动文件”,但可以通过以下方式启动示例脚本:

python scripts/rmlines_pdf_converter.py my_file.pdf --first 10 --last 25

示例脚本介绍

  • rmlines_pdf_converter.py: 该脚本将 PDF 转换为多个中间 SVG 文件,每个页面一个文件,然后生成 Remarkable Lines 笔记本并上传到 Remarkable Cloud。

3. 项目配置文件介绍

pyproject.toml

[tool.poetry]
name = "remarkable-layers"
version = "0.1.0"
description = "Python module for reading and writing Remarkable Lines files"
authors = ["bsdz <bsdz@example>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.7"
numpy = "^1.19.4"
lxml = "^4.6.1"

[tool.poetry.dev-dependencies]
pytest = "^6.1.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

配置文件介绍

  • [tool.poetry]: 定义项目的元数据,如名称、版本、描述、作者和许可证。
  • [tool.poetry.dependencies]: 定义项目的依赖项,如 Python 版本、numpy 和 lxml。
  • [tool.poetry.dev-dependencies]: 定义开发依赖项,如 pytest。
  • [build-system]: 定义构建系统的要求和后端。

通过以上配置文件,可以管理项目的依赖关系和构建过程。

remarkable-layers Python module for reading and writing Remarkable Lines files 项目地址: https://gitcode/gh_mirrors/re/remarkable-layers

本文标签: 项目教程RemarkableLayers