~dlax

Toulouse, France

Recent activity

[PATCH builds.sr.ht v2 3/3] Add a <link> element to advertise RSS feeds in jobs page 3 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

We add a <link> for RSS feed in jobs page; this accounts for search
terms.
---
This v2 fixes the index page by passing a "rss_feed" value to jobs_page() so
that the index page now exposes current user's feed.

 buildsrht/blueprints/jobs.py  | 26 +++++++++++++++++++++++---
 buildsrht/templates/jobs.html |  7 +++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py
index 76a72ca..5355c27 100644
--- a/buildsrht/blueprints/jobs.py
[message trimmed]

[PATCH builds.sr.ht v2 2/3] Handle search terms in RSS feeds 3 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

In "~username/rss.xml" and "~username/path/rss.xml" routes, we now
account for search terms to include jobs in generated RSS feeds.
Accordingly, search terms are included in feed's title and description.
---
 buildsrht/blueprints/jobs.py | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py
index 8e8de25..76a72ca 100644
--- a/buildsrht/blueprints/jobs.py
@@ -61,22 +61,26 @@ icon_map = {
    TaskStatus.skipped: "minus",
}
[message trimmed]

[PATCH builds.sr.ht v2 1/3] Add routes to generate RSS feeds for jobs 3 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

We add "~username/path/rss.xml" and "~username/rss.xml" routes returning
jobs as RSS. Only terminated jobs are included in the feed.
---
 buildsrht/blueprints/jobs.py | 46 +++++++++++++++++++++++++++++++++++-
 buildsrht/rss.py             | 34 ++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 buildsrht/rss.py

diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py
index 35ce450..8e8de25 100644
--- a/buildsrht/blueprints/jobs.py
@@ -1,6 +1,6 @@
from ansi2html import Ansi2HTMLConverter
[message trimmed]

[PATCH builds.sr.ht 3/3] Add a <link> element to advertise RSS feeds in jobs page 4 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

We add a <link> for RSS feed in jobs page; this accounts for search
terms.
---
 buildsrht/blueprints/jobs.py  | 17 +++++++++++++++--
 buildsrht/templates/jobs.html |  7 +++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py
index 76a72ca..5c87bcf 100644
--- a/buildsrht/blueprints/jobs.py
@@ -208,9 +208,15 @@ def user(username):
    jobs = Job.query.filter(Job.owner_id == user.id)
    if not current_user or current_user.id != user.id:
[message trimmed]

[PATCH builds.sr.ht 2/3] Handle search terms in RSS feeds 4 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

In "~username/rss.xml" and "~username/path/rss.xml" routes, we now
account for search terms to include jobs in generated RSS feeds.
Accordingly, search terms are included in feed's title and description.
---
 buildsrht/blueprints/jobs.py | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py
index 8e8de25..76a72ca 100644
--- a/buildsrht/blueprints/jobs.py
@@ -61,22 +61,26 @@ icon_map = {
    TaskStatus.skipped: "minus",
}
[message trimmed]

[PATCH builds.sr.ht 1/3] Add routes to generate RSS feeds for jobs 4 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

We add "~username/path/rss.xml" and "~username/rss.xml" routes returning
jobs as RSS. Only terminated jobs are included in the feed.
---
 buildsrht/blueprints/jobs.py | 46 +++++++++++++++++++++++++++++++++++-
 buildsrht/rss.py             | 34 ++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 buildsrht/rss.py

diff --git a/buildsrht/blueprints/jobs.py b/buildsrht/blueprints/jobs.py
index 35ce450..8e8de25 100644
--- a/buildsrht/blueprints/jobs.py
@@ -1,6 +1,6 @@
from ansi2html import Ansi2HTMLConverter
[message trimmed]

[PATCH builds.sr.ht v2 5/5] Add a filter to search jobs by tags 5 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

---
 buildsrht/search.py           | 4 ++++
 buildsrht/templates/jobs.html | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/buildsrht/search.py b/buildsrht/search.py
index 7fb5c51..21bd066 100644
--- a/buildsrht/search.py
@@ -14,9 +14,13 @@ def apply_search(query, terms):
        except ValueError:
            return q.filter(False)

    def job_tags(q, v):
[message trimmed]

[PATCH builds.sr.ht v2 4/5] Add a filter to search jobs by image 5 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

---
 buildsrht/search.py           | 4 ++++
 buildsrht/templates/jobs.html | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/buildsrht/search.py b/buildsrht/search.py
index 143ea45..7fb5c51 100644
--- a/buildsrht/search.py
@@ -5,6 +5,9 @@ def apply_search(query, terms):
    if not terms:
        return query

    def job_image(q, v):
[message trimmed]

[PATCH builds.sr.ht v2 3/5] Add a filter to search jobs by status 5 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

---
 buildsrht/search.py           | 13 +++++++++++--
 buildsrht/templates/jobs.html |  2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/buildsrht/search.py b/buildsrht/search.py
index a70226f..143ea45 100644
--- a/buildsrht/search.py
@@ -1,9 +1,18 @@
from srht.search import search
from buildsrht.types import Job
from buildsrht.types import Job, JobStatus

[message trimmed]

[PATCH builds.sr.ht v2 2/5] Use srht.search.search() to power search on jobs 5 days ago

From Denis Laxalde to ~sircmpwn/sr.ht-dev

For now, the search features are basically the same as before: we can
only search by Job's note content.
---
 buildsrht/search.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/buildsrht/search.py b/buildsrht/search.py
index 598ca92..a70226f 100644
--- a/buildsrht/search.py
@@ -1,8 +1,9 @@
from srht.search import search
from buildsrht.types import Job

[message trimmed]