同步插件源代码并补齐标准项目文件
This commit is contained in:
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Dependencies and build output
|
||||||
|
node_modules/
|
||||||
|
vendor/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
out/
|
||||||
|
main.js
|
||||||
|
*.apk
|
||||||
|
|
||||||
|
# Build tools and IDE
|
||||||
|
.gradle/
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
gradle/
|
||||||
|
gradlew
|
||||||
|
gradlew.bat
|
||||||
|
|
||||||
|
# Environment and secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
keystore.properties
|
||||||
|
*.jks
|
||||||
|
credentials*.json
|
||||||
|
|
||||||
|
# Runtime data and backups
|
||||||
|
data/
|
||||||
|
备份/
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 变更记录
|
||||||
|
|
||||||
|
## 2026-11-26 · 初始同步
|
||||||
|
|
||||||
|
- 同步插件源代码到新 Gitea 仓库。
|
||||||
|
- 补齐 README、LICENSE、.gitignore、CONTRIBUTING 等标准项目文件。
|
||||||
|
- 本仓库仅包含插件实现代码与必要资源,排除依赖、构建工具、编译产物、环境配置与备份数据。
|
||||||
19
CONTRIBUTING.md
Normal file
19
CONTRIBUTING.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# 贡献指南
|
||||||
|
|
||||||
|
欢迎对本插件提出改进建议或提交代码。
|
||||||
|
|
||||||
|
## 提交前检查
|
||||||
|
|
||||||
|
- 仅提交插件实现代码、资源与必要文档,不提交依赖目录、编译产物、运行时数据或备份文件。
|
||||||
|
- 保持现有目录结构;如新增平台适配代码,请在 `README.md` 的目录结构中说明。
|
||||||
|
- 涉及对外服务或凭据的配置不要写入代码或文档。
|
||||||
|
|
||||||
|
## 提交流程
|
||||||
|
|
||||||
|
1. Fork 仓库并创建功能分支。
|
||||||
|
2. 完成修改后提交 Pull Request,说明改动目的与影响范围。
|
||||||
|
3. 重要功能变更请同步更新 `CHANGELOG.md`。
|
||||||
|
|
||||||
|
## 问题反馈
|
||||||
|
|
||||||
|
请通过仓库 Issue 反馈问题,并尽可能提供插件类型、版本与复现步骤。
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 XIGE
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
31
README.md
31
README.md
@@ -1,2 +1,31 @@
|
|||||||
# XiaoHongShu
|
# Xiaohongshu Sync
|
||||||
|
|
||||||
|
> 仓库:`XiaoHongShu` · 类型:Obsidian 插件 · 版本:`1.0.0` · 作者:XIGE
|
||||||
|
|
||||||
|
导入小红书笔记及其媒体与分类信息,带附件的笔记保存为同名文件夹。
|
||||||
|
|
||||||
|
本仓库同步自本地插件源码,**仅包含插件实现代码与必要资源**;不包含依赖、构建工具、编译产物、环境配置或备份数据。
|
||||||
|
|
||||||
|
## 目录结构
|
||||||
|
|
||||||
|
- `main.ts`
|
||||||
|
- `manifest.json`
|
||||||
|
- `styles.css`
|
||||||
|
|
||||||
|
## 安装与使用
|
||||||
|
|
||||||
|
1. 本仓库仅包含插件源代码,未包含依赖与构建工具;请先按 Obsidian 插件标准流程构建生成 `main.js`。
|
||||||
|
2. 将 `manifest.json`、构建后的 `main.js`、`styles.css` 及源码目录放入 `<Vault>/.obsidian/plugins/<插件 id>/`。
|
||||||
|
3. 在 Obsidian「设置 → 第三方插件」中启用该插件。
|
||||||
|
|
||||||
|
## 开发与贡献
|
||||||
|
|
||||||
|
详见 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
||||||
|
|
||||||
|
## 授权
|
||||||
|
|
||||||
|
授权条款见 [LICENSE](LICENSE)(MIT License)。第三方组件版权归各自作者所有。
|
||||||
|
|
||||||
|
## 变更记录
|
||||||
|
|
||||||
|
详见 [CHANGELOG.md](CHANGELOG.md)。
|
||||||
|
|||||||
10
manifest.json
Normal file
10
manifest.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "xiaohongshu-sync",
|
||||||
|
"name": "Xiaohongshu Sync",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"minAppVersion": "0.15.0",
|
||||||
|
"description": "Import Xiaohongshu (小红书) notes with media and categorization. Notes with attachments are saved in same-name folders.",
|
||||||
|
"author": "Your Name",
|
||||||
|
"authorUrl": "https://github.com/your-username",
|
||||||
|
"isDesktopOnly": false
|
||||||
|
}
|
||||||
120
styles.css
Normal file
120
styles.css
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/* styles.css */
|
||||||
|
|
||||||
|
/* Modal content container */
|
||||||
|
.xhs-modal-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Row containers (used for text, category, download, and button rows) */
|
||||||
|
.xhs-modal-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Text input (textarea) */
|
||||||
|
.xhs-modal-textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 100px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Category chip container */
|
||||||
|
.xhs-chip-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Category chip (button) */
|
||||||
|
.xhs-chip {
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
color: #000;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Selected category chip with increased specificity */
|
||||||
|
.xhs-chip.xhs-chip--selected {
|
||||||
|
background-color: #FF2442;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 新增分类行 */
|
||||||
|
.xhs-add-category-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 新增分类输入框 */
|
||||||
|
.xhs-add-category-input {
|
||||||
|
flex: 1;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: var(--background-modifier-form-field);
|
||||||
|
color: var(--text-normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 新增分类按钮 */
|
||||||
|
.xhs-add-category-button {
|
||||||
|
padding: 4px 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
color: #000;
|
||||||
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xhs-add-category-button:hover {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Download row specific styles */
|
||||||
|
.xhs-download-row {
|
||||||
|
flex-direction: row !important;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wrapper for checkbox and label to ensure alignment */
|
||||||
|
.xhs-download-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Download label */
|
||||||
|
.xhs-download-label {
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button row specific styles */
|
||||||
|
.xhs-button-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Submit button */
|
||||||
|
.xhs-submit-button {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去掉设置页面分类管理标题的左边距 */
|
||||||
|
.xhs-setting-heading {
|
||||||
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user