# Unicode Text Formatter An [Obsidian](https://obsidian.md) plugin that transforms selected text into Unicode Mathematical Alphanumeric Symbols โ€” Sans-Serif Bold, Italic, and Bold-Italic โ€” plus Circled and Fullwidth characters โ€” for use in social media posts. ## Features - **Unicode Bold** โ€” converts letters and digits to sans-serif bold (๐—”๐—•๐—– / ๐—ฎ๐—ฏ๐—ฐ / ๐Ÿฌ๐Ÿญ๐Ÿฎ) - **Unicode Italic** โ€” converts letters to sans-serif italic (๐˜ˆ๐˜‰๐˜Š / ๐˜ข๐˜ฃ๐˜ค) - **Unicode Bold Italic** โ€” converts letters to sans-serif bold italic (๐˜ผ๐˜ฝ๐˜พ / ๐™–๐™—๐™˜) - **Unicode Fullwidth** โ€” converts letters and digits to fullwidth forms (๏ผก๏ผข๏ผฃ / ๏ฝ๏ฝ‚๏ฝƒ / ๏ผ๏ผ‘๏ผ’) - **Unicode Circled** โ€” converts letters and digits to circled forms (โ’ถโ’ทโ’ธ / โ“โ“‘โ“’ / โ‘ โ‘กโ‘ข) - **Remove Unicode Formatting** โ€” converts any formatted Unicode characters back to plain ASCII - **Convert List Bullets to Arrow** โ€” prefixes every selected line with `โ†’ `, stripping any leading `* ` marker first - **Convert List Bullets to Em Dash** โ€” prefixes every selected line with `โ€” `, stripping any leading `* ` marker first - **Convert List to Numbered (Slash)** โ€” numbers every selected line as `1/ item`, `2/ item`, ..., stripping any leading `* ` marker first - **Convert List to Numbered (Parentheses)** โ€” numbers every selected line as `(1) item`, `(2) item`, ..., stripping any leading `* ` marker first - **Convert Markdown to Post Format** โ€” converts a Markdown selection to LinkedIn/Facebook-ready text: `##` headings โ†’ bold, `**bold**` โ†’ Unicode bold, `_italic_` โ†’ Unicode italic, `- ` list items โ†’ `โ€” ` em-dash bullets - Non-mapped characters (punctuation, spaces, emoji, etc.) are passed through unchanged ## Usage 1. Select text in the editor 2. Open the Command Palette (`Ctrl/Cmd + P`) 3. Run one of: - **Format as Unicode Bold** - **Format as Unicode Italic** - **Format as Unicode Bold Italic** - **Format as Fullwidth** - **Format as Circled Letters/Numbers** - **Remove Unicode Formatting** โ€” reverses any of the above back to plain ASCII - **Convert List Bullets to Arrow** โ€” prefixes every line with `โ†’ ` (strips `* ` if present) - **Convert List Bullets to Em Dash** โ€” prefixes every line with `โ€” ` (strips `* ` if present) - **Convert List to Numbered (Slash)** โ€” numbers every line as `1/ item`, `2/ item`, ... (strips `* ` if present) - **Convert List to Numbered (Parentheses)** โ€” numbers every line as `(1) item`, `(2) item`, ... (strips `* ` if present) - **Convert Markdown to Post Format** โ€” converts Markdown to LinkedIn/Facebook-ready text (headings, bold, italic, lists) The selected text is replaced in place. ## Installation ### Manual 1. Build the plugin (see [Development](#development)) or download a release 2. Copy `main.js` and `manifest.json` to your vault at: ``` /.obsidian/plugins/obsidian-unicode-formatter/ ``` 3. In Obsidian: **Settings โ†’ Community Plugins โ†’ Installed Plugins** โ€” enable **Unicode Text Formatter** ## Development Requirements: Node.js โ‰ฅ 16 ```bash npm install npm run dev # watch mode โ€” recompiles on save npm run build # one-time production build npm run lint # ESLint check ``` ### Project structure | File | Purpose | |------|---------| | `src/unicode-maps.ts` | Builds character lookup maps from Unicode code point ranges | | `src/formatter.ts` | `transformText`, `cleanText`, `bulletToEmdash`, `bulletToArrow`, `numberedListSlash`, `numberedListParens`, `markdownToLinkedIn` โ€” text transformation functions | | `src/commands.ts` | Registers the eleven editor commands with the Obsidian plugin API | | `src/main.ts` | Plugin entry point โ€” calls `registerCommands` on load | ### Unicode blocks used | Style | Uppercase | Lowercase | Digits | |-------|-----------|-----------|--------| | Sans-Serif Bold | U+1D5D4โ€“U+1D5ED | U+1D5EEโ€“U+1D607 | U+1D7ECโ€“U+1D7F5 | | Sans-Serif Italic | U+1D608โ€“U+1D621 | U+1D622โ€“U+1D63B | โ€” | | Sans-Serif Bold-Italic | U+1D63Cโ€“U+1D655 | U+1D656โ€“U+1D66F | โ€” | | Fullwidth | U+FF21โ€“U+FF3A | U+FF41โ€“U+FF5A | U+FF10โ€“U+FF19 | | Circled | U+24B6โ€“U+24CF | U+24D0โ€“U+24E9 | U+2460โ€“U+2468, U+24EA | ## Releasing 1. Update `manifest.json` with the new version and minimum Obsidian version 2. Update `versions.json`: `"new-version": "min-obsidian-version"` 3. Create a GitHub release tagged with the exact version number 4. Attach `manifest.json` and `main.js` as release assets > You can bump the version automatically: > ```bash > npm version patch # or minor / major > ``` ## API Documentation See