Skip to content

Commit

Permalink
code reformatted using yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
lsaffre committed Feb 14, 2024
1 parent 7163dc6 commit af308dc
Show file tree
Hide file tree
Showing 20 changed files with 188 additions and 190 deletions.
40 changes: 14 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

intersphinx_mapping = {}
from rstgen.sphinxconf import interproject
interproject.configure(
globals(), 'atelier lino_book lino_logos')

interproject.configure(globals(), 'atelier lino_book lino_logos')

from lino.sphinxcontrib import configure
configure(globals(),'lino_logos.projects.sacred.settings.demo')

configure(globals(), 'lino_logos.projects.sacred.settings.demo')

from django.conf import settings
settings.SITE.title = "Lino-Logos Reference Manual"

settings.SITE.title = "Lino-Logos Reference Manual"

# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
Expand All @@ -36,21 +36,20 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
#~ extensions = [
#~ 'sphinx.ext.autodoc',
#~ 'sphinx.ext.autosummary',
# 'sphinx.ext.inheritance_diagram',
# 'sphinx.ext.todo',
#~ 'sphinx.ext.extlinks',
#~ 'sphinx.ext.graphviz',
#~ 'sphinx.ext.intersphinx',
#~ 'sphinx.ext.doctest',
#~ 'sphinx.ext.autodoc',
#~ 'sphinx.ext.autosummary',
# 'sphinx.ext.inheritance_diagram',
# 'sphinx.ext.todo',
#~ 'sphinx.ext.extlinks',
#~ 'sphinx.ext.graphviz',
#~ 'sphinx.ext.intersphinx',
#~ 'sphinx.ext.doctest',
#~ ]

#~ extensions.append('sphinxcontrib.autorun')

# extensions.append('rstgen.sphinxconf')


# Add any paths that contain templates here, relative to this directory.
# templates_path = ['.templates']

Expand All @@ -68,7 +67,6 @@
# The short X.Y version.
version = '.'.join(release.split('.')[:2])


# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'
Expand All @@ -82,12 +80,10 @@
# List of documents that shouldn't be included in the build.
#unused_docs = []


exclude_patterns = [
'include/*',
]


# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None

Expand All @@ -105,7 +101,6 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'


# Options for HTML output
# -----------------------

Expand Down Expand Up @@ -149,17 +144,15 @@
# Custom sidebar templates, maps document names to template names.
# http://sphinx.pocoo.org/latest/config.html#confval-html_sidebars
html_sidebars = {
'**': ['globaltoc.html', 'searchbox.html', 'links.html'],
'**': ['globaltoc.html', 'searchbox.html', 'links.html'],
}


# Additional templates that should be rendered to pages, maps page names to
# template names.
#~ html_additional_pages = {
#~ '*': 'links.html',
#~ '*': 'links.html',
#~ }


# If false, no module index is generated.
html_use_modindex = False

Expand All @@ -184,16 +177,13 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'bibles'


#language="de"

#~ show_source = True

#~ srcref_base_uri="http://code.google.com/lino"
#~ srcref_base_uri="http://code.google.com/p/lino/source/browse/#hg"



#~ nitpicky = True # use -n in Makefile instead

# http://sphinx.pocoo.org/theming.html
Expand All @@ -202,8 +192,6 @@

#~ todo_include_todos = True



# extlinks = {
# 'issue': ('http://code.google.com/p/lino-logos/issues/detail?id=%s', 'Issue '),
# 'checkin': ('http://code.google.com/p/lino-logos/source/detail?r=%s', 'Checkin '),
Expand Down
5 changes: 2 additions & 3 deletions docs/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
for a in sys.argv:
if a.startswith('--settings'):
has_settings = True

if not has_settings:

import conf

if __name__ == "__main__":
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)

1 change: 0 additions & 1 deletion lino_logos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"""


import os

from .setup_info import SETUP_INFO
Expand Down
2 changes: 0 additions & 2 deletions lino_logos/lib/bibles/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
## Copyright 2013-2015 Luc Saffre

"""
The Bibles app adds models and functionality for managing Bibles
(different editions of the Bible).
Expand Down Expand Up @@ -36,4 +35,3 @@ def setup_config_menu(self, site, profile, m):
def setup_explorer_menu(self, site, profile, m):
m = m.add_menu(self.app_label, self.verbose_name)
m.add_action('bibles.Sections')

20 changes: 5 additions & 15 deletions lino_logos/lib/bibles/fixtures/demo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2013 Luc Saffre
# License: GNU Affero General Public License v3 (see file COPYING for details)

"""
"""

Expand All @@ -17,23 +16,14 @@ def book(ref, en, abbr_en, de, abbr_de, et, abbr_et, **kw):
kw.update(dd.babel_values('abbr', en=abbr_en, de=abbr_de, et=abbr_et))
return Book(ref=ref, **kw)

yield book("genesis",
"Genesis", "Gen",
"Genesis", "Gen",
yield book("genesis", "Genesis", "Gen", "Genesis", "Gen",
"Esimene Moosese raamat", "1Mos")
yield book("exodus",
"Exodus", "Ex",
"Exodus", "Ex", "Teine Moosese raamat",
"2Mos")
yield book("leviticus",
"Leviticus", "Lev",
"Leviticus", "Lev",
yield book("exodus", "Exodus", "Ex", "Exodus", "Ex",
"Teine Moosese raamat", "2Mos")
yield book("leviticus", "Leviticus", "Lev", "Leviticus", "Lev",
"Kolmas Moosese raamat", "3Mos")

yield book("matthew",
"Matthew", "Mt",
"Mattäus", "Mt",
"Matteuse", "Mt")
yield book("matthew", "Matthew", "Mt", "Mattäus", "Mt", "Matteuse", "Mt")

from lino_logos.lib.bibles.fixtures.eng_kjv import objects
yield objects()
Expand Down
7 changes: 4 additions & 3 deletions lino_logos/lib/bibles/fixtures/eng_kjv.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: UTF-8 -*-
## Copyright 2013 Luc Saffre
# License: GNU Affero General Public License v3 (see file COPYING for details)

"""
Loads the King James Version
"""
Expand All @@ -17,7 +16,8 @@ def objects():

yield section("Chapter 1")

yield verses(1,"""
yield verses(
1, """
1 In the beginning God created the heaven and the earth.
2 And the earth was without form, and void; and darkness [was] upon the face of the deep. And the Spirit of God moved upon the face of the waters.
3 And God said, Let there be light: and there was light.
Expand Down Expand Up @@ -55,7 +55,8 @@ def objects():

yield section("Chapter 2")

yield verses(2,"""
yield verses(
2, """
1 Thus the heavens and the earth were finished, and all the host of them.
2 And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
3 And God blessed the seventh day, and sanctified it: because that in it he had rested from all his work which God created and made.
Expand Down
29 changes: 18 additions & 11 deletions lino_logos/lib/bibles/fixtures/eng_oeb.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# -*- coding: utf-8 -*-
# Copyright 2013 Luc Saffre
# License: GNU Affero General Public License v3 (see file COPYING for details)

"""
Loads the Open English Bible
"""

from lino_logos.lib.bibles.loader import *


def objects():

yield edition("eng","OEB", "Open English Bible")
yield edition("eng", "OEB", "Open English Bible")

set_book("matthew")

# yield section("The Good News According to Matthew")

yield section("The Birth, Parentage and Infancy")

yield verses(1,"""
yield verses(
1, """
1 A genealogy of Jesus Christ, a descendant of David and Abraham.
2 Abraham was the father of Isaac, Isaac of Jacob, Jacob of Judah and his brothers,
3 Judah of Perez and Zerah, whose mother was Tamar, Perez of Hezron, Hezron of Aram,
Expand Down Expand Up @@ -48,7 +49,8 @@ def objects():
25 He made Mary his wife, but they did not sleep together before the birth of her son; and to this son he gave the name Jesus.
""")

yield verses(2,"""
yield verses(
2, """
1 After the birth of Jesus at Bethlehem in Judea, in the reign of King Herod, some astrologers from the East arrived in Jerusalem, asking:
2 “Where is the newborn king of the Jews? For we saw his star in the east, and have come to worship him.”
3 When King Herod heard of this, he was much troubled, and so too was all Jerusalem.
Expand Down Expand Up @@ -99,7 +101,8 @@ def objects():
""")
yield section("The Birth, Parentage and Infancy")

yield verses(1,"""
yield verses(
1, """
1 A genealogy of Jesus Christ, a descendant of David and Abraham.
2 Abraham was the father of Isaac, Isaac of Jacob, Jacob of Judah and his brothers,
3 Judah of Perez and Zerah, whose mother was Tamar, Perez of Hezron, Hezron of Aram,
Expand Down Expand Up @@ -129,7 +132,8 @@ def objects():
25 He made Mary his wife, but they did not sleep together before the birth of her son; and to this son he gave the name Jesus.
""")

yield verses(2,"""
yield verses(
2, """
1 After the birth of Jesus at Bethlehem in Judea, in the reign of King Herod, some astrologers from the East arrived in Jerusalem, asking:
2 “Where is the newborn king of the Jews? For we saw his star in the east, and have come to worship him.”
3 When King Herod heard of this, he was much troubled, and so too was all Jerusalem.
Expand Down Expand Up @@ -180,7 +184,8 @@ def objects():
""")
yield section("The Birth, Parentage and Infancy")

yield verses(1,"""
yield verses(
1, """
1 A genealogy of Jesus Christ, a descendant of David and Abraham.
2 Abraham was the father of Isaac, Isaac of Jacob, Jacob of Judah and his brothers,
3 Judah of Perez and Zerah, whose mother was Tamar, Perez of Hezron, Hezron of Aram,
Expand Down Expand Up @@ -210,7 +215,8 @@ def objects():
25 He made Mary his wife, but they did not sleep together before the birth of her son; and to this son he gave the name Jesus.
""")

yield verses(2,"""
yield verses(
2, """
1 After the birth of Jesus at Bethlehem in Judea, in the reign of King Herod, some astrologers from the East arrived in Jerusalem, asking:
2 “Where is the newborn king of the Jews? For we saw his star in the east, and have come to worship him.”
3 When King Herod heard of this, he was much troubled, and so too was all Jerusalem.
Expand Down Expand Up @@ -262,7 +268,8 @@ def objects():

yield section("The Preparation")

yield verses(3,"""
yield verses(
3, """
1 About that time John the Baptist first appeared, proclaiming in the wilderness of Judea:
2 “Repent, for the kingdom of heaven is at hand.”
3 John was the one who was spoken of in the prophet Isaiah, where he says —
Expand Down Expand Up @@ -302,8 +309,8 @@ def objects():
""")

yield verses(4,"""
yield verses(4, """
""")

yield verses(5,"""
yield verses(5, """
""")
17 changes: 10 additions & 7 deletions lino_logos/lib/bibles/fixtures/est_eps.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# -*- coding: utf-8 -*-
# Copyright 2013 Luc Saffre
# License: GNU Affero General Public License v3 (see file COPYING for details)

"""
Loads some random excerps from the edition
found on http://www.piibel.net/ (copyright Eesti Piibli Selts).
"""


from __future__ import unicode_literals

from lino_logos.lib.bibles.loader import *


def objects():

yield edition("est","EPS","Piibel")
yield edition("est", "EPS", "Piibel")

set_book("genesis")

yield section("Jumal loob ja õnnistab maailma")

yield verses(1,"""
yield verses(
1, """
1 Alguses lõi Jumal taeva ja maa.
2 Maa oli tühi ja paljas ja pimedus oli sügavuse peal ja Jumala Vaim hõljus vete kohal.
3 Ja Jumal ütles: „Saagu valgus!” Ja valgus sai.
Expand Down Expand Up @@ -63,7 +63,8 @@ def objects():
31 Ja Jumal vaatas kõike, mis ta oli teinud, ja vaata, see oli väga hea. Siis sai õhtu ja sai hommik - kuues päev.
""")

yield verses(2,"""
yield verses(
2, """
1 Nõnda on taevas ja maa ning kõik nende väed valmis saanud.
2 Ja Jumal oli lõpetanud seitsmendaks päevaks oma töö, mis ta tegi, ja hingas seitsmendal päeval kõigist oma tegudest, mis ta oli teinud.
3 Ja Jumal õnnistas seitsmendat päeva ja pühitses seda, sest ta oli siis hinganud kõigist oma tegudest, mis Jumal luues oli teinud.
Expand All @@ -73,7 +74,8 @@ def objects():

yield section("Aadam ja Eeva")

yield verses(2,"""
yield verses(
2, """
4 See on lugu taeva ja maa sündimisest, kui need loodi. Sel ajal, kui Issand Jumal tegi maa ja taeva,
5 kui ainsatki väljapõõsast ei olnud veel maa peal ja ainsatki väljarohtu ei olnud veel tärganud, sest Issand Jumal ei olnud lasknud vihma sadada maa peale, ja inimest ei olnud põldu harimas,
6 tõusis udu maast ja kastis kogu mullapinda.
Expand Down Expand Up @@ -105,7 +107,8 @@ def objects():

yield section("Jeesuse põlvnemine")

yield verses(1, """
yield verses(
1, """
1 Jeesuse Kristuse, Aabrahami poja, Taaveti poja sugupuu:
2 Aabrahamile sündis Iisak, Iisakile sündis Jaakob, Jaakobile
sündisid Juuda ja tema vennad,
Expand Down
Loading

0 comments on commit af308dc

Please sign in to comment.