Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python3-module-altrepo
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
python3-module-altrepo
Commits
557adfef
Verified
Commit
557adfef
authored
Mar 14, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parser: add watch_total support for full outdated packages list
parent
9617ea45
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
4 deletions
+32
-4
config.py
altrepo/config.py
+1
-0
methods.py
altrepo/parser/methods.py
+8
-3
models.py
altrepo/parser/models.py
+8
-0
__init__.py
altrepo/parser/packages/__init__.py
+1
-1
watch.py
altrepo/parser/packages/watch.py
+14
-0
No files found.
altrepo/config.py
View file @
557adfef
...
...
@@ -7,6 +7,7 @@ class ALTRepoConfig:
cybertalk_url
:
str
=
"https://lists.altlinux.org/pipermail/sisyphus-cybertalk/{}/"
ftbfs_url
:
str
=
"https://git.altlinux.org/beehive/stats/Sisyphus-x86_64/ftbfs-joined"
watch_url
:
str
=
"https://watch.altlinux.org/pub/watch/{by_acl}/{nickname}.txt"
watch_total_url
:
str
=
"https://watch.altlinux.org/pub/watch/watch-total.txt"
appstream_url
:
str
=
(
"https://git.altlinux.org/gears/a/appstream-data-desktop.git?"
"a=blob_plain;f=xmls/altlinux.xml;hb=refs/heads/{branch}"
...
...
altrepo/parser/methods.py
View file @
557adfef
...
...
@@ -5,7 +5,7 @@ from typing import List, Literal
from
.
import
models
from
.news
import
urls_parser
,
urls_for_range
,
packages_parser
,
bugs_parser
from
.packages
import
ftbfs_parser
,
watch_parser
from
.packages
import
ftbfs_parser
,
watch_parser
,
watch_total_parser
class
BaseParser
:
...
...
@@ -146,10 +146,11 @@ def _aggregate_packages(
class
PackagesInfo
:
def
__init__
(
self
,
client
:
BaseParser
,
ftbfs_url
:
str
,
watch_url
:
str
):
def
__init__
(
self
,
client
:
BaseParser
,
ftbfs_url
:
str
,
watch_url
:
str
,
watch_total_url
:
str
):
self
.
client
=
client
self
.
_ftbfs_url
=
ftbfs_url
self
.
_watch_url
=
watch_url
self
.
_watch_total_url
=
watch_total_url
async
def
ftbfs
(
self
)
->
List
[
models
.
FTBFSModel
]:
text
=
await
self
.
client
.
get
(
self
.
_ftbfs_url
)
...
...
@@ -167,9 +168,13 @@ class PackagesInfo:
except
:
return
[]
async
def
watch_total
(
self
)
->
List
[
models
.
WatchTotalModel
]:
text
=
await
self
.
client
.
get
(
self
.
_watch_total_url
)
return
watch_total_parser
(
text
)
class
ALTRepoParser
:
def
__init__
(
self
,
session
:
aiohttp
.
ClientSession
,
config
:
"ALTRepoConfig"
):
self
.
_client
=
BaseParser
(
session
)
self
.
news
=
NewsInfo
(
self
.
_client
,
config
.
cybertalk_url
)
self
.
packages
=
PackagesInfo
(
self
.
_client
,
config
.
ftbfs_url
,
config
.
watch_url
)
self
.
packages
=
PackagesInfo
(
self
.
_client
,
config
.
ftbfs_url
,
config
.
watch_url
,
config
.
watch_total_url
)
altrepo/parser/models.py
View file @
557adfef
...
...
@@ -59,3 +59,11 @@ class WatchByMaintainerModel(BaseModel):
old_version
:
str
new_version
:
str
url
:
str
class
WatchTotalModel
(
BaseModel
):
maintainer
:
str
pkg_name
:
str
old_version
:
str
new_version
:
str
url
:
str
altrepo/parser/packages/__init__.py
View file @
557adfef
from
.ftbfs
import
ftbfs_parser
from
.watch
import
watch_parser
from
.watch
import
watch_parser
,
watch_total_parser
altrepo/parser/packages/watch.py
View file @
557adfef
...
...
@@ -12,3 +12,17 @@ def watch_parser(text: str):
for
parts
in
(
line
.
split
(
"
\t
"
)
for
line
in
text
.
strip
()
.
splitlines
())
if
len
(
parts
)
==
4
]
def
watch_total_parser
(
text
:
str
):
return
[
models
.
WatchTotalModel
(
maintainer
=
parts
[
0
],
pkg_name
=
parts
[
1
],
old_version
=
parts
[
2
],
new_version
=
parts
[
3
],
url
=
parts
[
4
],
)
for
parts
in
(
line
.
split
(
"
\t
"
)
for
line
in
text
.
strip
()
.
splitlines
())
if
len
(
parts
)
==
5
]
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