Skip to content

v-bible/go-sdk

Repository files navigation

go-sdk

Golang SDK for v-bible

contributors last update forks stars open issues license


📔 Table of Contents

🧰 Getting Started

‼️ Prerequisites

  • Go: 1.23.4.

  • Go tools:

    All required Go tools is placed in internal/tools/tools.go:

    make download-deps

Note

These dependencies are not included during build.

🏃 Run Locally

Clone the project:

git clone https://github.com/v-bible/go-sdk.git

Go to the project directory:

cd go-sdk

Install dependencies:

go mod download

👀 Usage

Utils

Process Verse

Convert verse data to markdown and HTML format.

Note

For markdown format, your markdown processor SHOULD support GFM footnotes.

Verse Parse

This util comply with the Biblical References: Format, Examples, History format.

You can use function NormalizeQueryUs or NormalizeQueryEu to normalize query to smaller chapters, ensuring each chapters will have start and end verse. The * means taking all verses. For example:

American Abbr. NormalizeQueryUs Biblical Passage European Abbr. NormalizeQueryEu
John 9 9:*-* The Gospel according to John, chapter 9 John 9 9,*-*
John 9, 12 9:*-*;12:*-* John, chapters 9 and 12 (two chapters only) John 9; 12 9,*-*;12,*-*
John 9--12 9:*-*;10:*-*;11:*-*;12:*-* John, chapters 9 through 12 (four chaps. total) John 9--12 9,*-*;10,*-*;11,*-*;12,*-*
John 9:12 9:12-12 John, chapter 9, verse 12 (only one verse) John 9,12 9,12-12
John 9:12b 9:12b-12b John, chapter 9, only the second part of verse 12 John 9,12b 9,12b-12b
John 9:1, 12 9:1-1;9:12-12 John, chapter 9, verses 1 and 12 only John 9,1.12 9,1-1;9,12-12
John 9:1-12 9:1-12 John, chapter 9, the passage from verse 1 to verse 12 John 9,1-12 9,1-12
John 9:1-12, 36 9:1-12;9:36-36 John, chapter 9, from verse 1 to verse 12, and verse 36 John 9,1-12.36 9,1-12;9,36-36
John 9:1; 12:36 9:1-1;12:36-36 John, only the two verses 9:1 and 12:36 John 9,1; 12,36 9,1-1;12,36-36
John 9:1--12:36 9:1-*;10:*-*;11:*-*;12:*-36 John, the whole section from 9:1 to 12:36 John 9,1--12,36 9,1-*;10,*-*;11,*-*;12,*-36
John 9:1-12; 12:3-6 9:1-12;12:3-6 John, the two passages 9:1-12 and 12:3-6 John 9,1-12; 12,3-6 9,1-12;12,3-6
John 9:1-3, 6-12; 12:3-6 9:1-3;9:6-12;12:3-6 three passages: John 9:1-3; and 9:6-12; and John 12:3-6 John 9,1-3.6-12; 12,3-6 9,1-3;9,6-12;12,3-6
John 9:1-3, 6-12--12:3-6 (Additional) 9:1-3;9:6-*;10:*-*;11:*-*;12:*-6 John, passage 9:1-3, whole section from 9:6 to 12:6 John 9,1-3.6-12--12,3-6 9,1-3;9,6-*;10,*-*;11,*-*;12,*-6
John 9:12-13 9:12-13 John, chapter 9, verses 12 and 13 ("12 and following") John 9,12f Not supported
not used; better to list exact verse #s Not supported John, chapter 9, verse 12 "and the following verses"; but how many? the end of the text is not specified! John 9,12ff Not supported

Note

For chapter range, you MUST use -- (two hyphens) not special characters, the same for verse range -.

For parsing verses:

  • Each verses will have Number and Order, with Order starts from 0 for a, 1 for b, 2 for c, etc.
  • * is converted to Number: -1 and Order :-1.
  • 9:12b is converted Number: 12 and Order :1.

🧭 Roadmap

  • ktcgkpv: Add footnotes for proper names.
  • Add tests.

👋 Contributing

Contributions are always welcome!

Please read the contribution guidelines.

📜 Code of Conduct

Please read the Code of Conduct.

⚠️ License

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License.

License: CC BY-NC-SA 4.0.

See the LICENSE.md file for full details.

🤝 Contact

Duong Vinh - tienvinh.duong4@gmail.com

Project Link: https://github.com/v-bible/go-sdk.

💎 Acknowledgements

Here are useful resources and libraries that we have used in our projects:

About

Golang SDK for v-bible

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •