{"id":27786173,"url":"https://github.com/zhouzxx/towxml-typer","last_synced_at":"2025-04-30T15:57:41.940Z","repository":{"id":286924203,"uuid":"861128715","full_name":"zhouzxx/towxml-typer","owner":"zhouzxx","description":"在微信小程序上实现markdown文档的AI打字机效果","archived":false,"fork":false,"pushed_at":"2025-04-09T01:46:25.000Z","size":18615,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T15:57:15.529Z","etag":null,"topics":["ai","markdown","towxml","typer","wechat-mini-program"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhouzxx.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-22T04:32:51.000Z","updated_at":"2025-04-09T01:55:07.000Z","dependencies_parsed_at":"2025-04-09T02:44:25.416Z","dependency_job_id":null,"html_url":"https://github.com/zhouzxx/towxml-typer","commit_stats":null,"previous_names":["zhouzxx/towxml-typer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouzxx%2Ftowxml-typer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouzxx%2Ftowxml-typer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouzxx%2Ftowxml-typer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhouzxx%2Ftowxml-typer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhouzxx","download_url":"https://codeload.github.com/zhouzxx/towxml-typer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251737469,"owners_count":21635603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","markdown","towxml","typer","wechat-mini-program"],"created_at":"2025-04-30T15:57:41.153Z","updated_at":"2025-04-30T15:57:41.927Z","avatar_url":"https://github.com/zhouzxx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![desc](towxm_typer.gif)\n\n\u003e Currently, `AI dialogues` like Chatgpt, Kimi, and ERNIE Bot on the market all present answers to users through a `typewriter effect` that goes line by line and word by word. However, after searching for a long time, I have not found an open-source, easy-to-use, stable-performing, and markdown document typewriter component that can be used in WeChat Mini Programs.\n\n\u003e It seems that many people use Markdown rendering libraries for WeChat mini-programs, such as towxml. By incrementally increasing the length of the Markdown text, components are forced to re-render the entire text each time to achieve a typewriter effect. However, this approach has its drawbacks. Every time a character is typed, the entire Markdown text is parsed and rendered again, causing the already rendered old text to be `re-parsed and re-rendered`. As the text content grows, the performance degrades over time due to the repeated parsing and rendering of large texts in a short period, leading to `slower typing speeds, and eventually causing the phone to overheat and potentially explode`.\n\n\n\u003e Based on this, I have modified the source code of towxml through a completely new method, allowing Markdown documents of any length to be parsed and rendered in just `one parse`. This approach ensures a `consistent typing speed` and `low performance consumption` from start to finish.\n\n\nModifying the towxml source code to implement an AI typewriter effect for Markdown documents on WeChat mini-programs, with support for:\n\n* Controlling the activation and deactivation of the typewriter effect.\n\n* Customizing the typing speed.\n\n* Specifying tags to skip the typewriter effect (e.g., tables, which can be displayed all at once without the need for individual typing).\n\nTo run the project:\n\n1. `Open the project with VSCode.`\n\n2. `Execute 'pnpm install'.`\n\n3. `Run 'pnpm run dev:mp-weixin'.`\n\n4. `Open the WeChat Developer Tools and import the project from 'dist\\dev\\mp-weixin'.`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhouzxx%2Ftowxml-typer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhouzxx%2Ftowxml-typer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhouzxx%2Ftowxml-typer/lists"}