ipinfo / mmdbctl

mmdbctl is an MMDB file management CLI supporting various operations on MMDB database files.
Apache License 2.0
93 stars 13 forks source link

File extensions not triggering default flags in import #3

Closed rm-Umar closed 2 years ago

rm-Umar commented 2 years ago

According to mmdbctl import help the file extensions should trigger the default flag

    -t, --tsv
      interpret input file as TSV.
      by default, the .tsv extension will turn this on.

but it's giving error if we don't specify the flag explicitly

$ mmdbctl import abc.csv 
err: input file type unknown

Giving error on json and csv as well

UmanShahzad commented 2 years ago

This is because the input is not given via arguments, it's given via the -i or --in flag.

UmanShahzad commented 2 years ago

We can probably add support for allowing the first argument to be optionally an input and second argument being the output MMDB.