diff --git a/README-en.md b/README-en.md new file mode 100644 index 00000000..77ffdeab --- /dev/null +++ b/README-en.md @@ -0,0 +1,742 @@ +
+

Typora Plugin

+ typora_plugin +

+ + + + + + +

+
+[简体中文](https://github.com/obgnail/typora_plugin/blob/master/README.md) | English + + +| # | Plugin | Function | Enabled by Default | +| ---- | ----------------------- | --------------------------------------------------------- | ------------------ | +| 1 | window_tab | Window Tab Bar | | +| 2 | search_multi | Multi-Fields File Searcher | | +| 3 | collapse_paragraph | Chapter Folding | × | +| 4 | collapse_list | List Folding | × | +| 5 | collapse_table | Table Folding | × | +| 6 | md_padding | Chinese-English Text Spacer | | +| 7 | slash_commands | Slash Commands | | +| 8 | templater | File Templater | | +| 9 | resourceOperation | Resource Management | | +| 10 | fence_enhance | Enhance Fence | | +| 11 | toc | TOC | | +| 12 | commander | Commander | | +| 13 | toolbar | Multi-Purpose Searcher | | +| 14 | right_click_menu | Right-Click Menu | | +| 15 | pie_menu | Pie menu | × | +| 16 | datatables | Enhance Table | × | +| 17 | preferences | Preferences | | +| 18 | markmap | Provides Markmap support | | +| 19 | echarts | Provides Echarts support | | +| 20 | chart | Provides Chartjs support | | +| 21 | drawIO | Provides DrawIO support | | +| 22 | abc | Provides abcjs support | | +| 23 | calendar | Provides tui.calendar support | | +| 24 | wavedrom | Provides WaveDrom support | | +| 25 | marp | Provides Marp support | | +| 26 | callouts | Provides Callouts support | | +| 27 | text_stylize | Text stylization | | +| 28 | read_only | Read-only mode | | +| 29 | blur | Blur mode | | +| 30 | kanban | Kanban | | +| 31 | timeline | Timeline | | +| 32 | chat | Chat | | +| 33 | file_counter | Show file count in directory | | +| 34 | auto_number | Auto Numbering | | +| 35 | imageReviewer | Image reviewer | | +| 36 | chineseSymbolAutoPairer | Automatic completion of Chinese symbols | | +| 37 | resize_table | Adjust table row height and column width | | +| 38 | resize_image | Adjust image display size | | +| 39 | export_enhance | Avoid image loss when exporting to html | | +| 40 | markdownLint | Markdown Lint Check | | +| 41 | go_top | One-click to top of the article | | +| 42 | reopenClosedFiles | Reopen Closed Files | × | +| 43 | truncate_text | Hide content to improve performance for large files | × | +| 44 | dark | Dark mode | | +| 45 | no_image | No image mode | | +| 46 | updater | One-click plugin update | | +| 47 | easy_modify | Editing tools | | +| 48 | editor_width_slider | Adjust writing area width | | +| 49 | redirectLocalRootUrl | Redirect local resource root directory | × | +| 50 | blockSideBySide | Display active blocks side by side | × | +| 51 | scrollBookmarker | Bookmark manager | × | +| 52 | cipher | Encrypt files | × | +| 53 | ripgrep | Search files using ripgrep | × | +| 54 | article_uploader | One-click upload blog to supported platforms | × | +| 55 | help | User help | | +| 56 | custom | Open platform for user-defined plugins (advanced) | | +| 57 | hotkeys | Hotkey registration center (advanced) | | +| 58 | quickButton | Add function buttons in the lower right corner (advanced) | | +| 59 | json_rpc | External control of Typora (advanced) | × | + + +**Respect all user choices**. Any plugin or feature in this project can be permanently enabled/disabled. + +> If you have other needs or find bugs, feel free to [open an issue](https://github.com/obgnail/typora_plugin/issues/new). PRs are also welcome. If you find this project helpful, please give me a star ⭐ + + + +## How to Use: Windows/Linux Platform + +Visit [Video Installation Tutorial](https://github.com/obgnail/typora_plugin/issues/847) + +1. [Download](https://github.com/obgnail/typora_plugin/releases/latest) the plugin source code package and unzip it. + +2. Go to the Typora installation path and find the folder A containing `window.html`. + + - For the official version of Typora, the path is `./resources/window.html`. + + - For the free version of Typora, the path is `./resources/app/window.html`. + +3. Paste the unzipped plugin folder into folder A. + +4. Go to the folder `A/plugin/bin/`. + + - Windows: Double-click to run `install_windows_amd_x64.exe`. If you see the following image, the installation is successful. + + - Linux: Run `install_linux.sh` as administrator. If you see the following image, the installation is successful. + +5. Verification: Restart Typora, right-click in the main text area, and if you see the `Often Used Plugins` column, everything is fine. + + +| | Official Version | Free Version | +| -------- | -------------------------------------------- | ---------------------------------------- | +| Steps 2-3| ![typora_dir_new](assets/typora_dir_new.png) | ![typora_dir_old](assets/typora_dir_old.png) | + +| | Windows | Linux | +| ------ | ---------------------------------------------- | ------------------------------------------ | +| Step 4 | ![install_windows](assets/install_windows.png) | ![install_linux](assets/install_linux.png) | + + +Additional Notes: + +- Windows can also install plugins by executing `install_windows.ps1`; similarly, Linux can execute the `install_linux_amd_x64` file. +- Each plugin has configuration options. It is recommended to configure according to personal needs. The configuration folder is located at [A/plugin/global/settings/](https://github.com/obgnail/typora_plugin/tree/master/plugin/global/settings/). + + + +## How to Use: Archlinux Platform + +> Currently, this method is only for the Archlinux platform, see [aur/typora-plugin](https://aur.archlinux.org/packages/typora-plugin) + +```sh +yay -S typora-plugin +``` + + + +## Q&A + +### Is my version of Typora supported? + +All plugins have been tested on version 0.9.98 (the last free version) and the latest version. This project theoretically supports all Typora versions, but Typora's functionality stabilized after version 0.9.98. **It is recommended to use version 0.9.98 or later**. + + +### Will the plugins become invalid? + +Theoretically, they can remain effective for a long time, and I am maintaining them. + + +### How to permanently disable/enable certain plugins? + +Right-click menu -> Less Used Plugins -> Enable/Disable Plugins. + + +### How to modify plugin configurations? + +The project includes over 600 configuration options, allowing a comprehensive definition of each plugin's behavior. + +All configurations are located in the [settings](https://github.com/obgnail/typora_plugin/tree/master/plugin/global/settings) directory. For modification methods, please read the [instruction file](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/README.md). + + +### How to upgrade plugins? + +Right-click menu -> Often Used Plugins -> Secondary Plugins -> Upgrade Plugins. + + +### I don't want to use it anymore, how to uninstall the plugin system? + +Right-click menu -> Less Used Plugins -> Help -> Uninstall Plugins. + + +### Does it support Typora for Mac? + +I don't have a Mac device, so I haven't tested it. + + + + +## Plugin Usage Instructions + +All plugins provide four usage methods: + +- Keyboard enthusiasts: + - `Ctrl+J` to bring up the plugin list (see `toolbar` plugin) + - Shortcut keys (see `hotkeys` plugin) +- Mouse enthusiasts: + - Right-click in the main text area (see `right_click_menu` plugin) + - Quick buttons (see `quickButton` plugin) + + +### window_tab: Tab Management + +- `Switch tabs`: Ctrl + scroll wheel, ctrl + shift + tab, ctrl + tab, ctrl + PgUp, ctrl + PgDn +- `Close tab`: ctrl + w, middle mouse button +- `Open in new window`: ctrl + click tab +- `Sort tabs`: Drag and drop +- `Pop up menu options for tabs`: Right-click the tab + +![window_tab](assets/window_tab.gif) + + +### search_multi: Multi-File Search + +Function: Search through a combination of different conditions to accurately find files. + +- `Open search box`: ctrl + shift + P +- `Close search box`: Position the cursor in the input box, type esc +- `Search`: enter +- `Select`: ArrowUp, ArrowDown +- `Open`: click, ctrl + enter +- `Move position`: ctrl + drag the input box + +Usage example: The search syntax is similar to Google search syntax and supports regular expressions. + +| Input | Search File | +| ----------------------------------------------------- | ------------------------------------------------------------ | +| `pear` | Contains pear | +| `sour pear` | Contains sour and pear | +| `sour OR pear` | Contains sour or pear | +| `"sour pear"` | Contains the phrase sour pear | +| `sour pear -apple` | Contains sour and pear, but not apple | +| `/\bsour\b/ pear mtime=2024-03-12` | Matches regex \bsour\b, contains pear, and file modification date is 2024-03-12 | +| `frontmatter:development OR head=plugin OR strong:MIT` | YAML Front Matter contains development or title content is plugin or bold text contains MIT | +| `size>10kb (linenum>=1000 OR hasimage=true)` | File size exceeds 10KB, and the file either has at least 1000 lines or contains images | +| `thead:k8s h2:prometheus blockcode:"kubectl apply"` | Table header contains k8s, h2 contains prometheus, code block contains kubectl apply | + +![search_mutli](assets/search_mutli.gif) + + +### collapse_paragraph: Fold Sections + +Function: Fold/expand all text under the section. Supported tags: h1~h6. + +- `Fold/expand a single section`: ctrl + click +- `Fold/expand all sibling sections under the parent section`: ctrl + alt + click +- `Fold/expand all sibling sections`: ctrl + shift + alt + click + +![collapse_paragraph](assets/collapse_paragraph.gif) + + +### collapse_list: Fold Lists + +Function: Fold/expand unordered lists, ordered lists, task lists. + + +### collapse_table: Fold Tables + +Function: Fold/expand tables. + + +### md_padding: Optimize Mixed Chinese and English + +Function: Add spaces between Chinese and English, Chinese and numbers when mixed. + +Shortcut: ctrl + shift + B + +![md_padding](assets/md_padding.gif) + + +### slash_commands: Slash Commands + +Function: Similar to Notion's slash command. + +Supports: + +- Insert text snippets (snippet) +- Insert components +- Edit styles +- Execute arbitrary logic + +> Supports user-defined commands, please modify the configuration file + +![slash_commands](assets/slash_commands.gif) + + +### templater: File Templates + +Function: Similar to Obsidian's file template function, quickly create files based on templates. + +Usage: Right-click menu -> Often Used Plugins -> Secondary Plugins -> File Templates. + +> For the template list, please modify the configuration file. + +![templater](assets/templater.gif) + + +### resourceOperation: One-click Cleanup of Unused Images + +Function: Resource management, cleanup of unused images + +Usage: Right-click menu -> Often Used Plugins -> Secondary Plugins -> Resource Management + + +### fence_enhance: Copy, Fold, Format Code + +![fence_enhance](assets/fence_enhance.png) + + +### toc: Generate Outline on the Right + +Function: Typora's sidebar cannot display both [File] and [Outline] simultaneously. To solve this problem, this plugin adds an [Outline] on the right. + +Usage: + +- Method 1: Often Used Plugins -> Secondary Plugins -> Outline +- Method 2: Right-click the [Outline] button on the sidebar + + +### commander: Command Line Environment + +Function: Similar to Total Commander's command line, a tool for quickly executing commands and providing minimal interaction. + +- `Pop up the execution box`: Right-click menu -> Often Used Plugins -> Command Line Environment +- `Close the execution box`: esc +- `Move position`: ctrl + drag the input box + +Supported shells: + +- `cmd/bash`: Default terminal for Windows or Mac +- `powershell`: Microsoft's silly child :D +- `git bash`: Ensure it is installed and added to the environment variable +- `wsl`: Ensure WSL2 is installed and added to the environment variable + +Built-in environment variables: + +- `$f`: Current file path +- `$d`: Directory of the current file +- `$m`: Mounted root directory + +Supports built-in commands for quick calls. Users can customize the `BUILTIN` option in the configuration file as needed. + +```toml +# Default built-in commands +BUILTIN = [ + { name = "", shell = "cmd/bash", cmd = "" }, + { name = "Explorer", shell = "powershell", hotkey = "ctrl+alt+e", cmd = "explorer $d" }, + { name = "Vscode", shell = "cmd/bash", cmd = "code $f" }, + { name = "WT", shell = "cmd/bash", cmd = "cd $d && wt" }, + { name = "GitCommit", shell = "cmd/bash", cmd = 'cd $m && git add . && git commit -m "update"' }, +] +``` + +![commander](assets/commander.gif) + + +### markmap: Provides markmap Support + +Usage: + +- Method 1: Right-click menu -> Less Used Plugins -> markmap +- Method 2: Directly click the markmap button in the lower right corner + +![markmap](assets/markmap.gif) + + +### toolbar: Multi-functional Search + +Function: Similar to VSCode's ctrl + shift + p function + +Usage: + +- Method 1: Right-click menu -> Less Used Plugins -> Multi-functional Search +- Method 2: Shortcut key `ctrl + j` + +Supports search: + +- `his`: Recently opened files +- `plu`: Plugins +- `tab`: Open tabs +- `ops`: Common operations +- `out`: Document outline +- `mode`: Switch file mode +- `theme`: Temporarily switch theme +- `func`: Function list +- `all`: Mixed search (search all items mixed together) + +Input content description: + +- Input content = search tool name + space + search content +- Supports `intersection queries`, `difference queries`, and can be freely combined (similar to Google's positive and negative queries) + +Examples: + +- `his node learn`: Find recently opened files that have titles containing both node and learn keywords +- `plu multi -search`: Find plugins whose names contain the multi keyword but do not contain the search keyword +- `tab -messing`: Find all open tabs whose names do not contain the messing keyword +- `his close -win -mark tab`: Find recently opened files whose titles contain close and tab keywords, but do not contain win and mark keywords + +![toolbar](assets/toolbar.gif) + + +### right_click_menu: Unified Management of Right-click Menu + +All plugins support direct invocation through the right-click menu. Mouse enthusiasts can use the right-click menu as the main way to call all plugins. + +You can customize the right-click menu by modifying the configuration file: + +```toml +# Each MENUS corresponds to a primary menu, allowing unlimited additions of primary menus and repeated addition of the same plugin +# NAME: The name of the primary menu +# LIST: List of secondary menu plugins (use "---" to insert a divider on the page for separation) +[[right_click_menu.MENUS]] +NAME = "Less Used Plugins" +LIST = [ + "window_tab", + "fence_enhance", + ... +] +[[right_click_menu.MENUS]] +NAME = "Often Used Plugins" +LIST = [ + "commander", + "markmap", + ... +] +``` + + +### pie_menu: Circular Menu + +Usage: + +- `Open circular menu`: Ctrl + right mouse button +- `Rotate circular menu`: Middle mouse button +- `Pin the circular menu, so it doesn't automatically disappear`: Left mouse button on the center of the circle +- `Expand the circular menu, so it doesn't automatically collapse`: Right mouse button on the center of the circle + +### preferences: Enable/Disable Plugins + +Usage: Right-click menu -> Less Used Plugins -> Enable/Disable Plugins + +### echarts: Provide Echarts Support + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> Echarts + +![echarts](assets/echarts.png) + +### chart: Provide Chart.js Support + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> Chart + +![chart](./assets/chart.png) + +### drawIO: Provide drawIO Component Support + +![drawIO](./assets/drawIO.png) + +### abc: Provide ABC Component Support + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> ABC + +![abcjs](./assets/abcjs.png) + +### calendar: Provide TUI.Calendar Component Support + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> Calendar + +![calendar](./assets/calendar.png) + +### wavedrom: Provide Wavedrom Component Support + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> Wavedrom + +![wavedrom](./assets/wavedrom.png) + +### marp: Provide Marp Component Support + +Function: Use markdown to create PPT. + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> Marp + +### callouts: Provide Callouts Support + +Usage: Right-click menu -> Often Used Plugins -> Secondary plugins -> Callouts + +![callouts](./assets/callouts.png) + +The quantity, type, color, and icon can all be defined by yourself. Please modify the configuration file: + +```toml +[[callouts.config.list]] +type = "note" +background_color = "#e1d1eb" +left_line_color = "#6a1b9a" +icon = "\\f040" +``` + +### kanban: Kanban + +Extend the code syntax to add Kanban functionality. + +![kanban](assets/kanban.png) + +### timeline: Timeline + +Extend the code syntax to add timeline functionality. + +![timeline](./assets/timeline.png) + +### chat: Chat + +Extend the code syntax to add chat functionality. + +![chat](./assets/chat.png) + +### text_stylize: Text Stylize + +Function: Convert text to HTML format, changing the text style. + +Usage: Right-click menu -> Less Used Plugins -> Text Stylize. + +![text_stylize](./assets/text_stylize.gif) + +### read_only: Read-Only Mode + +Function: In read-only mode, the document cannot be edited (after enabling, the bottom right corner of the statistics area will show `ReadOnly`). + +Shortcut: ctrl+shift+R + +### blur: Blur Mode + +Function: After enabling, only the currently focused component is visible, the rest are blurred. It can be used to prevent peeking. + +Usage: Right-click menu -> Less Used Plugins -> Blur Mode + +> This plugin can only be used with the official version of Typora. + +### file_counter: Display File Count + +![file_count](assets/file_counter.png) + +### auto_number: Auto Numbering + +![auto_number](assets/auto_number.png) + +> Note: This function is achieved by injecting CSS, which may conflict with the theme you are using. + +Unlike other implementations using theme CSS, this plugin perfectly solves the problem of no numbering in the sidebar after exporting to PDF by modifying the built-in function :) + +According to [Markdown Best Practices](https://learn.microsoft.com/en-us/powershell/scripting/community/contributing/general-markdown?view=powershell-7.3), a document should **have only one** h1 tag. + +### imageReviewer: Image Viewer + +Function: One-stop image viewing, and provides simple image editing. + +Usage: + +- Method 1: Click the "View Image" button at the bottom right corner +- Method 2: Right-click menu -> Often Used Plugins -> Secondary plugins -> Image Viewer + +![image-reviewer](./assets/image-reviewer.png) + +### chineseSymbolAutoPairer: Chinese Symbol Auto Pairing + +Function: Automatically pair symbols when typing `《 【 ( ‘ “ 「`. + +### datatables: Table Enhancement + +Function: Enhance tables. Provides functions such as search, filter, pagination, and sorting. + +Usage: Place the cursor on the table -> Right-click menu -> Less Used Plugins -> Table Enhancement. + +![datatables](assets/datatables.png) + +### resize_table: Resize Table + +Function: `ctrl + mouse drag`: Modify the row height and column width of the table. + +![resize_table](assets/resize_table.gif) + +### resize_image: Resize Image + +Function: `alt + mouse scroll`: Adjust the image size. + +### export_enhance: Export Enhancement + +Function: When exporting HTML, convert images to base64 to avoid image loss. + +### go_top: Go to Top + +Function: Add a "Go to Top" button at the bottom right corner. + +### reopenClosedFiles: Reopen Tabs That Were Not Closed When Typora Was Exited + +Function: Automatically or through a shortcut, open the tabs that were not closed when Typora was last exited. + +> This plugin only works when window_tab is enabled. + +### dark: Night Mode + +Usage: Right-click menu -> Often Used Plugins -> Night Mode + +### no_image: No Image Mode + +Usage: Right-click menu -> Often Used Plugins -> No Image Mode + +### markdownLint: Markdown Lint + +Function: Check whether the current file complies with markdown best practices. + +Usage: + +1. Method 1: Click the small square at the top right corner +2. Method 2: Right-click menu -> Often Used Plugins -> Secondary plugins -> Format Check + +### updater: One-Click Plugin Upgrade + +Usage: Right-click menu -> Less Used Plugins -> Upgrade Plugin + +> As we all know, some users cannot download the latest plugin directly from GitHub, so a proxy setting function is provided (default is system proxy). + +### easy_modify: Editing Tools + +Usage: Right-click menu -> Often Used Plugins -> Editing Tools + +This plugin is a collection of commonly used editing tools, currently including: + +1. Copy title path +2. Promote the title level of the selected paragraph +3. Demote the title level of the selected paragraph +4. Convert line break CRLF to LF +5. Convert line break LF to CRLF +6. Remove invisible characters +7. Generate mind map based on the document outline: mindmap +8. Generate mind map based on the document outline: graph +9. Extract selected text to a new file +10. Add trailing spaces + +### editor_width_slider: Adjust Writing Area Width + +Usage: Right-click menu -> Less Used Plugins -> Adjust Writing Area Width + +Function: Adjust the width of the writing area. + +### redirectLocalRootUrl: Redirect Local Resource Root Directory + +Function: If you mainly use Obsidian or Joplin to manage files and occasionally use Typora to open files, you will encounter a problem: both Obsidian and Joplin put local resources in the same directory, but Typora defaults to using relative paths to reference local resources. + +> This plugin is disabled by default and needs to be manually enabled. + +Before using this plugin, you need to set the following configuration options: + +```toml +# Resource root directory, supports absolute paths (such as D:\\tmp\\img) and relative paths (such as .\\assets). Pay attention to escaping backslashes when filling in (if empty, this plugin is invalid) +root = "./" +# Filter regular expression: only files whose paths match filter_regexp will use this plugin (if empty, all files will use this plugin) +filter_regexp = "" +``` + +### blockSideBySide: Display Active Blocks Side by Side + +Function: The active block is displayed vertically by default, changed to side by side. + +![blockSideBySide](./assets/blockSideBySide.png) + +> Note: This function is achieved by injecting CSS, which may conflict with the theme you are using. + +### scrollBookmarker: Bookmark Manager + +Usage: + +1. Use alt + click on the text content to bookmark. +2. This will automatically bring up the bookmark manager. Click on the bookmark above to jump to the bookmark. + +Show/Hide Bookmark Manager: Right-click menu -> Often Used Plugins -> Secondary plugins -> Bookmark Manager + +### help: User Help + +Usage: Right-click menu -> Less Used Plugins -> Help. + +### cipher: Encrypt File + +Usage: Right-click menu -> Less Used Plugins -> Encrypt File. + +### truncate_text: Temporarily Hide Content to Improve Large File Rendering Performance + +Function: The rendering performance of large files in Typora is very poor. Use this plugin to temporarily hide content (just hide the display, not modify the file) to improve rendering performance. It can also be used to prevent peeking. + +Usage: Right-click menu -> Less Used Plugins -> Text Truncate. + +The included functions are as follows: + +- Hide the front part: Hide the text in the front part, leaving only the last 80 paragraphs. +- Redisplay: Redisplay all previously hidden text. +- Display according to the current visible range: Display text according to the current visible range. + +> Principle: By setting the display style of DOM elements to none, elements are hidden so that they do not occupy a position in the rendering tree, and operations on hidden elements do not cause reflow of other elements. + +> collapse_paragraph (Chapter Collapse) can well replace this plugin, it is recommended to use collapse_paragraph. + +### ripgrep: Use Ripgrep to Search Files + +Typora comes with ripgrep. This plugin supports using the built-in ripgrep to search files. + +> To use this plugin, you need to be familiar with the ripgrep tool. This plugin is disabled by default and needs to be manually enabled. + +### hotkeys: Hotkey Registration Center (Advanced) + +> This plugin is an advanced plugin, only available to users with a JavaScript background. + +Function: Bind hotkeys to [any plugin system function] or [any custom function] in a declarative form. + +### quickButton: Add Function Buttons to the Bottom Right Corner (Advanced) + +> This plugin is an advanced plugin, only available to users with a JavaScript background. + +Function: Similar to hotkeys, set function buttons for [any plugin system function] in a declarative form. + +### custom: Open Platform, User-Defined Plugins (Advanced) + +> This plugin is an advanced plugin, only available to users with a JavaScript background. + +Function: Provide open capabilities, support users to write their own plugins. + +For specific usage, please refer to [README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/custom/README.md). + +### json_rpc: External Manipulation of Typora (Advanced) + +Function: Expose all capabilities including the typora-plugin in the form of `json-rpc` for external manipulation of Typora. + +For specific usage, please refer to [README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/json_rpc/README.md). + +> This plugin is an advanced plugin, only available to developers. After enabling this plugin, the external will have both node and browser environments, which can fully control the computer, so if you are not a developer, please do not enable it. + +### article_uploader: Upload Blog Articles + +Function: The user clicks or uses a shortcut key to trigger the automatic publishing function of the current article. The program automatically publishes blog articles to major platforms according to user configuration. + +For specific usage, refer to: [README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/article_uploader/README.md). Taking uploading to CSDN as an example, the GIF is as follows: + +![CSDN Success Demonstration](https://my-picture-bed1-1321100201.cos.ap-beijing.myqcloud.com/mypictures/CSDN%E6%88%90%E5%8A%9F%E6%BC%94%E7%A4%BA.gif) + + +## Acknowledgements + +- Apache: [ECharts](https://echarts.apache.org/zh/index.html) | [draw.io](https://github.com/jgraph/drawio) +- MIT: [markmap](https://markmap.js.org/) | [Chart.js](https://www.chartjs.org/) | [abcjs](https://github.com/paulrosen/abcjs) | [tui.calendar](https://github.com/nhn/tui.calendar) | [Marp](https://marp.app/) +- no-licence: [typora-tabbar-plugin](https://github.com/gatziourasd/typora-tabbar-plugin) | [typora-side-by-side](https://github.com/gruvw/typora-side-by-side) | [md-padding](https://github.com/) + +## Conclusion + +I am not a front-end developer, and all my front-end knowledge comes from Google. My JS/CSS skills are quite poor. + +**This project follows the MIT license, feel free to enjoy it.** + +If you find it useful, please give it a star ⭐, and feel free to recommend it to like-minded friends. diff --git a/README.md b/README.md index 3cdfe1e4..b169a175 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@

+简体中文 | [English](https://github.com/obgnail/markdown-finder/blob/master/README-en.md) | # | 插件 | 功能 | 默认启用 | | ---- | ----------------------- | -------------------------------------- | -------- | @@ -151,7 +152,7 @@ yay -S typora-plugin 项目包含 600+ 配置选项,可以比较完整定义各个插件的行为。 -所有配置位于 [settings](https://github.com/obgnail/typora_plugin/tree/master/plugin/global/settings) 目录中。修改配置方法请阅读该目录下的 [说明文件](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/%E8%AF%B7%E8%AF%BB%E6%88%91.md)。 +所有配置位于 [settings](https://github.com/obgnail/typora_plugin/tree/master/plugin/global/settings) 目录中。修改配置方法请阅读该目录下的 [说明文件](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/README.md)。 @@ -810,7 +811,7 @@ Typora 自带 ripgrep。此插件支持使用内建的 ripgrep 进行文件搜 功能:提供开放能力,支持用户自己写插件。 -具体使用请参考 [请读我.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/custom/%E8%AF%B7%E8%AF%BB%E6%88%91.md)。 +具体使用请参考 [README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/custom/README.md)。 @@ -818,7 +819,7 @@ Typora 自带 ripgrep。此插件支持使用内建的 ripgrep 进行文件搜 功能:将包括 typora-plugin 所有功能在内的一切能力通过 `json-rpc` 的形式暴露出去,以供外部操纵 Typora。 -具体使用请参考 [请读我.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/json_rpc/%E8%AF%B7%E8%AF%BB%E6%88%91.md)。 +具体使用请参考 [README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/json_rpc/README.md)。 > 此插件是高级插件,仅对开发人员开放。开启此插件后,外部将拥有 node、browser 两套环境,能完全控制电脑,因此如果您不是开发人员,请勿开启此插件。 > @@ -829,7 +830,7 @@ Typora 自带 ripgrep。此插件支持使用内建的 ripgrep 进行文件搜 功能:用户点击或者使用快捷键触发当前文章的自动发布功能,程序根据用户配置自动发布博客文章到各大平台 -具体使用参考: [请读我.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/article_uploader/%E8%AF%B7%E8%AF%BB%E6%88%91.md)。以上传到 CSDN 为例,Gif 图如下: +具体使用参考: [README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/article_uploader/README.md)。以上传到 CSDN 为例,Gif 图如下: ![CSDN 成功演示](https://my-picture-bed1-1321100201.cos.ap-beijing.myqcloud.com/mypictures/CSDN%E6%88%90%E5%8A%9F%E6%BC%94%E7%A4%BA.gif) diff --git "a/plugin/article_uploader/\350\257\267\350\257\273\346\210\221.md" b/plugin/article_uploader/README.md similarity index 96% rename from "plugin/article_uploader/\350\257\267\350\257\273\346\210\221.md" rename to plugin/article_uploader/README.md index 74e57c29..21beb649 100644 --- "a/plugin/article_uploader/\350\257\267\350\257\273\346\210\221.md" +++ b/plugin/article_uploader/README.md @@ -78,7 +78,7 @@ 下载完成以后,有两处可供配置。 -1. 配置插件`显示隐藏`、`插件名称`、`快捷键`等信息,与插件配置相同,参考:[typora_plugin/plugin/global/settings/请读我.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/请读我.md) +1. 配置插件`显示隐藏`、`插件名称`、`快捷键`等信息,与插件配置相同,参考:[typora_plugin/plugin/global/settings/README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/README.md) image-20240527175754400 @@ -92,7 +92,7 @@ #### 启用 -如果您想要**启用**,首先进入`.\plugin\global\settings`,找到`settings.user.toml`文件(初次使用需要先拷贝`settings.default.toml`一份,具体参考作者文档[typora_plugin/plugin/global/settings/请读我.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/请读我.md)。 +如果您想要**启用**,首先进入`.\plugin\global\settings`,找到`settings.user.toml`文件(初次使用需要先拷贝`settings.default.toml`一份,具体参考作者文档[typora_plugin/plugin/global/settings/README.md](https://github.com/obgnail/typora_plugin/blob/master/plugin/global/settings/README.md)。 启用`article_uploader`插件并在右键菜单配置中添加下面这个配置 diff --git "a/plugin/custom/\350\257\267\350\257\273\346\210\221.md" b/plugin/custom/README.md similarity index 99% rename from "plugin/custom/\350\257\267\350\257\273\346\210\221.md" rename to plugin/custom/README.md index 0b37394a..846f9da1 100644 --- "a/plugin/custom/\350\257\267\350\257\273\346\210\221.md" +++ b/plugin/custom/README.md @@ -308,7 +308,7 @@ module.exports = { plugin: myFullPathCopy } // 3. hint: 当鼠标移动到右键菜单时的提示 // 4. init: 在这里初始化你要的变量 // 5. style: 给 Typora 插入 style 标签。返回值为 string。若你想指定标签的 id,也可以返回 {textID: "", text: ""}。其中 textID 为此 style 标签的 id,text 为 style 内容 -// 6. styleTemplate: 引入 `./plugin/global/user_styles` 目录下和插件同名的 css 文件。详情请参考`./plugin/global/user_styles/请读我.md` +// 6. styleTemplate: 引入 `./plugin/global/user_styles` 目录下和插件同名的 css 文件。详情请参考`./plugin/global/user_styles/README.md` // 7. html: 为 Typora 插入 HTML 标签,返回 Element 类型或者 Element-string // 8. hotkey: 为 callback 注册快捷键,返回 Array 类型 或者 [{hotkey: "", callback: () => console.log(123)}] // 9. beforeProcess: 最先执行的函数,在这里初始化插件需要的数据。若返回 utils.stopLoadPluginError,则停止加载插件 diff --git a/plugin/global/locales/en.json b/plugin/global/locales/en.json index f55928b0..d9b5c07f 100644 --- a/plugin/global/locales/en.json +++ b/plugin/global/locales/en.json @@ -18,7 +18,7 @@ "__OFTEN_USED_PLUGINS__": "Often Used Plugins" }, "window_tab": { - "pluginName": "Window Tab", + "pluginName": "Window Tab Bar", "act.sort_tabs": "Sort Tabs", "act.save_tabs": "Save Current Tabs", "act.open_save_tabs": "Open Saved Tabs", @@ -406,7 +406,7 @@ "act.toggle_download": "Auto Download online images" }, "text_stylize": { - "pluginName": "Text Stylize", + "pluginName": "Text Stylization", "tool.blank": "", "tool.weight": "Bold", "tool.italic": "Italic", @@ -538,7 +538,7 @@ "act.uninstall_plugin": "Uninstall Plugin", "act.open_setting_folder": "Edit Configuration", "act.backup_setting_file": "Backup Configuration", - "act.show_setting": "Plugin Configuration", + "act.show_setting": "Show Configuration", "act.show_env": "Environment Information", "act.set_user_styles": "Edit Styles", "act.new_custom_plugin": "Develop a Plugin", @@ -636,7 +636,7 @@ "pluginName": "Callouts" }, "templater": { - "pluginName": "Templater", + "pluginName": "File Templater", "filename": "Filename", "template": "Template", "preview": "Preview", diff --git a/plugin/global/locales/zh-CN.json b/plugin/global/locales/zh-CN.json index 4c35ed2b..500781a8 100644 --- a/plugin/global/locales/zh-CN.json +++ b/plugin/global/locales/zh-CN.json @@ -538,7 +538,7 @@ "act.uninstall_plugin": "卸载插件", "act.open_setting_folder": "修改配置", "act.backup_setting_file": "备份配置", - "act.show_setting": "插件配置", + "act.show_setting": "查看配置", "act.show_env": "环境信息", "act.set_user_styles": "修改样式", "act.new_custom_plugin": "我要写插件", diff --git a/plugin/global/locales/zh-TW.json b/plugin/global/locales/zh-TW.json index 53230031..f91748b3 100644 --- a/plugin/global/locales/zh-TW.json +++ b/plugin/global/locales/zh-TW.json @@ -538,7 +538,7 @@ "act.uninstall_plugin": "解除安裝插件", "act.open_setting_folder": "修改設定", "act.backup_setting_file": "備份設定", - "act.show_setting": "插件設定", + "act.show_setting": "查看設定", "act.show_env": "環境資訊", "act.set_user_styles": "修改樣式", "act.new_custom_plugin": "我要寫插件", diff --git "a/plugin/global/settings/\350\257\267\350\257\273\346\210\221.md" b/plugin/global/settings/README.md similarity index 100% rename from "plugin/global/settings/\350\257\267\350\257\273\346\210\221.md" rename to plugin/global/settings/README.md diff --git a/plugin/global/settings/custom_plugin.default.toml b/plugin/global/settings/custom_plugin.default.toml index 767a593d..7dca8690 100644 --- a/plugin/global/settings/custom_plugin.default.toml +++ b/plugin/global/settings/custom_plugin.default.toml @@ -1,7 +1,7 @@ #------------------------------------------------------------------------- -# 请勿修改【custom_plugin.default.toml】文件,请阅读本目录下的【请读我.md】 -# 请勿修改【custom_plugin.default.toml】文件,请阅读本目录下的【请读我.md】 -# 请勿修改【custom_plugin.default.toml】文件,请阅读本目录下的【请读我.md】 +# 请勿修改【custom_plugin.default.toml】文件,请阅读本目录下的【README.md】 +# 请勿修改【custom_plugin.default.toml】文件,请阅读本目录下的【README.md】 +# 请勿修改【custom_plugin.default.toml】文件,请阅读本目录下的【README.md】 #------------------------------------------------------------------------- diff --git a/plugin/global/settings/settings.default.toml b/plugin/global/settings/settings.default.toml index 1bf9d309..3c91bf5a 100644 --- a/plugin/global/settings/settings.default.toml +++ b/plugin/global/settings/settings.default.toml @@ -1,7 +1,7 @@ #------------------------------------------------------------------------- -# 请勿修改【settings.default.toml】文件,请阅读本目录下的【请读我.md】 -# 请勿修改【settings.default.toml】文件,请阅读本目录下的【请读我.md】 -# 请勿修改【settings.default.toml】文件,请阅读本目录下的【请读我.md】 +# 请勿修改【settings.default.toml】文件,请阅读本目录下的【README.md】 +# 请勿修改【settings.default.toml】文件,请阅读本目录下的【README.md】 +# 请勿修改【settings.default.toml】文件,请阅读本目录下的【README.md】 #------------------------------------------------------------------------- diff --git "a/plugin/global/user_styles/\350\257\267\350\257\273\346\210\221.md" b/plugin/global/user_styles/README.md similarity index 100% rename from "plugin/global/user_styles/\350\257\267\350\257\273\346\210\221.md" rename to plugin/global/user_styles/README.md diff --git a/plugin/help.js b/plugin/help.js index 025286b2..e2909ef4 100644 --- a/plugin/help.js +++ b/plugin/help.js @@ -207,9 +207,9 @@ class helpPlugin extends BasePlugin { const map = { open_setting_folder: () => this.utils.runtime.openSettingFolder(), backup_setting_file: () => this.utils.runtime.backupSettingFile(), - set_user_styles: () => this.utils.showInFinder(this.utils.joinPath("./plugin/global/user_styles/请读我.md")), - new_custom_plugin: () => this.utils.showInFinder(this.utils.joinPath("./plugin/custom/请读我.md")), - json_rpc: () => this.utils.showInFinder(this.utils.joinPath("./plugin/json_rpc/请读我.md")), + set_user_styles: () => this.utils.showInFinder(this.utils.joinPath("./plugin/global/user_styles/README.md")), + new_custom_plugin: () => this.utils.showInFinder(this.utils.joinPath("./plugin/custom/README.md")), + json_rpc: () => this.utils.showInFinder(this.utils.joinPath("./plugin/json_rpc/README.md")), github_picture_bed: () => this.utils.openUrl("https://github.com/obgnail/typora_image_uploader"), update_plugin: () => this.updater && this.updater.call(), preferences: () => this.preferences && this.preferences.call(), diff --git "a/plugin/json_rpc/\350\257\267\350\257\273\346\210\221.md" b/plugin/json_rpc/README.md similarity index 100% rename from "plugin/json_rpc/\350\257\267\350\257\273\346\210\221.md" rename to plugin/json_rpc/README.md