rename applephotos to photoscli, update module path to gitea.k3s.k0.nu/tools/photocli
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/einand/applephotos/internal/photos"
|
||||
"gitea.k3s.k0.nu/tools/photocli/internal/photos"
|
||||
)
|
||||
|
||||
func run(args []string, stdout, stderr io.Writer, bridge photos.Bridge) int {
|
||||
@@ -37,14 +37,14 @@ func run(args []string, stdout, stderr io.Writer, bridge photos.Bridge) int {
|
||||
}
|
||||
|
||||
func usage(w io.Writer) {
|
||||
fmt.Fprintln(w, `applephotos — export optimized images from Apple Photos
|
||||
fmt.Fprintln(w, `photoscli — export optimized images from Apple Photos
|
||||
|
||||
Usage:
|
||||
applephotos albums
|
||||
applephotos photos --album-id <id>
|
||||
applephotos tree
|
||||
applephotos backup-all --out <dir> [--size <px>] [--originals]
|
||||
applephotos export --album-id <id> --out <dir> [--size <px>] [--originals]
|
||||
photoscli albums
|
||||
photoscli photos --album-id <id>
|
||||
photoscli tree
|
||||
photoscli backup-all --out <dir> [--size <px>] [--originals]
|
||||
photoscli export --album-id <id> --out <dir> [--size <px>] [--originals]
|
||||
|
||||
Commands:
|
||||
albums List user-created albums
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/einand/applephotos/internal/photos"
|
||||
"gitea.k3s.k0.nu/tools/photocli/internal/photos"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/einand/applephotos/internal/photos"
|
||||
"gitea.k3s.k0.nu/tools/photocli/internal/photos"
|
||||
)
|
||||
|
||||
type mockBridge struct {
|
||||
@@ -89,7 +89,7 @@ func TestRunNoArgs(t *testing.T) {
|
||||
if rc != 1 {
|
||||
t.Errorf("rc = %d, want 1", rc)
|
||||
}
|
||||
if !strings.Contains(stderr, "applephotos") {
|
||||
if !strings.Contains(stderr, "photoscli") {
|
||||
t.Errorf("stderr should contain usage, got: %s", stderr)
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func TestRunHelp(t *testing.T) {
|
||||
if rc != 0 {
|
||||
t.Errorf("%s: rc = %d, want 0", cmd, rc)
|
||||
}
|
||||
if !strings.Contains(stderr, "applephotos") {
|
||||
if !strings.Contains(stderr, "photoscli") {
|
||||
t.Errorf("%s: stderr should contain usage", cmd)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user