gitea2rss/man/gitea2rss.1.adoc

106 lines
3.6 KiB
Plaintext
Raw Permalink Normal View History

2019-04-17 00:17:26 +02:00
= gitea2rss(1)
:doctype: manpage
:Author: tastytea
:Email: tastytea@tastytea.de
:Date: 2021-04-25
2019-04-17 00:17:26 +02:00
:Revision: 0.0.0
:man source: gitea2rss
:man version: {revision}
:man manual: General Commands Manual
== NAME
2019-04-20 08:17:01 +02:00
gitea2rss - Generates RSS feeds from Gitea releases or tags.
2019-04-17 00:17:26 +02:00
== SYNOPSIS
*gitea2rss* _URL of Gitea project_ [_releases_|_tags_|_commits_]
2019-04-17 00:17:26 +02:00
2019-04-17 04:36:16 +02:00
== DESCRIPTION
2019-04-20 07:43:23 +02:00
gitea2rss fetches the releases (default) or tags from the Gitea API,
converts the data into an RSS feed and dumps it to stdout. You can use it as a
CGI script to generate the feeds dynamically or simply use cron to generate the
feeds at fixed intervals.
2019-04-17 06:34:48 +02:00
If you want to use gitea2rss as a CGI script, you have to set
*GITEA2RSS_BASEURL* to the basis URL of your instance, without the trailing
2019-04-17 20:35:51 +02:00
slash. For example: _https://git.example.com_. The *QUERY_STRING* must contain
_repo=user/project_. The feed-URL for alice's project, cooltool, would be:
_https://rss.example.com/?repo=alice/cooltool_. You can select the type of the
2019-04-20 07:43:23 +02:00
feed by appending `&type=` at the end of the URL. For example:
_https://rss.example.com/?repo=alice/cooltool&type=tags_.
2019-04-17 04:36:16 +02:00
The generated RSS feed contains the *channel* elements _title_, _link_,
_description_, _generator_ and _lastBuildDate_ and the *item* elements _title_,
_link_, _guid_, _pubDate_ and _description_.
== GITEA INTEGRATION
2019-04-17 07:15:18 +02:00
You can let Gitea automatically insert links to your RSS feeds by editing
`${GITEA_CUSTOM}/templates/custom/header.tmpl` and putting something like
this in it:
[source,html]
2019-04-17 07:15:18 +02:00
----
{{if .Repository.Name}}
<link rel="alternate" type="application/rss+xml"
title="Releases of {{.Repository.Name}}"
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}"/>
2019-04-20 07:43:23 +02:00
<link rel="alternate" type="application/rss+xml"
title="Tags of {{.Repository.Name}}"
2019-04-22 12:20:44 +02:00
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}&amp;type=tags"/>
2021-04-21 11:13:20 +02:00
<link rel="alternate" type="application/rss+xml"
title="Commits of {{.Repository.Name}}"
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}&amp;type=commits"/>
{{end}}
2019-04-17 07:15:18 +02:00
----
2019-04-18 00:03:58 +02:00
== PROXY SERVERS
2020-10-24 16:59:41 +02:00
Since *gitea2rss* is built on libcurl, it respects the same proxy environment
variables. See *curl*(1), section _ENVIRONMENT_.
2019-04-18 00:03:58 +02:00
2019-04-17 00:17:26 +02:00
== EXAMPLES
2019-04-20 07:43:23 +02:00
`gitea2rss https://git.example.com/user/project tags > repo.rss`
2019-04-18 00:03:58 +02:00
`ALL_PROXY="socks4a://[::1]:9050" gitea2rss https://git.example.com/user/project`
2019-04-17 04:36:16 +02:00
2019-04-17 20:39:51 +02:00
=== Example RSS feed
2019-04-17 05:19:49 +02:00
[source,xml]
2019-04-17 05:19:49 +02:00
----
2019-04-22 13:49:25 +02:00
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
2019-04-17 05:19:49 +02:00
<channel>
2019-04-22 13:49:25 +02:00
<atom:link href="https://rss.schlomp.space/?repo=tastytea/gitea2rss" rel="self" type="application/rss+xml"/>
2019-04-17 05:19:49 +02:00
<title>gitea2rss releases</title>
<link>https://schlomp.space/tastytea/gitea2rss</link>
2019-04-22 13:49:25 +02:00
<description>List of releases of tastytea/gitea2rss</description>
<generator>gitea2rss 0.4.4</generator>
<lastBuildDate>Mon, 22 Apr 2019 11:46:53 +0000</lastBuildDate>
2019-04-17 05:19:49 +02:00
<item>
<title>gitea2rss: 0.1.0</title>
<link>https://schlomp.space/tastytea/gitea2rss/releases</link>
<guid isPermaLink="false">schlomp.space release 169</guid>
2019-04-22 13:49:25 +02:00
<pubDate>Wed, 17 Apr 2019 04:37:10 +0000</pubDate>
2019-04-17 20:35:51 +02:00
<description>
<![CDATA[<p><strong>Stable</strong></p>
<pre>First release. Everything works, as far as I can tell.</pre>
<p><a href="https://schlomp.space/tastytea/gitea2rss/archive/0.1.0.tar.gz">Download tarball</a></p>]]>
</description>
2019-04-17 05:19:49 +02:00
</item>
</channel>
</rss>
----
2019-04-17 04:36:16 +02:00
== SEE ALSO
2020-10-24 16:59:41 +02:00
*crontab*(1), *crontab*(5), *curl*(1)
2019-04-17 00:17:26 +02:00
== REPORTING BUGS
Bugtracker: https://schlomp.space/tastytea/gitea2rss/issues
E-mail: tastytea@tastytea.de