{"id":13501248,"url":"https://github.com/wustho/baca","last_synced_at":"2025-04-04T09:08:13.673Z","repository":{"id":150595223,"uuid":"618341289","full_name":"wustho/baca","owner":"wustho","description":"TUI Ebook Reader","archived":false,"fork":false,"pushed_at":"2024-03-05T02:57:52.000Z","size":242,"stargazers_count":408,"open_issues_count":7,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T08:05:02.674Z","etag":null,"topics":["ebook","epub","mobi","reader","terminal-based","tui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wustho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T09:05:32.000Z","updated_at":"2025-03-24T13:58:52.000Z","dependencies_parsed_at":"2023-11-21T01:42:09.719Z","dependency_job_id":"521aaf97-daca-4114-a110-5c613b745c91","html_url":"https://github.com/wustho/baca","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wustho%2Fbaca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wustho%2Fbaca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wustho%2Fbaca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wustho%2Fbaca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wustho","download_url":"https://codeload.github.com/wustho/baca/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebook","epub","mobi","reader","terminal-based","tui"],"created_at":"2024-07-31T22:01:30.463Z","updated_at":"2025-04-04T09:08:13.648Z","avatar_url":"https://github.com/wustho.png","language":"Python","readme":"# `baca`: TUI E-book Reader\n\n![baca_screenshots](https://github.com/wustho/baca/assets/43810055/82d5beb0-d061-4e4c-82ed-a3bd84074d2f)\n\nMeet `baca`, [epy](https://github.com/wustho/epy)'s lovely sister who lets you indulge\nin your favorite e-books in the comfort of your terminal.\nBut with a sleek and contemporary appearance that's sure to captivate you!\n\n## Features\n\n- Formats supported: Epub, Epub3, Mobi \u0026 Azw\n- Remembers last reading position\n- Show images as ANSI image \u0026 you can click it for more detail\n- Scroll animations\n- Clean \u0026 modern looks\n- Text justification\n- Dark \u0026 light color scheme\n- Regex search\n- Hyperlinks\n\n## Requirements\n\n- `python\u003e=3.10`\n\n## Installation\n\n- Via pip: `pip install baca`\n- Via git: `pip install git+https://github.com/wustho/baca`\n- Via AUR: `yay -S baca-ereader-git`\n\n## Usage\n\n```sh\n# to read an ebook\nbaca path/to/your/ebook.epub\n\n# to read your last read ebook, just run baca without any argument\nbaca\n\n# to see your reading history use -r as an argument\nbaca -r\n\n# say you want to read an ebook from your reading history,\n# but you forgot the path to your ebook\n# just type any words you remember about your ebook\n# and baca will try to match it to path or title+author\nbaca doc ebook.epub\nbaca alice wonder lewis carroll\n```\n\n## Opening an Image\n\nTo open an image, when you encounter an ANSI image (when `ShowImageAsANSI=yes`) or some thing like this\n(if `ShowImageAsANSI=no`):\n\n```\n┌──────────────────────────────────────────────────────────────────────────────┐\n│                                    IMAGE                                     │\n└──────────────────────────────────────────────────────────────────────────────┘\n```\n\njust click on it using mouse and it will open the image using system app.\nYeah, I know you want to use keyboard for this, me too, but bear with this for now.\n\n\u003e \"Why show the images as ANSI images instead of render it directly on terminal like ranger does?\"\n\n1. The main reason is that currently, rendering images directly on the terminal\n   doesn't allow for partial scrolling of the image.\n   This means that we can't display only a portion (e.g., 30%) of the image when scrolling,\n   resulting in a broken and non-seamless scrolling experience.\n\n2. My primary intention in developing this app is for reading fiction e-books rather than technical ones,\n   and most fiction e-books don't contain many images.\n\n3. Displaying images on the terminal requires different implementations for various terminal emulators,\n   which requires a lot of maintenance.\n\n## Configurations\n\n![pretty_yes_no_cap](https://user-images.githubusercontent.com/43810055/228417623-ac78fb84-0ee0-4930-a843-752ef693822d.png)\n\nConfiguration file available at `~/.config/baca/config.ini` for linux users. Here is the default:\n\n```ini\n[General]\n# pick your favorite image viewer\nPreferredImageViewer = auto\n\n# int or css value string like 90%%\n# (escape percent with double percent %%)\nMaxTextWidth = 80\n\n# 'justify', 'center', 'left', 'right'\nTextJustification = justify\n\n# currently using pretty=yes is slow\n# and taking huge amount of memory\nPretty = no\n\nPageScrollDuration = 0.2\n\n# either show image as ansii image\n# or text 'IMAGE' as a placehoder\n# (showing ansii image will affect\n# performance \u0026 resource usage)\nShowImageAsANSII = yes\n\n[Color Dark]\nBackground = #1e1e1e\nForeground = #f5f5f5\nAccent = #0178d4\n\n[Color Light]\nBackground = #f5f5f5\nForeground = #1e1e1e\nAccent = #0178d4\n\n[Keymaps]\nToggleLightDark = c\nScrollDown = down,j\nScrollUp = up,k\nPageDown = ctrl+f,pagedown,l,space\nPageUp = ctrl+b,pageup,h\nHome = home,g\nEnd = end,G\nOpenToc = tab\nOpenMetadata = M\nOpenHelp = f1\nSearchForward = slash\nSearchBackward = question_mark\nNextMatch = n\nPreviousMatch = N\nConfirm = enter\nCloseOrQuit = q,escape\nScreenshot = f12\n```\n\n## Known Limitations\n\n- When searching for specific phrases in `baca`,\n  keep in mind that it may not be able to find them if they span across two lines,\n  much like in the search behavior of editor vi(m).\n\n  For example, `baca` won't be able to find the phrase `\"for it\"` because it is split into two lines\n  in this example.\n\n  ```\n  ...\n  she had forgotten the little golden key, and when she went back to the table for\n  it, she found she could not possibly reach it: she could see  it  quite  plainly\n  ...\n  ```\n\n\n  Additionally, `baca` may struggle to locate certain phrases due to adjustments made for text justification.\n  See the example above, `\"see_it\"` may become `\"see__it\"` due to adjusted spacing between words.\n  In this case, it may be more effective to use a regex search for `\"see +it\"` or simply search for the word `\"see\"` alone.\n\n  Overall, `baca`'s search feature is most effective for locating individual words\n  rather than phrases that may be split across multiple lines or impacted by text justification.\n\n- Compared to [epy](https://github.com/wustho/epy), currently `baca` has some missing features.\n  But these are planned to be implemented to `baca` in the near future:\n\n  - [ ] **TODO** Bookmarks\n  - [ ] **TODO** FictionBook support\n  - [ ] **TODO** URL reading support\n\n## Credits\n\n- Thanks to awesome [Textual Project](https://github.com/Textualize/textual)\n- [Kindle Unpack](https://github.com/kevinhendricks/KindleUnpack)\n- And many others!\n\n## License\n\nGPL-3\n\n","funding_links":[],"categories":["Python","\u003ca name=\"viewers\"\u003e\u003c/a\u003eViewers"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwustho%2Fbaca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwustho%2Fbaca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwustho%2Fbaca/lists"}