Make function name more readable
This commit is contained in:
parent
b1980a4989
commit
8e39f7d651
1 changed files with 2 additions and 2 deletions
4
rss.py
4
rss.py
|
@ -31,7 +31,7 @@ ITEM_TEMPLATE = """
|
|||
# <category>{category}</category>
|
||||
|
||||
|
||||
def iso8601torfc822(iso8601):
|
||||
def iso8601_to_rfc822(iso8601):
|
||||
# pylint: disable=invalid-name
|
||||
y, m, d = map(int, iso8601.split("-"))
|
||||
month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][m]
|
||||
|
@ -45,7 +45,7 @@ def main():
|
|||
p(sorted, key=lambda x: x["published"]) |
|
||||
p(map, lambda x: {
|
||||
**x,
|
||||
"published_rfc822": iso8601torfc822(x["published"]),
|
||||
"published_rfc822": iso8601_to_rfc822(x["published"]),
|
||||
"url": f"{BASE_URL}/{x['path']}"
|
||||
}) | list
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue