kyoh86 / gogh

GO GitHub project manager
MIT License
32 stars 0 forks source link

A way to backup and restore the list: `gogh dump` #35

Closed kyoh86 closed 5 years ago

kyoh86 commented 5 years ago

I want do like this:

$ gogh list > ghqlist.txt
$ cat ghqlist.txt | gogh get

I should that gogh can solve it.

introduce: https://github.com/motemen/ghq/issues/92

kyoh86 commented 5 years ago
$ gogh list | grep gogh
github.com/kyoh86/vim-gogh
github.com/kyoh86/gogh
$ gogh list | grep gogh > list.txt
$ cat list.txt | GOGH_ROOT=~/hoge gogh pipe
[ error ] 2019/03/17 16:11:00 fork/exec : no such file or directory
$ cat list.txt | GOGH_ROOT=~/hoge gogh bulk
[ error ] 2019/03/17 16:11:04 repository remote has too many slashes
$ gogh list -f full | grep gogh            
/Users/yamada/Projects/github.com/kyoh86/vim-gogh
/Users/yamada/Projects/github.com/kyoh86/gogh
$ cat list.txt | sed -e 's/^/https:\/\//g' | GOGH_ROOT=~/hoge gogh bulk
[  warn ] 2019/03/17 16:14:22 root dir /Users/yamada/hoge is not exist
Cloning into '/Users/yamada/hoge/github.com/kyoh86/vim-gogh'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 16 (delta 2), reused 16 (delta 2), pack-reused 0
Unpacking objects: 100% (16/16), done.
Cloning into '/Users/yamada/hoge/github.com/kyoh86/gogh'...
remote: Enumerating objects: 83, done.
remote: Counting objects: 100% (83/83), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 875 (delta 42), reused 53 (delta 24), pack-reused 792
Receiving objects: 100% (875/875), 6.95 MiB | 561.00 KiB/s, done.
Resolving deltas: 100% (571/571), done.
$

hmm..

It maybe resolved that gogh become can put URL list. I think that I should create a new formatter "url" for gogh list.

gogh list -f url

And I can create an alias for gogh list -f url as gogh dump.