<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[電子書閱讀器使用心得及技巧分享 - Medium]]></title>
        <description><![CDATA[電子書閱讀器的使用心得和有用軟體介紹 - Medium]]></description>
        <link>https://medium.com/ereadertips?source=rss----202f2e33af7e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>電子書閱讀器使用心得及技巧分享 - Medium</title>
            <link>https://medium.com/ereadertips?source=rss----202f2e33af7e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:30:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ereadertips" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[文石 BOOX Go Color 7 使用心得]]></title>
            <link>https://medium.com/ereadertips/%E6%96%87%E7%9F%B3-boox-go-color-7-50b1f23a053c?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/50b1f23a053c</guid>
            <category><![CDATA[電子書閱讀器]]></category>
            <category><![CDATA[文石]]></category>
            <category><![CDATA[e-ink]]></category>
            <category><![CDATA[電子紙]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Tue, 17 Sep 2024 01:53:40 GMT</pubDate>
            <atom:updated>2024-09-08T02:55:01.710Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mI3hoW5aAE1GHQ2mhrgOLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MNY7bS5FyZRQ7vsFdq9VLw.png" /></figure><p>好久沒有寫開箱文了，雖然最近買了不少閱讀器，但因為都是舊的款式，所以也懶得寫，只顧著開箱使用，也懶得再寫點什麼。但文石這台白色的 Go Color 7，倒是等了很久才等到它開始販售，所以可以來寫一下使用心得。</p><h3>硬體</h3><p>以 7 吋閱讀器來說，Go Color 7 的重量算是中等。雖然比不上輕很多的掌閱 Ocean 2 的 170 克，也比不上金屬機身的 Kindle Oasis 的 188 克；但是 195 克的重量也還算是在可以接受，能夠長時間手持閱讀的範圍內。</p><p>就外觀來說，它沒有 Kindle Oasis 和 掌閱 Ocean 系列的人體工學設計，偏重於一邊；但手感倒也比想像中的好很多，背後是類磨砂材質，既止滑，又不沾指紋。</p><p>在右側有實體翻頁鍵，可以自行定義按鍵行為，很方便。右側下方有喇叭，只是音質沒有很好，而且用右手手持時，會擋到出音孔，影響到聲音的品質。</p><p>再來是這台的最大特色了 — 白色機身！白色真的比較討喜。它不是純白的，所以在跟螢幕對比時，不至於覺得螢幕很暗。不過，因為採用的 Kaleido 3 彩色電子紙天生的特性，它的對比度怎麼比也比不了黑白的電子紙螢幕。</p><h3>軟體</h3><p>這一塊似乎就不用特別再寫什麼了。文石對於電子紙的客製化，是目前所有廠商裡面屬一屬二好的。各種針對每個 App 的優化，能給的都給了，設定多到一般的使用者要花很多時間才能弄懂怎麼設定。</p><p>機子剛拿到的時候，有個比較嚴重的問題是：如果將閱讀器放在手機架上，或是平放在桌上，這時對於畫面的觸控會變得非常不靈敏。很多使用者在一收到後就發現了這個問題。</p><p>好在，文石很快地就在幾天內推出了更新。只要更新系統後，就不再有這個問題。這點還算不錯，至少不用等上十天半個月。</p><h3>相關連結</h3><p><a href="https://www.iplug.com.tw/product_269628.php">ICAT | 7吋彩色BOOX Go Color 7</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50b1f23a053c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/%E6%96%87%E7%9F%B3-boox-go-color-7-50b1f23a053c">文石 BOOX Go Color 7 使用心得</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[擴充 AskGPT KOReader plugin]]></title>
            <link>https://medium.com/ereadertips/%E6%93%B4%E5%85%85-askgpt-koreader-plugin-d53aa5f5a38b?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/d53aa5f5a38b</guid>
            <category><![CDATA[koreader]]></category>
            <category><![CDATA[e-ink]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 09:01:50 GMT</pubDate>
            <atom:updated>2024-05-28T17:43:07.815Z</atom:updated>
            <content:encoded><![CDATA[<p>KOReader 的 AskGPT plugin 沒有任何預設的 prompt；再加上 KOReader 中又只能用它內建很陽春的軟體鍵盤，在使用上並不是很方便。因此，這幾天我一邊看書，一邊改良了一版，加入了最常使用的幾個 template，讓它們直接以按鈕的型式出現在選單中，也加入了 Google Gemini Model 的支援。</p><p>雖然 Google Gemini 1.5 Flash 的表現跟 OpenAI Gpt-4o 還有段差距 (比較慢，產出結果也比較不優)，但是畢竟它現在是近乎免費的，還是蠻香的。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vpkT4Spo1oqWx_a0jnXxug.png" /><figcaption>KOReader 選擇文字後的功能選單，新增 GPT Dictionar, GPT Translate 和 Gemini Dictionary</figcaption></figure><h4>下面記錄一下我做的改良</h4><ul><li>修正 loading 對話框太慢出現</li><li>新增 Dictionary, Translate 按鈕</li><li>實作 context-aware 字典解釋</li><li>新增 Gemini Dictionary 按鈕</li><li>將結果存入 Notes</li></ul><h3>修正 loading 對話框</h3><p>如果在同個函式中呼叫的話，它會一直等到 http request 回來後，才會跟著結果內容一併顯示。這麼一來就失去了顯示它的用意。為了解決類似的問題，KOReader 實作裡的 UIManager 有提供函式可以讓部分操作在下個 UI cycle 中再執行。因此，可以先顯示 loading 對話框，然後讓 http request 在下個 UI cycle 中再執行。</p><pre>UIManager:scheduleIn(0.1, function()<br>    showChatGPTDialog(self.ui, _reader_highlight_instance.selected_text.text)<br>    _reader_highlight_instance:onClose()<br>end)</pre><p>完整修改如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onWDXak2NTpDLRooH9mmWg.png" /></figure><h3>新增 GPT Dictionary, Translate 按鈕</h3><p>這一部分沒啥技術難度，就跳過原先會呈現的輸入框，直接將寫好的 prompt 餵給 http request 去執行。</p><p>主要的修改在這支 <a href="https://github.com/plateaukao/AskGPT/commit/94874b76a3191b0c30f4ee4b501857fb341f3a0c">commit</a>。關於加 dictionary button 的程式碼如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DvvLsmi4Nflq3DSAT2WGcQ.png" /></figure><p>在 dictdialog.lua 中，有塞入比較合適的 prompt，讓它可以做為字典。下面的程式碼有怪怪的兩個值：prev_context 和 next_context。它們的用途會在後面做說明。</p><pre>local context_message = {<br>   role = &quot;user&quot;,<br>   content = <br>      &quot;完整句子: &quot; .. prev_context .. &quot;&lt;&lt;&quot; .. highlightedText .. &quot;&gt;&gt;&quot; .. <br>      next_context .. &quot;\n&quot; ..<br>      &quot;將上述句子中 &lt;&lt;&gt;&gt; 中的內容 1. 翻譯成 zh-TW\n&quot; ..<br>      &quot;2. 顯示單字原型;如果是日文單字，則顯示漢字拼法 (原本語言)\n&quot; ..<br>      &quot;3. 舉一個新的例句 (原本語言與 zh-TW 對照，各佔一行)\n&quot; ..<br>      &quot;只回答，不要重覆提示\n\n&quot; ..<br>      &quot;&lt;&lt;&quot; .. highlightedText .. &quot;&gt;&gt;&quot;,<br>}</pre><p>GPT Translate 的話，跟做為字典差不多，就是 prompt 有點差別而已。</p><h3>實作 context-aware 字典解釋</h3><p>在使用字典時，常會遇到一個問題：有些常用字的解釋少說也有十幾二十個。在查詢時往往得要將所有解釋一個個看過一次，再來研究文章中的用途究竟是哪一個。如果剛好遇到一句話裡有兩三個字看不懂，那排列組合下來，要看懂那句話可能得花上不少時間。等搞懂後，應該也沒有心情再往下讀了。</p><p>如果有個字典能夠根據文章的前後文，直接給出當下最合適的解釋的話，不就可以省下很多時間，而且可以讓使用者快速地再回到書籍上，不用在字典停留太久。</p><p>以往的字典無法做到這一點是因為它都是以單字或是片話為搜尋的 key，然後解釋為其 value。如果一個 key 可以對應到超過一個 value 的話，它就頂多只能依常用度來排序，無法再依照其他方式排序或是提供額外的查詢方式。</p><p>有幸生在 ChatGPT 出現的年代，這個限制被打破了。ChatGPT 就是個可以了解整段文字，再來回答你問題的好工具。拿它來當 context-aware 字典真是再適合不過。</p><p>KOReader 的實作中，除了可以拿到 selected text 外，它還很貼心的提供了 context string，可以取得 selected text range 的往前和往後字串。這可以透過 ui.highlight:getSelectedWordContext(context_length) 。context_length 可以指定要往前和往後抓多少文字進來。這個函式的回傳值有兩個，用法如下：</p><pre>prev_context, next_context = ui.highlight:getSelectedWordContext(15)</pre><p>拿到前後 context，就能在 prompt 中請 chatgpt 根據前後文來給出 selected text 的意思。作法可以看上方提供的 prompt。</p><h3>新增 Gemini Dictionary 按鈕</h3><p>今年五月多的 Google IO 宣布了 Gemini 1.5 Flash 的新 model，能夠更快更便宜地提供服務。如果每分鐘呼叫次數在 15 次以內的話，是不需要收費的。拿來個人使用的話，很少會需要有這麼大呼叫次數。因此，很適合拿來做一些不需要太高品質的呼叫。</p><p>Google Gemini 取得 API key 的方式比 OpenAI 還容易，也不容事前先儲值，所以我很快地也整合了 Gemini 進 AskGPT plugin。</p><p>主要的修改在這個 <a href="https://github.com/plateaukao/AskGPT/commit/af5568db27bbb174d570930cdf2376da6c2ec818">commit</a>。</p><p>參考原先的 gpt_query.lua，複製成 gemini_query.lua。把 api_url 換成了 Google 的 “https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=&quot; .. API_KEY.key</p><p>在 prompt 方面，則是代入跟 ChatGPT 一模一樣的內容，方便兩者在使用上作效果的比較。</p><h3>將結果存入 Note</h3><p>好不容易搜尋到的結果，如果過一會兒忘了怎麼辦？是不是能將它記錄下來，方便事後再閱讀呢？</p><p>KOReader 原先的實作就已經有將標記的文字儲存下來的功能，也支援針對選定的文字內容輸入一些文字記錄到 Notes。利用後者，就能將 AskGPT 搜尋的結果偷塞到 Notes 中。</p><p>所以，我在搜尋結果對話框下方，多了一個加入筆記的按鍵。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WkHIIlvGfFN2MZ0IUj4Wtg.png" /></figure><p>實作方式如下：</p><ul><li>在 chatgptviewr.lua 中加入按鈕</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6a3oSEgJ7lrXxWXLtXW1bQ.png" /></figure><ul><li>在 dictdialog.lua 中生成結果對話框時，代入 handleAddToNote 函式。</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEVqWlj_yaTJIUDa0KdtAw.png" /></figure><ul><li>而 handleAddToNote 的實作就是去呼叫原先 KOReader 就有的功能</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H44flgox3pawUlBMFJwjew.png" /></figure><p>主要的修改在下面這一支 commit：</p><ul><li><a href="https://github.com/plateaukao/AskGPT/commit/51f0a90427c3d78bf101be9667c41666456973fd">feat: support adding results to note.</a></li></ul><p>存入 Notes 的內容，可以在點擊標記時看到：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQ_mBQmOz-jftSf85DkjFg.png" /></figure><h4>將選取文字在結果對話框裡標成粗體字</h4><p>最後對於 UI 上的一點小改善，把被選取的文字用粗體表示。這樣做會比顯示醜醜的 &lt;&lt; 和 &gt;&gt; 來的美觀一些。</p><p>主要的修改在這支 <a href="https://github.com/plateaukao/AskGPT/commit/0f5f6784519c0b44229ff08939d0baa820527624">commit</a>。</p><p>KOReader 的 Text Widget 支援利用某些 tag 來標示哪些文字片段要以粗體顯示，實際作法如下：在字串的最開始加上 TextBoxWidget.PTF_HEADER，告知字串裡會有其他的 tag。然後利用 TextBoxWidget.PTF_BOLD_START 和 TextBoxWidget.PTF_BOLD_END 將粗體字包住。這樣子就可以啦</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UudBNj91AAPGT-rsa2_0vQ.png" /></figure><p>顯示的效果如下：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sbzVpP1DgRFl48tRKBKzEw.png" /></figure><h3>相關連結</h3><p><a href="https://github.com/plateaukao/AskGPT">GitHub - plateaukao/AskGPT</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d53aa5f5a38b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/%E6%93%B4%E5%85%85-askgpt-koreader-plugin-d53aa5f5a38b">擴充 AskGPT KOReader plugin</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[擴充 AskGPT KOReader plugin: 新增一鍵加入筆記]]></title>
            <link>https://medium.com/ereadertips/%E6%93%B4%E5%85%85-askgpt-koreader-plugin-%E6%96%B0%E5%A2%9E%E4%B8%80%E9%8D%B5%E5%8A%A0%E5%85%A5%E7%AD%86%E8%A8%98-4553765388b2?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/4553765388b2</guid>
            <category><![CDATA[lua]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[e-ink]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[koreader]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 09:01:35 GMT</pubDate>
            <atom:updated>2024-06-05T16:33:22.934Z</atom:updated>
            <content:encoded><![CDATA[<p>這篇文章將說明在 AskGPT plugin 中 怎麼將 gpt 查詢結果一鍵存入筆記，並且說明開發 KOReader plugin 時如何避免踩雷。</p><p>在前一篇文章中已經實作了點擊按鈕後，喚起編輯筆記的對話框。雖然也是能達到效果，但畢竟多了一步。大多數儲存 gpt 結果的時候，是不需要編輯內容的，所以我又繼續研究怎麼將中間這一步省略掉。</p><h4>研究既有實作</h4><p>在 readerhighlight.lua 中，既有的加筆記函式實作內容如下：</p><pre>function ReaderHighlight:addNote(text)<br>    local index = self:saveHighlight(true)<br>    if text then -- called from Translator to save translation to note<br>        self:clear()<br>    end<br>    self:editHighlight(index, true, text)<br>    UIManager:close(self.edit_highlight_dialog)<br>    self.edit_highlight_dialog = nil<br>end<br><br>function ReaderHighlight:editHighlight(index, is_new_note, text)<br>    self.ui.bookmark:setBookmarkNote(index, is_new_note, text)<br>end</pre><p>如程式碼所示：</p><ol><li>它會先把標記存下來 (self.saveHighlight)；</li><li>並且開啟編輯的對話框 (self.editHighlight)。</li></ol><p>再往下看的話，可以看到 self.editHighlight 其實是去呼叫另一個 bookmark 模組的函式。</p><p>那麼，我們再來看看下面 bookmark.setBookmarkNote() 是怎麼實作的。以下內容是去掉不相干邏輯後的函式實作。InputDialog 是編輯筆記時的對話框主體。由於我想要的行為是完全不出現這個 UI 介面，直接將結果儲存，所以需要參考的實作是它的 Save Button 點擊邏輯。</p><p>從 Save 的實作中可以看到，它主要做了兩件事：</p><ol><li>把 value 塞入 annotation</li><li>利用 self.ui.handleEvent 將這個 annotation 的變化傳給需要知道的人。</li></ol><p>而 annotation 則是在函式的第一行取得的。</p><pre>function ReaderBookmark:setBookmarkNote(item_or_index, is_new_note, new_note)<br>    local annotation = self.ui.annotation.annotations[index]<br>    local type_before = item and item.type or self.getBookmarkType(annotation)<br>    input_text = new_note<br>    self.input = InputDialog:new{<br>        title = _(&quot;Edit note&quot;),<br>        description = &quot;   &quot; .. self:_getDialogHeader(annotation),<br>        input = input_text,<br>        allow_newline = true,<br>        add_scroll_buttons = true,<br>        use_available_height = true,<br>        buttons = {<br>            {<br>                 ...<br>                {<br>                    text = _(&quot;Save&quot;),<br>                    is_enter_default = true,<br>                    callback = function()<br>                        local value = self.input:getInputText()<br>                        if value == &quot;&quot; then -- blank input deletes note<br>                            value = nil<br>                        end<br>                        annotation.note = value<br>                        local type_after = self.getBookmarkType(annotation)<br>                        if type_before ~= type_after then<br>                            if type_before == &quot;highlight&quot; then<br>                                self.ui:handleEvent(Event:new(&quot;AnnotationsModified&quot;,<br>                                    { annotation, nb_highlights_added = -1, nb_notes_added = 1 }))<br>                            else<br>                                self.ui:handleEvent(Event:new(&quot;AnnotationsModified&quot;,<br>                                    { annotation, nb_highlights_added = 1, nb_notes_added = -1 }))<br>                            end<br>                        end<br>                        if annotation.drawer then<br>                            self.ui.highlight:writePdfAnnotation(&quot;content&quot;, annotation, value)<br>                        end<br>                        UIManager:close(self.input)<br>                        if from_highlight then<br>                            if self.view.highlight.note_mark then<br>                                UIManager:setDirty(self.dialog, &quot;ui&quot;) -- refresh note marker<br>                            end<br>                        else<br>                            item.note = value<br>                            item.type = type_after<br>                            item.text = self:getBookmarkItemText(item)<br>                            self.refresh()<br>                        end<br>                    end,<br>                },<br>            }<br>        },<br>    }<br>    UIManager:show(self.input)<br>    self.input:onShowKeyboard()<br>end</pre><h4>改寫現有機制</h4><p>了解了既有的實作後，試著將上面的作法實作到 AskGPT plugin 中。把原先的 addNote() 函式換成上述的內容，省略了一大堆關於對話框的操作。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e38Ub6mLUYv7UkC_IE1myQ.png" /></figure><p>看似完全照抄的內容，卻在執行時一直 crash。系統總是找不到 ui.annotatoin 這個元件；但明明看程式碼，其他的元件也都是這麼呼叫的啊。為什麼就我的 plugin 無法取得。</p><p>系統總會跳出以下的錯誤訊息：</p><blockquote>Failed to run script: …ulated/0/koreader/plugins//askgpt.koplugin/askdialog.lua:113: attempt to index field ‘annotation’ (a nil value)</blockquote><h4>查找為什麼會出錯</h4><p>針對這個出錯點，花了兩三天在查問題出在哪，一直沒有什麼頭緒。過程中還讓我多學了一點怎麼在 android 上 debug KOReader 的開發。如果只是安裝 KOReader app，沒做什麼設定的話，當 App crash 時，會在畫面上出現一顆炸彈圖案，偶爾會附上出錯的 call stack。但大部分情況下，就只有顯示一顆炸彈，讓人一頭霧水，不知從何查起。</p><p>後來，再認真研讀文件後，找到在 KOReader 的文件瀏覽模式下，可以從工具列的 more tools 找到打開 debugging information 的選項。一旦這個選項打開了，就不用苦苦等炸彈畫面的 call stack；在常用的 android logcat 中就可以看到許多關於 KOReader 的 debugging information。而且，也包含了 crash 時最重要的 call stack。</p><p>雖然會了這個技巧，但依然無法讓我找到為什麼 ui.annotation 總是 nil 的原因。</p><h4>求援</h4><p>無奈之下，只好在 KOReader github 上開了一條 issue，問問眾開發大神。</p><p>於是，我洋洋灑灑解釋了一大篇：</p><p><a href="https://github.com/koreader/koreader/issues/11948">FR: A function to save notes directly without showing Note Edit Dialog · Issue #11948 · koreader/koreader</a></p><p>裡面包含了我想做的事，參考的程式碼，以及 crash 時的 error logs。</p><p>然後…在十幾二十分鐘內就得到了答案，也解了這個我追了好幾天的難題！</p><p>原因原來出在我在參考的程式碼是 github 上最新的程式碼，而我在測試設備上裝的版本是 stable version。兩者間還是有一定的程式碼差別。就那麼剛好，我需要使用的 ui.annotation 是在最新程式碼中才有的元件； stable release version 中其實還無法參考到這元件。</p><p>解決這個 crash 的方式是：把我測試的版本升級到 development channel 的 nightly build 版本就可以了！</p><h4>心得</h4><p>搞清楚自己在開發的 App 版本和參考實作的程式碼版本是一致的，這點很重要，很重要，很重要。</p><p>下次不要再犯這種錯誤了。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4553765388b2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/%E6%93%B4%E5%85%85-askgpt-koreader-plugin-%E6%96%B0%E5%A2%9E%E4%B8%80%E9%8D%B5%E5%8A%A0%E5%85%A5%E7%AD%86%E8%A8%98-4553765388b2">擴充 AskGPT KOReader plugin: 新增一鍵加入筆記</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[root SONY DPT-CP1 並且安裝 KOReader App]]></title>
            <link>https://medium.com/ereadertips/root-sony-dpt-cp1-%E4%B8%A6%E4%B8%94%E5%AE%89%E8%A3%9D-koreader-app-49a0755df67e?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/49a0755df67e</guid>
            <category><![CDATA[dpt-cp1]]></category>
            <category><![CDATA[root-android-phone]]></category>
            <category><![CDATA[koreader]]></category>
            <category><![CDATA[e-ink]]></category>
            <category><![CDATA[sony]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 09:01:07 GMT</pubDate>
            <atom:updated>2024-06-09T14:02:28.812Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2AIHUr3Cu5T-reEKVFElRg.png" /></figure><p>上週在網上逛 Amazon 時，看到國際運費免費，失心瘋地買了二手的閱讀器 SONY DPT-CP1，一台 2018 年推出的超輕 10 吋閱讀器。這篇要來說說怎麼在 SONY DPT-CP1 上安裝 KOReader 的方式。</p><h3>前言</h3><p>目前我在買閱讀器時，在意的因素有兩點: 要嘛就是 CPU 性能要很強，因為要拿來上網，流暢度很重要；另外一點是要輕要好拿，能有多輕就多輕，因為看書時習慣拿在手上看，所以如果螢幕能很大，又能兼顧到重量的話，是最好的選擇。</p><p>以第一點 “CPU 性能” 要強來看，目前文石去年到今年推出的閱讀器都有很好的性能，很適合拿來上網用。所以目前瀏覽網頁的話，我使用的主力是 BOOX Tab Ultra C。</p><p>以第二點 “愈輕愈好” 來選擇的話，這一兩年陸續買了掌閱 Ocean2 (7&quot;), Ocean3 Plus (8&quot;) 和 Ocean 3 Turo (7&quot;) 以及 Amazon 的 Kindle Oasis 3 (7&quot;)；重量都是在 170 克到 200 克左右，而且都有將閱讀器重量偏重一邊的設計，在手持上更加舒適。</p><p>但，總覺得還是少了一台 10 吋的輕型設備。目前市面上的10吋新機種，大都是在400~450克之間。好一點的，標榜很輕的，也是要 370~ 380 克。跟 8 吋只要 200 克的 Ocean3 plus 比的話，還是差了一大截，甚至要它兩倍的重量。</p><p>找著找著，就只好往舊的機種找去。剛好看到網路上有人寫到，其實 SONY 2018年出的 DPT-CP1 (10&quot;) 也是能 root，然後安裝 KOReader App 的。看到 KOReader app 我眼睛就亮了。只要能安裝 KOReader app，就表示能夠自己動手調整的可能性變得無限大；而且，10吋大的 DPT-CP1 只有 240 克！這才是真正的輕啊~</p><p>看了看，它似乎沒有再出新款的，但舊款的也沒有因此而降價多少。剛好最近美亞和日亞都有在促銷國際運費免費，所以在日亞上逛一逛，看到有二手的 DPT-CP1 只要半價。雖然知道應該已經被使用很長一段時間了，但，可以買來試試裝上 KOReader app，即使有些小缺點，也是可以忍受的。</p><p>於是，我入手了照片中左邊的 SONY DPT-CP1 (右邊是拿來對比用的文石 6 吋白色 Poke4s)。照著網路的教學 (大概 10 分鐘？)就 root 成功了，也裝上了 2024.04 版的 KOReader app。不得不說，KOReader 真的很神，連 6 年前推出的機種，Android OS 還在 5.1 ，都可以順利安裝。更重要的是！我修改的轉直排 patch 也可以套用上去。</p><h3>root 方式</h3><p>root 的方式我主要是依照下面這篇文章操作的。在這邊先假設使用的環境是 MacOS，在電腦上也已經裝好了 python3 。</p><p><a href="https://yiruru.com/6%E4%BB%A3%E7%A0%81%E5%A6%82%E8%AF%97/Sony%20DPT-RP1%20%E7%94%B5%E5%AD%90%E7%BA%B8%E7%A0%B4%E8%A7%A3/">Sony DPT-RP1 电子纸破解</a></p><ol><li>安裝 python 需要的一些套件</li></ol><pre>pip install httpsig pyserial urllib3 requests</pre><p>2. 把下面 github repo clone 一份下來</p><p><a href="https://github.com/HappyZ/dpt-tools">https://github.com/HappyZ/dpt-tools</a></p><p>3. 開啟 DPT-CP1 的 wifi 連線，找到其 wifi IP，並且在終端機裡進到 dpt-tools 的目錄下，執行下面指令</p><pre>python dpt-tools.py -ip your_device_wifi_ip</pre><p>執行後，如果在 Terminal 中看到 DPT Tools 的字串，就表示完成了第一步。</p><p>4. 在 Terminal 中輸入 fw，按 Enter，然後填入以下的路徑：</p><pre>fw_updater_packer_by_shankerzhiwu/pkg_example/hack_basics/fw.pkg</pre><p>畫面出現提示 yes/no 時，打入 yes，再按 Enter</p><p>這時系統會重開機，並跑一些安裝程式，等它完成。如果畫面上有 update failure 或 uneable to update，都不要理它。(因為實際上已經裝了)</p><p>5. 依步驟 4，再安裝下面兩個路徑：</p><pre>fw_updater_packer_unpacker/pkg_example/flashable_mod_boot_img_1.6.50.14130/FwUpdater.pkg</pre><pre>fw_updater_packer_unpacker/pkg_example/flashable_supersu/FwUpdater.pkg</pre><p>6. 試試 adb devices，看看有沒有抓到 DPT-CP1。有的話，可以到下面的 github 抓一個小小的 App Launcher 來使用。</p><p><a href="https://github.com/Modificator/E-Ink-Launcher/releases">Releases · Modificator/E-Ink-Launcher</a></p><p>下載後執行</p><pre>adb install the_apk_you_downloaded.apk</pre><p>7. 安裝好之後，為了讓它會出現在設備上方的選單中，要再進行下面的操作。第一行的 launcher_mod.tar.gz 可以在 dpt-tools 中找到。都執行好之後，重開機，點擊設備上方的按鈕後，可以看到多了一個 Apps。</p><pre>adb push /path_to/launcher_mod.tar.gz /sdcard/launcher_mod.tar.gz<br>adb shell mount -o rw,remount /system<br>adb shell rm -rf /etc/dp_extensions<br>adb shell busybox tar -xvzf /sdcard/launcher_mod.tar.gz -C /<br>adb shell chown -R root:root /etc/dp_extensions<br>adb shell chown system:system /data/system/ExtMgr.db<br>adb shell chmod 0660 /data/system/ExtMgr.db<br>adb shell chown system:system /data/system/ExtMgr.db-journal<br>adb shell chmod 0600 /data/system/ExtMgr.db-journal<br>adb reboot</pre><h4>其他</h4><p>上述流程算是完成了整個 root 的過程，而且還順便裝了個 App Launcher。以下則是一些可能會需要調整的設定；可以根據自己的需求，決定要不要做。</p><ul><li>打開系統預設的設定 App</li></ul><pre>adb shell am start -a android.settings.SETTINGS</pre><ul><li>切換系統語系 (只有中英日三種語言)</li></ul><pre>adb shell am start -a android.settings.LOCALE_SETTINGS</pre><ul><li>切換輸入法</li></ul><pre>adb shell am start -a android.settings.INPUT_METHOD_SETTINGS</pre><h3>安裝 KOReader App</h3><p>在 root 完之後，安裝 app 的方式其實就跟一般的 Android 設備差不多，能夠利用 adb install 的指令將 app sideload 進 DPT-CP1 中。</p><p>KOReader App 可以到 <a href="https://github.com/koreader/koreader/releases">https://github.com/koreader/koreader/releases</a> 下載比較新的版本。然後執行下面的指令：</p><pre>adb install name_of_koreader_app.apk</pre><h4>細步調整</h4><p>在 root 後的 DPT-CP1 上，所有安裝的 app 的字體都會變得很小。在 KOReader 中能夠對此做一些設定：</p><blockquote>設定 &gt; 螢幕 &gt; 螢幕 DPI &gt; 自訂 : 200</blockquote><p>因為 DPT-CP1 是黑白的，所以可以把用彩色繪製畫面的選項關掉</p><blockquote>設定 &gt; 螢幕 &gt; 彩色顯示: 關閉它</blockquote><p>如果在使用時，畫面會自動關掉的話，可以開啟。或是有時畫面重繪有問題的話，也可以把它打開來。</p><blockquote>設定 &gt; 螢幕 &gt; 螢幕逾時 &gt; 保持螢幕開啟</blockquote><h3>相關連結</h3><p>除了上面參考的那篇中文文章外，最齊全的 Rooting 教學都在下面這個連結：</p><p><a href="https://github.com/HappyZ/dpt-tools/wiki/The-Ultimate-Rooting-Guide">The Ultimate Rooting Guide</a></p><p>裡面有教到怎麼利用重新打包 framework-res.apk，來更換待機畫面。但我一直試不成功。因為這過程可能會不小心讓你的設備變磚，所以建議不要嘗試。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49a0755df67e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/root-sony-dpt-cp1-%E4%B8%A6%E4%B8%94%E5%AE%89%E8%A3%9D-koreader-app-49a0755df67e">root SONY DPT-CP1 並且安裝 KOReader App</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SONY DPT-CP1: 加上 KOReader 啟動圖示及安裝 AssistiveTouch, 萊姆輸入法]]></title>
            <link>https://medium.com/ereadertips/sony-dpt-cp1-%E5%8A%A0%E4%B8%8A-koreader-%E5%95%9F%E5%8B%95%E5%9C%96%E7%A4%BA%E5%8F%8A%E5%AE%89%E8%A3%9D-assistivetouch-%E8%90%8A%E5%A7%86%E8%BC%B8%E5%85%A5%E6%B3%95-3fea512ed890?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/3fea512ed890</guid>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[sony]]></category>
            <category><![CDATA[e-ink]]></category>
            <category><![CDATA[koreader]]></category>
            <category><![CDATA[dpt-cp1]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 10 Jun 2024 08:59:52 GMT</pubDate>
            <atom:updated>2024-06-10T15:30:22.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eggxpN7QAmHDunKlGw3iSQ.png" /></figure><p>這篇文章講說明如何在系統選單中加入 KOReader 圖案，並且，在設備上顯示懸浮球，方便返回上一步和開啟系統選單。</p><h3>在系統 Launcher 加上 KOReader App 圖案</h3><p>本小節的作法主要是參考<a href="https://github.com/HappyZ/dpt-tools/wiki/ADB-Tricks,-DIY-Launcher-App#launcher-app">這個連結</a>。如果對於 Android 開發有點概念的話，操作上很容易。但，就算沒有概念的話，一步步照著作也是可以的。</p><ol><li>/etc/dp_extensions 是系統用來放選單中每一個按鈕的設定。我們先將 Launcher 中的隨便一個設定目錄複製到電腦中。這邊舉的例子是 NoteCreator。</li></ol><pre>adb pull /etc/dp_extensions/NoteCreator</pre><p>2. 再來是把這份目錄以及下面的每個檔案根據我們想要新增的應用作調整。首先，是把目錄名稱和檔案名稱都改掉。這邊以 KOReader 當例子的話，要進行以下的操作。</p><pre>cp -R NoteCreator  KOReader<br>cd KOReader<br>mv NoteCreator_extension.xml KOReader_extension.xml<br>mv NoteCreator_strings-en.xml KOReader_strings-en.xml<br>mv NoteCreator_strings-ja.xml KOReader_strings-ja.xml<br>mv NoteCreator_strings-zh_CN.xml KOReader_strings-zh_CN.xml<br>mv ic_homemenu_createnote.png ic_homemenu_koreader.png</pre><p>3. 改好檔名後，開啟 KOReader_extension.xml，這是指定按鈕被點擊時要怎麼啟動 App。這需要你先知道你想呼叫的 App 的 main activity 名稱才行。以 KOReader app 為例，這可以在其 github repo 中的 AndroidManifest.xml 中找到。找到後，把內容中的 name 和 component, icon 換掉。修改如下：</p><pre>&lt;LauncherEntry name=&quot;NoteCreator&quot; category=&quot;Launcher&quot; uri=&quot;intent:#Intent;launchFlags=0x10000000;component=com.sony.apps.notecreator/.activities.MainActivity;end&quot; string=&quot;STR_ICONMENU_1005&quot; icon=&quot;ic_homemenu_createnote.png&quot; order=&quot;5&quot;/&gt;<br>=&gt;<br>&lt;LauncherEntry name=&quot;KOReader&quot; category=&quot;Launcher&quot; uri=&quot;intent:#Intent;launchFlags=0x10000000;component=org.koreader.launcher/.MainActivity;end&quot; string=&quot;STR_ICONMENU_1005&quot; icon=&quot;ic_homemenu_koreader.png&quot; order=&quot;5&quot;/&gt;</pre><p>內容中還有 <strong>order</strong> 參數可以修改，我並沒有特別做調整。如果希望它的位置前面一點或後面一點的話，可以自行再調整。</p><p>4. 再來是修改一下字串檔的內容。進到每個 KOReader_strings-*.xml 中，將內容中的 Create&amp;#010;New Note 置換掉。以 KOReader 為例，則是全換成 KOReader 就行，因為它沒有其他語言的翻譯。</p><pre>&lt;string name=&quot;STR_ICONMENU_1005&quot;&gt;Create&amp;#010;New Note&lt;/string&gt;<br>=&gt;<br>&lt;string name=&quot;STR_ICONMENU_1005&quot;&gt;KOReader&lt;/string&gt;</pre><p>5. 需要把圖檔 (ic_homemenu_createnote.png) 換成一個你想要的圖。我的作法是先打開原檔，將原先的圖檔 clear 掉，再從想要的 App 中，拿它的圖來縮小後，塞到原檔中，儲存。這麼一來，圖檔的寬高 (220x120) 就會跟原先的一樣，不需要擔心新的圖檔有相容性的問題。</p><p>6. 完成上述所有調整後，再來是把這個目錄放到設備中，讓系統在重開機時能重新處理，找到這個新的目錄。DPT-CP1 除了會在 /etc/dp_extensions/ 下找資訊外，也會到 /data/dp_extensions 下找。而 /data 下是不需要什麼特別權限的。所以我們要將目錄複製到這兒。首先，先建立 /data/dp_extensions 這個目錄，再將調整完的目錄 KOReader 複製過去。</p><pre>adb shell mkdir /data/dp_extensions<br># 要先跳出 KOReader 這個目錄<br>cd .. <br>adb push KOReader/ /data/dp_extensions/</pre><p>7.做完後，要將暫存的相關資料清掉，以便設備在重開機時，會重新建立選單的內容。這麼一來就大功告成啦！</p><pre>adb shell<br>cd /data/system<br>mv ExtMgr.db ExtMgr.db_bak<br>mv ExtMgr.db-journal ExtMgr.db-journal_bak<br># 先離開 adb shell<br>exit<br># 重開機<br>adb reboot</pre><p>上述步驟都沒出錯的話，重開機後應該就可以在系統選單中看到 KOReader 圖案出現在 Create New Note 旁邊。</p><h3>安裝 AssistiveTouch</h3><p>原以為修改來給 Pubu Pubook SE 的 AssistiveTouch app 可以直接安裝到 SONY DPT-CP1 上，但事情總沒有想像中的順利。DPT-CP1 是 Android OS 5.1 的老機種了，而且有可能 SONY 也有做過一些系統調整，所以在取得系統權限上遇到了一些問題。把之前 AssistiveTouch 裝上後，執行會因為檢查 overlay 權限 API 不存在而馬上 crash。詳細的各種錯誤可以在這個<a href="https://chatgpt.com/share/ee41078f-3924-4c1a-99d2-330fc8a91287">與 ChatGPT 的請教</a>中看到。</p><p>後續做了一堆修改，包括</p><ul><li>overlay on top of other windows 的權限修改；</li><li>加上版本的判斷，避免 Android 6 以後的程式碼被執行；</li><li>將懸浮球的尺寸變大；</li><li>將原先送出 Accessibility key code 的方式換為從程式裡執行 adb shell input keyevent key_code_name 。(反正已經 root 了，目前就只有這方式能測試成功)</li></ul><p>主要的實作如下：</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/901999fa48d0740fa91ef2fd20e41f70/href">https://medium.com/media/901999fa48d0740fa91ef2fd20e41f70/href</a></iframe><ul><li>在 commandline 呼叫下面的給予權限方式 (不確定有沒有效，但我都有執行)</li></ul><pre>adb shell pm grant com.android.mirror.assisttouch android.permission.SYSTEM_ALERT_WINDOW</pre><p>經過這麼胡亂的操作後，終於可以把 AssistiveTouch 懸浮球安裝上去，並且正常執行。</p><p>通常在電子書閱讀器上我是不大想用這類軟體的；但安裝懸浮球的好處是：</p><ul><li>(單擊) 在 SONY 設備上提供方便的返回方式</li><li>(雙擊) 減少需要一直點實體按鍵開啟系統功能選單，降低這台二手機壞掉的可能性</li><li>(長按) 之前在 Pubook 上的長按功能是用來刷新整個畫面。不過，這在 SONY 設備上因為都沒殘影，好像不用提供這功能。可以留著以後如果有更常用的功能時，再實作上去。</li></ul><h3>安裝萊娒輸入法</h3><p>之前自己在維護的萊娒輸入法，經過下面修改後，也可以安裝到這台設備上：</p><ul><li>將 minSDK 降到 21</li><li>升級 gradle 的版本，並且處理一下新版的需求 (像是要加上 name space)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gi-GR-b32S0bExL7B1v9mA.png" /></figure><h3>相關連結</h3><ul><li><a href="https://github.com/plateaukao/AssistiveTouch/commit/b9bb9d43f75a01338d8dbda2d1d5e2672f46fcea">AssistiveTouch 的 commit</a></li><li><a href="https://github.com/plateaukao/sweetlime/commit/caee6bdcbfe1a34f3042a21126ebf89f6b39ed56">萊姆輸入法的修改</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fea512ed890" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/sony-dpt-cp1-%E5%8A%A0%E4%B8%8A-koreader-%E5%95%9F%E5%8B%95%E5%9C%96%E7%A4%BA%E5%8F%8A%E5%AE%89%E8%A3%9D-assistivetouch-%E8%90%8A%E5%A7%86%E8%BC%B8%E5%85%A5%E6%B3%95-3fea512ed890">SONY DPT-CP1: 加上 KOReader 啟動圖示及安裝 AssistiveTouch, 萊姆輸入法</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Koreader 中快速切換成直排閱讀模式]]></title>
            <link>https://medium.com/ereadertips/koreader-%E4%B8%AD%E5%BF%AB%E9%80%9F%E5%88%87%E6%8F%9B%E6%88%90%E7%9B%B4%E6%8E%92%E9%96%B1%E8%AE%80%E6%A8%A1%E5%BC%8F-b75b26f6a6c6?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/b75b26f6a6c6</guid>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 06 May 2024 03:03:41 GMT</pubDate>
            <atom:updated>2024-04-21T13:56:38.765Z</atom:updated>
            <content:encoded><![CDATA[<p>KOReader 是個很強大的 open source閱讀軟體，也因為它的功能太多太彈性了，造成剛接觸的使用者，一看到各式各樣的選單，就會落荒而逃。(我之前也是，所以跟它擦身而過好幾年)</p><p>今天要分享一個最近使用 KOReader的小心得。它雖然功能多得驚人，但是沒有直接支援橫排轉直排，對於喜歡看中文小說的我來說，還是覺得有點遺憾。但是，這兩天找到了一個快速設定的方式，可以巧妙地一鍵達到直排的效果。</p><p>其中的奧秘在於： KOReader的畫面區域點擊動作可以設定成 很多個動作的組合(這太神了)。如果說大家覺得 EinkBro 的點擊畫面很好用的話，Koreader的設定完全是另一個高深世界。</p><p>下面就是簡單的設定說明(也可以直接看我附的影片比較快)</p><h4>設定概念</h4><ul><li>點擊畫面右下角，變成直排畫面</li><li>長按畫面右下角，切回橫排閱讀模式</li></ul><h4>設定細節</h4><ul><li><strong>前往 設定 &gt; 輕觸與手勢 &gt; 手勢管理員 &gt; 角落 &gt; 右下</strong></li><li>(裝置 &gt; 旋轉 90 度) + (可重排文件 &gt; Set Font: 原俠正楷90 度)</li><li><strong>前往 設定 &gt; 輕觸與手勢 &gt; 手勢管理員 &gt; 長按角落 &gt; 右下：</strong></li><li>(裝置 &gt; 旋轉 0 度) + (可重排文件 &gt; Font:正常原俠正楷體)</li></ul><p>有在使用 KOReader 的使用者，也可以試試看喔。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b75b26f6a6c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/koreader-%E4%B8%AD%E5%BF%AB%E9%80%9F%E5%88%87%E6%8F%9B%E6%88%90%E7%9B%B4%E6%8E%92%E9%96%B1%E8%AE%80%E6%A8%A1%E5%BC%8F-b75b26f6a6c6">Koreader 中快速切換成直排閱讀模式</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Koreader 的直排閱讀 patch]]></title>
            <link>https://medium.com/ereadertips/koreader-%E7%9A%84%E7%9B%B4%E6%8E%92%E9%96%B1%E8%AE%80-patch-8fcf1f366269?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/8fcf1f366269</guid>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 06 May 2024 03:03:14 GMT</pubDate>
            <atom:updated>2024-04-21T14:03:07.802Z</atom:updated>
            <content:encoded><![CDATA[<p>從 Koreader 的開發網站上，有另一位神人寫了個小修正(lua script)，可以在當書籍的 typography 設為日文時，將畫面(文字的部分)轉成 90 度。</p><p>這樣子有什麼好處呢？</p><p>前幾週我有分享一個方式可以讓使用者點擊畫面某個區域時，可以同時把字型換成 轉成 90 度的特殊字型，再順便將系統畫面也轉 90 度，藉此達成一個很克難的直排閱讀。雖然這樣子就可以直排閱讀了，但是當你想要做些其他調整時，就會發現 menu 變成在畫面的左右邊，很難操作(見圖二)。</p><p>而這個 script 則是可以讓只有套了轉 90 度的文字的顯示區再轉 90 度而已 (有點繞口)，其他的 app 介面都還是正常的(選單，對話框，進度列都還是在上下方，見圖一)！</p><h4>套用方式</h4><p>神人的說明在: <a href="https://github.com/koreader/koreader/issues/11469#issuecomment-1969338188">https://github.com/koreader/koreader/issues/11469#issuecomment-1969338188</a></p><p>1. 簡單的操作方式是 1. 先下載這個連結到手機上 <a href="https://github.com/koreader/koreader/files/14436601/2-cre-rotate-japanese-book.lua.txt">https://github.com/koreader/koreader/files/14436601/2-cre-rotate-japanese-book.lua.txt</a></p><p>2. 把它放到 /koreader/patches 下 (可能要把 .txt 的副檔名拿掉)</p><p>3. 然後開啟書籍後，自己先將字型換成 偽直排字型，再將書籍的 typography 設成日文 (目前 script 裡是寫死 ja，如果你主要看的是中文書的話，可能要換成中文 locale)</p><h4>同場加映</h4><p>另一個神人在同個討論串裡，提到他寫了個 python script 可以快速地將字型轉成 偽直排字型，不用再開啟 fontforge 去操作那難用的 UI 了 (但不確定是不是它只針對日文有作用而已，我還沒拿來試中文)。有興趣的人可以研究一下他的 script 寫法 (要使用到 fontforge 的 python extension) 。</p><p>在 MacOS 上的話，要先安裝 fontforge，然後執行下面的指令。(直接用 python 跑會找不到 fontforge module，所以，必須用 fontforge 中提供的 FFPython 來執行)</p><pre>/Applications/FontForge.app/Contents/MacOS/FFPython main.py input.ttf ouput.ttf</pre><p>轉換偽直排字型的小工具: <a href="https://github.com/MyK00L/tategakifont?tab=readme-ov-file">https://github.com/MyK00L/tategakifont?tab=readme-ov-file</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fcf1f366269" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/koreader-%E7%9A%84%E7%9B%B4%E6%8E%92%E9%96%B1%E8%AE%80-patch-8fcf1f366269">Koreader 的直排閱讀 patch</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[自製偽直排字型]]></title>
            <link>https://medium.com/ereadertips/%E8%87%AA%E8%A3%BD%E5%81%BD%E7%9B%B4%E6%8E%92%E5%AD%97%E5%9E%8B-501e671219f2?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/501e671219f2</guid>
            <category><![CDATA[fonts]]></category>
            <category><![CDATA[chinese]]></category>
            <category><![CDATA[e-ink]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 06 May 2024 03:02:45 GMT</pubDate>
            <atom:updated>2024-05-03T16:36:17.554Z</atom:updated>
            <content:encoded><![CDATA[<p>這篇文章主要是介紹如何比較快速地把一個字型轉換成偽直排的字型。</p><p>之前已經有很多文章在介紹了，但大都是在討論怎麼利用 fontforge 這套軟體，一個個手動去改字型的轉向。目前這邊收集到的文章有：</p><ul><li><a href="https://blog.jigong.org/?p=1623">偽直排：直書控的救星</a></li><li><a href="https://www.vixual.net/blog/archives/713">Kobo/Kindle E-Reader 也能一鍵橫排轉直排? 還不用等待轉檔?</a></li><li><a href="https://github.com/dpublishing/epub3guide/blob/master/tdpf-epub3guide.md">epub3guide/tdpf-epub3guide.md at master · dpublishing/epub3guide</a></li></ul><p>但要一個個選字元再來做轉換太累人了。前一陣子看到有人提供了一個 script，可以利用 fontforge 程式中的 python library 直接做轉換。雖然目前還有一點小問題(有些標點符號沒有正常旋轉成功)，但是已經可以省下九成以上的時間。只要跑個 script 後，再進 fontforge 手動調整兩三個標點符號就行。如果覺得兩三個標點符號無傷大雅的話，直接拿來用也是可以的。</p><p>轉換的 script 在：</p><p><a href="https://github.com/MyK00L/tategakifont">GitHub - MyK00L/tategakifont</a></p><p>裡面有一個 VerticalOrientation.txt 的文件，定義了在旋轉字元時，有哪些字元要旋轉；是要以中間為圓心旋轉，或是要轉完靠右上，左下，等不同的差別。有些中文的標點符號會不大正確，可以在這邊試著去做一些調整。</p><p>把上面的 repo 抓下來，改一改 VerticalOrientation.txt 後，在 MacOS 上先裝好 FontForge，然後執行下面的指令：</p><pre>/Applications/FontForge.app/Contents/MacOS/FFPython main.py ./input.ttf ./output.ttf</pre><p>應該就可以產生一個轉了 90 度的字體，馬上就可以拿來試試效果，再做細步調整。</p><p>如果有些標點符號沒有轉換成功的話，可以再進到 fontforge，依照上面分站的第一篇 偽直排：直書控的救星 裡頭的作法轉換。通常只需要再手動轉兩三個符號，不用兩三分鐘就可以完成。下面有比較常會出錯的字元列表。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7kqvUWu3foIbikqQUQhdOQ.png" /><figcaption>from: <a href="https://github.com/dpublishing/epub3guide/blob/master/tdpf-epub3guide.md">https://github.com/dpublishing/epub3guide/blob/master/tdpf-epub3guide.md</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=501e671219f2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/%E8%87%AA%E8%A3%BD%E5%81%BD%E7%9B%B4%E6%8E%92%E5%AD%97%E5%9E%8B-501e671219f2">自製偽直排字型</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JB Kindle Voyage 和 AskGPT plugin for KOReader]]></title>
            <link>https://medium.com/ereadertips/jb-kindle-voyage-%E5%92%8C-askgpt-plugin-for-koreader-17e17ce7bc39?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/17e17ce7bc39</guid>
            <category><![CDATA[e-ink]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[koreader]]></category>
            <category><![CDATA[kindle-voyage]]></category>
            <category><![CDATA[kindle]]></category>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Mon, 06 May 2024 03:02:20 GMT</pubDate>
            <atom:updated>2024-05-05T14:30:39.974Z</atom:updated>
            <content:encoded><![CDATA[<p>kindle voyage 買來有快十年了吧，隨著最近又買了 kindle scribe 和 kindle oasis3，以及對於 koreader 的熟悉程度愈來愈高，終於下定決心來越獄一下，為它安裝 koreader app。</p><p>jb 的過程有點煩瑣，不過，照著”書伴”網站上的教學一步步來，應該十幾二十分鐘可以搞定。裝好 koreader app 後，自然是先裝上前幾天研究好的直排 patch，再換上自己轉好的偽直排字型，從此，可以開心地用著它直排地看 epub 電子書了。</p><p><a href="https://bookfere.com/post/970.html">Kindle 通用越狱教程：适用固件版本 5.12.2.2~5.14.2</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5s6N20THFZ8SPSXuKa8kA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5Ym7U8_31Hwj-7T0pYwFQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KEivOCxms0BwIi73H-QpHw.jpeg" /></figure><p>另外，基於 koreader 強大的擴充性，有強者為它寫了 askGPT plugin。只要你有 OpenAI API key，就可以直接在 koreader 中跟 chatgpt 互動！我稍微調整了一下 UI，把 plugin 連結放在留言處。有興趣的人可以試試。</p><p>另外，因為 OpenAI API 是要錢的，如果大家會寫程式的話，可以考慮把 gpt_query.lua 中的 api entrypoint 改成 local 自建的 ollama api server 或是其他跟 openAI API 相容的 API server，就可以少一筆支出。(雖然目前 openai API 的收費已經便宜到不行)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OwhreO5kwQu_UBkw1SzRaA.png" /></figure><p>對了，另外跟大家分享一下小發現：</p><ol><li>如果在 kindle 上執行 koreader 的話，可以在 koreader 中自定休眠的圖案喔！可以用目前閱讀中的書籍封面、或是某個特定資料夾下的一堆圖片，或是以目前的畫面做為修眠畫面。還可以自訂在休眠時，畫面是不是要有個提醒的 message，像是 書中自有黃金屋 之類的。</li><li>koreader 對於許多系統(像是文石和 kindle)的畫面刷新都有支援，所以可以設定當點擊畫面某個區域，或是做了某個手勢之後，可以讓畫面全刷。對於不愛用懸浮球的我來說，這個功能在 kindle 和 文石機器 上很實用！(kindle 不太需要重刷畫面就是了)</li></ol><h3>相關連結</h3><p><a href="https://github.com/plateaukao/AskGPT">GitHub - plateaukao/AskGPT</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17e17ce7bc39" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/jb-kindle-voyage-%E5%92%8C-askgpt-plugin-for-koreader-17e17ce7bc39">JB Kindle Voyage 和 AskGPT plugin for KOReader</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[華為 Matepad Paper 快刷 App]]></title>
            <link>https://medium.com/ereadertips/%E8%8F%AF%E7%82%BA-matepad-paper-%E5%BF%AB%E5%88%B7-app-0641e4ddda3b?source=rss----202f2e33af7e---4</link>
            <guid isPermaLink="false">https://medium.com/p/0641e4ddda3b</guid>
            <dc:creator><![CDATA[Daniel Kao]]></dc:creator>
            <pubDate>Wed, 17 Apr 2024 13:31:57 GMT</pubDate>
            <atom:updated>2024-04-17T13:31:30.129Z</atom:updated>
            <content:encoded><![CDATA[<h3>我的 matepad paper 復活了！</h3><p>2022 年上半年發布的華為 matepad paper，因為是第一代產品，所以在軟體穩定度和完整度上，一直被使用者詬病；但是，它的硬體堪稱是當時最強的也不為過，就算是放到現在，也比大多數的閱讀器要強很多。</p><p>下面圖中我稍微裝了一下 geek bench 6 來跑一下 cpu 的性能，在跟右邊的 BOOX Tab Ultra C 做比較時，比分硬是高了快一倍。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4eaLRk1rPmxmiX-kG7OtjA.jpeg" /></figure><p>matepad paper 的硬體雖然很強，但是它為了追求無殘影的效果，只提供了使用者兩種刷新模式：普通模式和智慧模式。普通模式就是畫質最好的刷新方式，很適和在看靜態的內容；而智慧模式則是由系統幫你決定在什麼情況下，要不要用稍微快一點的刷新速度來處理畫面變化。</p><p>這個智慧模式的刷新速度跟文石的極速和快刷完全不行比，刷新速度相當慢，也因此，空有強大的 cpu 性能，在操作上總是會覺得它慢半拍。</p><h3>曙光</h3><p>不過，前幾天在網友的分享下，得知原來早在 2023 年初就有神人透過修改 app 的 package id (系統用來辨識 app 的 id) 欺騙系統，讓閱讀器以為當前的 app 是個影音播放 app，這時，matepad paper 就會進入”隱藏版”的刷新模式，達到類似一般文石系統的極速刷新模式。雖然這個模式下，殘影明顯地多了起來，但很多時候操作上的流暢性是勝於輕微的殘影的。</p><p>但是，這個作法的前提是要有辦法取得想要它刷新變快的 app 原始碼，自己重新修改過 package id 才行，沒辦法套用到一般從網路上抓到的 apk。</p><h3>希望</h3><p>這時，神人又找到了另一個作法，他去改了一個叫”屏幕濾鏡”的 app，這個 app 原先的作用是可以在畫面上蓋上一層膜，用來適度地調整畫面呈現的顏色，或是亮度。而這個機制剛好可以造成不管目前畫面上是哪個 app 在運作，都可以有快刷的效果。</p><p>不過，畢竟原先屏幕濾鏡不是要拿來做快刷的，所以在設定上很煩索。一般人要裝，在操作上也很麻煩；再者，這 app 中也多了一堆不需要的功能。</p><h3>自己動手作</h3><p>因此，在了解了它的運作方式後，我也自己寫了一個小程式專門來做這件事，讓操作的步驟變得簡單很多。而且，佔用的體積也從原本的 4MB 降到了 28 KB。(雖然這點不是很重要就是了)</p><p>結論是：目前 matepad paper 幾乎無敵啦，有好看的外表，有性能高的 CPU，還有隨時想快刷就快刷的作法，重量又輕(約360克而已，那些 400 多克的 10 吋機型請一邊排排站)。</p><p>附上程式(HWQuickRefresh)的連結，要使用的人，在安裝後執行它，會跳出需要允許 accessibility 的權限(因為要蓋在畫面上)。同意後，回到桌面，再切到”智慧模式”，大部分的 app 應該就是快刷模式。如果想臨時關掉，就切到一般模式；要整個關掉的話，就再點一次 HWQuickRefresh app，即可。</p><p>(ps. 如果執行時有遇到畫面全黑，可以從右上方下拉，進入 系統設定，再進入應用程式列表，把它反安裝就行)</p><h3>連結</h3><p><a href="https://github.com/plateaukao/AssistiveTouch/releases/tag/mp1.0">Release 華為 Matepad Paper 快刷模式 v1.0 · plateaukao/AssistiveTouch</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0641e4ddda3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ereadertips/%E8%8F%AF%E7%82%BA-matepad-paper-%E5%BF%AB%E5%88%B7-app-0641e4ddda3b">華為 Matepad Paper 快刷 App</a> was originally published in <a href="https://medium.com/ereadertips">電子書閱讀器使用心得及技巧分享</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>