aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-10-18 16:31:54 +0200
committern-peugnet <n.peugnet@free.fr>2021-10-18 16:34:02 +0200
commit65d747171ecc4dab437aecb2573e6d25c2922730 (patch)
tree362bce97f26f9218c3584fb58a789f825c072aae /main.go
parentbd1681cfe3554075b1b0827563b76c6b95bf8b94 (diff)
downloaddna-backup-65d747171ecc4dab437aecb2573e6d25c2922730.tar.gz
dna-backup-65d747171ecc4dab437aecb2573e6d25c2922730.zip
update todo and add CLI optionswork/export
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/main.go b/main.go
index fb0478e..250af73 100644
--- a/main.go
+++ b/main.go
@@ -40,10 +40,12 @@ const (
)
var (
- logLevel int
- chunkSize int
- format string
- trackSize int
+ logLevel int
+ chunkSize int
+ format string
+ poolCount int
+ trackSize int
+ tracksPerPool int
)
var Commit = command{flag.NewFlagSet("commit", flag.ExitOnError), commitMain,
@@ -79,7 +81,9 @@ func init() {
s.Flag.IntVar(&chunkSize, "c", 8<<10, "chunk size")
}
Export.Flag.StringVar(&format, "format", "dir", "format of the export (dir, csv)")
+ Export.Flag.IntVar(&poolCount, "pools", 96, "number of pools")
Export.Flag.IntVar(&trackSize, "track", 1020, "size of a DNA track")
+ Export.Flag.IntVar(&tracksPerPool, "tracks-per-pool", 10000, "number of tracks per pool")
}
func main() {
@@ -138,10 +142,10 @@ func exportMain(args []string) error {
r := repo.NewRepo(source, chunkSize)
switch format {
case "dir":
- exporter := dna.New(dest, 96, trackSize, 10000)
+ exporter := dna.New(dest, poolCount, trackSize, tracksPerPool)
r.Export(exporter)
case "csv":
- fmt.Println("csv")
+ fmt.Println("not yet implemented")
default:
logger.Errorf("unknown format %s", format)
}