Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
altlinux-packages-bot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Unitsaev
altlinux-packages-bot
Commits
1a38b958
Verified
Commit
1a38b958
authored
Jul 16, 2025
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
altrepo.parser.news: fix the locale
parent
d4ab07bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
methods.py
src/altrepo/parser/methods.py
+4
-3
statistics.py
src/handlers/statistics.py
+1
-3
No files found.
src/altrepo/parser/methods.py
View file @
1a38b958
...
@@ -32,7 +32,7 @@ class NewsInfo:
...
@@ -32,7 +32,7 @@ class NewsInfo:
html
=
await
self
.
client
.
get
(
f
"{base_url}date.html"
,
"koi8-r"
)
html
=
await
self
.
client
.
get
(
f
"{base_url}date.html"
,
"koi8-r"
)
soup
=
BeautifulSoup
(
html
,
"html.parser"
)
soup
=
BeautifulSoup
(
html
,
"html.parser"
)
sisyphus_id
=
-
1
sisyphus_id
=
0
result
=
{
"sisyphus"
:
None
,
"bugs"
:
None
,
"p11"
:
None
}
result
=
{
"sisyphus"
:
None
,
"bugs"
:
None
,
"p11"
:
None
}
for
li
in
soup
.
find_all
(
"li"
):
for
li
in
soup
.
find_all
(
"li"
):
...
@@ -54,8 +54,9 @@ class NewsInfo:
...
@@ -54,8 +54,9 @@ class NewsInfo:
sisyphus_id
=
msg_id
sisyphus_id
=
msg_id
elif
f
"Sisyphus-{today_str} bugs"
in
text
:
elif
f
"Sisyphus-{today_str} bugs"
in
text
:
result
[
"bugs"
]
=
url
result
[
"bugs"
]
=
url
elif
"p11/branch packages"
in
text
and
msg_id
>
sisyphus_id
:
elif
"p11/branch packages"
in
text
and
sisyphus_id
:
result
[
"p11"
]
=
url
if
msg_id
>
sisyphus_id
:
result
[
"p11"
]
=
url
if
result
[
"sisyphus"
]
is
None
:
if
result
[
"sisyphus"
]
is
None
:
result
[
"p11"
]
=
None
result
[
"p11"
]
=
None
...
...
src/handlers/statistics.py
View file @
1a38b958
...
@@ -29,10 +29,8 @@ async def statistics_handler(m: Message, user: User | None, branch: str | None =
...
@@ -29,10 +29,8 @@ async def statistics_handler(m: Message, user: User | None, branch: str | None =
statistics_data
=
(
await
altrepo
.
api
.
packageset
.
repository_statistics
(
branch
))
.
branches
[
0
]
statistics_data
=
(
await
altrepo
.
api
.
packageset
.
repository_statistics
(
branch
))
.
branches
[
0
]
locale
.
setlocale
(
locale
.
LC_TIME
,
'ru_RU.UTF-8'
)
statistics_date
=
(
datetime
.
fromisoformat
(
statistics_date
=
(
datetime
.
fromisoformat
(
statistics_data
.
date_update
))
.
strftime
(
"
%
-
d
%
B
%
Y г.
"
)
statistics_data
.
date_update
))
.
strftime
(
"
%
F
"
)
if
"_"
in
statistics_data
.
branch
:
if
"_"
in
statistics_data
.
branch
:
branch
,
arch
=
statistics_data
.
branch
.
split
(
"_"
)
branch
,
arch
=
statistics_data
.
branch
.
split
(
"_"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment