From 4c8c2801382495354fa9aa25ba13eb65374609c2 Mon Sep 17 00:00:00 2001 From: ClaudiaFang Date: Fri, 24 Apr 2026 18:46:31 +0000 Subject: [PATCH] chore: update author to ClaudiaFang and repo name to git-files-sync --- .github/workflows/check.yml | 2 +- .releaserc.json | 4 ++-- CHANGELOG.md | 2 +- README.md | 12 ++++++------ manifest.json | 4 ++-- package.json | 2 ++ pr_body.md | 2 +- targeted_append.mjs | 29 +++++++++++++++++++++++++++++ 8 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 targeted_append.mjs diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ba1da9d..5f0e251 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 diff --git a/.releaserc.json b/.releaserc.json index ed31db3..aebb10b 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -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" } ] } ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc718b..6856f9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 47571d4..1edfd12 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Git File Sync -[![Release](https://img.shields.io/github/v/release/firstsun-dev/git-files-push?style=flat-square)](https://github.com/firstsun-dev/git-files-push/releases) -[![Downloads](https://img.shields.io/github/downloads/firstsun-dev/git-files-push/total?style=flat-square)](https://github.com/firstsun-dev/git-files-push/releases) -[![License](https://img.shields.io/github/license/firstsun-dev/git-files-push?style=flat-square)](LICENSE) +[![Release](https://img.shields.io/github/v/release/firstsun-dev/git-files-sync?style=flat-square)](https://github.com/firstsun-dev/git-files-sync/releases) +[![Downloads](https://img.shields.io/github/downloads/firstsun-dev/git-files-sync/total?style=flat-square)](https://github.com/firstsun-dev/git-files-sync/releases) +[![License](https://img.shields.io/github/license/firstsun-dev/git-files-sync?style=flat-square)](LICENSE) [![Obsidian](https://img.shields.io/badge/Obsidian-v0.15.0+-purple?style=flat-square)](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 `/.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)** diff --git a/manifest.json b/manifest.json index 34d5316..d8c32b6 100644 --- a/manifest.json +++ b/manifest.json @@ -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 } \ No newline at end of file diff --git a/package.json b/package.json index 343e6c2..dfc1c16 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pr_body.md b/pr_body.md index 0ff5636..1f5abea 100644 --- a/pr_body.md +++ b/pr_body.md @@ -5,7 +5,7 @@ ## Repo URL -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 diff --git a/targeted_append.mjs b/targeted_append.mjs new file mode 100644 index 0000000..93d9c0e --- /dev/null +++ b/targeted_append.mjs @@ -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); +}