* [layerindex-web][PATCH RESEND] layerindex: branchcompare: add rST format
@ 2025-11-27 15:48 Antonin Godard
2026-01-06 8:54 ` Antonin Godard
0 siblings, 1 reply; 2+ messages in thread
From: Antonin Godard @ 2025-11-27 15:48 UTC (permalink / raw)
To: yocto-patches; +Cc: Thomas Petazzoni, Antonin Godard
Add a new rST output format for the branch comparison tool. This can be
used to help write the Yocto Project release notes.
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
An existing example (that I formatted manually at the time):
https://git.yoctoproject.org/yocto-docs/tree/documentation/migration-guides/release-notes-5.2.rst?id=79cd33b06e87c04e4f873a5afd9d53714bc5047f#n876
HTML output: https://docs.yoctoproject.org/5.2.4/migration-guides/release-notes-5.2.html#recipe-upgrades-in-yocto-ver
---
layerindex/urls.py | 5 +++++
templates/layerindex/branchcompare.html | 1 +
templates/layerindex/branchcompare_rst.txt | 35 ++++++++++++++++++++++++++++++
3 files changed, 41 insertions(+)
diff --git a/layerindex/urls.py b/layerindex/urls.py
index 80ceaa7..3b95a88 100644
--- a/layerindex/urls.py
+++ b/layerindex/urls.py
@@ -195,6 +195,11 @@ urlpatterns = [
content_type='text/plain; charset=utf-8',
template_name='layerindex/branchcompare_plain.txt'),
name='branch_comparison_plain'),
+ re_path(r'^branch_comparison_rst/$',
+ BranchCompareView.as_view(
+ content_type='text/plain; charset=utf-8',
+ template_name='layerindex/branchcompare_rst.txt'),
+ name='branch_comparison_rst'),
re_path(r'^recipe_deps/$',
RecipeDependenciesView.as_view(
template_name='layerindex/recipedeps.html'),
diff --git a/templates/layerindex/branchcompare.html b/templates/layerindex/branchcompare.html
index 56b2310..93ac801 100644
--- a/templates/layerindex/branchcompare.html
+++ b/templates/layerindex/branchcompare.html
@@ -151,6 +151,7 @@
<span class="pull-right">
<a class="btn btn-default" href="{% url 'branch_comparison_plain' %}?{{ request.GET.urlencode }}"><i class="glyphicon glyphicon-file"></i> Plain text</a>
+ <a class="btn btn-default" href="{% url 'branch_comparison_rst' %}?{{ request.GET.urlencode }}"><i class="glyphicon glyphicon-file"></i> rST</a>
</span>
diff --git a/templates/layerindex/branchcompare_rst.txt b/templates/layerindex/branchcompare_rst.txt
new file mode 100644
index 0000000..1e61848
--- /dev/null
+++ b/templates/layerindex/branchcompare_rst.txt
@@ -0,0 +1,35 @@
+From {{ from_branch }} to {{ to_branch }} (layers: {{ showlayers_text }})
+
+Added
+-----
+
+.. list-table::
+ :widths: 30 70
+ :header-rows: 1
+
+ * - Recipe
+ - Version(s)
+{% for recipe in added %} * - ``{{ recipe.pn }}``
+ - {% for rv in recipe.to_versions %}{{ rv.pv }}{% if not forloop.last %}, {% endif %}{% endfor %}
+{% endfor %}
+
+Changed
+-------
+
+.. list-table::
+ :widths: 20 40 40
+ :header-rows: 1
+
+ * - Recipe
+ - Previous version(s)
+ - New version(s)
+{% for recipe in changed %}{% with pv_changed=recipe.pv_changed %} * - ``{{ recipe.pn }}``
+ - {% for rv in recipe.from_versions %}{{ rv.pv }}{% if rv.srcrev and not pv_changed %} ({{ rv.srcrev|truncatechars:13 }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
+ - {% for rv in recipe.to_versions %}{{ rv.pv }}{% if rv.srcrev and not pv_changed %} ({{ rv.srcrev|truncatechars:13 }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
+{% endwith %}{% endfor %}
+
+Removed
+-------
+
+{% for recipe in removed %}- ``{{ recipe.pn }}``
+{% endfor %}
---
base-commit: 459e8d6f1f18528a835513f12dffcc999c8f7fb5
change-id: 20251127-branch-compare-rst-e26338eefd53
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-06 8:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27 15:48 [layerindex-web][PATCH RESEND] layerindex: branchcompare: add rST format Antonin Godard
2026-01-06 8:54 ` Antonin Godard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.