Posts tagged with “闲言碎语”

My New 'Toy' - E-ink Screen E-reader BOYUE LikeBook S61

As a software developer, I spend my working hours glued to screens, and in my downtime, it's either scrolling through social media or reading e-books, all on screens big and small. Often, before it's even time for a break, my eyes are already dry and strained. I can't help but reminisce about my old Kindle from years ago, lost goodness knows where. I need to get myself an e-ink device solely for reading, and it must run on Android so I can use my beloved KOReader on the ink screen.

With a limited budget and primarily for reading, my expectations aren't high: the screen doesn't need to be large, the CPU doesn't need to be powerful, but it'd be nice to have ample storage for books.

A search on AliExpress caught my eye with this BOYUE e-reader.

BOYUE LikeBook S61, 6-inch, 4-core 1.6G CPU, 1GB RAM, 16GB Storage NZ$ 102.97, with shipping $4.25 plus 15% GST, totaling $122.42.

Surely, this is a clearance sale of old machines. Because the description stated that the system is Android 4.4, quite outdated. But optimistically, I thought, there should be third-party ROMs for flashing, so I placed the order. The logistics were quite efficient this time, and after only about a dozen days, I received it on March 1st. The system is not 4.4 but even older, 4.2.2. After searching online, I couldn't find a suitable ROM for flashing. So, in the days after receiving the device, I had to make do and find software online that still supports Android 4.2.2 and meets my needs. This process wasn't smooth, and at one point, I even considered giving up and returning it. However, after the initial setbacks, things started to go more smoothly.

After some tinkering, using this device has become quite comfortable, dare I say, even enjoyable!

I'll spare you the details of the hardships endured during repeated attempts. Today's main purpose is to share my findings. If it helps any fellow buyer of this brand-new old machine, then I couldn't be happier.

  • Main reading program: koreader-v2023-06-1.apk
  • Launcher: Simple.ink.launcher.apk
  • SSH server: SimpleSSHD-27.apk
  • Browser: com.UCMobile.intl_11.4.apk
  • File Manager es-file-explorer-4-2.apkrelaunchx_200106000.apk
  • Mastodon client: tusky.apk

I'll find some time to bundle these APKs and throw them onto a rickety VPS for everyone to download. After all, finding these installation packages took quite a bit of my time.


2024-03-24 Update I've revised this list, packaged these APK files, and written a brief explanation. The download link is also in this explanation, so feel free to download if needed. Link to the explanation


我的新“玩具” - 电子墨水屏阅读器 BOYUE LikeBook S61 (Chinese Version)

身为软件开发者,我工作时盯着屏幕,工作之余除了刷社交媒体就是看电子书,还是大大小小的屏幕。往往不等到休息时间,眼睛就干涩得不行。我不禁怀念起我那台多年前就不知道丢到哪里的老Kindle。还是要整一台e-ink 设备专门读书,而且一定得是安卓系统,这样我就能在墨水屏上用我最爱的 KOReader阅读器读书了。

预算不多,而且主要是看书,我的期望值并不高:屏幕不必大,CPU也不求多块,但存书的空间最好能大一点。

AliExpress 上一通搜索,这台BOYUE 阅读器吸引住我的眼球。

BOYUE LikeBook S61 6 inch 4核1.6G CPU 1G RAM 16G Storage NZ$ 102.97 运费 $4.25 再加上 15% 的GST,到手价才 $122.42。

这定然是老机器清仓甩卖。因为描述里写系统是Android 4.4,相当老了。但乐观的我想,应该总能找到第三方ROM刷机吧,于是乎就下单了。这次物流蛮给力,只等了十几天,我3月1日就收到货了。系统不是 4.4, 而是更老的 4.2.2。网上一通搜索,并没有找到合适的ROM刷机。于是乎拿到机器这几天,我只能因陋就简,在网上找能满足我需要的尚支持 Android 4.2.2 版本的软件。这个过程并不顺利,我甚至一度考虑别折腾了,要不干脆退货算了。然而在最初的挫折之后,后面却是越来越顺利。

经过一番调教之后,这台机器用起来已经相当顺手,甚至可以说是舒适了!

中间反复尝试的艰辛略去不提,今天这篇主要是分享一下我的成果, 如果能帮到也买了这台全新的老机器的网友,那我就再开心不过了。

  • 主阅读程序 koreader-v2023-06-1.apk
  • Launcher Simple.ink.launcher.apk
  • SSH server, SimpleSSHD-27.apk
  • Browser, com.UCMobile.intl_11.4.apk
  • File Manager es-file-explorer-4-2.apkrelaunchx_200106000.apk
  • Mastodon client tusky.apk

抽时间我会将这些apk打个包扔我一台破VPS上供大家下载,毕竟找这些安装包花了我不少时间。


2024-03-24 Update 我修订了这个列表打包了这些apk文件,并写了一个简要的说明, 下载链接也在这个说明里,欢迎需要的朋友下载。

把博客的中文字体改成了汇文明朝体

这个博客使用了 Chyrp-lite 项目,当初之所以选择它,一方面觉得看上去还行,另一方面是因为它是 PHP 写的,而我曾经是一个老PHP程序员,这样万一遇到点什么小毛病可以自己改。我最近知道了一种新字体:汇文明朝体。怎么说呢,这个字体在八十年代相当流行。我那个时候读过的书,多是这种这种印刷体。不知道什么人把它搬到了互联网上,我先是把它用到了我最喜欢的读书app 多看阅读上,今天又琢磨把它移植到我的博客上。闲话少绪,说干就干, 在ChatGPT的帮助之下,把字体转成woff2格式,再改一个CSS文件,不到半小时就整好了。

--- a/themes/blossom/stylesheets/all.css
+++ b/themes/blossom/stylesheets/all.css
@@ -1,8 +1,16 @@
+@font-face {
+    font-family: 'Huiwen Mingchao font';
+    src: url('../../../fonts/汇文明朝体.woff2') format('woff');
+    font-weight: normal;
+    font-style: normal;
+    unicode-range: U+4E00-9FFF;
+}
 @font-face {
     font-family: 'Open Sans webfont';
     src: url('../../../fonts/OpenSans-Regular.woff') format('woff');
     font-weight: normal;
     font-style: normal;
+    unicode-range: U+0020-007E;
 }
 @font-face {
     font-family: 'Open Sans webfont';
@@ -58,8 +66,8 @@ html[lang="he"] {
     background-color: #208448;
 }
 body {
-    font-family: "Open Sans webfont", sans-serif;
-    font-size: 1rem;
+    font-family: "Huiwen Mingchao font", "Open Sans webfont", sans-serif;
+    font-size: 1.2rem;
     color: #1f1f23;
     line-height: 1.5;
     background-color: #f7f5ed;

小记:MacBook Pro Mid 2010 升级 512G 杂牌 SSD

最近 temu (拼多多海外版)很火,老是鼓动着我花钱。这不,满$150刀减$40的优惠券就在那儿晃啊晃,你说我是买啊还是买啊?当然是买买买了!正巧我的老MacBook Pro (Mid 2010) 硬盘才128G,而我的次老MacBook Pro(Mid 2015)硬盘也才256G,都该换了。但我并不想出太多血,所以下单了杂牌 Derlar 512G 和 1T硬盘各一支,又加了一个type-c接口的sd卡读卡器拼单,优惠后 $112.74 包邮。4月8号下的单,今天收到货,爽呆呆。

然而升级过程并非一帆风顺,中间冷汗也是流了不少。

我的这台机器,上次光驱换成128G SSD不久之后,老硬盘就不能识别了。我那会就把老硬盘拆掉当外置硬盘使用。

这次我打算先试试双硬盘,把新盘放到原来的硬盘位置,结果系统不认,小汗,不过因为之前老硬盘也出过时认时不认的问题,我并没有很担心。也许就是线坏了。把新盘换光驱位置,认出来了,开心!

但装系统仍然是个麻烦事。我的次老MacBook Pro是最新系统,而这台老MacBook Pro只支持到 High Sierra,我只好又把老SSD接回去,制作好USB引导盘。再把新硬盘装回去,眼看着顺利进入了系统安装界面,我就放心的出门散步去了。然而...

等我散步回来,机器是关机状态。不对啊。哦,其实不是关机状态,是无限重启状态。这可不是什么好现象。网上搜了一下,说啥的都有。最悲观的说法是硬盘不兼容。可别呀!

Option+Command+Shift+R 进去看了看,咦?新盘的文件系统我怎么用的是 Mac OS Extended (Journaled),记得从 High Sierra起改用APFS了不是?于是重新格式成APFS再安装一遍。漫长的等待之后,成了!

哼!想搞我,没那么容易。不过还是出了一身冷汗。毕竟退货啥的怪麻烦。

This site just moved to Oracle Cloud and upgrated to the latest chyrp-lite version (2023.01)

If you found anything unusal or incorrect, please press Ctrl+Shift+R to reload the page first. If you still found something wrong, please leave a comment here or contact me at telegram https://t.me/shukebeta

Many thanks

Why did I decide to move/upgrade?

Previously, this site is hosted at my home, on an old dell laptop (4G ram/250G hdd). In general, it works great. However, sometimes, housewife displug this laptop and forget to plug it back. It didn't happen often but it happened several times. Two days ago, we went camping and my wife turned off the whole wiring board to avoid some danger in her mind!

As wife is always right, I decided to move this site to one of the free VM on oracle cloud. And, it is done today! By the way, I upgraded this site to a most recent release. Hope you guys love it.

ChatGPT 帮我发布书摘

我更喜欢用 多看阅读 来读电子书。一方面阅读体验好,另一方面它支持扫描pdf重排。另外,多看的书摘格式即使导出到Email也挺赏心悦目的。许是已经年老的缘故,我最近在收集一些旧文,以及把我历年的读书书摘集中发布在我的blog上。我的blog的编辑器是一个比较简陋的 markdown编辑器,为了确保发布后能有相对美观的格式,我总要手工编辑一下,怪累的。

今天闲来无事,复制粘贴手工发布了几篇书摘后我想,哎,何不让chatGPT帮我写个脚本来简化我的工作。说干就干,于是花了一两个小时,让chatGPT给我写了以下两个脚本:

第一个,负责整理书摘的格式,我给取了个名字就叫 shuzhai

#!/bin/bash

# Check if filename is provided as parameter
if [ $# -ne 1 ]; then
  echo "Usage: $0 filename"
  exit 1
fi

filename="$1"

sed -i '/^$/d' "$filename"
# Add "书摘:" prefix to the first line
sed -i '1s/^/书摘:/' "$filename"
# Add "作者:" prefix to the second line
sed -i '2s/^/作者:/' "$filename"

# Insert an extra empty line before the last non-empty line of the file
sed -i -e ':a' -e '$!{N;ba}' -e 's/\(\S.*\)\n/\1\n\n/' "$filename"

# Run the first sed command to add an extra empty line before the date time
sed -i 's/\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\) [0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}/\n&/' "$filename"

# Run the second sed command to add two spaces at the end of each non-empty line
sed -i '/^$/!s/$/  /' "$filename"

第二个脚本,我叫它 publish_shuzhai_to_blog, 它调用前面的 shuzhai脚本,并自动将书摘内容发到我的blog站点。

#!/bin/bash

# Check if filename is provided as parameter
if [ $# -ne 1 ]; then
  echo "Usage: $0 filename"
  exit 1
fi

filename="$1"

if [ ! -f "$filename" ]; then
  echo "File not found: $filename"
  exit 1
fi

if ! [ -r "$filename" ]; then
  echo "File not readable: $filename"
  exit 1
fi

# Check that the file is a text file
if ! file "$filename" | grep -q "text"; then
  echo "Not a text file: $filename"
  exit 1
fi

# Create the logs directory if it doesn't exist
LOG_DIR=~/logs
if [ ! -d "$LOG_DIR" ]; then
  mkdir "$LOG_DIR"
fi

# Create an empty log file if it doesn't exist
LOG_FILE="$LOG_DIR/$(basename "$0").log"
if [ ! -f "$LOG_FILE" ]; then
  touch "$LOG_FILE"
fi

# read the text file and extract the first line as the POST_TITLE
POST_TITLE=$(head -n 1 $1)

# Check if the new file's title is the same as the last processed title
if [ -s "$LOG_FILE" ]; then
  LAST_TITLE=$(tail -n 1 "$LOG_FILE")
  if [ "$LAST_TITLE" = "$POST_TITLE" ]; then
    echo "Error: Duplicate title detected: $POST_TITLE"
    exit 1
  fi
fi

# format the file first
~/bin/shuzhai "$filename"

# re-read the first line as title, as we add "书摘:" as a prefix to the title
POST_TITLE=$(head -n 1 $1)

# Log the new title
echo "$POST_TITLE" >> "$LOG_FILE"

# set the URL of the blog site
BLOG_URL='https://blog.shukebeta.com/admin/add_post/'

# read the rest as the POST_BODY
POST_BODY=$(tail -n +2 $filename)

# build the data for the curl request
DATA=$(cat <<EOF
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="title"

${POST_TITLE}
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="body"

${POST_BODY}
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="status"

public
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="slug"


------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="created_at"

$(date +"%Y-%m-%d %H:%M:%S")
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="option[comment_status]"

open
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="tags"

中文, 书摘
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="option[category_id]"

3
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="feather"

text
------WebKitFormBoundaryEznVwciBsbYrRkwB
Content-Disposition: form-data; name="hash"

28ccc1f365e2781c9b0877badb3349cc5ce9945a
------WebKitFormBoundaryEznVwciBsbYrRkwB--
EOF
)

# send the curl request
curl -X POST "${BLOG_URL}" \
     -H 'origin: https://blog.shukebeta.com' \
     -H 'referer: https://blog.shukebeta.com/admin/' \
     -H 'cookie: there is only a place-holder, hahahaha' \
     -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryEznVwciBsbYrRkwB" \
     -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" \
     --data "${DATA}"

这两个脚本要是我自己来写,怕是要花一整天。感叹!