sourceforge

package
v0.0.0-...-7670848 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 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 (
	// TarballRegex matches SourceForge sources
	TarballRegex = regexp.MustCompile("https?://.*sourceforge.net/projects?/(.+)/files/(.+/)?(.+?)[\\-_]([\\d]+(?:.\\d+)*\\w*?)\\.(?:zip|tar\\..+z.*)(?:\\/download)?$")
	// ProjectRegex matches SourceForge sources
	ProjectRegex = regexp.MustCompile("https?://.*sourceforge.net/projects?/(.+)/(?:files/)?(.+?/)?(.+?)[\\-_]([\\d]+(?:.\\d+)*\\w*?).+$")
)

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(params []string) (r *results.Result, err error)

Latest finds the newest release for a SourceForge package

func (Provider) Match

func (c Provider) Match(query string) (params []string)

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

func (Provider) Releases

func (c Provider) Releases(params []string) (rs *results.ResultSet, err error)

Releases finds all matching releases for a SourceForge package

func (Provider) String

func (c Provider) String() string

String gives the name of this provider

Jump to

Keyboard shortcuts

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