圣经参考CLI应用程序

pybible-cli的Python项目详细描述


test

Pybible cli-圣经参考

pybible cli是参考圣经书籍、章节和经文的基本模块。使用命令行,可以引用King James Bible。在

安装

您可以从PyPI安装pybible cli:pip install pybible-cli

此模块至少需要Python版本3。在

如何使用

pybible cli是一个命令行应用程序,名为pybible。要引用(在终端上打印)经文、章节、书籍甚至整本圣经,只需调用命令:

$ pybible
In the beginning God created the heaven and the earth.
...
The grace of our Lord Jesus Christ be with you all. Amen.

可以参考上面的整本圣经或只是其中的一部分,例如:

参考旧约:

^{pr2}$

参考新约:

$ pybible -nt
The book of the generation of Jesus Christ, the son of David, the son of Abraham.
...
The grace of our Lord Jesus Christ be with you all. Amen.

参考约翰的书:

$ pybible --book john
In the beginning was the Word, and the Word was with God, and the Word was God.
...
And there are also many other things which Jesus did, the which, if they should be written every one, I suppose that even the world itself could not contain the books that should be written. Amen.

参考约翰书第三章:

$ pybible --chapter john 3
There was a man of the Pharisees, named Nicodemus, a ruler of the Jews:
...
He that believeth on the Son hath everlasting life: and he that believeth not the Son shall not see life; but the wrath of God abideth on him.

参考约翰书第三章第四节:

$ pybible --verse john 3 4
Nicodemus saith unto him, How can a man be born when he is old? can he enter the second time into his mother's womb, and be born?

获取一个带有--qotd参数的随机韵文:

$ pybible --qotd
"And the house which I build is great: for great is our God above all gods." - 2 Chronicles 2:5 (King James Bible)    

可以添加参数以包括输出上的引用(-r--reference),并计算被引用内容的大小(-s--size)。在

如需帮助,请执行:

$ pybible -h
usage: pybible [-h] [--bible BIBLE]
               [-ot | -nt | --qotd | --book BOOK_NAME | --chapter BOOK_NAME CHAPTER_NUMBER | --verse BOOK_NAME CHAPTER_NUMBER VERSE_NUMBER]
               [-r] [-s]

Bible reference

optional arguments:
  -h, --help            show this help message and exit
  --bible BIBLE         Bible version to use
  -ot, --old_testament  Reference the old testament
  -nt, --new_testament  Reference the new testament
  --qotd                Quote a single, random verse
  --book BOOK_NAME      Reference book
  --chapter BOOK_NAME CHAPTER_NUMBER
                        Reference book and chapter
  --verse BOOK_NAME CHAPTER_NUMBER VERSE_NUMBER
                        Reference book, chapter and verse
  -r, --reference       Include book, chapter number and verse reference
  -s, --size            Size of bible, book, chapter or vere referenced

✞

您也可以在python代码中使用pybible-cli来引用圣经,只需从pybible包导入pybible_load模块:

>>> from pybible import pybible_load
>>> bible = pybible_load.load()
>>> bible.name
'King James Bible'

贡献

如果您喜欢这个模块,可以随意贡献并使pybible-cli模块成为python圣经参考模块(这就是目标)。在

此时只有一个圣经版本可用(King James版本),您可以帮助向该模块添加更多版本的圣经,只需遵循classes包中的OOP结构并将其pickle到一个文件中。在

有些性能问题涉及取消拾取,您也可以帮助解决;)

请随时与我联系,寻求新的功能和想法。。。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java随机填充2d数组   java运行时。getRuntime。带有长参数的exec(cmd)   java Minecraft无法放置自定义背景   java AChartEngine YAxis自定义标签区域边距和图表值为字符串?   泛型类的java类型安全错误   整数的java符号等价物。toBinaryString方法?   Java中数组列表的数组   java WebView应用程序在谷歌登录后显示空白屏幕   java从backback中删除特定片段   如果服务器不支持使用的协议,java JSSE是否实现回退?   java Sonarqube正在进行核心漏洞查找。如何解决   javajavax。jcr。UnsupportedPositionOperationException:testVersionable处的节点不可版本化   java在安卓中每隔X小时运行一次文件/函数,无需打开应用程序   java如何为磁盘持久性配置BigMemory?   java BufferWriter不转换383以上的整数   Java7交集类型:规范具体说明了什么?   Java:CollectionHow创建多列   java如何检测运算符的空白   java问题:在firebase中为导航栏中的第二个表单提交数据第一个表单工作正常。实际isse是连接Mainactivity中的另一个活动