lkk9898969
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    痾 其實也沒甚麼好寫的,不如說單純就是推廣文。 [Notepad++ Chinese Converter Plugin / Notepad++ 繁簡轉換插件](https://github.com/lkk9898969/Npp_ChineseConverter) [![Notepad++ Chinese Converter Plugin / Notepad++ 繁簡轉換插件](https://opengraph.githubassets.com/abbddd/lkk9898969/Npp_ChineseConverter)](https://github.com/lkk9898969/Npp_ChineseConverter) > 下面寫一些瑣碎的事 ## 寫插件的動機? 很簡單,就是我有一個檔案,很大,有很多簡體,那我總不可能一個一個丟Google翻譯吧? 字數太多吃不了。 要再寫一個程式專門簡轉繁? 那不如直接寫成Notepad+\+插件。不過說的簡單做的難啦,也是花了挺多時間在Debug的,畢竟是第一次開發Notepad+\+插件。 其實我原本想說網路上隨便找應該有人寫類似的插件,沒想到Google搜尋都快被我點完了楞是一個結果都沒搜到,萬般無奈之下才只好自己寫,不然有別人寫好的直接拿來用就好了說。 ## 實作細節? 其實也沒啥細節,就把選取的文字丟給`OpenCC`,再把轉出來的文字蓋上去而已。 `OpenCC`在運作的時候是需要吃字典的 (`OpenCC`在轉換實際上就是查字典),而為了這個字典要存在其實下了蠻多功夫。理想上是直接把字典塞在Memory裡面,讓`OpenCC`直接讀Memory的字典就好了。 但問題是我太菜了,沒搞懂(也懶得搞懂)`OpenCC`是如何去讀字典的,乾脆暴力把字典直接壓縮在插件裡面,第一次啟動的時候就把字典解壓縮出來,然後讓`OpenCC`去讀解壓縮完的字典。 ~~然後呢,為此還跑去研究`libarchive`如何直接把壓縮檔從Memory解壓到檔案系統,這部分其實不難,但是我又手賤去用7z壓縮字典,可想而知`liblzma`是怎麼成為子模組了 *(為了避免dll產生,`OpenCC`、`libarchive`跟`liblzma`都直接用static library link起來了)*。~~ *修訂:後來改用7-zip開源的LZMA SDK了,`libarchive`+`liblzma`編譯實在太久了,Code Size又大,LZMA SDK相對簡單且更輕巧,雖然裡面給的Example我一行都看不懂但有AI阿! 阿反正字典解的出來就好了。* 老實說乖乖用zip包起來就好了,但是zip有那個經典的檔名code page問題實在是很怕解壓縮的時候出事,rar的話... WinRAR好像是要錢的齁? 我還是乖乖用7z就好了。 ## 插件更新/優化? 痾,老實說應該是不會更新,這種插件是要能有什麼奇怪的BUG呢?(歪頭) 能改進的地方就是把~~我懶惰不想寫的~~其他功能加進來,其實我有預留好`OpenCC`其他的轉換方式,選單連結上去就能用了,~~但我就懶得寫選單阿怎麼樣\~\~~~ *~~另外一個比較能改的地方是不要把字典寫在檔案系統,直接在Memory的地方解壓縮後讓OpenCC去讀Memory的字典就好。 但是嘛,這種東西我還真的是一點概念都沒有,根本就不知道要怎麼做。而且你說這個是優化嗎? umm... 拿記憶體空間換磁碟空間? 其實好像也沒差,但我就是不想多塞東西到硬碟上(kimoji問題),而且更新字典也比較直觀,就是插件更新字典就一起更新了。~~* *修訂:後來研究完發現`OpenCC`是透過json設定檔讀取路徑,然後依照路徑在檔案系統上開字典檔,如果要改成從Memory讀整個讀檔邏輯都要自己寫(`OpenCC`沒有預留不依賴檔案系統讀檔的方法),Windows不像Linux可以把檔案系統映射到Memeory上,整個超麻煩,放棄。* 現在的話,插件更新完還得重新按一次載入字典才會更新,為甚麼呢? 因為插件在載入時會檢查檔案系統上字典的資料夾存不存在,不存在才會將字典解壓縮。但是! 不會檢查資料夾內容。換句話說,你要硬刪掉一些用不到的字典省空間是可以的,畢竟不檢查也用不到。 ## 發這篇文的目的? ~~炫耀~~不是,單純就是我想讓這個倉庫上google search,網路上查到說把倉庫丟去社群網站能大大提高搜尋引擎index倉庫的機率。~~*不過我丟reddit已經1個禮拜了google搜下去還是啥都沒有才跑來這裡發文的。不過,這篇文好像也不會在google search上欸...嗯?*~~ *修訂:現在Google搜尋`Notepad++ 繁簡轉換`這個插件是第一個結果了,可喜可賀,包含這篇文也搜的到了,~~那我好像可以刪了?~~*

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully