Skip to content

Commit

Permalink
Restyled by yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed May 17, 2024
1 parent a55fde9 commit 85f27ab
Showing 1 changed file with 31 additions and 51 deletions.
82 changes: 31 additions & 51 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,18 @@

if titlepage["taskDate"] == "auto":
t = time.localtime()
titlepage["taskDate"] = (
str(t.tm_year)
+ "-"
+ "{:02d}".format(t.tm_mon)
+ "-"
+ "{:02d}".format(t.tm_mday)
)
titlepage["taskDate"] = (str(t.tm_year) + "-" + "{:02d}".format(t.tm_mon) +
"-" + "{:02d}".format(t.tm_mday))

if titlepage["creationDate"] == "auto":
t = time.localtime()
titlepage["creationDate"] = (
str(t.tm_year)
+ "-"
+ "{:02d}".format(t.tm_mon)
+ "-"
+ "{:02d}".format(t.tm_mday)
)
titlepage["creationDate"] = (str(t.tm_year) + "-" +
"{:02d}".format(t.tm_mon) + "-" +
"{:02d}".format(t.tm_mday))

if titlepage["year"] == "auto":
titlepage["year"] = str(time.localtime().tm_year)


# for cloud_sptheme.ext.issue_tracker
issue_tracker_url = "gh:gucio321/fizyka"

Expand Down Expand Up @@ -157,9 +147,12 @@ def defineLatexVar(varName: str, var: str) -> str:

latex_additional_files = ["resources/titlepage.cls", "resources/logo_AGH.jpg"]
latex_elements = {
"papersize": "a4paper",
"pointsize": "10pt",
"preamble": r"""
"papersize":
"a4paper",
"pointsize":
"10pt",
"preamble":
r"""
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\ChRuleWidth{0pt}
\ChNumVar{}
Expand All @@ -181,42 +174,27 @@ def defineLatexVar(varName: str, var: str) -> str:
\let\oldsphinxattableend\sphinxattableend
\renewcommand{\sphinxattableend}{\oldsphinxattableend\end{minipage}}
\newcommand{\sphinxDocumentTitle}{"""
+ titlepage["title"]
+ r"""}
\newcommand{\sphinxDocumentAuthor}{"""
+ titlepage["author"]
+ r"""}
\newcommand{\sphinxDocumentGroupID}{"""
+ titlepage["groupID"]
+ r"""}
\newcommand{\sphinxDocumentFaculty}{"""
+ titlepage["faculty"]
+ r"""}
\newcommand{\sphinxDocumentTaskDate}{"""
+ titlepage["taskDate"]
+ r"""}
\newcommand{\sphinxDocumentCreationDate}{"""
+ titlepage["creationDate"]
+ r"""}
\newcommand{\sphinxDocumentCorrectionDate}{"""
+ titlepage["correctionDate"]
+ r"""}
"""
+ defineLatexVar("\sphinxDocumentTeam", titlepage["team"])
+ r"""
"""
+ defineLatexVar("\sphinxDocumentNumber", titlepage["number"])
+ r"""
"""
+ defineLatexVar("\sphinxDocumentYear", titlepage["year"])
+ r"""
\newcommand{\sphinxDocumentTitle}{""" + titlepage["title"] + r"""}
\newcommand{\sphinxDocumentAuthor}{""" + titlepage["author"] + r"""}
\newcommand{\sphinxDocumentGroupID}{""" + titlepage["groupID"] + r"""}
\newcommand{\sphinxDocumentFaculty}{""" + titlepage["faculty"] + r"""}
\newcommand{\sphinxDocumentTaskDate}{""" + titlepage["taskDate"] +
r"""}
\newcommand{\sphinxDocumentCreationDate}{""" +
titlepage["creationDate"] + r"""}
\newcommand{\sphinxDocumentCorrectionDate}{""" +
titlepage["correctionDate"] + r"""}
""" + defineLatexVar("\sphinxDocumentTeam", titlepage["team"]) + r"""
""" + defineLatexVar("\sphinxDocumentNumber", titlepage["number"]) +
r"""
""" + defineLatexVar("\sphinxDocumentYear", titlepage["year"]) + r"""
\titlespacing*{\chapter}{-10pt}{10pt}{0pt} % Adjust the values as needed
\titlespacing*{\section}{0pt}{5pt}{0pt} % Adjust the values as needed
""",
"maketitle": r"""\input{titlepage.cls}
"maketitle":
r"""\input{titlepage.cls}
\titleformat{\chapter}[hang]
{\normalfont\large\bfseries}{\llap{\thechapter\hskip 8pt}}{0pt}{\large}
Expand All @@ -227,6 +205,8 @@ def defineLatexVar(varName: str, var: str) -> str:
\makeatother
""",
"tableofcontents": "",
"extraclassoptions": "openany,oneside",
"tableofcontents":
"",
"extraclassoptions":
"openany,oneside",
}

0 comments on commit 85f27ab

Please sign in to comment.