mirror of
https://github.com/groldsf/obsidian_check_plugin.git
synced 2026-07-22 05:37:48 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
4f9c5ab5e3
11 changed files with 366 additions and 169 deletions
196
README.md
196
README.md
|
|
@ -1,186 +1,44 @@
|
|||
# Checkbox Sync
|
||||
# Checkbox Sync for Obsidian
|
||||
|
||||
[](LICENSE)
|
||||
[](https://github.com/groldsf/obsidian_check_plugin/releases)
|
||||
[](https://github.com/groldsf/obsidian_check_plugin/releases)
|
||||
|
||||
- [English](#english)
|
||||
- [Русский](#русский)
|
||||
**Checkbox Sync** is an [Obsidian](https://obsidian.md/) plugin that helps automate the management of checkbox states within hierarchical lists (parent ↔ children synchronization).
|
||||
|
||||
## English
|
||||
It automatically updates parent checkboxes based on their children's state, and optionally cascades changes from parent to children, providing flexibility for managing task lists and nested checklists.
|
||||
|
||||
### Description
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/groldsf/obsidian_check_plugin/refs/heads/master/img/showcase.gif" alt="Checkbox Sync Demo: Parent state updates automatically based on children." width="400">
|
||||
<br/>
|
||||
<em>Example: Parent checkbox automatically reflects child completion status.</em>
|
||||
</p>
|
||||
|
||||
**Checkbox Sync** is a plugin for [Obsidian](https://obsidian.md/) that helps automate the management of checkbox states within hierarchical lists in your notes. It offers bidirectional synchronization options based on your settings:
|
||||
[**➡️ Read the Full Documentation (English & Русский) for more examples and settings**](https://groldsf.github.io/obsidian_check_plugin/)
|
||||
|
||||
1. **Parent state from children:** If enabled, the parent checkbox state automatically reflects the completion status of its children (checked if all children are checked, unchecked otherwise).
|
||||
2. **Child state from parent:** If enabled, manually changing a parent checkbox's state will cascade that change down to all its direct and nested children.
|
||||
|
||||
This provides flexibility in how you manage your task lists.
|
||||
## Key Features
|
||||
|
||||
**Example 1: Parent state updates from children**
|
||||
* Automatically check/uncheck parent based on children state.
|
||||
* Automatically check/uncheck children when parent state changes manually.
|
||||
* Configurable synchronization.
|
||||
* Supports ordered and unordered lists.
|
||||
* Respects list indentation for nested hierarchies.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/groldsf/obsidian_check_plugin/refs/heads/master/img/showcase.gif" alt="Checking the last child causes the parent to become checked. Unchecking any child unchecks the parent (requires `enableAutomaticParentState` setting)." width="300">
|
||||
## Quick Links
|
||||
|
||||
*Checking the last child causes the parent to become checked. Unchecking any child unchecks the parent (requires `enableAutomaticParentState` setting).*
|
||||
* [**Documentation Home**](https://groldsf.github.io/obsidian_check_plugin/)
|
||||
* [Installation Guide](https://groldsf.github.io/obsidian_check_plugin/installation)
|
||||
* [Settings Overview](https://groldsf.github.io/obsidian_check_plugin/settings)
|
||||
* [Usage & Examples](https://groldsf.github.io/obsidian_check_plugin/usage)
|
||||
* [Changelog](https://groldsf.github.io/obsidian_check_plugin/changelog)
|
||||
* [Roadmap](https://groldsf.github.io/obsidian_check_plugin/roadmap)
|
||||
* [Report an Issue / Suggestion](https://github.com/groldsf/obsidian_check_plugin/issues)
|
||||
|
||||
**Example 2: Child state updates from parent**
|
||||
## Contributing
|
||||
|
||||
<img src="https://raw.githubusercontent.com/groldsf/obsidian_check_plugin/refs/heads/master/img/showcase2.gif" alt="Manually checking/unchecking the parent checkbox cascades the state change to all children (requires `enableAutomaticChildState` setting)." width="300">
|
||||
Contributions are welcome! Please see the [**Contributing Guide**](https://groldsf.github.io/obsidian_check_plugin/contributing) on our documentation site for details on how to help improve Checkbox Sync.
|
||||
|
||||
*Manually checking/unchecking the parent checkbox cascades the state change to all children (requires `enableAutomaticChildState` setting).*
|
||||
## License
|
||||
|
||||
### Supported Lists
|
||||
|
||||
The plugin works with both ordered and unordered lists:
|
||||
|
||||
- **Unordered Lists** - Lists created with `-`, `+` or `*` markers
|
||||
- **Ordered Lists** - Numbered lists (1., 2., etc.)
|
||||
|
||||
The plugin respects list indentation, allowing for nested checkbox hierarchies at any level. It also attempts to handle checkboxes within embedded files (`![[...]]`), though behavior might depend on Obsidian's own handling of embeds.
|
||||
|
||||
### Settings
|
||||
|
||||
The plugin offers the following configuration options:
|
||||
|
||||
- **X-Only Mode**
|
||||
- **Enabled:** Only checkboxes marked with `x` (e.g., `- [x]`) are considered checked.
|
||||
- **Disabled:** Any character inside the checkbox (except a space) marks it as checked (e.g., `- [-]`, `- [?]`).
|
||||
- **Update parent checkbox state automatically** (`enableAutomaticParentState`)
|
||||
- **Enabled (Default):** The state of a parent checkbox is automatically updated based on the state of its children (checked if all children are checked, unchecked otherwise).
|
||||
- **Disabled:** The parent checkbox state is not automatically changed when child states change.
|
||||
- **Update child checkbox state automatically** (`enableAutomaticChildState`)
|
||||
- **Enabled (Default):** Manually changing the state of a parent checkbox automatically updates the state of all its direct and nested children to match.
|
||||
- **Disabled:** Manually changing a parent checkbox does not affect its children's state.
|
||||
|
||||
### Usage
|
||||
|
||||
After activating the plugin, it automatically tracks and synchronizes checkboxes based on your settings, as demonstrated in the examples above. You can enable or disable the upward sync (parent from children) and downward sync (children from parent) independently via the settings to tailor the behavior to your preferred workflow.
|
||||
|
||||
### Installation
|
||||
|
||||
#### Via Community Plugins (Recommended)
|
||||
1. Open Obsidian and go to **Settings → Community plugins**.
|
||||
2. Click the **Browse** button, search for "Checkbox Sync", and click **Install**.
|
||||
3. Once installed, click **Enable**.
|
||||
#### Manual Installation
|
||||
1. Go to the [releases page](https://github.com/groldsf/obsidian_check_plugin/releases) and download the latest `main.js`, `manifest.json`, and `styles.css` (if present).
|
||||
2. Create a new folder named `checkbox-sync` inside your vault's plugin folder: `<your-vault>/.obsidian/plugins/`.
|
||||
3. Copy the downloaded files into the `<your-vault>/.obsidian/plugins/checkbox-sync/` folder.
|
||||
4. Restart Obsidian.
|
||||
5. Open **Settings → Community plugins**, find **Checkbox Sync** in the list, and enable it.
|
||||
|
||||
### Development and Contribution
|
||||
|
||||
If you want to make changes or improvements to the plugin:
|
||||
|
||||
1. **Fork** the repository.
|
||||
2. Create a new branch:
|
||||
`git checkout -b feature/feature-name`
|
||||
3. Make changes and commit:
|
||||
`git commit -m "Description of changes"`
|
||||
4. Push changes to your fork:
|
||||
`git push origin feature/feature-name`
|
||||
5. Open a Pull Request in the original repository.
|
||||
|
||||
### License
|
||||
|
||||
This project is licensed under the 0BSD license.
|
||||
|
||||
### Acknowledgments
|
||||
|
||||
- [Obsidian](https://obsidian.md/) — a platform for creating and organizing notes.
|
||||
- The project is based on the [obsidian-sample-plugin](https://github.com/obsidianmd/obsidian-sample-plugin) template.
|
||||
|
||||
---
|
||||
|
||||
If you have any questions, suggestions, or find a bug, please [create an issue](https://github.com/groldsf/obsidian_check_plugin/issues) in the repository.
|
||||
|
||||
## Русский
|
||||
|
||||
### Описание
|
||||
|
||||
**Checkbox Sync** — это плагин для [Obsidian](https://obsidian.md/), который помогает автоматизировать управление состоянием чекбоксов в иерархических списках ваших заметок. Он предлагает опции двунаправленной синхронизации в соответствии с вашими настройками:
|
||||
|
||||
1. **Состояние родителя от детей:** Если включено, состояние родительского чекбокса автоматически отражает статус выполнения его дочерних элементов (отмечен, если все дочерние отмечены, не отмечен в противном случае).
|
||||
2. **Состояние детей от родителя:** Если включено, ручное изменение состояния родительского чекбокса каскадно применит это изменение ко всем его прямым и вложенным дочерним элементам.
|
||||
|
||||
Это обеспечивает гибкость в управлении списками задач.
|
||||
|
||||
**Пример 1: Состояние родителя обновляется от детей**
|
||||
|
||||
<img src="https://raw.githubusercontent.com/groldsf/obsidian_check_plugin/refs/heads/master/img/showcase.gif" alt="Checking the last child causes the parent to become checked. Unchecking any child unchecks the parent (requires `enableAutomaticParentState` setting)." width="300">
|
||||
|
||||
*Отметка последнего дочернего чекбокса приводит к отметке родительского. Снятие отметки с любого дочернего элемента снимает отметку с родительского (требует включенной настройки `enableAutomaticParentState`).*
|
||||
|
||||
**Пример 2: Состояние детей обновляется от родителя**
|
||||
|
||||
<img src="https://raw.githubusercontent.com/groldsf/obsidian_check_plugin/refs/heads/master/img/showcase2.gif" alt="Manually checking/unchecking the parent checkbox cascades the state change to all children (requires `enableAutomaticChildState` setting)." width="300">
|
||||
|
||||
*Ручная отметка/снятие отметки с родительского чекбокса каскадно применяет изменение ко всем дочерним элементам (требует включенной настройки `enableAutomaticChildState`).*
|
||||
|
||||
### Поддерживаемые списки
|
||||
|
||||
Плагин работает как с нумерованными, так и с ненумерованными списками:
|
||||
|
||||
- **Ненумерованные списки** - Списки, созданные с помощью маркеров `-`, `+` или `*`
|
||||
- **Нумерованные списки** - Списки с цифровой нумерацией (1., 2. и т.д.)
|
||||
|
||||
Плагин учитывает отступы списков, позволяя создавать вложенные иерархии чекбоксов на любом уровне. Он также пытается корректно обрабатывать чекбоксы внутри встроенных файлов (`![[...]]`), хотя поведение может зависеть от собственной обработки встраиваний в Obsidian.
|
||||
|
||||
### Настройки
|
||||
|
||||
Плагин предлагает следующие параметры конфигурации:
|
||||
|
||||
- **Режим X-Only**
|
||||
- **Включен:** Только чекбоксы, отмеченные символом `x` (например, `- [x]`), считаются выполненными.
|
||||
- **Отключен:** Любой символ внутри чекбокса (кроме пробела) считается отметкой о выполнении (например, `- [-]`, `- [?]`).
|
||||
- **Автоматически обновлять состояние родительского чекбокса** (`enableAutomaticParentState`)
|
||||
- **Включено (По умолчанию):** Состояние родительского чекбокса автоматически обновляется на основе состояния дочерних (отмечен, если все дочерние отмечены, не отмечен в противном случае).
|
||||
- **Отключено:** Состояние родительского чекбокса не изменяется автоматически при изменении состояния дочерних.
|
||||
- **Автоматически обновлять состояние дочерних чекбоксов** (`enableAutomaticChildState`)
|
||||
- **Включено (По умолчанию):** Ручное изменение состояния родительского чекбокса автоматически обновляет состояние всех его прямых и вложенных дочерних элементов.
|
||||
- **Отключено:** Ручное изменение родительского чекбокса не влияет на состояние его дочерних элементов.
|
||||
|
||||
### Использование
|
||||
|
||||
После активации плагина, он автоматически отслеживает и синхронизирует чекбоксы в соответствии с вашими настройками, как показано в примерах выше. Вы можете независимо включать или отключать синхронизацию вверх (родитель от детей) и вниз (дети от родителя) с помощью настроек, чтобы адаптировать поведение под ваш рабочий процесс.
|
||||
|
||||
### Установка
|
||||
|
||||
#### Через Плагины сообщества (Рекомендуется)
|
||||
1. Откройте Obsidian и перейдите в **Настройки → Плагины сообщества**.
|
||||
2. Нажмите кнопку **Обзор**, найдите "Checkbox Sync" и нажмите **Установить**.
|
||||
3. После установки нажмите **Включить**.
|
||||
#### Ручная установка
|
||||
1. Перейдите на [страницу релизов](https://github.com/groldsf/obsidian_check_plugin/releases) и скачайте последние `main.js`, `manifest.json` и `styles.css` (при наличии).
|
||||
2. Создайте новую папку с именем `checkbox-sync` в папке плагинов вашего хранилища: `<ваше-хранилище>/.obsidian/plugins/`.
|
||||
3. Скопируйте загруженные файлы в папку `<ваше-хранилище>/.obsidian/plugins/checkbox-sync/`.
|
||||
4. Перезапустите Obsidian.
|
||||
5. Откройте **Настройки → Плагины сообщества**, найдите **Checkbox Sync** в списке и активируйте его.
|
||||
|
||||
### Разработка и вклад
|
||||
|
||||
Если вы хотите внести изменения или улучшения в плагин:
|
||||
|
||||
1. **Форкните** репозиторий.
|
||||
2. Создайте новую ветку:
|
||||
`git checkout -b feature/имя-функционала`
|
||||
3. Внесите изменения и сделайте коммит:
|
||||
`git commit -m "Описание изменений"`
|
||||
4. Отправьте изменения в свой форк:
|
||||
`git push origin feature/имя-функционала`
|
||||
5. Откройте Pull Request в оригинальном репозитории.
|
||||
|
||||
### Лицензия
|
||||
|
||||
Этот проект лицензирован под лицензией 0BSD.
|
||||
|
||||
### Благодарности
|
||||
|
||||
- [Obsidian](https://obsidian.md/) — платформа для создания и организации заметок.
|
||||
- Проект создан на основе шаблона [obsidian-sample-plugin](https://github.com/obsidianmd/obsidian-sample-plugin).
|
||||
|
||||
---
|
||||
|
||||
Если у вас есть вопросы, предложения или вы обнаружили баг, пожалуйста, [создайте issue](https://github.com/groldsf/obsidian_check_plugin/issues) в репозитории.
|
||||
This project is licensed under the 0BSD license. See the [LICENSE](LICENSE) file for details.
|
||||
17
docs/_config.yml
Normal file
17
docs/_config.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
remote_theme: pmarsceill/just-the-docs
|
||||
|
||||
# --- Основные настройки сайта (используются темой) ---
|
||||
title: Checkbox Sync Documentation
|
||||
description: Documentation for the Checkbox Sync Obsidian plugin.
|
||||
|
||||
# --- Базовые настройки "Just the Docs" (можно добавить позже) ---
|
||||
# Включить встроенный поиск (требует небольшой настройки, см. док-ю темы)
|
||||
search_enabled: false
|
||||
|
||||
# Вспомогательные ссылки в шапке (необязательно)
|
||||
aux_links:
|
||||
"Checkbox Sync on GitHub":
|
||||
- "https://github.com/groldsf/obsidian_check_plugin" # Замените на URL вашего репозитория
|
||||
|
||||
# Настройки цветовой схемы (необязательно, по умолчанию светлая)
|
||||
color_scheme: light
|
||||
BIN
docs/assets/showcase.gif
Normal file
BIN
docs/assets/showcase.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 377 KiB |
BIN
docs/assets/showcase2.gif
Normal file
BIN
docs/assets/showcase2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 983 KiB |
61
docs/changelog.md
Normal file
61
docs/changelog.md
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
title: Changelog
|
||||
nav_order: 3
|
||||
---
|
||||
# Changelog
|
||||
|
||||
## [1.0.10] - 2025-04-12
|
||||
### Fixed
|
||||
- Fix bug [#10](https://github.com/groldsf/obsidian_check_plugin/issues/10).
|
||||
|
||||
## [1.0.9] - 2025-04-11
|
||||
### Added
|
||||
- Added "Allow (un)checking of parent" [#9](https://github.com/groldsf/obsidian_check_plugin/issues/9).
|
||||
- Added file cache.
|
||||
- Added new settings.
|
||||
|
||||
## [1.0.8] - 2025-03-20
|
||||
### Fixed
|
||||
- Fix callback.
|
||||
- Fix scroll.
|
||||
|
||||
## [1.0.7] - 2025-03-20
|
||||
### Added
|
||||
- Added mutex.
|
||||
|
||||
## [1.0.6] - 2025-03-19
|
||||
### Fixed
|
||||
- Bug: non-cascading update in view mode [#8](https://github.com/groldsf/obsidian_check_plugin/issues/8)
|
||||
|
||||
## [1.0.5] - 2025-03-15
|
||||
### Added
|
||||
- Added settings tab.
|
||||
### Fixed
|
||||
- Fix name and description.
|
||||
- [#4](https://github.com/groldsf/obsidian_check_plugin/issues/4).
|
||||
- [#6](https://github.com/groldsf/obsidian_check_plugin/issues/6).
|
||||
- [#7](https://github.com/groldsf/obsidian_check_plugin/issues/7).
|
||||
|
||||
## [1.0.4] - 2025-03-10
|
||||
### Added
|
||||
- Add checkbox sync support for Reading View via vault.on('modify'), keep editor-change for real-time updates, [#3](https://github.com/groldsf/obsidian_check_plugin/issues/3).
|
||||
### Fixed
|
||||
- Prevent editor scrolling on checkbox sync by moving cursor to end of first changed line and hiding it with blur, [#2](https://github.com/groldsf/obsidian_check_plugin/issues/2).
|
||||
- Fix license.
|
||||
|
||||
## [1.0.3] - 2025-02-18
|
||||
### Added
|
||||
- Added tests.
|
||||
|
||||
## [1.0.2] - 2025-02-17
|
||||
### Added
|
||||
- Added support for different list types.
|
||||
### Fixed
|
||||
- Fix name and description.
|
||||
|
||||
## [1.0.1] - 2025-02-08
|
||||
### Fixed
|
||||
- Fixed cursor and scroll bug.
|
||||
|
||||
## [1.0.0] - 2025-02-03
|
||||
- Initial release of Checkbox Sync.
|
||||
40
docs/contributing.md
Normal file
40
docs/contributing.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
title: Contributing
|
||||
nav_order: 6
|
||||
---
|
||||
# Contributing
|
||||
|
||||
- [English](#english)
|
||||
- [Русский](#русский)
|
||||
|
||||
## English
|
||||
|
||||
If you want to make changes or improvements to the plugin:
|
||||
|
||||
1. **Fork** the repository.
|
||||
2. **Clone** your fork locally.
|
||||
3. **Install dependencies:** `npm install` (or yarn)
|
||||
4. **Start development build:** `npm run dev` (or yarn dev)
|
||||
5. Create a new branch: `git checkout -b feature/feature-name`
|
||||
6. Make changes and commit: `git commit -m "feat: Description of changes"` (Try to follow [conventional commit messages](https://www.conventionalcommits.org/))
|
||||
7. Push changes to your fork: `git push origin feature/feature-name`
|
||||
8. Open a Pull Request in the original repository.
|
||||
|
||||
Please ensure your code adheres to the existing style and include updates to the documentation (`/docs`) if your changes affect usage or settings.
|
||||
|
||||
---
|
||||
|
||||
## Русский
|
||||
|
||||
Если вы хотите внести изменения или улучшения в плагин:
|
||||
|
||||
1. **Форкните** репозиторий.
|
||||
2. **Клонируйте** ваш форк локально.
|
||||
3. **Установите зависимости:** `npm install` (или yarn)
|
||||
4. **Запустите сборку для разработки:** `npm run dev` (или yarn dev)
|
||||
5. Создайте новую ветку: `git checkout -b feature/имя-функционала`
|
||||
6. Внесите изменения и сделайте коммит: `git commit -m "feat: Описание изменений"` (Старайтесь следовать [conventional commit messages](https://www.conventionalcommits.org/))
|
||||
7. Отправьте изменения в свой форк: `git push origin feature/имя-функционала`
|
||||
8. Откройте Pull Request в оригинальном репозитории.
|
||||
|
||||
Пожалуйста, убедитесь, что ваш код соответствует существующему стилю, и включите обновления документации (`/docs`), если ваши изменения затрагивают использование или настройки.
|
||||
54
docs/index.md
Normal file
54
docs/index.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
title: Welcome
|
||||
nav_order: 0
|
||||
---
|
||||
# Welcome to Checkbox Sync Documentation
|
||||
|
||||
- [English](#english)
|
||||
- [Русский](#русский)
|
||||
|
||||
## English
|
||||
|
||||
**Checkbox Sync** is a plugin for [Obsidian](https://obsidian.md/) that helps automate the management of checkbox states within hierarchical lists in your notes.
|
||||
|
||||
It offers bidirectional synchronization options based on your settings:
|
||||
1. **Parent state from children:** If enabled, the parent checkbox state automatically reflects the completion status of its children.
|
||||
2. **Child state from parent:** If enabled, manually changing a parent checkbox's state will cascade that change down to all its children.
|
||||
|
||||
This provides flexibility in how you manage your task lists.
|
||||
|
||||
**Quick Links:**
|
||||
* [Usage and Examples](usage.md)
|
||||
* [Settings Explained](settings.md)
|
||||
* [Changelog](changelog.md)
|
||||
* [Roadmap](roadmap.md)
|
||||
* [Installation Guide](installation.md)
|
||||
* [Contributing Guide](contributing.md)
|
||||
|
||||
### Acknowledgments
|
||||
* [Obsidian](https://obsidian.md/) — a platform for creating and organizing notes.
|
||||
* The project is based on the [obsidian-sample-plugin](https://github.com/obsidianmd/obsidian-sample-plugin) template.
|
||||
|
||||
---
|
||||
|
||||
## Русский
|
||||
|
||||
**Checkbox Sync** — это плагин для [Obsidian](https://obsidian.md/), который помогает автоматизировать управление состоянием чекбоксов в иерархических списках ваших заметок.
|
||||
|
||||
Он предлагает опции двунаправленной синхронизации в соответствии с вашими настройками:
|
||||
1. **Состояние родителя от детей:** Если включено, состояние родительского чекбокса автоматически отражает статус выполнения его дочерних элементов.
|
||||
2. **Состояние детей от родителя:** Если включено, ручное изменение состояния родительского чекбокса каскадно применит это изменение ко всем его дочерним элементам.
|
||||
|
||||
Это обеспечивает гибкость в управлении списками задач.
|
||||
|
||||
**Быстрые ссылки:**
|
||||
* [Использование и примеры](usage.md)
|
||||
* [Описание настроек](settings.md)
|
||||
* [История изменений](changelog.md)
|
||||
* [Планы (Roadmap)](roadmap.md)
|
||||
* [Руководство по установке](installation.md)
|
||||
* [Руководство для контрибьюторов](contributing.md)
|
||||
|
||||
### Благодарности
|
||||
* [Obsidian](https://obsidian.md/) — платформа для создания и организации заметок.
|
||||
* Проект создан на основе шаблона [obsidian-sample-plugin](https://github.com/obsidianmd/obsidian-sample-plugin).
|
||||
38
docs/installation.md
Normal file
38
docs/installation.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: Installation
|
||||
nav_order: 5
|
||||
---
|
||||
# Installation
|
||||
|
||||
- [English](#english)
|
||||
- [Русский](#русский)
|
||||
|
||||
## English
|
||||
|
||||
### Via Community Plugins (Recommended)
|
||||
1. Open Obsidian and go to **Settings → Community plugins**.
|
||||
2. Click the **Browse** button, search for "Checkbox Sync", and click **Install**.
|
||||
3. Once installed, click **Enable**.
|
||||
|
||||
### Manual Installation
|
||||
1. Go to the [releases page](https://github.com/groldsf/obsidian_check_plugin/releases) and download the latest `main.js`, `manifest.json`, and `styles.css` (if present).
|
||||
2. Create a new folder named `checkbox-sync` inside your vault's plugin folder: `<your-vault>/.obsidian/plugins/`.
|
||||
3. Copy the downloaded files into the `<your-vault>/.obsidian/plugins/checkbox-sync/` folder.
|
||||
4. Restart Obsidian.
|
||||
5. Open **Settings → Community plugins**, find **Checkbox Sync** in the list, and enable it.
|
||||
|
||||
---
|
||||
|
||||
## Русский
|
||||
|
||||
### Через Плагины сообщества (Рекомендуется)
|
||||
1. Откройте Obsidian и перейдите в **Настройки → Плагины сообщества**.
|
||||
2. Нажмите кнопку **Обзор**, найдите "Checkbox Sync" и нажмите **Установить**.
|
||||
3. После установки нажмите **Включить**.
|
||||
|
||||
### Ручная установка
|
||||
1. Перейдите на [страницу релизов](https://github.com/groldsf/obsidian_check_plugin/releases) и скачайте последние `main.js`, `manifest.json` и `styles.css` (при наличии).
|
||||
2. Создайте новую папку с именем `checkbox-sync` в папке плагинов вашего хранилища: `<ваше-хранилище>/.obsidian/plugins/`.
|
||||
3. Скопируйте загруженные файлы в папку `<ваше-хранилище>/.obsidian/plugins/checkbox-sync/`.
|
||||
4. Перезапустите Obsidian.
|
||||
5. Откройте **Настройки → Плагины сообщества**, найдите **Checkbox Sync** в списке и активируйте его.
|
||||
29
docs/roadmap.md
Normal file
29
docs/roadmap.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: Roadmap
|
||||
nav_order: 4
|
||||
---
|
||||
# Roadmap
|
||||
|
||||
This document outlines the development status and future plans for the Checkbox Sync plugin. Items listed under "Next Release Candidates" are already implemented in the development branch or are actively being worked on for the upcoming release. Items under "Future Ideas / Backlog" are planned for later versions or are under consideration.
|
||||
|
||||
*(Note: This roadmap is tentative and priorities may shift.)*
|
||||
|
||||
## Next Release Candidates
|
||||
|
||||
* [Feature: Flexible Checkbox Symbol Configuration](https://github.com/groldsf/obsidian_check_plugin/issues/11)
|
||||
* [Feature: Setting to Disable Automatic Checkbox Synchronization on File Open](https://github.com/groldsf/obsidian_check_plugin/issues/13)
|
||||
* [Refactor: Refactor CheckboxSyncPluginSettingTab for Improved Maintainability and Scalability](https://github.com/groldsf/obsidian_check_plugin/issues/15)
|
||||
|
||||
## Future Ideas / Backlog
|
||||
|
||||
* [Feature] **Logging Toggle:** Add a setting to enable/disable detailed logging for debugging purposes.
|
||||
* [Feature] **Support Non-Checkbox Nodes:** Allow regular list items (e.g., `- Parent Item` without `[ ]`) to function as structural nodes within the hierarchy for synchronization logic.
|
||||
* [Feature] **File/Folder Scope Filter:** Implement settings to include or exclude specific files or folders where the plugin should be active.
|
||||
* [Feature] **Configurable Checkbox Character (Auto-Update):** Add a setting to define which character is used to mark checkboxes when automatically updated by the plugin.
|
||||
* [Feature] **List Reordering Functionality:** Explore and potentially implement list item reordering features, possibly inspired with approaches like [obsidian-checkboxReorder](https://github.com/Erl-koenig/obsidian-checkboxReorder) (e.g., moving completed items).
|
||||
* [Tech] **Improve Change Detection:** Investigate using a library like `jsdiff` to more accurately detect and react to specific changes within files, potentially improving performance and reliability.
|
||||
* [Tech] **Refactor Settings Handling:** Change how settings are used internally. Instead of passing the settings object by reference, create a new instance of `CheckboxUtils` (or relevant class) when settings are modified to ensure proper state isolation and updates.
|
||||
|
||||
---
|
||||
|
||||
*Contributions and suggestions are welcome! Please open an issue to discuss these items or suggest new ones.*
|
||||
38
docs/settings.md
Normal file
38
docs/settings.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: Settings
|
||||
nav_order: 2
|
||||
---
|
||||
# Settings
|
||||
|
||||
- [English](#english)
|
||||
- [Русский](#русский)
|
||||
|
||||
## English
|
||||
|
||||
The plugin offers the following configuration options:
|
||||
|
||||
- **X-Only Mode**
|
||||
- **Enabled:** Only checkboxes marked with `x` (e.g., `- [x]`) are considered checked.
|
||||
- **Disabled:** Any character inside the checkbox (except a space) marks it as checked (e.g., `- [-]`, `- [?]`).
|
||||
- **Update parent checkbox state automatically** (`enableAutomaticParentState`)
|
||||
- **Enabled (Default):** The state of a parent checkbox is automatically updated based on the state of its children (checked if all children are checked, unchecked otherwise).
|
||||
- **Disabled:** The parent checkbox state is not automatically changed when child states change.
|
||||
- **Update child checkbox state automatically** (`enableAutomaticChildState`)
|
||||
- **Enabled (Default):** Manually changing the state of a parent checkbox automatically updates the state of all its direct and nested children to match.
|
||||
- **Disabled:** Manually changing a parent checkbox does not affect its children's state.
|
||||
|
||||
---
|
||||
|
||||
## Русский
|
||||
|
||||
Плагин предлагает следующие параметры конфигурации:
|
||||
|
||||
- **Режим X-Only**
|
||||
- **Включен:** Только чекбоксы, отмеченные символом `x` (например, `- [x]`), считаются выполненными.
|
||||
- **Отключен:** Любой символ внутри чекбокса (кроме пробела) считается отметкой о выполнении (например, `- [-]`, `- [?]`).
|
||||
- **Автоматически обновлять состояние родительского чекбокса** (`enableAutomaticParentState`)
|
||||
- **Включено (По умолчанию):** Состояние родительского чекбокса автоматически обновляется на основе состояния дочерних (отмечен, если все дочерние отмечены, не отмечен в противном случае).
|
||||
- **Отключено:** Состояние родительского чекбокса не изменяется автоматически при изменении состояния дочерних.
|
||||
- **Автоматически обновлять состояние дочерних чекбоксов** (`enableAutomaticChildState`)
|
||||
- **Включено (По умолчанию):** Ручное изменение состояния родительского чекбокса автоматически обновляет состояние всех его прямых и вложенных дочерних элементов.
|
||||
- **Отключено:** Ручное изменение родительского чекбокса не влияет на состояние его дочерних элементов.
|
||||
62
docs/usage.md
Normal file
62
docs/usage.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
title: Usage and Examples
|
||||
nav_order: 1
|
||||
---
|
||||
# Usage and Examples
|
||||
|
||||
- [English](#english)
|
||||
- [Русский](#русский)
|
||||
|
||||
## English
|
||||
|
||||
After activating the plugin, it automatically tracks and synchronizes checkboxes based on your settings. You can enable or disable the upward sync (parent from children) and downward sync (children from parent) independently via the settings to tailor the behavior to your preferred workflow.
|
||||
|
||||
**Example 1: Parent state updates from children**
|
||||
*(Requires `enableAutomaticParentState` setting)*
|
||||
|
||||
<img src="assets/showcase.gif" alt="Checking the last child causes the parent to become checked. Unchecking any child unchecks the parent." width="300">
|
||||
|
||||
*Checking the last child causes the parent to become checked. Unchecking any child unchecks the parent.*
|
||||
|
||||
**Example 2: Child state updates from parent**
|
||||
*(Requires `enableAutomaticChildState` setting)*
|
||||
|
||||
<img src="assets/showcase2.gif" alt="Manually checking/unchecking the parent checkbox cascades the state change to all children." width="300">
|
||||
|
||||
*Manually checking/unchecking the parent checkbox cascades the state change to all children.*
|
||||
|
||||
### Supported Lists
|
||||
|
||||
The plugin works with both ordered and unordered lists:
|
||||
- **Unordered Lists** - Lists created with `-`, `+` or `*` markers
|
||||
- **Ordered Lists** - Numbered lists (1., 2., etc.)
|
||||
|
||||
The plugin respects list indentation, allowing for nested checkbox hierarchies at any level. It also attempts to handle checkboxes within embedded files (`![[...]]`), though behavior might depend on Obsidian's own handling of embeds.
|
||||
|
||||
---
|
||||
|
||||
## Русский
|
||||
|
||||
После активации плагина, он автоматически отслеживает и синхронизирует чекбоксы в соответствии с вашими настройками. Вы можете независимо включать или отключать синхронизацию вверх (родитель от детей) и вниз (дети от родителя) с помощью настроек, чтобы адаптировать поведение под ваш рабочий процесс.
|
||||
|
||||
**Пример 1: Состояние родителя обновляется от детей**
|
||||
*(Требует включенной настройки `enableAutomaticParentState`)*
|
||||
|
||||
<img src="assets/showcase.gif" alt="Отметка последнего дочернего чекбокса приводит к отметке родительского. Снятие отметки с любого дочернего элемента снимает отметку с родительского." width="300">
|
||||
|
||||
*Отметка последнего дочернего чекбокса приводит к отметке родительского. Снятие отметки с любого дочернего элемента снимает отметку с родительского.*
|
||||
|
||||
**Пример 2: Состояние детей обновляется от родителя**
|
||||
*(Требует включенной настройки `enableAutomaticChildState`)*
|
||||
|
||||
<img src="assets/showcase2.gif" alt="Ручная отметка/снятие отметки с родительского чекбокса каскадно применяет изменение ко всем дочерним элементам." width="300">
|
||||
|
||||
*Ручная отметка/снятие отметки с родительского чекбокса каскадно применяет изменение ко всем дочерним элементам.*
|
||||
|
||||
### Поддерживаемые списки
|
||||
|
||||
Плагин работает как с нумерованными, так и с ненумерованными списками:
|
||||
- **Ненумерованные списки** - Списки, созданные с помощью маркеров `-`, `+` или `*`
|
||||
- **Нумерованные списки** - Списки с цифровой нумерацией (1., 2. и т.д.)
|
||||
|
||||
Плагин учитывает отступы списков, позволяя создавать вложенные иерархии чекбоксов на любом уровне. Он также пытается корректно обрабатывать чекбоксы внутри встроенных файлов (`![[...]]`), хотя поведение может зависеть от собственной обработки встраиваний в Obsidian.
|
||||
Loading…
Reference in a new issue