Skip to content

Commit

Permalink
Move slogan to Info class
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Jun 1, 2024
1 parent cf5a8b9 commit a1f60bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions wetterdienst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Author:
class Info:
def __init__(self):
self.name = __appname__
self.slogan = f"{self.name} - open weather data for humans."
self.version = __version__
self.authors = [
Author("Benjamin Gutzmann", "gutzemann@gmail.com", "gutzbenj"),
Expand Down
5 changes: 2 additions & 3 deletions wetterdienst/ui/restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def _create_author_entry(author: Author):
return f"{author.name} (<a href='https://github.com/{author.github_handle}' target='_blank' rel='noopener'>github</a>, <a href='mailto:{author.email}'>mail</a>)" # noqa:E501

title = f"{info.name} restapi"
about = "Wetterdienst - Open weather data for humans."
sources = []
for provider in Provider:
shortname = provider.name
Expand All @@ -66,7 +65,7 @@ def _create_author_entry(author: Author):
<html lang="en">
<head>
<title>{title}</title>
<meta name="description" content="{about}">
<meta name="description" content="{info.slogan}">
<meta name="keywords" content="weather, climate, data, api, open, source, wetterdienst">
<style>
body {{
Expand Down Expand Up @@ -131,7 +130,7 @@ def _create_author_entry(author: Author):
</head>
<body>
<div class="container">
<h1>{about}</h1>
<h1>{info.slogan}</h1>
<h2>Endpoints</h2>
<div class="list">
<li><a href="api/coverage" target="_blank" rel="noopener">coverage</a></li>
Expand Down

0 comments on commit a1f60bd

Please sign in to comment.