gitea2rss/man/gitea2rss.1.adoc
tastytea 9caeab9b91
All checks were successful
continuous-integration/drone/push Build is passing
Add “commits” to usage info in manpage.
2021-04-25 10:50:13 +02:00

3.6 KiB
Raw Blame History

gitea2rss(1) Manual Page

NAME

gitea2rss - Generates RSS feeds from Gitea releases or tags.

SYNOPSIS

gitea2rss URL of Gitea project [releases|tags|commits]

DESCRIPTION

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.

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 slash. For example: https://git.example.com. The QUERY_STRING must contain repo=user/project. The feed-URL for alices project, cooltool, would be: https://rss.example.com/?repo=alice/cooltool. You can select the type of the feed by appending &type= at the end of the URL. For example: https://rss.example.com/?repo=alice/cooltool&type=tags.

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

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:

{{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}}"/>
<link rel="alternate" type="application/rss+xml"
      title="Tags of {{.Repository.Name}}"
      href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}&amp;type=tags"/>
<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}}

PROXY SERVERS

Since gitea2rss is built on libcurl, it respects the same proxy environment variables. See curl(1), section ENVIRONMENT.

EXAMPLES

gitea2rss https://git.example.com/user/project tags > repo.rss

ALL_PROXY="socks4a://[::1]:9050" gitea2rss https://git.example.com/user/project

Example RSS feed

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="https://rss.schlomp.space/?repo=tastytea/gitea2rss" rel="self" type="application/rss+xml"/>
    <title>gitea2rss releases</title>
    <link>https://schlomp.space/tastytea/gitea2rss</link>
    <description>List of releases of tastytea/gitea2rss</description>
    <generator>gitea2rss 0.4.4</generator>
    <lastBuildDate>Mon, 22 Apr 2019 11:46:53 +0000</lastBuildDate>
    <item>
      <title>gitea2rss: 0.1.0</title>
      <link>https://schlomp.space/tastytea/gitea2rss/releases</link>
      <guid isPermaLink="false">schlomp.space release 169</guid>
      <pubDate>Wed, 17 Apr 2019 04:37:10 +0000</pubDate>
      <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>
    </item>
  </channel>
</rss>

SEE ALSO

crontab(1), crontab(5), curl(1)