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