diff --git a/README.md b/README.md index 1dab2cd9..066a9841 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ yay -S circumflex ```console # Go -go run main.go +go install github.com/bensadeh/circumflex@latest ``` > [!IMPORTANT] diff --git a/bubble/bubble.go b/bubble/bubble.go index 66a9f60b..3179ea71 100644 --- a/bubble/bubble.go +++ b/bubble/bubble.go @@ -1,14 +1,15 @@ package bubble import ( - "clx/categories" - "clx/cli" "fmt" "os" - "clx/bubble/list" - "clx/favorites" - "clx/settings" + "github.com/bensadeh/circumflex/categories" + "github.com/bensadeh/circumflex/cli" + + "github.com/bensadeh/circumflex/bubble/list" + "github.com/bensadeh/circumflex/favorites" + "github.com/bensadeh/circumflex/settings" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" diff --git a/bubble/list/defaultitem.go b/bubble/list/defaultitem.go index 1eedd32d..42882397 100644 --- a/bubble/list/defaultitem.go +++ b/bubble/list/defaultitem.go @@ -5,11 +5,11 @@ import ( "io" "strings" - "clx/constants/nerdfonts" + "github.com/bensadeh/circumflex/constants/nerdfonts" - "clx/constants/category" - "clx/item" - "clx/syntax" + "github.com/bensadeh/circumflex/constants/category" + "github.com/bensadeh/circumflex/item" + "github.com/bensadeh/circumflex/syntax" "github.com/nleeper/goment" diff --git a/bubble/list/list.go b/bubble/list/list.go index 75793052..ff896b8d 100644 --- a/bubble/list/list.go +++ b/bubble/list/list.go @@ -1,7 +1,6 @@ package list import ( - "clx/categories" _ "embed" "fmt" "io" @@ -9,29 +8,31 @@ import ( "strings" "time" - "clx/app" + "github.com/bensadeh/circumflex/categories" + + "github.com/bensadeh/circumflex/app" "github.com/charmbracelet/bubbles/viewport" - "clx/reader" - - "clx/browser" - "clx/bubble/list/message" - "clx/bubble/ranking" - "clx/cli" - "clx/constants/category" - "clx/favorites" - "clx/header" - "clx/help" - "clx/history" - "clx/hn" - "clx/hn/services/hybrid" - "clx/hn/services/mock" - "clx/item" - "clx/screen" - "clx/settings" - "clx/tree" - "clx/validator" + "github.com/bensadeh/circumflex/reader" + + "github.com/bensadeh/circumflex/browser" + "github.com/bensadeh/circumflex/bubble/list/message" + "github.com/bensadeh/circumflex/bubble/ranking" + "github.com/bensadeh/circumflex/cli" + "github.com/bensadeh/circumflex/constants/category" + "github.com/bensadeh/circumflex/favorites" + "github.com/bensadeh/circumflex/header" + "github.com/bensadeh/circumflex/help" + "github.com/bensadeh/circumflex/history" + "github.com/bensadeh/circumflex/hn" + "github.com/bensadeh/circumflex/hn/services/hybrid" + "github.com/bensadeh/circumflex/hn/services/mock" + "github.com/bensadeh/circumflex/item" + "github.com/bensadeh/circumflex/screen" + "github.com/bensadeh/circumflex/settings" + "github.com/bensadeh/circumflex/tree" + "github.com/bensadeh/circumflex/validator" "github.com/charmbracelet/bubbles/paginator" "github.com/charmbracelet/bubbles/spinner" @@ -802,8 +803,6 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd { m.SetDisabledInput(true) startSpinnerCmd := m.StartSpinner() - //m.categoryToDisplay = nextCat - changeCatCmd := func() tea.Msg { return message.FetchAndChangeToCategory{Index: nextIndex, Category: nextCat, Cursor: m.cursor} } @@ -826,8 +825,6 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd { m.SetDisabledInput(true) startSpinnerCmd := m.StartSpinner() - //m.categoryToDisplay = prevCat - changeCatCmd := func() tea.Msg { return message.FetchAndChangeToCategory{Index: prevIndex, Category: prevCat, Cursor: m.cursor} } diff --git a/bubble/list/message/message.go b/bubble/list/message/message.go index 5615022e..41df760f 100644 --- a/bubble/list/message/message.go +++ b/bubble/list/message/message.go @@ -1,8 +1,9 @@ package message import ( - "clx/item" "time" + + "github.com/bensadeh/circumflex/item" ) type EditorFinishedMsg struct { diff --git a/categories/categories.go b/categories/categories.go index 31a62332..4cc110ba 100644 --- a/categories/categories.go +++ b/categories/categories.go @@ -1,10 +1,11 @@ package categories import ( - "clx/constants/category" "fmt" "os" "strings" + + "github.com/bensadeh/circumflex/constants/category" ) type Category string diff --git a/cli/cli.go b/cli/cli.go index 922696fb..a363b245 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "clx/constants/unicode" - "clx/settings" + "github.com/bensadeh/circumflex/constants/unicode" + "github.com/bensadeh/circumflex/settings" ) func Less(input string, config *settings.Config) *exec.Cmd { diff --git a/cmd/add.go b/cmd/add.go index 993c861f..ee3a7114 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -3,8 +3,8 @@ package cmd import ( "strconv" - "clx/favorites" - "clx/hn/services/hybrid" + "github.com/bensadeh/circumflex/favorites" + "github.com/bensadeh/circumflex/hn/services/hybrid" "github.com/spf13/cobra" ) diff --git a/cmd/article.go b/cmd/article.go index b9f34d8b..a3e8d54e 100644 --- a/cmd/article.go +++ b/cmd/article.go @@ -5,12 +5,12 @@ import ( "os" "strconv" - "clx/less" - "clx/reader" + "github.com/bensadeh/circumflex/less" + "github.com/bensadeh/circumflex/reader" - "clx/hn/services/hybrid" + "github.com/bensadeh/circumflex/hn/services/hybrid" - "clx/cli" + "github.com/bensadeh/circumflex/cli" "github.com/spf13/cobra" ) diff --git a/cmd/clear.go b/cmd/clear.go index 8b71d3f2..8461c1c7 100644 --- a/cmd/clear.go +++ b/cmd/clear.go @@ -1,7 +1,7 @@ package cmd import ( - "clx/history" + "github.com/bensadeh/circumflex/history" "github.com/spf13/cobra" ) diff --git a/cmd/comments.go b/cmd/comments.go index 327e9ab6..64746bd8 100644 --- a/cmd/comments.go +++ b/cmd/comments.go @@ -5,13 +5,13 @@ import ( "strconv" "time" - "clx/less" + "github.com/bensadeh/circumflex/less" - "clx/hn/services/hybrid" + "github.com/bensadeh/circumflex/hn/services/hybrid" - "clx/cli" - "clx/screen" - "clx/tree" + "github.com/bensadeh/circumflex/cli" + "github.com/bensadeh/circumflex/screen" + "github.com/bensadeh/circumflex/tree" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cmd/root.go index fe92e966..c459203c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,14 +4,14 @@ import ( "fmt" "os" - "clx/categories" + "github.com/bensadeh/circumflex/categories" - "clx/app" - "clx/bubble" - "clx/cli" - "clx/indent" - "clx/less" - "clx/settings" + "github.com/bensadeh/circumflex/app" + "github.com/bensadeh/circumflex/bubble" + "github.com/bensadeh/circumflex/cli" + "github.com/bensadeh/circumflex/indent" + "github.com/bensadeh/circumflex/less" + "github.com/bensadeh/circumflex/settings" "github.com/logrusorgru/aurora/v3" "github.com/spf13/cobra" @@ -33,7 +33,7 @@ var ( func Root() *cobra.Command { rootCmd := &cobra.Command{ - Use: "clx", + Use: "github.com/bensadeh/circumflex", Short: "\n" + aurora.Magenta("circumflex").String() + " is a command line tool for browsing Hacker News in your terminal", Version: app.Version, Run: func(cmd *cobra.Command, args []string) { @@ -126,7 +126,7 @@ func verifyLess(noLessVerify bool) { if !isValid && currentLessVersion == "" { flag := aurora.Bold("--no-less-verify").String() lessCmd := aurora.Magenta("less").String() - clxCmd := aurora.Magenta("clx").String() + clxCmd := aurora.Magenta("github.com/bensadeh/circumflex").String() lessVersion := aurora.Yellow("?").String() fmt.Printf("Could not verify version of %s\n\n", lessCmd) @@ -140,7 +140,7 @@ func verifyLess(noLessVerify bool) { if !isValid { flag := aurora.Bold("--no-less-verify").String() lessCmd := aurora.Magenta("less").String() - clxCmd := aurora.Magenta("clx").String() + clxCmd := aurora.Magenta("github.com/bensadeh/circumflex").String() lessVersion := aurora.Yellow(currentLessVersion).String() fmt.Printf("Your version of %s is outdated\n\n", lessCmd) diff --git a/cmd/url.go b/cmd/url.go index 57b9636e..90f5c9c2 100644 --- a/cmd/url.go +++ b/cmd/url.go @@ -4,10 +4,10 @@ import ( _ "embed" "os" - "clx/less" - "clx/reader" + "github.com/bensadeh/circumflex/less" + "github.com/bensadeh/circumflex/reader" - "clx/cli" + "github.com/bensadeh/circumflex/cli" "github.com/spf13/cobra" ) diff --git a/cmd/version.go b/cmd/version.go index 6ac581a0..e118f5d5 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -3,7 +3,7 @@ package cmd import ( "fmt" - "clx/app" + "github.com/bensadeh/circumflex/app" "github.com/spf13/cobra" ) diff --git a/comment/comment.go b/comment/comment.go index ca05ac79..44a7ddcf 100644 --- a/comment/comment.go +++ b/comment/comment.go @@ -3,8 +3,8 @@ package comment import ( "strings" - "clx/settings" - "clx/syntax" + "github.com/bensadeh/circumflex/settings" + "github.com/bensadeh/circumflex/syntax" "github.com/logrusorgru/aurora/v3" diff --git a/favorites/bfavorites.go b/favorites/bfavorites.go index e7e69c95..ca9f0d71 100644 --- a/favorites/bfavorites.go +++ b/favorites/bfavorites.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - "clx/file" - "clx/item" + "github.com/bensadeh/circumflex/file" + "github.com/bensadeh/circumflex/item" ) type Favorites struct { diff --git a/go.mod b/go.mod index 0aee75ad..cd7f8e7f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module clx +module github.com/bensadeh/circumflex go 1.22 diff --git a/header/header.go b/header/header.go index ecb3ab64..9f0edb9e 100644 --- a/header/header.go +++ b/header/header.go @@ -1,10 +1,11 @@ package header import ( - "clx/categories" "fmt" "strings" + "github.com/bensadeh/circumflex/categories" + "github.com/charmbracelet/lipgloss" ) diff --git a/help/help.go b/help/help.go index 47e121f7..d975dc41 100644 --- a/help/help.go +++ b/help/help.go @@ -3,8 +3,8 @@ package help import ( "strings" - "clx/constants/unicode" - "clx/info" + "github.com/bensadeh/circumflex/constants/unicode" + "github.com/bensadeh/circumflex/info" "github.com/charmbracelet/lipgloss" ) diff --git a/history/history.go b/history/history.go index 749beeae..44481784 100644 --- a/history/history.go +++ b/history/history.go @@ -5,7 +5,7 @@ import ( "os" "path" - "clx/file" + "github.com/bensadeh/circumflex/file" ) type History interface { diff --git a/hn/hn.go b/hn/hn.go index 52ebc352..96163f9e 100644 --- a/hn/hn.go +++ b/hn/hn.go @@ -1,6 +1,6 @@ package hn -import "clx/item" +import "github.com/bensadeh/circumflex/item" type Service interface { FetchItems(itemsToFetch int, category int) (items []*item.Item, errMsg string) diff --git a/hn/services/hybrid/hybrid.go b/hn/services/hybrid/hybrid.go index 6b5b6493..66cfd9ec 100644 --- a/hn/services/hybrid/hybrid.go +++ b/hn/services/hybrid/hybrid.go @@ -9,12 +9,12 @@ import ( "github.com/bobesa/go-domain-util/domainutil" - ansi "clx/utils/strip-ansi" + ansi "github.com/bensadeh/circumflex/utils/strip-ansi" - "clx/app" - "clx/constants/category" - "clx/endpoints" - "clx/item" + "github.com/bensadeh/circumflex/app" + "github.com/bensadeh/circumflex/constants/category" + "github.com/bensadeh/circumflex/endpoints" + "github.com/bensadeh/circumflex/item" "github.com/go-resty/resty/v2" ) diff --git a/hn/services/mock/mock.go b/hn/services/mock/mock.go index b29a4813..db4bdb6b 100644 --- a/hn/services/mock/mock.go +++ b/hn/services/mock/mock.go @@ -4,8 +4,8 @@ import ( "math/rand" "time" - "clx/constants/category" - "clx/item" + "github.com/bensadeh/circumflex/constants/category" + "github.com/bensadeh/circumflex/item" ) type Service struct{} diff --git a/info/info.go b/info/info.go index af65fb64..c1617772 100644 --- a/info/info.go +++ b/info/info.go @@ -3,12 +3,12 @@ package info import ( "strings" - "clx/constants/nerdfonts" + "github.com/bensadeh/circumflex/constants/nerdfonts" . "github.com/logrusorgru/aurora/v3" - "clx/constants/margins" - "clx/keymaps" text "github.com/MichaelMure/go-term-text" + "github.com/bensadeh/circumflex/constants/margins" + "github.com/bensadeh/circumflex/keymaps" ) func GetText(screenWidth int, enableNerdFonts bool) string { diff --git a/keymaps/keymaps_test.go b/keymaps/keymaps_test.go index 637a3710..bc863845 100644 --- a/keymaps/keymaps_test.go +++ b/keymaps/keymaps_test.go @@ -1,10 +1,11 @@ package keymaps_test import ( - ansi "clx/utils/strip-ansi" "testing" - "clx/keymaps" + ansi "github.com/bensadeh/circumflex/utils/strip-ansi" + + "github.com/bensadeh/circumflex/keymaps" "github.com/stretchr/testify/assert" ) diff --git a/main.go b/main.go index 604ea564..840f8565 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -import "clx/cmd" +import "github.com/bensadeh/circumflex/cmd" func main() { rootCmd := cmd.Root() diff --git a/meta/meta.go b/meta/meta.go index 9235edd1..79644aa7 100644 --- a/meta/meta.go +++ b/meta/meta.go @@ -4,13 +4,13 @@ import ( "fmt" "strconv" - "clx/constants/nerdfonts" + "github.com/bensadeh/circumflex/constants/nerdfonts" - "clx/comment" - "clx/constants/unicode" - "clx/item" - "clx/settings" - "clx/syntax" + "github.com/bensadeh/circumflex/comment" + "github.com/bensadeh/circumflex/constants/unicode" + "github.com/bensadeh/circumflex/item" + "github.com/bensadeh/circumflex/settings" + "github.com/bensadeh/circumflex/syntax" text "github.com/MichaelMure/go-term-text" diff --git a/reader/markdown/html/markdown.go b/reader/markdown/html/markdown.go index 4e2f63d0..ab67bf57 100644 --- a/reader/markdown/html/markdown.go +++ b/reader/markdown/html/markdown.go @@ -3,7 +3,7 @@ package html import ( "strings" - "clx/reader/markdown" + "github.com/bensadeh/circumflex/reader/markdown" md "github.com/JohannesKaufmann/html-to-markdown" "github.com/JohannesKaufmann/html-to-markdown/plugin" diff --git a/reader/markdown/parser/parser.go b/reader/markdown/parser/parser.go index 3269fa9a..b76436a6 100644 --- a/reader/markdown/parser/parser.go +++ b/reader/markdown/parser/parser.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "clx/reader/markdown" + "github.com/bensadeh/circumflex/reader/markdown" ) const ( diff --git a/reader/markdown/postprocessor/bbc.go b/reader/markdown/postprocessor/bbc.go index 59752f4d..57fa41c0 100644 --- a/reader/markdown/postprocessor/bbc.go +++ b/reader/markdown/postprocessor/bbc.go @@ -3,7 +3,7 @@ package postprocessor import ( "strings" - "clx/reader/markdown/postprocessor/filter" + "github.com/bensadeh/circumflex/reader/markdown/postprocessor/filter" . "github.com/logrusorgru/aurora/v3" ) diff --git a/reader/markdown/postprocessor/filter/filter.go b/reader/markdown/postprocessor/filter/filter.go index 5cd7ab6d..b60b40db 100644 --- a/reader/markdown/postprocessor/filter/filter.go +++ b/reader/markdown/postprocessor/filter/filter.go @@ -3,8 +3,8 @@ package filter import ( "strings" - "clx/constants/unicode" - ansi "clx/utils/strip-ansi" + "github.com/bensadeh/circumflex/constants/unicode" + ansi "github.com/bensadeh/circumflex/utils/strip-ansi" ) type RuleSet struct { diff --git a/reader/markdown/postprocessor/postprocessor.go b/reader/markdown/postprocessor/postprocessor.go index a5da90d9..8a367326 100644 --- a/reader/markdown/postprocessor/postprocessor.go +++ b/reader/markdown/postprocessor/postprocessor.go @@ -3,9 +3,9 @@ package postprocessor import ( "strings" - "clx/constants/margins" - "clx/constants/unicode" - "clx/screen" + "github.com/bensadeh/circumflex/constants/margins" + "github.com/bensadeh/circumflex/constants/unicode" + "github.com/bensadeh/circumflex/screen" t "github.com/MichaelMure/go-term-text" ) diff --git a/reader/markdown/postprocessor/rules.go b/reader/markdown/postprocessor/rules.go index a3aba025..c1ac92e5 100644 --- a/reader/markdown/postprocessor/rules.go +++ b/reader/markdown/postprocessor/rules.go @@ -1,10 +1,11 @@ package postprocessor import ( - "clx/constants/unicode" "strings" - "clx/reader/markdown/postprocessor/filter" + "github.com/bensadeh/circumflex/constants/unicode" + + "github.com/bensadeh/circumflex/reader/markdown/postprocessor/filter" ) func filterSite(text string, url string) string { diff --git a/reader/markdown/terminal/renderer.go b/reader/markdown/terminal/renderer.go index 29ad8154..71690e83 100644 --- a/reader/markdown/terminal/renderer.go +++ b/reader/markdown/terminal/renderer.go @@ -6,11 +6,11 @@ import ( "github.com/muesli/reflow/wordwrap" - "clx/reader/markdown" + "github.com/bensadeh/circumflex/reader/markdown" - "clx/constants/unicode" - "clx/meta" - "clx/syntax" + "github.com/bensadeh/circumflex/constants/unicode" + "github.com/bensadeh/circumflex/meta" + "github.com/bensadeh/circumflex/syntax" "github.com/charmbracelet/glamour" diff --git a/reader/reader.go b/reader/reader.go index 1a3b5838..1e0943c5 100644 --- a/reader/reader.go +++ b/reader/reader.go @@ -4,13 +4,13 @@ import ( "fmt" "time" - ansi "clx/utils/strip-ansi" + ansi "github.com/bensadeh/circumflex/utils/strip-ansi" - "clx/reader/markdown/postprocessor" - "clx/reader/markdown/terminal" + "github.com/bensadeh/circumflex/reader/markdown/postprocessor" + "github.com/bensadeh/circumflex/reader/markdown/terminal" - "clx/reader/markdown/html" - "clx/reader/markdown/parser" + "github.com/bensadeh/circumflex/reader/markdown/html" + "github.com/bensadeh/circumflex/reader/markdown/parser" "github.com/go-shiori/go-readability" ) diff --git a/syntax/syntax.go b/syntax/syntax.go index 67876b89..16e2f5d3 100644 --- a/syntax/syntax.go +++ b/syntax/syntax.go @@ -1,13 +1,14 @@ package syntax import ( - "github.com/logrusorgru/aurora/v3" "regexp" "strings" - "clx/constants/nerdfonts" + "github.com/logrusorgru/aurora/v3" + + "github.com/bensadeh/circumflex/constants/nerdfonts" - "clx/constants/unicode" + "github.com/bensadeh/circumflex/constants/unicode" "github.com/charmbracelet/lipgloss" ) diff --git a/tree/postprocessor/postprocessor.go b/tree/postprocessor/postprocessor.go index 5e2facc7..7bed2a25 100644 --- a/tree/postprocessor/postprocessor.go +++ b/tree/postprocessor/postprocessor.go @@ -3,8 +3,8 @@ package postprocessor import ( "strings" - "clx/constants/margins" - "clx/constants/unicode" + "github.com/bensadeh/circumflex/constants/margins" + "github.com/bensadeh/circumflex/constants/unicode" text "github.com/MichaelMure/go-term-text" ) diff --git a/tree/tree.go b/tree/tree.go index 6ed007ba..de25f495 100644 --- a/tree/tree.go +++ b/tree/tree.go @@ -6,16 +6,16 @@ import ( "github.com/charmbracelet/lipgloss" - "clx/constants/nerdfonts" - - "clx/comment" - "clx/constants/margins" - "clx/constants/unicode" - "clx/item" - "clx/meta" - "clx/settings" - "clx/syntax" - "clx/tree/postprocessor" + "github.com/bensadeh/circumflex/constants/nerdfonts" + + "github.com/bensadeh/circumflex/comment" + "github.com/bensadeh/circumflex/constants/margins" + "github.com/bensadeh/circumflex/constants/unicode" + "github.com/bensadeh/circumflex/item" + "github.com/bensadeh/circumflex/meta" + "github.com/bensadeh/circumflex/settings" + "github.com/bensadeh/circumflex/syntax" + "github.com/bensadeh/circumflex/tree/postprocessor" . "github.com/logrusorgru/aurora/v3" diff --git a/tree/tree_test.go b/tree/tree_test.go index 9ad1d2f9..4830b751 100644 --- a/tree/tree_test.go +++ b/tree/tree_test.go @@ -2,14 +2,15 @@ package tree_test import ( "encoding/json" - "github.com/charmbracelet/lipgloss" - "github.com/muesli/termenv" "os" "testing" - "clx/item" - "clx/settings" - "clx/tree" + "github.com/charmbracelet/lipgloss" + "github.com/muesli/termenv" + + "github.com/bensadeh/circumflex/item" + "github.com/bensadeh/circumflex/settings" + "github.com/bensadeh/circumflex/tree" "github.com/stretchr/testify/assert" ) diff --git a/utils/http/fetcher.go b/utils/http/fetcher.go index e3d88b04..66b3da98 100644 --- a/utils/http/fetcher.go +++ b/utils/http/fetcher.go @@ -5,9 +5,9 @@ import ( "strconv" "time" - "clx/app" - "clx/constants/category" - "clx/endpoints" + "github.com/bensadeh/circumflex/app" + "github.com/bensadeh/circumflex/constants/category" + "github.com/bensadeh/circumflex/endpoints" "github.com/go-resty/resty/v2" )