baca
1.0.0
baca
:TUI电子书阅读器认识epy的可爱姐姐baca
,让您舒适地让您沉迷于自己喜欢的电子书。但是,凭借时尚而现代的外观一定会吸引您!
python>=3.10
pip install baca
pip install git+https://github.com/wustho/baca
yay -S baca-ereader-git
# to read an ebook
baca path/to/your/ebook.epub
# to read your last read ebook, just run baca without any argument
baca
# to see your reading history use -r as an argument
baca -r
# say you want to read an ebook from your reading history,
# but you forgot the path to your ebook
# just type any words you remember about your ebook
# and baca will try to match it to path or title+author
baca doc ebook.epub
baca alice wonder lewis carroll
要打开图像,当您遇到ANSI映像时(当ShowImageAsANSI=yes
)或类似的东西(如果ShowImageAsANSI=no
):
┌──────────────────────────────────────────────────────────────────────────────┐
│ IMAGE │
└──────────────────────────────────────────────────────────────────────────────┘
只需使用鼠标单击它,它将使用系统应用程序打开图像。是的,我知道您也想为此使用键盘,但现在要忍受。
“为什么将图像显示为ANSI图像,而不是像Ranger一样直接在终端上呈现?”
主要原因是,当前,直接在终端上渲染图像不允许部分滚动图像。这意味着我们不能在滚动时仅显示图像的一部分(例如,30%),从而导致破损而无缝的滚动体验。
我开发此应用程序的主要目的是阅读小说电子书,而不是技术书籍,而大多数小说电子书都不包含很多图像。
在终端上显示图像需要为各种终端模拟器进行不同的实现,这需要大量维护。
~/.config/baca/config.ini
的配置文件可用于Linux用户。这是默认值:
[General]
# pick your favorite image viewer
PreferredImageViewer = auto
# int or css value string like 90%%
# (escape percent with double percent %%)
MaxTextWidth = 80
# 'justify', 'center', 'left', 'right'
TextJustification = justify
# currently using pretty=yes is slow
# and taking huge amount of memory
Pretty = no
PageScrollDuration = 0.2
# either show image as ansii image
# or text 'IMAGE' as a placehoder
# (showing ansii image will affect
# performance & resource usage)
ShowImageAsANSII = yes
[Color Dark]
Background = # 1e1e1e
Foreground = # f5f5f5
Accent = # 0178d4
[Color Light]
Background = # f5f5f5
Foreground = # 1e1e1e
Accent = # 0178d4
[Keymaps]
ToggleLightDark = c
ScrollDown = down,j
ScrollUp = up,k
PageDown = ctrl+f,pagedown,l,space
PageUp = ctrl+b,pageup,h
Home = home,g
End = end,G
OpenToc = tab
OpenMetadata = M
OpenHelp = f1
SearchForward = slash
SearchBackward = question_mark
NextMatch = n
PreviousMatch = N
Confirm = enter
CloseOrQuit = q,escape
Screenshot = f12
在搜索baca
中的特定短语时,请记住,如果它们跨越两行,它可能找不到它们,就像编辑VI(M)的搜索行为一样。
例如, baca
将无法找到"for it"
的短语,因为在此示例中,它被分为两行。
...
she had forgotten the little golden key, and when she went back to the table for
it, she found she could not possibly reach it: she could see it quite plainly
...
此外, baca
可能会因对文本辩护的调整而难以找到某些短语。参见上面的示例, "see_it"
可能会因单词之间的调整间距而变为"see__it"
。在这种情况下,使用正则搜索"see +it"
或简单地搜索单独的单词"see"
可能更有效。
总体而言, baca
的搜索功能最有效地定位单个单词,而不是可以跨多行或受文本辩护影响的短语。
与EPY相比,目前baca
缺少一些功能。但是,这些计划在不久的将来将其实施到baca
:
GPL-3