├── screenshot.png ├── fetch ├── fetch.go └── fetchbase.go ├── go.mod ├── .gitignore ├── LICENSE ├── README.md ├── fetchfetch.go ├── Makefile ├── go.sum └── .github └── workflows ├── reviewdog.yml └── go.yml /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NikonP/fetchfetch/HEAD/screenshot.png -------------------------------------------------------------------------------- /fetch/fetch.go: -------------------------------------------------------------------------------- 1 | package fetch 2 | 3 | import "os/exec" 4 | 5 | type Fetch struct { 6 | Name string 7 | Description string 8 | } 9 | 10 | func (fetch *Fetch) FetchExists() bool { 11 | _, err := exec.LookPath(fetch.Name) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/NikonP/fetchfetch 2 | 3 | go 1.19 4 | 5 | require github.com/jedib0t/go-pretty/v6 v6.4.6 6 | 7 | require ( 8 | github.com/mattn/go-runewidth v0.0.13 // indirect 9 | github.com/rivo/uniseg v0.2.0 // indirect 10 | golang.org/x/sys v0.1.0 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |

fetchfetch

4 |

Fetch all of your fetches. written in go.

5 | 6 | 7 | 8 | 9 | 10 | GitHub Workflow Status 11 |
12 |
13 | 14 |
15 |
16 | 17 | 18 | ## 1 - Requirements 19 | 20 | `make` - for the installer 21 | 22 | `go` - for installing fetchfetch/executing fetchfetch 23 | 24 | ## 2 - Install 25 | 26 | ``` 27 | $ make install 28 | ``` 29 | 30 | or grab binary from [releases](https://github.com/NikonP/fetchfetch/releases) 31 | 32 | ## 3 - Update 33 | 34 | ``` 35 | $ make update 36 | ``` 37 | 38 | ## 4 - Uninstall 39 | 40 | ``` 41 | $ make uninstall 42 | ``` 43 | -------------------------------------------------------------------------------- /fetchfetch.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // WARNING: The code that follows may make you cry: 4 | // A Safety Pig has been provided below for your benefit 5 | // _ 6 | // _._ _..._ .-', _.._(`)) 7 | // '-. ` ' /-._.-' ',/ 8 | // ) \ '. 9 | // / _ _ | \ 10 | // | a a / | 11 | // \ .-. ; 12 | // '-('' ).-' ,' ; 13 | // '-; | .' 14 | // \ \ / 15 | // | 7 .__ _.-\ \ 16 | // | | | ``/ /` / 17 | // /,_| | /,_/ / 18 | // /,_/ '`-' 19 | 20 | import ( 21 | "fmt" 22 | "os" 23 | 24 | "github.com/NikonP/fetchfetch/fetch" 25 | "github.com/jedib0t/go-pretty/v6/table" 26 | "github.com/jedib0t/go-pretty/v6/text" 27 | ) 28 | 29 | func main() { 30 | t := table.NewWriter() 31 | t.SetOutputMirror(os.Stdout) 32 | t.SetAllowedRowLength(80) 33 | t.SetStyle(table.StyleColoredGreenWhiteOnBlack) 34 | 35 | t.AppendHeader(table.Row{ 36 | "Fetch", 37 | "Description", 38 | "Is installed", 39 | }) 40 | 41 | installedCount := 0 42 | totalFetchesCount := len(fetch.Fetches) 43 | 44 | for _, fetch := range fetch.Fetches { 45 | isInstalled := "" 46 | 47 | if fetch.FetchExists() { 48 | installedCount += 1 49 | isInstalled = text.FgGreen.Sprint("[+]") 50 | } 51 | 52 | t.AppendRow(table.Row{ 53 | fetch.Name, 54 | fetch.Description, 55 | isInstalled, 56 | }) 57 | } 58 | 59 | t.AppendFooter(table.Row{ 60 | "", 61 | "", 62 | fmt.Sprintf( 63 | "%d/%d", 64 | installedCount, 65 | totalFetchesCount, 66 | ), 67 | }) 68 | 69 | t.AppendSeparator() 70 | 71 | t.Render() 72 | 73 | t = table.NewWriter() 74 | t.SetOutputMirror(os.Stdout) 75 | t.SetAllowedRowLength(80) 76 | t.SetStyle(table.StyleColoredGreenWhiteOnBlack) 77 | } 78 | -------------------------------------------------------------------------------- /fetch/fetchbase.go: -------------------------------------------------------------------------------- 1 | package fetch 2 | 3 | var Fetches = []Fetch{ 4 | { 5 | Name: "fetchfetch", 6 | Description: "Fetch all your fetches", 7 | }, 8 | { 9 | Name: "shutthefetchup", 10 | Description: "Fetch for Linux subreddits", 11 | }, 12 | { 13 | Name: "nofetch", 14 | Description: "Smol POSIX sh fetch", 15 | }, 16 | { 17 | Name: "neofetch", 18 | Description: "Classic, Bash fetch", 19 | }, 20 | { 21 | Name: "pfetch", 22 | Description: "Smol POSIX sh fetch", 23 | }, 24 | { 25 | Name: "ramfetch", 26 | Description: "Fetch for RAM info", 27 | }, 28 | { 29 | Name: "ufetch", 30 | Description: "Tiny fetch", 31 | }, 32 | { 33 | Name: "nerdfetch", 34 | Description: "Neofetch with Nerdfont", 35 | }, 36 | { 37 | Name: "archfetch", 38 | Description: "Is's a fetch btw", 39 | }, 40 | { 41 | Name: "cfetch", 42 | Description: "Smol fetch", 43 | }, 44 | { 45 | Name: "onefetch", 46 | Description: "Fetch for Git repos", 47 | }, 48 | { 49 | Name: "hyfetch", 50 | Description: "Neofetch with LGBTQ+ flags", 51 | }, 52 | { 53 | Name: "uwufetch", 54 | Description: "uwu", 55 | }, 56 | { 57 | Name: "picofetch", 58 | Description: "Smol fetch", 59 | }, 60 | { 61 | Name: "macchina", 62 | Description: "Fetch written in Rust™", 63 | }, 64 | { 65 | Name: "minifetch", 66 | Description: "Smol fetch", 67 | }, 68 | { 69 | Name: "paleofetch", 70 | Description: "Neofetch, but written in C", 71 | }, 72 | { 73 | Name: "cpufetch", 74 | Description: "CPU architecture fetching tool", 75 | }, 76 | { 77 | Name: "gpufetch", 78 | Description: "GPU architecture fetching tool", 79 | }, 80 | { 81 | Name: "fastfetch", 82 | Description: "Neofetch writtn in C", 83 | }, 84 | { 85 | Name: "wfetch", 86 | Description: "Basically W*ndows Neofetch", 87 | }, 88 | } 89 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | install: 3 | @echo "==> fetchfetch installer" 4 | @echo "==> Made by gentoo-btw" 5 | @echo " " 6 | @echo "==> Installing fetchfetch.." 7 | @test -f /usr/bin/go && echo "==> Found go executable at /usr/bin/go." 8 | @test -f /usr/bin/go || echo "==> Go not found. please install go." || exit 1 9 | @echo "==> Running go to install fetchfetch.." 10 | @go install github.com/NikonP/fetchfetch@latest 11 | @echo "==> Installed fetchfetch." 12 | @echo "==> Make sure ~/go/bin is in your PATH" 13 | @echo " " 14 | @echo "==> Also. stop trying to make fetch happen (if your gonna make it happen)" 15 | @echo "==> We are tired of new fetch tools over and over again. so please don't you dare publish your fetch tool into reddit (e.g r/linux)" 16 | 17 | update: 18 | @echo "==> fetchfetch installer" 19 | @echo "==> Made by gentoo-btw" 20 | @echo " " 21 | @echo "==> Updating fetchfetch" 22 | @echo "==> Removing current fetchfetch executable. assuming path ~/go/bin/" 23 | @rm ~/go/bin/fetchfetch 24 | @echo "==> Installing fetchfetch (again)" 25 | @go install github.com/NikonP/fetchfetch@latest 26 | @echo "==> Updated fetchfetch" 27 | @echo "==> Make sure ~/go/bin is in your PATH." 28 | @echo " " 29 | @echo "==> Also. stop trying to make fetch happen (if your gonna make it happen)" 30 | @echo "==> We are tired of new fetch tools over and over again. so please don't you dare publish your fetch tool into reddit (e.g r/linux)" 31 | 32 | uninstall: 33 | @echo "==> fetchfetch installer" 34 | @echo "==> Made by gentoo-btw" 35 | @echo " " 36 | @echo "==> Removing fetchfetch. assuming to remove ~/go/bin/fetchfetch" 37 | @rm ~/go/bin/fetchfetch 38 | @echo "==> Thanks for using fetchfetch" 39 | @echo " " 40 | @echo "==> Also. stop trying to make fetch happen (if your gonna make it happen)" 41 | @echo "==> We are tired of new fetch tools over and over again. so please don't you dare publish your fetch tool into reddit (e.g r/linux)" 42 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw= 5 | github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= 6 | github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= 7 | github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 8 | github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= 9 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 10 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 11 | github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= 12 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 13 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 14 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 15 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 16 | github.com/stretchr/testify v1.7.4 h1:wZRexSlwd7ZXfKINDLsO4r7WBt3gTKONc6K/VesHvHM= 17 | github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 18 | golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= 19 | golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 20 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 21 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 22 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 23 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 24 | -------------------------------------------------------------------------------- /.github/workflows/reviewdog.yml: -------------------------------------------------------------------------------- 1 | name: reviewdog 2 | on: [pull_request] 3 | jobs: 4 | reviewdog_misspell_golintci-lint: 5 | name: golintci-lint / misspell 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Checkout 9 | uses: actions/checkout@v1 10 | - name: Misspell 11 | uses: reviewdog/action-misspell@v1 12 | - uses: actions/checkout@v1 13 | - name: Check out code into the Go module directory 14 | uses: actions/checkout@v3 15 | - name: golangci-lint 16 | uses: reviewdog/action-golangci-lint@v2 17 | with: 18 | github_token: ${{ secrets.github_token }} 19 | reporter: github-pr-review 20 | -------------------------------------------------------------------------------- /.github/workflows/go.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a golang project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go 3 | 4 | name: Go 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | 10 | jobs: 11 | 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | 17 | - name: Set up Go 18 | uses: actions/setup-go@v3 19 | with: 20 | go-version: 1.19 21 | 22 | - name: Build linux amd64 23 | run: GOOS=linux GOARCH=amd64 go build -o builds/fetchfetch-latest-linux-amd64 24 | 25 | - name: Build linux arm64 26 | run: GOOS=linux GOARCH=arm64 go build -o builds/fetchfetch-latest-linux-arm64 27 | 28 | - name: Build linux arm 29 | run: GOOS=linux GOARCH=arm go build -o builds/fetchfetch-latest-linux-arm 30 | 31 | - name: Build linux 386 32 | run: GOOS=linux GOARCH=386 go build -o builds/fetchfetch-latest-linux-386 33 | 34 | - name: Build freebsd amd64 35 | run: GOOS=freebsd GOARCH=amd64 go build -o builds/fetchfetch-latest-freebsd-amd64 36 | 37 | - name: Build freebsd arm64 38 | run: GOOS=freebsd GOARCH=arm64 go build -o builds/fetchfetch-latest-freebsd-arm64 39 | 40 | - name: Build freebsd arm 41 | run: GOOS=freebsd GOARCH=arm go build -o builds/fetchfetch-latest-freebsd-arm 42 | 43 | - name: Build freebsd 386 44 | run: GOOS=freebsd GOARCH=386 go build -o builds/fetchfetch-latest-freebsd-386 45 | 46 | - name: Build openbsd amd64 47 | run: GOOS=openbsd GOARCH=amd64 go build -o builds/fetchfetch-latest-openbsd-amd64 48 | 49 | - name: Build openbsd arm64 50 | run: GOOS=openbsd GOARCH=arm64 go build -o builds/fetchfetch-latest-openbsd-arm64 51 | 52 | - name: Build openbsd arm 53 | run: GOOS=openbsd GOARCH=arm go build -o builds/fetchfetch-latest-openbsd-arm 54 | 55 | - name: Build openbsd 386 56 | run: GOOS=openbsd GOARCH=386 go build -o builds/fetchfetch-latest-openbsd-386 57 | 58 | - name: Build windows amd64 59 | run: GOOS=windows GOARCH=amd64 go build -o builds/fetchfetch-latest-windows-amd64.exe 60 | 61 | - name: Build windows arm64 62 | run: GOOS=windows GOARCH=arm64 go build -o builds/fetchfetch-latest-windows-arm64.exe 63 | 64 | - name: Build windows arm 65 | run: GOOS=windows GOARCH=arm go build -o builds/fetchfetch-latest-windows-arm.exe 66 | 67 | - name: Build windows 386 68 | run: GOOS=windows GOARCH=386 go build -o builds/fetchfetch-latest-windows-386.exe 69 | 70 | 71 | 72 | - uses: "marvinpinto/action-automatic-releases@latest" 73 | with: 74 | repo_token: "${{ secrets.GITHUB_TOKEN }}" 75 | automatic_release_tag: "latest" 76 | prerelease: true 77 | title: "GitHub action Build" 78 | files: | 79 | builds/* 80 | --------------------------------------------------------------------------------