sourceforge

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// API is the format string for a sourceforge RSS feed
	API = "https://sourceforge.net/projects/%s/rss?path=/%s"
)

Variables

View Source
var ProjectRegex = regexp.MustCompile("https?://.*sourceforge.net/projects?/(.+)/(?:files/)?(.+?/)?(.+?)-([\\d]+(?:.\\d+)*\\w*?).+$")

ProjectRegex matches SourceForge sources

View Source
var TarballRegex = regexp.MustCompile("https?://.*sourceforge.net/projects?/(.+)/files/(.+/)?(.+?)-([\\d]+(?:.\\d+)*\\w*?)\\.(?:zip|tar\\..+z.*)(?:\\/download)?$")

TarballRegex matches SourceForge sources

Functions

This section is empty.

Types

type Feed

type Feed struct {
	XMLName xml.Name `xml:"rss"`
	Items   []Item   `xml:"channel>item"`
}

Feed represents the RSS feed itself

type Item

type Item struct {
	XMLName xml.Name `xml:"item"`
	Link    string   `xml:"link"`
	Date    string   `xml:"pubDate"`
}

Item represents an entry in the RSS Feed

type Provider

type Provider struct{}

Provider is the upstream provider interface for SourceForge

func (Provider) Latest

func (c Provider) Latest(name string) (r *results.Result, s results.Status)

Latest finds the newest release for a SourceForge package

func (Provider) Match

func (c Provider) Match(query string) string

Match checks to see if this provider can handle this kind of query

func (Provider) Name

func (c Provider) Name() string

Name gives the name of this provider

func (Provider) Releases

func (c Provider) Releases(name string) (rs *results.ResultSet, s results.Status)

Releases finds all matching releases for a SourceForge package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL