mirror of
https://github.com/firstsun-dev/git-files-sync.git
synced 2026-07-22 06:54:27 +00:00
chore: update author to ClaudiaFang and repo name to git-files-sync
This commit is contained in:
parent
36a3767a37
commit
4c8c280138
8 changed files with 44 additions and 13 deletions
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
run: |
|
||||
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
|
||||
BRANCH_NAME_SAFE=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g')
|
||||
ZIP_NAME="git-files-push-${{ steps.version.outputs.version }}-${BRANCH_NAME_SAFE}.zip"
|
||||
ZIP_NAME="git-files-sync-${{ steps.version.outputs.version }}-${BRANCH_NAME_SAFE}.zip"
|
||||
zip -j "$ZIP_NAME" main.js manifest.json styles.css
|
||||
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
|
||||
|
||||
|
|
|
|||
|
|
@ -59,14 +59,14 @@
|
|||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "node -e \"const fs=require('fs'); const m=JSON.parse(fs.readFileSync('manifest.json')); m.version='${nextRelease.version}'; fs.writeFileSync('manifest.json', JSON.stringify(m,null,'\\t')); const v=JSON.parse(fs.readFileSync('versions.json')); v['${nextRelease.version}']=m.minAppVersion; fs.writeFileSync('versions.json', JSON.stringify(v,null,'\\t'));\"",
|
||||
"publishCmd": "zip -j git-files-push-${nextRelease.version}.zip main.js manifest.json styles.css"
|
||||
"publishCmd": "zip -j git-files-sync-${nextRelease.version}.zip main.js manifest.json styles.css"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
"assets": [
|
||||
{ "path": "git-files-push-*.zip", "label": "Plugin Package" }
|
||||
{ "path": "git-files-sync-*.zip", "label": "Plugin Package" }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -36,4 +36,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- **Smart Rename**: Automatically detects file renames
|
||||
- **Flexible Sync**: Sync entire vault or specific folders
|
||||
|
||||
[1.0.0]: https://github.com/firstsun-dev/git-files-push/releases/tag/1.0.0
|
||||
[1.0.0]: https://github.com/firstsun-dev/git-files-sync/releases/tag/1.0.0
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -1,8 +1,8 @@
|
|||
# Git File Sync
|
||||
|
||||
[](https://github.com/firstsun-dev/git-files-push/releases)
|
||||
[](https://github.com/firstsun-dev/git-files-push/releases)
|
||||
[](LICENSE)
|
||||
[](https://github.com/firstsun-dev/git-files-sync/releases)
|
||||
[](https://github.com/firstsun-dev/git-files-sync/releases)
|
||||
[](LICENSE)
|
||||
[](https://obsidian.md)
|
||||
|
||||
**Git File Sync** is a powerful Obsidian plugin that enables seamless synchronization of individual notes with GitLab or GitHub repositories. Unlike full-vault sync solutions, it gives you granular control over what gets pushed and pulled, making it perfect for shared projects, selective backups, and cross-platform workflows.
|
||||
|
|
@ -44,7 +44,7 @@ Full support for Obsidian Mobile. Push and pull your notes on the go with a resp
|
|||
3. Click **Install**, then **Enable**.
|
||||
|
||||
### Manual Installation
|
||||
1. Download the latest `main.js`, `manifest.json`, and `styles.css` from the [Releases](https://github.com/firstsun-dev/git-files-push/releases) page.
|
||||
1. Download the latest `main.js`, `manifest.json`, and `styles.css` from the [Releases](https://github.com/firstsun-dev/git-files-sync/releases) page.
|
||||
2. Create a folder named `git-file-sync` in `<vault>/.obsidian/plugins/`.
|
||||
3. Copy the downloaded files into that folder.
|
||||
4. Reload Obsidian and enable the plugin.
|
||||
|
|
@ -121,7 +121,7 @@ If you want to contribute or build from source:
|
|||
|
||||
```bash
|
||||
# Clone and install
|
||||
git clone https://github.com/firstsun-dev/git-files-push.git
|
||||
git clone https://github.com/firstsun-dev/git-files-sync.git
|
||||
npm install
|
||||
|
||||
# Development build
|
||||
|
|
@ -139,4 +139,4 @@ This project is licensed under the [MIT License](LICENSE).
|
|||
|
||||
---
|
||||
|
||||
**Created by [firstsun-dev](https://github.com/firstsun-dev)**
|
||||
**Created by [ClaudiaFang](https://github.com/ClaudiaFang)**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"version": "1.1.0",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Selectively sync individual notes with GitLab or GitHub. Push, pull, diff, and resolve conflicts — file by file, on mobile and desktop.",
|
||||
"author": "firstsun-dev",
|
||||
"authorUrl": "https://github.com/firstsun-dev",
|
||||
"author": "ClaudiaFang",
|
||||
"authorUrl": "https://github.com/ClaudiaFang",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
|
|
@ -4,6 +4,8 @@
|
|||
"description": "Selectively sync individual notes with GitLab or GitHub. Push, pull, diff, and resolve conflicts — file by file, on mobile and desktop.",
|
||||
"main": "main.js",
|
||||
"type": "module",
|
||||
"author": "ClaudiaFang",
|
||||
"repository": "github:firstsun-dev/git-files-sync",
|
||||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
## Repo URL
|
||||
|
||||
<!--- Paste a link to your repo here for easy access -->
|
||||
Link to my plugin: https://github.com/firstsun-dev/git-files-push
|
||||
Link to my plugin: https://github.com/firstsun-dev/git-files-sync
|
||||
|
||||
## Release Checklist
|
||||
- [ ] I have tested the plugin on
|
||||
|
|
|
|||
29
targeted_append.mjs
Normal file
29
targeted_append.mjs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import fs from 'fs';
|
||||
|
||||
const filePath = '/home/tianyao/obsidian-releases/community-plugins.json';
|
||||
const entry = {
|
||||
"id": "git-file-sync",
|
||||
"name": "Git File Sync",
|
||||
"author": "firstsun-dev",
|
||||
"description": "Selectively sync individual notes with GitLab or GitHub. Push, pull, diff, and resolve conflicts — file by file, on mobile and desktop.",
|
||||
"repo": "firstsun-dev/git-files-push"
|
||||
};
|
||||
|
||||
try {
|
||||
let content = fs.readFileSync(filePath, 'utf8').trim();
|
||||
|
||||
// Find the last closing bracket of the main array
|
||||
const lastBracketIndex = content.lastIndexOf(']');
|
||||
if (lastBracketIndex === -1) throw new Error('Could not find closing bracket');
|
||||
|
||||
// Prepare the entry string with correct indentation (2 spaces)
|
||||
const entryStr = `,\n {\n "id": "${entry.id}",\n "name": "${entry.name}",\n "author": "${entry.author}",\n "description": "${entry.description}",\n "repo": "${entry.repo}"\n }`;
|
||||
|
||||
// Construct the new content
|
||||
const newContent = content.substring(0, lastBracketIndex) + entryStr + "\n]";
|
||||
|
||||
fs.writeFileSync(filePath, newContent + '\n', 'utf8');
|
||||
console.log('Successfully appended plugin entry to the end without reformatting the file.');
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
}
|
||||
Loading…
Reference in a new issue