admin管理员组文章数量:1614997
Google Drive Remarkable Sync 项目教程
google-drive-remarkable-syncApps Script library for synchronising Google Drive folder with Remarkable reader.项目地址:https://gitcode/gh_mirrors/go/google-drive-remarkable-sync
1. 项目的目录结构及介绍
google-drive-remarkable-sync/
├── LICENSE
├── README.md
├── appsscript.json
├── code.gs
├── remarkableGoogleDriveSyncLib.gs
└── remarkableGoogleDriveSyncLib.js
- LICENSE: 项目的许可证文件,采用 MIT 许可证。
- README.md: 项目的说明文档,包含项目的基本信息和使用方法。
- appsscript.json: Google Apps Script 的配置文件。
- code.gs: 主脚本文件,包含主要的同步逻辑。
- remarkableGoogleDriveSyncLib.gs: 同步库的脚本文件,包含同步相关的函数和逻辑。
- remarkableGoogleDriveSyncLib.js: 同步库的 JavaScript 文件,可能用于其他平台的同步逻辑。
2. 项目的启动文件介绍
项目的启动文件是 code.gs
。该文件包含了主要的同步逻辑和配置。以下是 code.gs
文件的主要内容:
function run_sync() {
// 一次性代码,从 https://my.remarkable/device/connect/mobile 获取
let rOneTimeCode = "abcdwxyz";
let gdFolderSearchParams = "title = 'Books' and mimeType = 'application/vnd.google-apps.folder'";
let syncMode = "mirror";
RemarkableGoogleDriveSyncLib.syncGoogleDriveWithRemarkableCloud(rOneTimeCode, gdFolderSearchParams, "Google Drive", syncMode);
}
- rOneTimeCode: 从 reMarkable 设备获取的一次性代码。
- gdFolderSearchParams: 指定 Google Drive 文件夹的搜索参数。
- syncMode: 同步模式,可以是 "update" 或 "mirror"。
3. 项目的配置文件介绍
项目的配置文件是 appsscript.json
。该文件包含了 Google Apps Script 的配置信息。以下是 appsscript.json
文件的内容:
{
"timeZone": "America/New_York",
"dependencies": {
"libraries": [
{
"userSymbol": "RemarkableGoogleDriveSyncLib",
"libraryId": "1_ftsHelqnCqBXAwFAOv3U-WUUm_n3_nENg7n6BrDDzze7EekBD9vmf-0",
"version": "14"
}
]
},
"exceptionLogging": "STACKDRIVER"
}
- timeZone: 脚本运行的时区。
- dependencies: 脚本的依赖库,包含
RemarkableGoogleDriveSyncLib
库。 - exceptionLogging: 异常日志记录方式。
以上是 Google Drive Remarkable Sync 项目的目录结构、启动文件和配置文件的介绍。希望这份文档能帮助你更好地理解和使用该项目。
google-drive-remarkable-syncApps Script library for synchronising Google Drive folder with Remarkable reader.项目地址:https://gitcode/gh_mirrors/go/google-drive-remarkable-sync
版权声明:本文标题:Google Drive Remarkable Sync 项目教程 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1728686996a1169589.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论