diff options
49 files changed, 131 insertions, 124 deletions
@@ -1,2 +1,3 @@ .idea -web/coverage.html
\ No newline at end of file +web/coverage.html +coverage.out
\ No newline at end of file diff --git a/.pik/build.sh b/.pik/build.sh index 3b12060..c07ef97 100644 --- a/.pik/build.sh +++ b/.pik/build.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# build uwu -echo "$@" +# build pik CGO_ENABLED=0 go build -v "$@" . -echo "Congratulations!" +echo "Congratulations! You just built $(./pik --version)" diff --git a/.pik/install.sh b/.pik/install.sh index 117fcc6..0b23681 100644 --- a/.pik/install.sh +++ b/.pik/install.sh @@ -11,4 +11,10 @@ if [ -f "$DEST" ] ; then fi go build -o "$DEST" "$@" . -echo "congratulations!"
\ No newline at end of file + +if [[ $PATH != *"$DEST_FOLDER"* ]] ; then + echo "installed pik but $DEST_FOLDER is not in \$PATH" + exit 1 +fi + +echo "congratulations! You are now using pik $(pik --version)"
\ No newline at end of file @@ -13,19 +13,20 @@ running `pik` in any repository will index its own file-based task system, as we ## installing +* `git clone https://git.ewy.one/pik/` +* `cd pik` + if you were already using `pik`, `pik install` would suffice! thankfully you can `pik` yourself: -* `git clone https://git.ewy.one/pik/` -* `cd pik` * `bash .pik/install.sh` wow! you just learned about `pik`s most obvious usage! ## getting started -0. if you are already using a supported external runner from [here](#supported-external-runners) and replace it - with `pik` (`make build` -> `pik build`) +0. if you are already using a supported external runner from [here](#supported-external-runners), you can use it with pik +by simply replacing the command with `pik`. 1. create a `.pik` folder in your project diff --git a/cache/cache.go b/cache/cache.go index 39ee062..7d46b3a 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -3,12 +3,12 @@ package cache import ( "bufio" "errors" + "git.ewy.one/pik/model" + "git.ewy.one/pik/paths" "io" "io/fs" "os" "path" - "pik/model" - "pik/paths" "strings" ) diff --git a/cache/cache_test.go b/cache/cache_test.go index ecf07f5..30c7784 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -3,9 +3,9 @@ package cache import ( + . "git.ewy.one/pik/runner" "github.com/stretchr/testify/assert" "path/filepath" - . "pik/runner" "strings" "testing" "testing/fstest" diff --git a/describe/describe.go b/describe/describe.go index a7070a1..0f6c6cd 100644 --- a/describe/describe.go +++ b/describe/describe.go @@ -2,9 +2,9 @@ package describe import ( "bufio" + "git.ewy.one/pik/model" "io" "os" - "pik/model" "strings" ) diff --git a/describe/describe_test.go b/describe/describe_test.go index 283be64..dcee1d7 100644 --- a/describe/describe_test.go +++ b/describe/describe_test.go @@ -3,10 +3,10 @@ package describe import ( + "git.ewy.one/pik/runner" "github.com/stretchr/testify/assert" "os" "path/filepath" - "pik/runner" "testing" ) @@ -1,14 +1,14 @@ package env import ( + "git.ewy.one/pik/flags" + "git.ewy.one/pik/indexers/pikdex" + "git.ewy.one/pik/model" + "git.ewy.one/pik/spool" "github.com/joho/godotenv" "io/fs" "os" "path/filepath" - "pik/flags" - "pik/indexers/pikdex" - "pik/model" - "pik/spool" "slices" ) diff --git a/env/env_test.go b/env/env_test.go index 865f3cd..a1826c1 100644 --- a/env/env_test.go +++ b/env/env_test.go @@ -3,11 +3,11 @@ package env import ( + "git.ewy.one/pik/model" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" "os" "path/filepath" - "pik/model" "testing" ) @@ -2,11 +2,11 @@ package git import ( "errors" + "git.ewy.one/pik/model" + "git.ewy.one/pik/spool" "os" "os/exec" "path/filepath" - "pik/model" - "pik/spool" "strconv" "strings" ) @@ -1,4 +1,4 @@ -module pik +module git.ewy.one/pik go 1.26.1 diff --git a/indexers/pikdex/hydrate.go b/indexers/pikdex/hydrate.go index ec7f71f..967ce99 100644 --- a/indexers/pikdex/hydrate.go +++ b/indexers/pikdex/hydrate.go @@ -1,7 +1,7 @@ package pikdex import ( - "pik/model" + "git.ewy.one/pik/model" "strings" ) diff --git a/indexers/pikdex/hydrate_test.go b/indexers/pikdex/hydrate_test.go index 72ac8ea..013cafb 100644 --- a/indexers/pikdex/hydrate_test.go +++ b/indexers/pikdex/hydrate_test.go @@ -3,8 +3,8 @@ package pikdex import ( + "git.ewy.one/pik/runner" "github.com/stretchr/testify/assert" - "pik/runner" "testing" ) diff --git a/indexers/pikdex/index.go b/indexers/pikdex/index.go index 64b111f..bd9f1e1 100644 --- a/indexers/pikdex/index.go +++ b/indexers/pikdex/index.go @@ -2,12 +2,12 @@ package pikdex import ( "errors" + "git.ewy.one/pik/model" + "git.ewy.one/pik/spool" "io/fs" "os" "path" "path/filepath" - "pik/model" - "pik/spool" "slices" "strings" "sync" @@ -3,24 +3,24 @@ package main import ( _ "embed" "fmt" + "git.ewy.one/pik/cache" + "git.ewy.one/pik/crawl" + "git.ewy.one/pik/flags" + "git.ewy.one/pik/git" + "git.ewy.one/pik/indexers/pikdex" + "git.ewy.one/pik/menu" + "git.ewy.one/pik/model" + "git.ewy.one/pik/paths" + "git.ewy.one/pik/run" + "git.ewy.one/pik/runner/exc" + "git.ewy.one/pik/runner/gnumake" + "git.ewy.one/pik/runner/just" + "git.ewy.one/pik/runner/python" + "git.ewy.one/pik/runner/shell" + "git.ewy.one/pik/search" + "git.ewy.one/pik/spool" "github.com/spf13/pflag" "os" - "pik/cache" - "pik/crawl" - "pik/flags" - "pik/git" - "pik/indexers/pikdex" - "pik/menu" - "pik/model" - "pik/paths" - "pik/run" - "pik/runner/exc" - "pik/runner/gnumake" - "pik/runner/just" - "pik/runner/python" - "pik/runner/shell" - "pik/search" - "pik/spool" "sync" ) diff --git a/menu/banner.go b/menu/banner.go index 33d79d4..3cbb4d6 100644 --- a/menu/banner.go +++ b/menu/banner.go @@ -1,12 +1,12 @@ package menu import ( + "git.ewy.one/pik/flags" + "git.ewy.one/pik/menu/style" + "git.ewy.one/pik/model" + "git.ewy.one/pik/paths" "github.com/charmbracelet/lipgloss" "os/exec" - "pik/flags" - "pik/menu/style" - "pik/model" - "pik/paths" "strings" ) diff --git a/menu/confirm.go b/menu/confirm.go index 1c6a535..b996285 100644 --- a/menu/confirm.go +++ b/menu/confirm.go @@ -3,12 +3,12 @@ package menu import ( "bufio" "fmt" + "git.ewy.one/pik/flags" + "git.ewy.one/pik/menu/style" + "git.ewy.one/pik/model" "github.com/charmbracelet/lipgloss" "io" "os" - "pik/flags" - "pik/menu/style" - "pik/model" "slices" ) diff --git a/menu/git.go b/menu/git.go index ed5a595..73248f0 100644 --- a/menu/git.go +++ b/menu/git.go @@ -1,9 +1,9 @@ package menu import ( + "git.ewy.one/pik/menu/style" + "git.ewy.one/pik/model" "github.com/charmbracelet/lipgloss" - "pik/menu/style" - "pik/model" "strconv" ) diff --git a/menu/icon.go b/menu/icon.go index ec2135f..29ae87d 100644 --- a/menu/icon.go +++ b/menu/icon.go @@ -1,8 +1,8 @@ package menu import ( + "git.ewy.one/pik/menu/style" "github.com/charmbracelet/lipgloss" - "pik/menu/style" "strings" ) diff --git a/menu/menu.go b/menu/menu.go index 2677259..eaefdc8 100644 --- a/menu/menu.go +++ b/menu/menu.go @@ -2,9 +2,9 @@ package menu import ( "errors" + "git.ewy.one/pik/model" + "git.ewy.one/pik/spool" tea "github.com/charmbracelet/bubbletea" - "pik/model" - "pik/spool" ) var WrongModelTypeError = errors.New("wrong model type") diff --git a/menu/model.go b/menu/model.go index e5b4b88..5144110 100644 --- a/menu/model.go +++ b/menu/model.go @@ -1,14 +1,14 @@ package menu import ( + "git.ewy.one/pik/model" + "git.ewy.one/pik/motd" + "git.ewy.one/pik/spool" + "git.ewy.one/pik/viewport" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/x/term" "github.com/spf13/pflag" "os" - "pik/model" - "pik/motd" - "pik/spool" - "pik/viewport" ) type Model struct { diff --git a/menu/source.go b/menu/source.go index e08c8bd..ea5619f 100644 --- a/menu/source.go +++ b/menu/source.go @@ -1,9 +1,9 @@ package menu import ( + "git.ewy.one/pik/menu/style" + "git.ewy.one/pik/model" "github.com/charmbracelet/lipgloss" - "pik/menu/style" - "pik/model" "slices" "strings" ) diff --git a/menu/state.go b/menu/state.go index 16702a2..0a5ffbc 100644 --- a/menu/state.go +++ b/menu/state.go @@ -1,8 +1,8 @@ package menu import ( + "git.ewy.one/pik/menu/style" "github.com/charmbracelet/lipgloss" - "pik/menu/style" ) var ( diff --git a/menu/target.go b/menu/target.go index e619cbc..2a7bd22 100644 --- a/menu/target.go +++ b/menu/target.go @@ -1,10 +1,10 @@ package menu import ( + "git.ewy.one/pik/menu/style" + "git.ewy.one/pik/model" + "git.ewy.one/pik/viewport" "github.com/charmbracelet/lipgloss" - "pik/menu/style" - "pik/model" - "pik/viewport" ) var ( diff --git a/model/new.go b/model/new.go index 8dd0ca4..7753f65 100644 --- a/model/new.go +++ b/model/new.go @@ -2,10 +2,10 @@ package model import ( "errors" + "git.ewy.one/pik/flags" + "git.ewy.one/pik/identity" "io/fs" "path/filepath" - "pik/flags" - "pik/identity" "strings" "sync" ) diff --git a/model/source.go b/model/source.go index b7f28d4..f0296ed 100644 --- a/model/source.go +++ b/model/source.go @@ -1,9 +1,9 @@ package model import ( - "pik/identity" - "pik/paths" - "pik/spool" + "git.ewy.one/pik/identity" + "git.ewy.one/pik/paths" + "git.ewy.one/pik/spool" ) // Source is a location containing stuff we can run diff --git a/order/order.go b/order/order.go index 83c7dcb..b4bc0d2 100644 --- a/order/order.go +++ b/order/order.go @@ -2,11 +2,11 @@ package order import ( "bufio" + "git.ewy.one/pik/describe" + "git.ewy.one/pik/identity" "io" "io/fs" "os" - "pik/describe" - "pik/identity" "strings" ) diff --git a/run/edit.go b/run/edit.go index ad7645c..b3ea722 100644 --- a/run/edit.go +++ b/run/edit.go @@ -2,9 +2,9 @@ package run import ( "errors" + "git.ewy.one/pik/model" "os" "os/exec" - "pik/model" ) var NoEditorError = errors.New("$EDITOR not set") @@ -2,11 +2,11 @@ package run import ( "fmt" + "git.ewy.one/pik/env" + "git.ewy.one/pik/flags" + "git.ewy.one/pik/menu" + "git.ewy.one/pik/model" "os" - "pik/env" - "pik/flags" - "pik/menu" - "pik/model" "slices" ) diff --git a/runner/base.go b/runner/base.go index e1fef66..515f433 100644 --- a/runner/base.go +++ b/runner/base.go @@ -1,10 +1,10 @@ package runner import ( + "git.ewy.one/pik/identity" + "git.ewy.one/pik/indexers/pikdex" + "git.ewy.one/pik/model" "path/filepath" - "pik/identity" - "pik/indexers/pikdex" - "pik/model" "slices" "strings" ) diff --git a/runner/create.go b/runner/create.go index 4e9035b..921ebab 100644 --- a/runner/create.go +++ b/runner/create.go @@ -3,10 +3,10 @@ package runner import ( + "git.ewy.one/pik/identity" + "git.ewy.one/pik/model" "github.com/stretchr/testify/assert" "os/exec" - "pik/identity" - "pik/model" "testing" ) diff --git a/runner/exc/runner.go b/runner/exc/runner.go index 4b0c2e6..734d013 100644 --- a/runner/exc/runner.go +++ b/runner/exc/runner.go @@ -1,12 +1,12 @@ package exc import ( + "git.ewy.one/pik/identity" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" + "git.ewy.one/pik/spool" "io/fs" "path/filepath" - "pik/identity" - "pik/model" - "pik/runner" - "pik/spool" ) func (e *exc) Hydrate(target model.Target) (model.HydratedTarget, error) { diff --git a/runner/exc/target.go b/runner/exc/target.go index c9d20b8..1f665c0 100644 --- a/runner/exc/target.go +++ b/runner/exc/target.go @@ -1,11 +1,11 @@ package exc import ( + "git.ewy.one/pik/describe" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" + "git.ewy.one/pik/spool" "os/exec" - "pik/describe" - "pik/model" - "pik/runner" - "pik/spool" ) type Executable struct { diff --git a/runner/gnumake/make.go b/runner/gnumake/make.go index e04f927..de9a9b9 100644 --- a/runner/gnumake/make.go +++ b/runner/gnumake/make.go @@ -2,12 +2,12 @@ package gnumake import ( "errors" + "git.ewy.one/pik/identity" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "io/fs" "os/exec" "path/filepath" - "pik/identity" - "pik/model" - "pik/runner" "regexp" "slices" "strings" diff --git a/runner/gnumake/target.go b/runner/gnumake/target.go index bde09f8..7f00ae2 100644 --- a/runner/gnumake/target.go +++ b/runner/gnumake/target.go @@ -1,9 +1,9 @@ package gnumake import ( + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "os/exec" - "pik/model" - "pik/runner" ) type Target struct { diff --git a/runner/just/just.go b/runner/just/just.go index 377553e..6c414a3 100644 --- a/runner/just/just.go +++ b/runner/just/just.go @@ -2,12 +2,12 @@ package just import ( "errors" + "git.ewy.one/pik/identity" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "io/fs" "os/exec" "path/filepath" - "pik/identity" - "pik/model" - "pik/runner" "strings" ) diff --git a/runner/just/target.go b/runner/just/target.go index 9319e73..8f80b55 100644 --- a/runner/just/target.go +++ b/runner/just/target.go @@ -1,9 +1,9 @@ package just import ( + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "os/exec" - "pik/model" - "pik/runner" ) type Target struct { diff --git a/runner/python/file.go b/runner/python/file.go index 4734b0a..86e2b73 100644 --- a/runner/python/file.go +++ b/runner/python/file.go @@ -1,12 +1,12 @@ package python import ( + "git.ewy.one/pik/describe" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" + "git.ewy.one/pik/spool" "os/exec" "path/filepath" - "pik/describe" - "pik/model" - "pik/runner" - "pik/spool" ) type File struct { diff --git a/runner/python/indexer.go b/runner/python/indexer.go index 98502ca..c01d567 100644 --- a/runner/python/indexer.go +++ b/runner/python/indexer.go @@ -1,11 +1,11 @@ package python import ( + "git.ewy.one/pik/model" "github.com/pelletier/go-toml/v2" "io/fs" "os" "path/filepath" - "pik/model" ) type pyproj struct { diff --git a/runner/python/proj.go b/runner/python/proj.go index 1230b1c..d407fcc 100644 --- a/runner/python/proj.go +++ b/runner/python/proj.go @@ -1,10 +1,10 @@ package python import ( + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "os/exec" "path/filepath" - "pik/model" - "pik/runner" ) type Project struct { diff --git a/runner/python/runner.go b/runner/python/runner.go index 73192e6..edd49c4 100644 --- a/runner/python/runner.go +++ b/runner/python/runner.go @@ -2,12 +2,12 @@ package python import ( "errors" + "git.ewy.one/pik/identity" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "io/fs" "os/exec" "path/filepath" - "pik/identity" - "pik/model" - "pik/runner" ) type python struct { diff --git a/runner/shell/hydrated.go b/runner/shell/hydrated.go index dcd28be..981eb48 100644 --- a/runner/shell/hydrated.go +++ b/runner/shell/hydrated.go @@ -2,10 +2,10 @@ package shell import ( "errors" - "pik/describe" - "pik/model" - "pik/runner" - "pik/spool" + "git.ewy.one/pik/describe" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" + "git.ewy.one/pik/spool" ) type Hydrated struct { diff --git a/runner/shell/shell.go b/runner/shell/shell.go index c4513c9..792a7c3 100644 --- a/runner/shell/shell.go +++ b/runner/shell/shell.go @@ -3,14 +3,14 @@ package shell import ( "bufio" "errors" + "git.ewy.one/pik/identity" + "git.ewy.one/pik/indexers/pikdex" + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" + "git.ewy.one/pik/spool" "io/fs" "os/exec" "path/filepath" - "pik/identity" - "pik/indexers/pikdex" - "pik/model" - "pik/runner" - "pik/spool" "slices" "strings" "sync" diff --git a/runner/shell/target.go b/runner/shell/target.go index 9c53617..b37f812 100644 --- a/runner/shell/target.go +++ b/runner/shell/target.go @@ -1,9 +1,9 @@ package shell import ( + "git.ewy.one/pik/model" + "git.ewy.one/pik/runner" "os/exec" - "pik/model" - "pik/runner" ) type Target struct { diff --git a/runner/stub.go b/runner/stub.go index 9899b0d..e64e57f 100644 --- a/runner/stub.go +++ b/runner/stub.go @@ -3,8 +3,8 @@ package runner import ( + "git.ewy.one/pik/model" "os/exec" - "pik/model" ) // Stub is the most minimal and useless implementation of the target interface. It only panics. Use if you need a target-compliant struct. diff --git a/search/search.go b/search/search.go index 7d863b9..a95d414 100644 --- a/search/search.go +++ b/search/search.go @@ -1,7 +1,7 @@ package search import ( - "pik/model" + "git.ewy.one/pik/model" "slices" ) diff --git a/search/search_test.go b/search/search_test.go index 7246ffc..8e82b4b 100644 --- a/search/search_test.go +++ b/search/search_test.go @@ -3,8 +3,8 @@ package search import ( + "git.ewy.one/pik/runner" "github.com/stretchr/testify/assert" - "pik/runner" "testing" ) diff --git a/viewport/scroll.go b/viewport/scroll.go index 809fe17..280fea7 100644 --- a/viewport/scroll.go +++ b/viewport/scroll.go @@ -1,8 +1,8 @@ package viewport import ( + "git.ewy.one/pik/menu/style" "github.com/charmbracelet/lipgloss" - "pik/menu/style" "strings" ) |
