Skip to content

Commit 483aa72

Browse files
committed
v1.5.5
Added examples to use gitlab and sourcehut forge Corrected spell errors tanks to Jens Schleusener. Corrected failed tests (blog does not have any feed anymore). Due to a new release process at github changes all github examples from releases.atom to tags.atom. Release 1.5.5.
1 parent cce2974 commit 483aa72

File tree

7 files changed

+33
-17
lines changed

7 files changed

+33
-17
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ It can check projects from :
1818
* www.freshports.org (FreeBSD packages)
1919
* fossies.org
2020
* repo.continuum.io
21+
* sourcehut forge
22+
* gitlab forge
2123

2224
Projects must be added to a YAML file (named by default
2325
`~/.config/versions/versions.yaml`). One can use `--file=FILENAME`
@@ -31,7 +33,7 @@ files containing the project list and their associated version (the latest).
3133
the latest parsed post of the feed.
3234

3335

34-
# YAML file structure
36+
# YAML file structure
3537

3638
```
3739
sitename:
@@ -53,8 +55,8 @@ othersitename:
5355
- projects
5456
```
5557

56-
There is two types of sites :
57-
58+
There is two types of sites :
59+
5860
* 'list': The site has one feed with all projects in it such as
5961
freshcode.club or fossies.org
6062
* 'byproject": The site gives access to one feed per project.
@@ -67,11 +69,13 @@ There is two types of sites :
6769
entry (default behavior) or all entries from the "last checked"
6870
time.
6971

72+
A real life example file is provided: [versions/versions.yaml](versions/versions.yaml)
73+
7074

7175
# Installation
7276

73-
Installation of versions is not mandatory and you can invoke it
74-
directly from the command line provided you have already installed
77+
Installation of versions is not mandatory and you can invoke it
78+
directly from the command line provided you have already installed
7579
its requirements.
7680

7781
## Pypi
@@ -110,7 +114,7 @@ $ watch -n 86400 ./versions.py
110114

111115
* Option `-h` or `--help` will give you some help.
112116
* Option `-v` or `--version` will tell you the version you have.
113-
* Option `-l` or `--list-cache` prints the content of the local cache
117+
* Option `-l` or `--list-cache` prints the content of the local cache
114118
(ie latest known versions).
115119
* Option `-f FILENAME` or `--file FILENAME` ease usage of different
116120
YAML configuration files.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# For a discussion on single-sourcing the version across setup.py and the
4040
# project code, see
4141
# https://packaging.python.org/en/latest/single_source_version.html
42-
version='1.5.4', # Required
42+
version='1.5.5', # Required
4343

4444
# This is a one-line description or tagline of what your project does. This
4545
# corresponds to the "Summary" metadata field:

tests/coverage.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ freshcode_wrong_url:
1212
- sauvegarde
1313

1414
non_existing_host.org:
15-
url: "https://non_existing_host.org/{}/releases.atom"
15+
url: "https://non_existing_host.org/{}/tags.atom"
1616
type: list
1717
projects:
1818
- notaproject
@@ -39,7 +39,7 @@ sourceforge.m:
3939

4040

4141
github:
42-
url: "https://github.com/{}/releases.atom"
42+
url: "https://github.com/{}/tags.atom"
4343
type: byproject
4444
projects:
4545
- name: angular/angular
@@ -66,13 +66,13 @@ github2:
6666
- name: dupgit/versions
6767

6868
github3:
69-
url: "https://github.com/{}/releases.atom"
69+
url: "https://github.com/{}/tags.atom"
7070
type: byproject
71-
projets:
71+
projets_is_not_projects:
7272
- dupgit/versions
7373

7474
github4:
75-
url: "https://github.com/{}/releases.atom"
75+
url: "https://github.com/{}/tags.atom"
7676
type: notatype
7777
projects:
7878
- dupgit/versions

tests/versions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sourceforge:
4848
regex: '/\w+-([\d\.]+)/.*'
4949

5050
github:
51-
url: "https://github.com/{}/releases.atom"
51+
url: "https://github.com/{}/tags.atom"
5252
type: byproject
5353
entry: last checked
5454
projects:

versions/caches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _read_cache_file(self):
101101

102102
def write_cache_file(self):
103103
"""
104-
Owerwrites dictionary cache to the cache file
104+
Overwrites dictionary cache to the cache file
105105
"""
106106

107107
cache_file = open_and_truncate_file(self.cache_filename)

versions/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def get_feed_entries_from_url(url):
122122
RSS or Atom feed.
123123
>>> get_feed_entries_from_url("http://delhomme.org/notfound.html")
124124
Error 404 while fetching "http://delhomme.org/notfound.html".
125-
>>> feed = get_feed_entries_from_url("http://blog.delhomme.org/index.php?feed/atom")
125+
>>> feed = get_feed_entries_from_url("https://github.com/dupgit/versions/tags.atom")
126126
>>> feed.status
127127
200
128128
"""

versions/versions.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ sourceforge:
4646
projects:
4747
- name: advtor
4848
regex: '/\w+-([\d\.]+)/.*'
49-
49+
5050
github:
51-
url: "https://github.com/{}/releases.atom"
51+
url: "https://github.com/{}/tags.atom"
5252
type: byproject
5353
entry: last checked
5454
projects:
@@ -91,3 +91,15 @@ savanah:
9191
type: byproject
9292
projects:
9393
- wget
94+
95+
sourcehut:
96+
url: "https://git.sr.ht/{}/refs/rss.xml"
97+
type: byproject
98+
projects:
99+
- ~sircmpwn/meta.sr.ht
100+
101+
gitlab_openldap:
102+
url: "https://git.openldap.org/{}/-/tags?format=atom"
103+
type: byproject
104+
projects:
105+
- openldap/openldap

0 commit comments

Comments
 (0)