Skip to content

Commit

Permalink
Merge pull request #36 from philoserf/prepare-version-1.0.0
Browse files Browse the repository at this point in the history
Plugin management transfer and version 1.0.0 release
  • Loading branch information
philoserf authored Feb 11, 2025
2 parents 59eda0e + 59b8409 commit 6ceceda
Show file tree
Hide file tree
Showing 24 changed files with 1,079 additions and 321 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
tab_width = 4
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [philoserf]
buy_me_a_coffee: philoserf
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Report a bug
title: ""
labels: bug
assignees: ""
---

<!-- Before opening a bug report, consider the following steps:
- Disable any plugins or snippets that might be causing a conflict.
- Update Obsidian to the latest version.
- Restart Obsidian.
Now, let’s describe the bug:
- Provide a clear and concise description of the issue.
To reproduce the bug, follow these steps:
- Describe the actions you take to trigger the bug.
- Clearly state what you expect to happen.
If applicable, include screenshots to help illustrate your problem.
Finally, provide any relevant debug information. You can access this information in Obsidian by pressing Ctrl/Cmd-P, selecting “Show debug info,” and clicking “Copy to clipboard.” -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature request
about: Suggest a new feature
title: ""
labels: enhancement
assignees: ""
---

<!-- Is your feature request related to a specific problem? If so, please provide a clear and concise description of the issue. For instance, I often feel frustrated when […]
Next, describe the solution you envision for this problem. Clearly outline what you would like to achieve. -->
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
37 changes: 37 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "16 15 * * 1"

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release
on:
push:
tags: ["*"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"

- run: |
npm install
npm run build
- name: Package
run: |
mkdir dist
cp main.js manifest.json README.md dist/
zip -r release.zip dist/
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release.zip
asset_name: release-${{ github.ref_name }}.zip
asset_content_type: application/zip
17 changes: 7 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Intellij
*.iml
.idea

# npm
node_modules
package-lock.json

# build
main.js
*.js.map
node_modules/
data.json
.obsidian/appearance.json
.obsidian/core-plugins.json
.obsidian/graph.json
.obsidian/workspace.json
CHANGELOG.md
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.obsidian/
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright 2025 by Mark Ayers
Copyright 2020–2024 by Badr Bouslikhin

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.
101 changes: 41 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,65 @@
# Obsidian Vault Changelog Plugin

This is a simple plugin that maintains a changelog of recently edited files in your vault.
The changelog update can be triggered both manually and automatically.
A plugin to maintain a change log of recently edited files in your Obsidian vault. Updates can be triggered manually or automatically.

<img src="https://raw.githubusercontent.com/MrZeroo00/obsidian-vault-changelog/main/resources/demo.png" width=50% height=50%>
**Important:** The change log note will be entirely overwritten at each update. Use a dedicated change log note and embed it in other notes if needed.

**Everything in the changelog note will be overwritten**. It's best to use a dedicated changelog note and embed it in other notes.
**Note:** This is a continuation of the original work by Badr Bouslikhin from 2020 to 2024. In January, Badr entrusted the project to Mark Ayers by transferring the code repository. On behalf of the Obsidian community, I want to express our gratitude to Badr for this valuable contribution.

<img src="https://raw.githubusercontent.com/MrZeroo00/obsidian-vault-changelog/main/resources/demo-embedded.png" width=50% height=50%>
## Installation

## How to Install
1. Open settings.
2. Navigate to "Community plugins".
3. Select "Browse".
4. Search for "Changelog."
5. Install and enable.

### Manual installation
link: <https://obsidian.md/plugins?id=obsidian-vault-changelog#>

1. Download zip archive from GitHub releases page.
1. Extract the archive into `<vault>/.obsidian/plugins`.
1. Reload Obsidian
## Usage

### From within Obsidian
Use the command palette command `Vault Changelog: Update` to update the
change log manually.

You can install the plugin via the Community Plugins tab within Obsidian. Just search for "Changelog".
## Example

## How to use

Once the plugin is installed and activated, you must provide it with the changelog file path.

You can update the changelog using the new command `Vault changelog: update` in the command palette.

You can configure two other options:

1. Number of recent files to show in the changelog
1. Automatic refresh of the changelog: this option automatically updates changelog on any note modification, deletion or rename.

### Changelog file location

The changelog file location input is the full absolute path (including .md extension).

```
./
├── notes/
│ └── misc/
│ └── changelog.md
├── pictures/
├── some-note.md
└── some-other-note.md
```markdown
- 2024-01-28T1430 · [[Note Title]]
- 2024-01-28T1425 · [[Another Note]]
```

If you want to use `changelog.md` from the example above, you should input `notes/misc/changelog.md` in the preference pane.
## Settings

## Development
- **Auto Update**: Toggle automatic changelog updates (default: `false`)
- **Changelog Path**: Location of changelog file (default: `Changelog.md`)
- **Datetime Format**: Moment.js format string (default: `YYYY-MM-DD[T]HHmm`)
- **Max Recent Files**: Number of files to track (default: `25`)

This project uses Typescript to provide type checking and documentation.
This plugin depends on the latest [plugin API](https://github.com/obsidianmd/obsidian-api) in Typescript Definition format, which contains TSDoc comments describing what it does.
## Changelog

**Note:** the Obsidian API is still in early alpha and is subject to change at any time!
### v1.0.0

If you want to contribute to development and/or just customize it with your own
tweaks, you can do the following:
- placeholder

- Clone this repository.
- `npm i` or `yarn` to install dependencies
- `npm run build` to compile.
- Copy `manifest.json`, `main.js` and `styles.css` to a subfolder of your plugins
folder (e.g. `<vault>/.obsidian/plugins/obsidian-vault-changelog/`)
- Reload obsidian to see changes
### v0.1.0

## Notes
- The initial release by Badr Bouslikhin

This is experimental and may have instability. It is possible that there are
bugs which may delete data in the current note. Please make backups!
## Code of conduct

## Common issues and solutions
We are all human beings, being human. Treat each other with respect and decorum. Assume good intentions. Practice a "Yes, and" worldview.

### Issue 1: Couldn`t write changelog: check the file path
## Contributing

1. Create a new file, for example - `notes/misc/changelog`
2. Go to **Settings -> Plugin Option -> Vault Changelog**
2. Enter path in **Changelog note location - notes/misc/changelog.md**
3. Restart Obsidian
- Open (or contribute to) a [Discussion on GitHub](https://github.com/philoserf/obsidian-vault-changelog/discussions)
- Open (or contribute to) an [Issue on GitHub](https://github.com/philoserf/obsidian-vault-changelog/issues)
- Open (or contribute to) a [Pull Request on GitHub](<(https://github.com/philoserf/obsidian-vault-changelog/pulls)>)
- Discuss the plugin in the [Forum](https://forum.obsidian.md)
- Discuss the plugin on [Discord](https://discord.gg/obsidianmd)

## Development

#### **Notes:**
> - Make sure to keep a **_proper file path and a name_**, like the one I have used.
> - If you are creating a new file with Obsidian, then **_don't put a (.md) extension_**.
1. Clone this repository `gh repo clone philoserf/obsidian-vault-changelog`.
2. Install dependencies with `npm install`.
3. Build the project with `npm run build`.
4. Add the `manifest.json` and `main.js` files to your plugins.
23 changes: 23 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import esbuild from "esbuild";

const production = process.argv[2] === "production";

// Define the build options
const buildOptions = {
bundle: true,
entryPoints: ["src/main.ts"],
external: ["obsidian"],
format: "cjs",
minify: production,
outfile: "main.js",
target: "ESNext",
};

// Build the plugin
esbuild
.build(buildOptions)
.then(() => console.log("Build complete!"))
.catch((err) => {
console.error("Build failed:", err);
process.exit(1);
});
Loading

0 comments on commit 6ceceda

Please sign in to comment.