KeeNotes 桌面版支持本地数据导入啦~
KeeNotes 桌面版支持本地数据导入啦~ -王福强的个人博客:一个架构士的思考与沉淀 pre > code{ white-space: pre-wrap; font-family: monospace; font-size: 14px; /* border-left: blueviolet; border-left-width: thick; border-left-style: double; padding-left: 1rem !important; */ } .x-indicator{ display:none; } .htmx-request .x-indicator{ display:inline; } .htmx-request.x-indicator{ display:inline; } pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ { "@context": "https://schema.org", "@type": "NewsArticle", "headline": "KeeNotes 桌面版支持本地数据导入啦~", "image": [ "https://afoo.me/images/fb_subscribe.jpg" ], "datePublished": "2026-01-25", "author": [{ "@type": "Person", "name": "王福强", "url": "https://afoo.me" }] } 福强私学 福强AI学堂 架构百科 博客文章 创作出版 产品与服务 登录信息 更多链接 (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({}); KeeNotes 桌面版支持本地数据导入啦~ 王福强 2026-01-25 (adsbygoogle = window.adsbygoogle || []).push({}); 新发布的 V1.3.4.26 版 支持用户从本地导入自己之前的闪念,不管是自己持有的,还是其它软件的。 通过桌面版KeeNotes,你有两种方式导入数据(从而在所有端上都可以访问): 使用本地API导入 在Settings -> Data Import 选择本地NDJSON文件导入 使用本地API导入 桌面版KeeNotes在本地开放了一个简单的数据导入API: 默认端口开在1979,你可以根据自己喜好更改这个端口(或者因为本地端口冲突?)。 API的使用其实也很简单: http localhost:1979 content="API test for local import server" channel="cli" created_at="2024-10-24 11:11:01" 即以POST形式发送JSON格式的Payload即可, JSON必要字段如上所示: content:闪念内容主体 channel:来源或者分类 created_at:创建时候的时间戳 还有一个可选字段是encrypted,主要针对导入其它KeeNotes服务器的数据的场景,对于普通用户来说,一般不需要了解。 择本地NDJSON文件导入 KeeNotes桌面版支持的第二种数据导入方式是,允许用户选择本地文件批量导入。 文件格式是NDJSON格式,这个格式其实也不复杂,所谓NDJSON格式,其实就是一行一个JSON对象。 比如: {"content": "test content/测试内容","channel":"data_import","created_at":"2024-10-25 11:25:00"} {"content": "test content/测试内容2","channel":"data_import","ts":"2024-10-25 10:35:00"} ... 用户如果想把其它系统的数据导入KeeNotes, 只要将原系统的数据导出为NDJSON格式,然后在KeeNotes桌面版的Settings -> Data Import界面选择目标NDJSON文件,KeeNotes桌面版就会自动在后台开始数据导入的任务了。 NDJSON每一行JSON的内容和必要字段,跟使用本地API导入使用的格式一样。(不过也多个可选项,就是created_at字段也可以用ts字段代替,这两个字段在NDJSON这里代表时间戳字段都可以) 比如, 假如我要把自己原来keebox里的闪念导入keenotes,我直接用下面的命令导出NDJSON就可以了: sqlite3 -list -noheader "notes.sqlite3" "select json_object('content', content, 'channel', channel, 'created_at', created_at) from notes;" > out.ndjson 因为原来的数据就是sqlite3数据库存储,所以,直接使用sqlite3的json_object函数导出就可以了。 至于对于用户你来说,AI时代,不知道怎么把老数据转成NDJSON,直接交代AI去干就好了,原本它也适合干这个 ^-6 (adsbygoogle = window.adsbygoogle || []).push({}); >>>>>> 更多阅读 <<<<<< 百足之虫,死而不僵 谁刷抖音谁就low? 你才low,你们全家都low! 非诚勿扰, 扰你了吗? 「福强私学」来一个? 「福强私学」, 一部沉淀了个人成长、技术与架构、组织与管理以及商业上的方法与心法的百科全书。 福强老师的 AI 通识课 开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。 Copyright © 王福强个人版权所有 - Since 2004 (Everything is homebrewed with Pandoc and Markdown, little Scala also included.) // Set "light" theme as default if (!localStorage.theme) { localStorage.theme = "light"; } if ( localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches) ) { document.documentElement.classList.add('dark'); } else { document.documentElement.classList.remove('dark'); } function attachEvent(selector, event, fn) { const matches = document.querySelectorAll(selector); if (matches && matches.length) { matches.forEach((elem) => { elem.addEventListener(event, () => fn(elem), false); }); } } window.onload = function () { attachEvent('[data-toggle-menu]', 'click', function (elem) { elem.classList.toggle('expanded'); document.body.classList.toggle('overflow-hidden'); document.getElementById('header')?.classList.toggle('h-screen'); document.querySelector('#header nav')?.classList.toggle('hidden'); }); attachEvent("[data-toggle-color-scheme]", "click", function () { document.documentElement.classList.toggle("light"); localStorage.theme = "light"; }); }; window.onpageshow = function () { const elem = document.querySelector('[data-toggle-menu]'); if (elem) { elem.classList.remove('expanded'); } document.body.classList.remove('overflow-hidden'); document.getElementById('header')?.classList.remove('h-screen'); document.querySelector('#header nav')?.classList.add('hidden'); }; var gitalk = new Gitalk({ clientID: '518a605d711883414ac0', clientSecret: '69fb8ccc0616c5bcbc64d24ece0d06d279da91ff', repo: 'afoo.me.comments', owner: 'fujohnwang', admin: ['fujohnwang'], id: location.pathname.substring(0, 49), // Ensure uniqueness and length less than 50 distractionFreeMode: false // Facebook-like distraction free mode }) gitalk.render('comments') /* paste this line in verbatim */ window.formbutton=window.formbutton||function(){(formbutton.q=formbutton.q||[]).push(arguments)}; /* customize formbutton below*/ formbutton("create", { action: "https://formspree.io/f/xknlpkkd", title: "有什么可以帮到您?💕💕💕 How can I help you?", buttonImg: "", fields: [ { type: "email", label: "您的电子邮箱(方便与您联系):", name: "email", required: true, placeholder: "your@email.com" }, { type: "textarea", label: "您想提交的反馈和询问信息:", name: "message", placeholder: "What's on your mind?", }, { type: "submit" } ], styles: { title: { backgroundColor: "blue" }, button: { backgroundColor: "blue" } } }); // tooltips tippy('#aiedu', { content: "As to AI nowadays, LLM and Stable Diffusion are hot even hottest among them, If your want to both know-why and know-how with them, instead of only know-how which can't repeat itself, you should get you to https://ai.afoo.me right now ❗" });