Download page generator
  • Go 63.3%
  • HTML 36.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-04-01 07:16:23 +00:00
assets.go Basic user agent detection, extra references in HTML (fixes #6, fixes #8, fixes #9) 2016-04-01 07:16:23 +00:00
config.json Cleanup and README 2016-03-23 11:50:53 +01:00
github.go Cleanup and README 2016-03-23 11:50:53 +01:00
handler.go Basic user agent detection, extra references in HTML (fixes #6, fixes #8, fixes #9) 2016-04-01 07:16:23 +00:00
index.go.html Basic user agent detection, extra references in HTML (fixes #6, fixes #8, fixes #9) 2016-04-01 07:16:23 +00:00
LICENSE Initial 2016-03-21 14:13:17 +01:00
main.go Cleanup and README 2016-03-23 11:50:53 +01:00
README.md Basic user agent detection, extra references in HTML (fixes #6, fixes #8, fixes #9) 2016-04-01 07:16:23 +00:00

downloads

downloads is an automatic download page generator. It takes a config file that describes the repositories to check, fetches release information for each of them, and generates a nice download page.

Running for development

  • go run *.go
  • windows users: go build then run downloads.exe
  • Open http://localhost:8891/ in your browser
  • Tweak the index.html and reload (reduce TemplateCacheTime in the config when developing).

Configuration

The following fields are used on the config.json:

  • ListenAddr: The address on which to listen for HTTP requests.
  • RepoCacheTime: How long to cache Github repo data (in nanoseconds).
  • TemplateCacheTime: How long to cache evaluation of the index.go.html template (in nanoseconds).
  • Repos: A list of repositories to present download data for. Each contains the following fields:
    • FriendlyName: What to call the project on the download page.
    • GithubName: What it's actually called on github (owner/repo).
    • NameExpr: What to call the download assets, either as a static "string" (used verbatim) or as a "/regexp/" where the first grouped match is used.
    • ArchExpr: As NameExpr, to extract the asset architecture.
    • OSExpr: As NameExpr, to extract the asset operating system.