GithubHelp home page GithubHelp logo

bibish's Introduction

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.

bibish's People

Contributors

arraybolt3 avatar judahsshadow avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

arraybolt3

bibish's Issues

Module list can be wider than terminal

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.

Searching with no results provides no feedback.

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.

Genbook TOC skips first nodes on each branch

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:

  1. select a genbook or essay module
  2. issue show TOC command
  3. verify output with another front-end to see missing nodes.

Segfault in Parser::parseCommand due to improper input validation

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:

  1. Compile bibish from git master.
  2. Run it on a machine with no modules installed.
  3. Run ?.
  4. Run 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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.