История изменений
Исправление saahriktu, (текущая версия) :
Cool Reader.
Сам юзаю скрипты
#!/bin/bash
SOURCE_ENCODING=`grep encoding= $1 | sed 's/^.*encoding=\"//;s/\".*$//'`
DEST_FILE=`basename $1 .fb2`
sed -i 's/<binary.*binary>//g' $1
lynx -dump -force_html -width=120 -assume_charset=$SOURCE_ENCODING $1 > $DEST_FILE
#!/bin/bash
#
# Afrosnakebot v0.1
# bash script for removing images in base64 after dumping fb2 files to plain text
# 2013 (c) Kurashov A.K., under GNU GPLv3
if [ "$#" -lt 1 ]; then
echo "usage: afrosnakebot file"
exit
fi
BASE64IMAGEFIRSTLINE=`sed -n "/\/9j\//=" $1 | head -n 1`
if [ "$BASE64IMAGEFIRSTLINE" != "" ]; then
echo "$BASE64IMAGEFIRSTLINE,\$d" | sed -f - -i $1
exit
fi
BASE64IMAGEFIRSTLINE=`sed -n "/iVBORw0KGgoAAAANSUhEUgAA/=" $1 | head -n 1`
if [ "$BASE64IMAGEFIRSTLINE" != "" ]; then
echo "$BASE64IMAGEFIRSTLINE,\$d" | sed -f - -i $1
fi
После чего читаю less'ом.
Исходная версия saahriktu, :
Cool Reader.
Сам юзаю скрипты
#!/bin/bash
SOURCE_ENCODING=`grep encoding= $1 | sed 's/^.*encoding=\"//;s/\".*$//'`
DEST_FILE=`basename $1 .fb2`
sed -i 's/<binary.*binary>//g' $1
lynx -dump -force_html -width=120 -assume_charset=$SOURCE_ENCODING $1 > $DEST_FILE
> cat x4021/scripts/afrosnakebot
#!/bin/bash
#
# Afrosnakebot v0.1
# bash script for removing images in base64 after dumping fb2 files to plain text
# 2013 (c) Kurashov A.K., under GNU GPLv3
if [ "$#" -lt 1 ]; then
echo "usage: afrosnakebot file"
exit
fi
BASE64IMAGEFIRSTLINE=`sed -n "/\/9j\//=" $1 | head -n 1`
if [ "$BASE64IMAGEFIRSTLINE" != "" ]; then
echo "$BASE64IMAGEFIRSTLINE,\$d" | sed -f - -i $1
exit
fi
BASE64IMAGEFIRSTLINE=`sed -n "/iVBORw0KGgoAAAANSUhEUgAA/=" $1 | head -n 1`
if [ "$BASE64IMAGEFIRSTLINE" != "" ]; then
echo "$BASE64IMAGEFIRSTLINE,\$d" | sed -f - -i $1
fi