Symbol Stripper

by Tacai
5
4
3
2
1
Score: 50/100

Description

An Obsidian plugin to strip specified characters or regex matches from selected text with one click.

Reviews

No reviews yet.

Stats

0
stars
12
downloads
0
forks
3
days
3
days
3
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
7
commits

Latest Version

4 days ago

Changelog

v1.0.4

✨ 设置页重构:恢复自定义Tab分页

  • 移除声明式设置API,恢复直接Tab分页UI

    • 移除 getSettingDefinitions() / getControlValue() / setControlValue() 方法
    • 移除 SettingPage / SettingDefinitionItem 导入
    • 移除 MainSettingPage / PresetsSettingPage / ImportExportSettingPage 子类
    • 所有Tab分页UI直接在 SymbolStripperSettingTab.display() 中渲染
    • 点击插件设置直接显示Tab分页界面,无多余跳转层
  • Tab分页结构

    • 常规:右键菜单、跟随栏、位置九宫格、剔除刷、语言切换
    • 预设:使用说明、筛选框、可折叠预设列表、添加按钮
    • 导入/导出:JSON导出/导入

✅ 审核合规修复

  • 修复 Warning: prefer-create-el

    • 导出:document.createElement('a')containerEl.createDiv({cls:'sr-hidden'}).createEl('a', {attr:{...}})
    • 导入:document.createElement('input')containerEl.createDiv({cls:'sr-hidden'}).createEl('input', {type:'file', attr:{...}})
  • 修复 Warning: 不安全的any类型

    • catch(e: any)catch(e: unknown) + instanceof Error 类型守卫

✨ Settings Page Refactor: Restored Custom Tab Navigation

  • Removed declarative settings API, restored direct Tab navigation UI

    • Removed getSettingDefinitions() / getControlValue() / setControlValue() methods
    • Removed SettingPage / SettingDefinitionItem imports
    • Removed MainSettingPage / PresetsSettingPage / ImportExportSettingPage subclasses
    • All Tab navigation UI rendered directly in SymbolStripperSettingTab.display()
    • Clicking plugin settings shows Tab interface directly, no extra navigation layer
  • Tab structure

    • General: context menu, following toolbar, position grid, eraser brush, language
    • Presets: usage guide, filter, collapsible preset list, add button
    • Import/Export: JSON export/import

✅ Review Compliance Fixes

  • Fixed Warning: prefer-create-el

    • Export: document.createElement('a')containerEl.createDiv({cls:'sr-hidden'}).createEl('a', {attr:{...}})
    • Import: document.createElement('input')containerEl.createDiv({cls:'sr-hidden'}).createEl('input', {type:'file', attr:{...}})
  • Fixed Warning: unsafe any types

    • catch(e: any)catch(e: unknown) + instanceof Error type guard

Full Changelog: https://github.com/Tasete/symbol-stripper/compare/v1.0.3...v1.0.4

README file from

Github

中文 | English


Symbol Stripper

License: MIT Obsidian Downloads

选中文本,一键剔除指定字符或正则匹配。

Select text and strip specified characters or regex matches with one click.


预览 / Preview

右键菜单 / Context Menu

右键菜单

跟随栏 / Floating Toolbar

跟随栏

剔除刷 / Eraser Brush

剔除刷


中文

功能特性

  • 🔤 字符模式 — 逐字符剔除,如剔除所有数字、标点
  • 🔍 正则模式 — 按正则表达式匹配剔除,如剔除所有空白、中文标点
  • 🎯 浮动工具栏 — 选中文本后自动出现跟随光标的工具栏,一键执行常用预设
  • 剔除刷 — 双击工具栏星标按钮激活,连续选中文本自动应用预设
  • 📋 右键菜单 — 选中文本 → 右键 → 选择预设
  • ⌨️ 命令面板Ctrl+P → 搜索"剔除" → 选择预设执行
  • ⚙️ 预设管理 — 在设置页自定义预设(增删改查、筛选、导入导出)
  • 🌐 多语言 — 支持中文 / English,跟随系统语言自动切换

内置预设

预设名称 模式 内容
剔除数字 字符 0-9
剔除空白 正则 \s+
剔除中文标点 正则 中文标点字符集
剔除英文标点 字符 常见英文标点

安装

Obsidian 社区插件(推荐)

  1. 设置 → 社区插件 → 浏览 → 搜索 "Symbol Stripper"
  2. 安装并启用

BRAT

  1. 安装 BRAT 插件
  2. BRAT 设置 → Add Beta plugin with frozen version → 输入仓库地址
  3. 搜索 Tacai/symbol-stripper,安装并启用

手动安装

  1. Releases 下载 main.jsmanifest.jsonstyles.css
  2. 在 vault 中创建 .obsidian/plugins/symbol-stripper/ 目录
  3. 将三个文件复制到该目录
  4. 重启 Obsidian → 设置 → 社区插件 → 启用 Symbol Stripper

致谢

浮动工具栏交互设计和设置界面分页设计参考了 editing-toolbar(MPL-2.0 License, by Cuman / PKM-er)。

许可证

MIT License, Copyright (c) 2026 Tacai


English

Features

  • 🔤 Char Mode — Strip individual characters, e.g. remove all digits or punctuation
  • 🔍 Regex Mode — Strip by regex match, e.g. remove all whitespace or Chinese punctuation
  • 🎯 Floating Toolbar — Auto-appears next to the cursor on text selection for one-click preset execution
  • Eraser Brush — Double-click the star button to activate; auto-applies preset on each selection
  • 📋 Context Menu — Select text → Right-click → Choose a preset
  • ⌨️ Command PaletteCtrl+P → Search "strip" → Choose a preset to execute
  • ⚙️ Preset Management — Add, edit, delete, filter, import, and export presets in settings
  • 🌐 i18n — Chinese / English support with auto language detection

Default Presets

Preset Name Mode Content
Strip Digits char 0-9
Strip Whitespace regex \s+
Strip Cn Punctuation regex Chinese punctuation character set
Strip En Punctuation char Common English punctuation

Installation

Obsidian Community Plugins (Recommended)

  1. Settings → Community Plugins → Browse → Search "Symbol Stripper"
  2. Install and enable

BRAT

  1. Install the BRAT plugin
  2. BRAT Settings → Add Beta plugin with frozen version → Enter repository URL
  3. Search for Tacai/symbol-stripper, install and enable

Manual Installation

  1. Download main.js, manifest.json, styles.css from Releases
  2. Create .obsidian/plugins/symbol-stripper/ directory in your vault
  3. Copy the three files into that directory
  4. Restart Obsidian → Settings → Community Plugins → Enable Symbol Stripper

Acknowledgments

The floating toolbar interaction design and settings page tab design were inspired by editing-toolbar (MPL-2.0 License, by Cuman / PKM-er).

License

MIT License, Copyright (c) 2026 Tacai