├── .gitignore ├── wiki └── deb │ ├── postinst │ └── control ├── .deepsource.toml ├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ └── codeql-analysis.yml ├── Makefile ├── license.md ├── go.mod ├── docs └── readme.md ├── main.go └── go.sum /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /wiki/deb/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | chmod +x /usr/local/bin/wiki 3 | exit 0 4 | -------------------------------------------------------------------------------- /wiki/deb/control: -------------------------------------------------------------------------------- 1 | Package: wiki 2 | Version: 1.2.0 3 | Architecture: amd64 4 | Maintainer: beta@ozx.me 5 | Description: View Wikipedia articles through the CLI 6 | -------------------------------------------------------------------------------- /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[analyzers]] 4 | name = "go" 5 | enabled = true 6 | 7 | [analyzers.meta] 8 | import_root = "github.com/BetaPictoris/wiki" 9 | 10 | [[transformers]] 11 | name = "gofumpt" 12 | enabled = true -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "gomod" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | mkdir -vp build 3 | make binary 4 | make deb 5 | 6 | binary: 7 | go build -o build/wiki ./main.go 8 | 9 | deb: 10 | mkdir -vp build/wiki-deb/usr/local/bin/ 11 | go build -o build/wiki-deb/usr/local/bin/wiki ./main.go 12 | mkdir -vp build/wiki-deb/DEBIAN/ 13 | cp -v wiki/deb/control build/wiki-deb/DEBIAN/ 14 | cp -v wiki/deb/postinst build/wiki-deb/DEBIAN/ 15 | chmod 775 build/wiki-deb/DEBIAN/postinst 16 | dpkg-deb --build build/wiki-deb 17 | 18 | clean: 19 | rm -rv build 20 | 21 | install: 22 | install -vDt /usr/local/bin -m 755 build/wiki 23 | 24 | uninstall: 25 | rm -v /usr/local/bin/wiki 26 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2023 Daniel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Go 2 | 3 | on: 4 | push: 5 | branches: [dev] 6 | pull_request: 7 | branches: [dev] 8 | 9 | jobs: 10 | lint: 11 | name: Lint 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/setup-go@v3 15 | with: 16 | go-version: 1.19 17 | - uses: actions/checkout@v3 18 | - name: golangci-lint 19 | uses: golangci/golangci-lint-action@v3 20 | 21 | build: 22 | strategy: 23 | matrix: 24 | os: [ubuntu-latest, windows-latest, macos-latest] # OSes to run on 25 | version: [1.19] # Go version to use 26 | 27 | needs: lint 28 | runs-on: ${{ matrix.os }} 29 | name: Build on ${{ matrix.os }} Go ${{ matrix.version }} 30 | 31 | steps: 32 | - uses: actions/checkout@v2 33 | 34 | - name: Set up Go 35 | uses: actions/setup-go@v2 36 | with: 37 | go-version: ${{ matrix.version }} 38 | 39 | - name: Build (Directories) 40 | run: mkdir build 41 | 42 | - name: Build (Binary) 43 | run: go build -o build/wiki ./main.go 44 | 45 | - name: Build (Debian) 46 | if: ${{ matrix.os == 'ubuntu-latest' }} 47 | run: make deb 48 | 49 | - name: Rename binary for Windows 50 | if: ${{ matrix.os == 'windows-latest' }} 51 | run: move build/wiki build/wiki.exe 52 | 53 | - name: Upload a Build Artifact 54 | uses: actions/upload-artifact@v2.3.1 55 | with: 56 | # Artifact name 57 | name: Wiki CLI - ${{ matrix.os }} 58 | path: ./build 59 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/betapictoris/wiki 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/JohannesKaufmann/html-to-markdown v1.3.6 7 | github.com/charmbracelet/bubbles v0.14.0 8 | github.com/charmbracelet/bubbletea v0.22.1 9 | github.com/charmbracelet/glamour v0.5.0 10 | github.com/charmbracelet/lipgloss v0.6.0 11 | github.com/knipferrc/teacup v0.3.0 12 | ) 13 | 14 | require ( 15 | github.com/PuerkitoBio/goquery v1.8.0 // indirect 16 | github.com/alecthomas/chroma v0.10.0 // indirect 17 | github.com/andybalholm/cascadia v1.3.1 // indirect 18 | github.com/aymerick/douceur v0.2.0 // indirect 19 | github.com/containerd/console v1.0.3 // indirect 20 | github.com/dlclark/regexp2 v1.7.0 // indirect 21 | github.com/gorilla/css v1.0.0 // indirect 22 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect 23 | github.com/mattn/go-isatty v0.0.16 // indirect 24 | github.com/mattn/go-localereader v0.0.1 // indirect 25 | github.com/mattn/go-runewidth v0.0.13 // indirect 26 | github.com/microcosm-cc/bluemonday v1.0.19 // indirect 27 | github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 // indirect 28 | github.com/muesli/cancelreader v0.2.2 // indirect 29 | github.com/muesli/reflow v0.3.0 // indirect 30 | github.com/muesli/termenv v0.12.0 // indirect 31 | github.com/olekukonko/tablewriter v0.0.5 // indirect 32 | github.com/rivo/uniseg v0.3.4 // indirect 33 | github.com/yuin/goldmark v1.4.14 // indirect 34 | github.com/yuin/goldmark-emoji v1.0.1 // indirect 35 | golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect 36 | golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect 37 | golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect 38 | golang.org/x/text v0.3.7 // indirect 39 | ) 40 | -------------------------------------------------------------------------------- /docs/readme.md: -------------------------------------------------------------------------------- 1 | # Wiki CLI [![Build](https://github.com/BetaPictoris/wiki/actions/workflows/build.yml/badge.svg)](https://github.com/BetaPictoris/wiki/actions/workflows/build.yml) 2 | 3 | View Wikipedia articles through the CLI 4 | 5 | > [!WARNING] 6 | > Wiki CLI is considered to be feature complete and archived. 7 | 8 | [![wiki](https://cdn.ozx.me/betapictoris/wiki.svg)](https://github.com/BetaPictoris/wiki) 9 | 10 | ## Installation 11 | 12 | ### From release 13 | 14 | ```bash 15 | curl -LO https://github.com/BetaPictoris/wiki/releases/latest/download/wiki # Download the latest binary. 16 | sudo install -Dt /usr/local/bin -m 755 wiki # Install Wiki CLI to "/usr/local/bin" with the mode "755" 17 | ``` 18 | 19 | ### Build from source 20 | 21 | #### Dependencies 22 | 23 | You need Go (1.19+) installed to build this program. You can install it from your distro's repository using one of the following commands: 24 | 25 | ```bash 26 | # Arch/Manjaro (and derivatives) 27 | sudo pacman -Syu go 28 | 29 | # Debian/Ubuntu (and derivatives) 30 | sudo apt install golang-go 31 | ``` 32 | 33 | Alternatively, you can install it from [Go's official website](https://go.dev/doc/install). 34 | 35 | Then, to build & install wiki run: 36 | 37 | ```bash 38 | git clone git@github.com:BetaPictoris/wiki.git # Clone the repository 39 | cd wiki # Change into the repository's directory 40 | make # Build Wiki CLI 41 | sudo make install # Install Wiki CLI to "/usr/local/bin" with the mode "755" 42 | ``` 43 | 44 | ### From a package manager 45 | 46 | #### [IndiePKG](https://github.com/talwat/indiepkg) 47 | 48 | ```bash 49 | indiepkg install wiki 50 | ``` 51 | 52 | ### User install 53 | 54 | If you don't have access to `sudo` on your system you can install to your user's `~/.local/bin` directory with this command: 55 | 56 | ```bash 57 | install -Dt ~/.local/bin -m 755 wiki 58 | ``` 59 | 60 | --- 61 | 62 | [![wiki](https://cdn.ozx.me/betapictoris/header.svg)](https://github.com/BetaPictoris) 63 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ "dev" ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ "dev" ] 20 | schedule: 21 | - cron: '35 2 * * 0' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'go' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 37 | # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v3 42 | 43 | # Initializes the CodeQL tools for scanning. 44 | - name: Initialize CodeQL 45 | uses: github/codeql-action/init@v2 46 | with: 47 | languages: ${{ matrix.language }} 48 | # If you wish to specify custom queries, you can do so here or in a config file. 49 | # By default, queries listed here will override any specified in a config file. 50 | # Prefix the list here with "+" to use these queries and those in the config file. 51 | 52 | # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 53 | # queries: security-extended,security-and-quality 54 | 55 | 56 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 57 | # If this step fails, then you should remove it and run the build manually (see below) 58 | - name: Autobuild 59 | uses: github/codeql-action/autobuild@v2 60 | 61 | # ℹ️ Command-line programs to run using the OS shell. 62 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 63 | 64 | # If the Autobuild fails above, remove it and uncomment the following three lines. 65 | # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. 66 | 67 | # - run: | 68 | # echo "Run, Build Application using script" 69 | # ./location_of_script_within_repo/buildscript.sh 70 | 71 | - name: Perform Analysis 72 | uses: github/codeql-action/analyze@v2 73 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | // Import pkgs 4 | import ( 5 | "fmt" 6 | "io" 7 | "log" 8 | "net/http" 9 | "os" 10 | "strings" 11 | 12 | tea "github.com/charmbracelet/bubbletea" 13 | "github.com/charmbracelet/lipgloss" 14 | 15 | "github.com/charmbracelet/bubbles/viewport" 16 | "github.com/charmbracelet/glamour" 17 | "github.com/knipferrc/teacup/statusbar" 18 | 19 | md "github.com/JohannesKaufmann/html-to-markdown" 20 | ) 21 | 22 | const ( 23 | lang = "en" // Lang prefix used on 24 | apiURL = "https://" + lang + ".wikipedia.org/api/rest_v1/" // Wikipedia API URL 25 | useHighPerformanceRenderer = false 26 | ) 27 | 28 | // Bubble represents the properties of the UI. 29 | type Bubble struct { 30 | statusbar statusbar.Bubble 31 | viewport viewport.Model 32 | height int 33 | content string 34 | title string 35 | articleName string 36 | ready bool 37 | } 38 | 39 | // Init initializes the UI. 40 | func (Bubble) Init() tea.Cmd { 41 | return nil 42 | } 43 | 44 | // NewStatusbar creates a new instance of the UI. 45 | func NewStatusbar() statusbar.Bubble { 46 | sb := statusbar.New( 47 | statusbar.ColorConfig{ 48 | Foreground: lipgloss.AdaptiveColor{Dark: "#ffffff", Light: "#ffffff"}, 49 | Background: lipgloss.AdaptiveColor{Light: "#F25D94", Dark: "#F25D94"}, 50 | }, 51 | statusbar.ColorConfig{ 52 | Foreground: lipgloss.AdaptiveColor{Light: "#ffffff", Dark: "#ffffff"}, 53 | Background: lipgloss.AdaptiveColor{Light: "#3c3836", Dark: "#3c3836"}, 54 | }, 55 | statusbar.ColorConfig{ 56 | Foreground: lipgloss.AdaptiveColor{Light: "#ffffff", Dark: "#ffffff"}, 57 | Background: lipgloss.AdaptiveColor{Light: "#3c3836", Dark: "#3c3836"}, 58 | }, 59 | statusbar.ColorConfig{ 60 | Foreground: lipgloss.AdaptiveColor{Light: "#ffffff", Dark: "#ffffff"}, 61 | Background: lipgloss.AdaptiveColor{Light: "#6124DF", Dark: "#6124DF"}, 62 | }, 63 | ) 64 | 65 | return sb 66 | } 67 | 68 | // Update handles all UI interactions. 69 | func (b Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) { 70 | var ( 71 | cmd tea.Cmd 72 | cmds []tea.Cmd 73 | ) 74 | 75 | switch msg := msg.(type) { 76 | case tea.WindowSizeMsg: 77 | b.height = msg.Height 78 | 79 | footerHeight := lipgloss.Height(b.footerView()) 80 | verticalMarginHeight := footerHeight 81 | 82 | if !b.ready { 83 | // Since this program is using the full size of the viewport we 84 | // need to wait until we've received the window dimensions before 85 | // we can initialize the viewport. The initial dimensions come in 86 | // quickly, though asynchronously, which is why we wait for them 87 | // here. 88 | b.viewport = viewport.New(msg.Width, msg.Height-verticalMarginHeight) 89 | b.viewport.YPosition = 0 90 | b.viewport.HighPerformanceRendering = useHighPerformanceRenderer 91 | b.viewport.SetContent(b.content) 92 | b.ready = true 93 | 94 | // This is only necessary for high performance rendering, which in 95 | // most cases you won't need. 96 | // 97 | // Render the viewport one line below the header. 98 | b.viewport.YPosition = 1 99 | } else { 100 | b.viewport.Width = msg.Width 101 | b.viewport.Height = msg.Height - verticalMarginHeight 102 | } 103 | 104 | case tea.KeyMsg: 105 | switch msg.String() { 106 | case "ctrl+c", "esc", "q": 107 | cmds = append(cmds, tea.Quit) 108 | } 109 | } 110 | 111 | // Handle keyboard and mouse events in the viewport 112 | b.viewport, cmd = b.viewport.Update(msg) 113 | cmds = append(cmds, cmd) 114 | 115 | return b, tea.Batch(cmds...) 116 | } 117 | 118 | // View returns a string representation of the UI. 119 | func (b Bubble) View() string { 120 | if !b.ready { 121 | return "\n Initializing..." 122 | } 123 | return fmt.Sprintf("%s\n%s", b.viewport.View(), b.footerView()) 124 | } 125 | 126 | func (b Bubble) footerView() string { 127 | b.statusbar.SetSize(b.viewport.Width) 128 | b.statusbar.SetContent(b.title, b.articleName, "", fmt.Sprintf("%3.f%%", b.viewport.ScrollPercent()*100)) 129 | return b.statusbar.View() 130 | } 131 | 132 | func main() { 133 | article := "" 134 | saveToFile := false 135 | 136 | if len(os.Args) >= 2 { 137 | article = os.Args[1] 138 | 139 | if len(os.Args) >= 3 { 140 | if os.Args[2] == "-s" { 141 | saveToFile = true 142 | } 143 | } 144 | } else { 145 | log.Fatal("Usage: wiki
[-s (Save to file)]") 146 | } 147 | 148 | // Read remote URL's conts 149 | resp, err := http.Get(apiURL + "page/html/" + article) 150 | if err != nil { 151 | log.Fatal(err) 152 | } 153 | 154 | cont, err := io.ReadAll(resp.Body) 155 | if err != nil { 156 | log.Fatal(err) 157 | } 158 | 159 | converter := md.NewConverter("", true, nil) 160 | content, err := converter.ConvertString(strings.ReplaceAll(string(cont), "//upload.wikimedia.org", "https://upload.wikimedia.org")) 161 | if err != nil { 162 | log.Fatal(err) 163 | } 164 | 165 | out, err := glamour.Render("# "+content, "dark") 166 | if err != nil { 167 | log.Fatal(err) 168 | } 169 | 170 | if saveToFile { 171 | f, err := os.OpenFile(article+".md", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0400) 172 | if err != nil { 173 | log.Fatal(err) 174 | } 175 | 176 | _, err = f.Write([]byte("# " + content)) 177 | if err != nil { 178 | log.Fatal(err) 179 | } 180 | err = f.Close() 181 | if err != nil { 182 | log.Fatal(err) 183 | } 184 | } else { 185 | p := tea.NewProgram( 186 | Bubble{statusbar: NewStatusbar(), content: string(out), title: "Wiki CLI", articleName: strings.ReplaceAll(article, "_", " ")}, 187 | tea.WithAltScreen(), // use the full size of the terminal in its "alternate screen buffer" 188 | tea.WithMouseCellMotion(), // turn on mouse support, so we can track the mouse wheel 189 | ) 190 | 191 | if err := p.Start(); err != nil { 192 | log.Fatal("could not run program:", err) 193 | } 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/JohannesKaufmann/html-to-markdown v1.3.6 h1:i3Ma4RmIU97gqArbxZXbFqbWKm7XtImlMwVNUouQ7Is= 2 | github.com/JohannesKaufmann/html-to-markdown v1.3.6/go.mod h1:Ol3Jv/xw8jt8qsaLeSh/6DBBw4ZBJrTqrOu3wbbUUg8= 3 | github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= 4 | github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= 5 | github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= 6 | github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= 7 | github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= 8 | github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= 9 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= 10 | github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= 11 | github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= 12 | github.com/charmbracelet/bubbles v0.14.0 h1:DJfCwnARfWjZLvMglhSQzo76UZ2gucuHPy9jLWX45Og= 13 | github.com/charmbracelet/bubbles v0.14.0/go.mod h1:bbeTiXwPww4M031aGi8UK2HT9RDWoiNibae+1yCMtcc= 14 | github.com/charmbracelet/bubbletea v0.21.0/go.mod h1:GgmJMec61d08zXsOhqRC/AiOx4K4pmz+VIcRIm1FKr4= 15 | github.com/charmbracelet/bubbletea v0.22.1 h1:z66q0LWdJNOWEH9zadiAIXp2GN1AWrwNXU8obVY9X24= 16 | github.com/charmbracelet/bubbletea v0.22.1/go.mod h1:8/7hVvbPN6ZZPkczLiB8YpLkLJ0n7DMho5Wvfd2X1C0= 17 | github.com/charmbracelet/glamour v0.5.0 h1:wu15ykPdB7X6chxugG/NNfDUbyyrCLV9XBalj5wdu3g= 18 | github.com/charmbracelet/glamour v0.5.0/go.mod h1:9ZRtG19AUIzcTm7FGLGbq3D5WKQ5UyZBbQsMQN0XIqc= 19 | github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= 20 | github.com/charmbracelet/lipgloss v0.5.0/go.mod h1:EZLha/HbzEt7cYqdFPovlqy5FZPj0xFhg5SaqxScmgs= 21 | github.com/charmbracelet/lipgloss v0.6.0 h1:1StyZB9vBSOyuZxQUcUwGr17JmojPNm87inij9N3wJY= 22 | github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S0atAUvBMP6Ppuk= 23 | github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= 24 | github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= 25 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 26 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 27 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 28 | github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= 29 | github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= 30 | github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= 31 | github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= 32 | github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= 33 | github.com/knipferrc/teacup v0.3.0 h1:H11Ym//McnGP8eC8ibVT0ACvAJUZ93DhA4QRyyJd/no= 34 | github.com/knipferrc/teacup v0.3.0/go.mod h1:gn3PGpGkak5jPC92Xd0wWbTaWub6ZqczvPez+lEdoC0= 35 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 36 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 37 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 38 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 39 | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= 40 | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= 41 | github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= 42 | github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 43 | github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= 44 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 45 | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= 46 | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= 47 | github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= 48 | github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= 49 | github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= 50 | github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= 51 | github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= 52 | github.com/microcosm-cc/bluemonday v1.0.17/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= 53 | github.com/microcosm-cc/bluemonday v1.0.19 h1:OI7hoF5FY4pFz2VA//RN8TfM0YJ2dJcl4P4APrCWy6c= 54 | github.com/microcosm-cc/bluemonday v1.0.19/go.mod h1:QNzV2UbLK2/53oIIwTOyLUSABMkjZ4tqiyC1g/DyqxE= 55 | github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= 56 | github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 h1:kMlmsLSbjkikxQJ1IPwaM+7LJ9ltFu/fi8CRzvSnQmA= 57 | github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= 58 | github.com/muesli/cancelreader v0.2.0/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= 59 | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= 60 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= 61 | github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68/go.mod h1:Xk+z4oIWdQqJzsxyjgl3P22oYZnHdZ8FFTHAQQt5BMQ= 62 | github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= 63 | github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= 64 | github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw= 65 | github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= 66 | github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= 67 | github.com/muesli/termenv v0.12.0 h1:KuQRUE3PgxRFWhq4gHvZtPSLCGDqM5q/cYr1pZ39ytc= 68 | github.com/muesli/termenv v0.12.0/go.mod h1:WCCv32tusQ/EEZ5S8oUIIrC/nIuBcxCVqlN4Xfkv+7A= 69 | github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= 70 | github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 71 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 72 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 73 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 74 | github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 75 | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 76 | github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= 77 | github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= 78 | github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= 79 | github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= 80 | github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= 81 | github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= 82 | github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= 83 | github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= 84 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 85 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 86 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 87 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 88 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 89 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 90 | github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg= 91 | github.com/yuin/goldmark v1.4.14 h1:jwww1XQfhJN7Zm+/a1ZA/3WUiEBEroYFNTiV3dKwM8U= 92 | github.com/yuin/goldmark v1.4.14/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 93 | github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os= 94 | github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ= 95 | golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 96 | golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 97 | golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= 98 | golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= 99 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 100 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 101 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 102 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 103 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 104 | golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 105 | golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 106 | golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 107 | golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 108 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 109 | golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= 110 | golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 111 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 112 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 113 | golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= 114 | golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 115 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 116 | golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= 117 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 118 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 119 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 120 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 121 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 122 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 123 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 124 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 125 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 126 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 127 | --------------------------------------------------------------------------------