Skip to content

Commit

Permalink
Update plugin name and bump to 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Acylation committed Mar 31, 2024
1 parent 41526aa commit 4f010c3
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 26 deletions.
47 changes: 47 additions & 0 deletions README-ZH.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
# Obsidian Click Clack

![Obsidian Downloads](https://img.shields.io/badge/dynamic/json?logo=obsidian&color=%23483699&label=downloads&query=%24%5B%22click-clack%22%5D.downloads&url=https%3A%2F%2Fraw.luolix.top%2Fobsidianmd%2Fobsidian-releases%2Fmaster%2Fcommunity-plugin-stats.json)

[English](README.md) | [简体中文](README-ZH.md)

在 Obsidian 中模拟机械键盘、打字机按键音。

> [!Note]
> 最新插件版本: 0.1.1
> 文档版本: 0.1.1
## 安装插件

本插件尚处于早期开发阶段,正在申请上架社区插件市场,官方下载暂不可用。您可以考虑使用手动下载,或通过 BRAT 插件下载。

### 手动下载

[最新发布](https://github.com/Acylation/obsidian-click-clack/releases/latest)页面中,找到并下载 `main.js``manifest.json` 两个文件,并将它们放在 `[您的仓库]/.obsidian/plugins/click-clack` 路径下。

插件本体带有一个默认音效。在插件设置页面中,您还可以通过点击`下载`按钮获取更多音效。若自动下载遇到困难,如网络环境不佳等情况,请您到[最新发布](https://github.com/Acylation/obsidian-click-clack/releases/latest)页面中手动下载 `resources.zip` 并将其解压,获得 `[yourvault]/.obsidian/plugins/click-clack/resources` 这一文件夹。

### 通过 BRAT 插件下载

您可以在 [BRAT](https://github.com/TfTHacker/obsidian42-brat) 插件的设置页中,添加本仓库的地址,以下载本插件并获取持续更新。

## 插件设置

在本插件的设置页,您可以调节按键音量大小、临时开启/关闭按键音,以及选择您最喜欢的音效。

您也可以使用命令面板(`Ctrl` + `P`)临时开启/关闭按键音。

## 致谢

本项目依据社区讨论 <https://forum.obsidian.md/t/typewriter-sounds/15474>,其中包含了许多宝贵的设计建议。

本项目采用的首批音效直接取自 [Writemonkey 3](https://writemonkey.com/wm3/index.php) 的 Click Clack 插件,特此致谢!

## 开发计划

- 设置页面
- 自定义音源/音效
- 录音采集编辑工具
- 键盘映射 UI
- 兼容音源
- Mechvibes
- Monkey type
- 处理控制字符
- 处理非编辑器区域
- Canvas 嵌入节点区域
51 changes: 36 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
# Obsidian Click Clack

Simulates typewriter sounds in Obsidian.md
![Obsidian Downloads](https://img.shields.io/badge/dynamic/json?logo=obsidian&color=%23483699&label=downloads&query=%24%5B%22click-clack%22%5D.downloads&url=https%3A%2F%2Fraw.luolix.top%2Fobsidianmd%2Fobsidian-releases%2Fmaster%2Fcommunity-plugin-stats.json)

source: <https://forum.obsidian.md/t/typewriter-sounds/15474>
[简体中文](README-ZH.md) | [English](README.md)

This plugin is still in early development. Listen to key events and play typing sound effect through local resource.
Simulates typewriter / mechanical keyboard sounds in Obsidian.

## Install manually
> [!Note]
> Latest release: 0.1.1
> Document version: 0.1.1
Go to the latest release page, download `main.js` and `manifest.json` and put the in the directory of `[yourvault]/.obsidian/plugins/click-clack`.
## Installation

A default sound resource is bundled with the plugin. However, if you want more variants, please download the `resources.zip` from the release and include the unzipped resource folder `resources` to the plugin folder.
This plugin is still in early development. Currently it's unavailable from the plugin market. You can download this manually or using BRAT plugin.

### Manually install

Go to the [latest release](https://github.com/Acylation/obsidian-click-clack/releases/latest) page, download `main.js` and `manifest.json` and put the in the directory of `[yourvault]/.obsidian/plugins/click-clack`.

A default sound resource is bundled with the plugin. If you want more variants, you can find the `Download` button in the plugin's settings tab. Clicking it would fetch the `resources.zip` from the release page and unzip it to the directory of `[yourvault]/.obsidian/plugins/click-clack/resources`. You can also manually download and unzip the resources if there's error with automatical download.

### Install via BRAT

You can add register this repo path in the [BRAT](https://github.com/TfTHacker/obsidian42-brat) plugin to install and get updated.

## Configurations

In the plugin's settings tab, you can adjust sound volume for all keys, toggle on/off key sounds and select your favorite sound schemes.

You can also toggle on/off the key sounds via command palette (`Ctrl` + `P`), searching for `enable click clack sound` or `disable click clack sound`.

## Credits

This project is based on forum discussion <https://forum.obsidian.md/t/typewriter-sounds/15474>, where contains many valuable design suggestions.

The first batch of sound schemes are taken from the Click Clack plugin of [Writemonkey 3](https://writemonkey.com/wm3/index.php). Thank you so much for the charming resources!

## Roadmap

- Settings interface
- Custom sources (common, return?, ping?,)
- Monkey type
- Mechvibe
- Recorder and sound editor integration / workflow
- Adapt resources
- Monkey type
- Mechvibes
- Handle controller chars
- Documentation & Community
- i18n
- README-ZH.md
- Forum
- Forum-zh
- Discord
- Community plugin release
- Handle non-editor region
- include canvas md embed node
7 changes: 4 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"id": "click-clack",
"name": "Click clack",
"version": "0.1.0",
"name": "Click Clack",
"version": "0.1.1",
"minAppVersion": "1.0.0",
"description": "Simulates typewriter sounds in Obsidian.md",
"description": "Simulates typewriter / mechanical keyboard sounds in Obsidian.",
"author": "Acylation",
"authorUrl": "https://github.com/Acylation",
"fundingUrl": "https://ko-fi.com/Acylation",
"isDesktopOnly": false
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "click-clack",
"version": "0.1.0",
"version": "0.1.1",
"description": "Make some noise when typing in Obsidian.md!",
"main": "main.js",
"scripts": {
Expand All @@ -10,8 +10,8 @@
"lint": "eslint ./src"
},
"keywords": [
"mechanical-keyboard",
"typewriter",
"mechanical-keyboard",
"obsidian",
"obsidian-plugin",
"obsidian-md",
Expand All @@ -35,4 +35,4 @@
"howler": "^2.2.3",
"i18next": "^23.10.1"
}
}
}
6 changes: 3 additions & 3 deletions src/fetchHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ export const checkOrDownload = async () => {
};

const download = async (name: string, localPath: string) => {
new Notice(`Click clack: Downloading ${name}!`, 5000);
new Notice(`Click Clack: Downloading ${name}!`, 5000);
try {
await fetchAsset(name, localPath);
new Notice(
`Click clack: Resource ${name} successfully downloaded! ✔️`,
`Click Clack: Resource ${name} successfully downloaded! ✔️`,
5000
);
} catch (error) {
new Notice(`Click clack: Failed to fetch ${name}: ${error} ❌`);
new Notice(`Click Clack: Failed to fetch ${name}: ${error} ❌`);
throw Error(`Failed to fetch resource ${name} from GitHub release.`);
}
};
Expand Down

0 comments on commit 4f010c3

Please sign in to comment.