Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monty5811/elm-bible
https://github.com/monty5811/elm-bible
bible elm scripture
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/monty5811/elm-bible
- Owner: monty5811
- License: mit
- Created: 2017-10-06T13:54:11.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T07:02:58.000Z (almost 5 years ago)
- Last Synced: 2023-08-25T18:55:54.749Z (over 1 year ago)
- Topics: bible, elm, scripture
- Language: Elm
- Homepage: http://package.elm-lang.org/packages/monty5811/elm-bible/1.0.0/Bible
- Size: 78.1 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-bible
[![Build Status](https://semaphoreci.com/api/v1/monty5811/elm-bible/branches/master/badge.svg)](https://semaphoreci.com/monty5811/elm-bible)
Parse and format Bible references in Elm.
## Features
- Parse a reference from a string
- Nicely format a reference to a string
- Convert a reference to an encoded representation for sorting/comparing/storageThe following reference formats can be parsed:
- Genesis 1
- Genesis 1:1
- Genesis 1:1-20
- Genesis 1:20-2:24
- Genesis 1-5
- Genesis 1 - Exodus 5
- Genesis 1:1 - Exodus 5:20
- Genesis 1:1 - Exodus 5
- Genesis 1 - Exodus 5:20## Examples
```elm
(fromString "Gen 1:1" |> Result.map format)
== Ok "Genesis 1:1"(fromString "Gen 1:1 - Rev 5") |> Result.map format)
== Ok "Genesis 1:1 - Revelation 5:14"(fromString "Gen 1:1 - Rev 5") |> Result.map encode)
== Ok {start = 1001001, end = 66005014}```
## Contributing
Contributions welcome, please [open an issue](https://github.com/monty5811/elm-bible/issues/new) to get started.