升级后都是血泪啊,pocket的文章没法同步了。应该是加入了安卓类似的wifi检测。因为服务器被墙,就直接不同步,导致pocket失效。
然后,我就自己写脚本啊,反正也不复杂:
#!/bin/sh
ksmroot=${ksmroot:-"/adds/kbmenu"}
ksmuser=${ksmuser:-"/mnt/onboard/.adds/kbmenu_user"}
HOSTS="/etc/hosts"
MAIN="http://videolooks.herokuapp.com/extra/gethosts.php"
HOSTS_URL="$MAIN"
REMOTE_FILE=$ksmuser/scripts/users/hosts.tmp
KOBO_FILE=$ksmuser/scripts/users/hosts.kobo
kobohosttmp=$ksmuser/scripts/users/tmpkobohost
BACK_FILE=$ksmuser/scripts/users/hosts.bak
get_hosts()
{
wget ${HOSTS_URL} -O ${REMOTE_FILE}
theexitcode=$?
if [ "$theexitcode" -ne 0 ]
then
$ksmroot/kbmessage.sh "hosts download faild and exit code is $theexitcode" >&2
exit 2
fi
}
mv_hosts()
{
cat $REMOTE_FILE | grep kobo > $kobohosttmp
cat $BACK_FILE $kobohosttmp > $KOBO_FILE
rm $kobohosttmp
mv -f $KOBO_FILE $HOSTS
cpcode=$?
if [ "$cpcode" -ne 0 ]
then
$ksmroot/kbmessage.sh "copy faild and exit code is $cpcode" >&2
exit 2
else
$ksmroot/kbmessage.sh "-f $HOSTS"
fi
}
get_hosts
mv_hosts
替换hosts文件倒是成功了,然后找kobo 的配置文件,将它里面http的网站,全部替换成https。
同步了下,还是不行。为了验证替换是否正确,打开kobo自带的浏览器,访问kobo的官网,可以打开,看来是确认的url还是不能访问
然后我又翻腾了github,找到了这个koreader支持的开源项目,send2ebook,暂时用这个吧……