judahsshadow / bibish Goto Github PK
View Code? Open in Web Editor NEWBIBISH is [a] Bible Interactive SHell
License: GNU General Public License v2.0
BIBISH is [a] Bible Interactive SHell
License: GNU General Public License v2.0
BIBISH Is [a] Bible Interactive SHell. It is a front-end to the SWORD Project library inspired by the bible package in Debian GNU/Linux. The basic commands are: quit - Exits the program. list - Lists installed modules (bibles by default) and their short names for the select command. Takes arguments of bible, commentaries, devotions, books, dictionaries, lexicons, unorthodox, glossaries, essays Any other arguments will result in the list of bibles being displayed. select - Selects a module for use. Takes argument of a module short name. Short name is case sensitive. show - Shows a passage or entry with the selected work. Takes argument of a range of scripture for bibles and commentaries, a key for lexicons or dictionaries, a date in the format of MM.DD for devotions, and a key path for general books. For general books or essays, a special argument of TOC may be supplied to get the table of contents of the selected book/essay, which will show the keypath for all items in the book. Given how long key paths for books can be, it is currently recommended to paste the key path from the show TOC command if your terminal supports that. help - Displays basic help message. Accepts an argument of about to display version and license information. search - Searches for a multi-word phrase in the selected version Takes argument of multi for multi-word search, exact for exact phrase search, regex for regular expression search, and the word(s) or phrase(s) to search for. Currently searches the whole module. Currently searches are case insensitive read - Starts at a given key (reference) and proceeds to display the entire module from there. Be careful with this command as it loads the entire module into memory and will eat up your processor and RAM while doing it. The read command is not recommended for modules of type genbook (General Book modules) due to the size of those modules. about - Shows some basic information about the application, including license and version information. devo - Shows the daily devotional for a given month and day in either the full month name, or three letter abbreviation followed by a day, (i.e. February 24 or Jan 31), or a date in the format MM.DD (i.e. 04.21). This command will also accept today, yesterday, and tomorrow as arguments and show the entry for those days. Defaults to showing today if no argument is given. If a work other than a dauly devotional is selected, then the module will display the nearest match to the key provided in the argument. gloss - Shows the glossary entry for a given word. This is different from the show command, in that, it will also display the to/from languages, where show only shows the key text and the entry. info - Shows information about the currently selected module. Takes copyright as an argument to show copyright and distribution information about the module.
For small terminal windows the list of modules can be wider than available terminal width. This causes the top of the screen to be pushed off screen.
Issue: Searches returning no results just go back to the prompt with no feedback that nothing was found. Additionally, no spacing appears between the header and the prompt.
Steps to reproduce: Search for words not occuring in the text.
Appears to happen during double newline detection.
Expected behavior: Each node in the tree is displayed on "show toc"
Actual behavior: The first node in each branch is skipped.
Steps to reproduce:
First access of a module doesn't show key. Sometimes previously entered keys are displayed
Summary:
bibish does not check to see if any arguments were passed to a command given to it before it attempts to parse what those arguments are. This results in invalid accesses and can result in a segfault.
Steps to reproduce:
?
.list
.Expected result: You should be informed that no modules are installed.
Actual result: Segmentation fault.
Additional info:
gdb points to the segfault occurring in src/parser.cpp:97
, where bibish compares the first argument passed to list
to see if it is the string bibles
. However as no arguments were passed to list
, argumentPart
is an empty std::list
and argumentPart.front()
appears to return an invalid value. When list
is run as the first command to bibish, whatever that invalid value is doesn't seem to cause much trouble, but if you run ?
first, something in memory changes and bibish crashes when attempting to do the comparison.
Looking at parser.cpp
, it looks like none of the commands check their argument count before attempting to parse them. This does indeed cause more issues - I can cause a similar but not identical crash running select
(with no arguments) immediately after running ?
.
I haven't looked closely enough at the rest of the code to know how exactly to guard against this, but I intend to.
Nice app by the way, I'm liking it so far :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.