-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from sfinkens/fix-minor-issues
Fix minor issues
- Loading branch information
Showing
5 changed files
with
50 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2020 pygac-fdr developers | ||
# | ||
# This file is part of pygac-fdr. | ||
# | ||
# pygac-fdr is free software: you can redistribute it and/or modify it under the | ||
# terms of the GNU General Public License as published by the Free Software | ||
# Foundation, either version 3 of the License, or (at your option) any later | ||
# version. | ||
# | ||
# pygac-fdr is distributed in the hope that it will be useful, but WITHOUT ANY | ||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along with | ||
# pygac-fdr. If not, see <http://www.gnu.org/licenses/>. | ||
"""Print contents of metadata database.""" | ||
|
||
import argparse | ||
import pandas as pd | ||
|
||
from pygac_fdr.metadata import MetadataCollector | ||
|
||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser(description=__doc__) | ||
parser.add_argument('dbfile', help='Metadata database') | ||
parser.add_argument('-n', help='Maximum number of rows to be printed', | ||
type=int) | ||
args = parser.parse_args() | ||
|
||
collector = MetadataCollector() | ||
mda = collector.read_sql(args.dbfile) | ||
|
||
pd.set_option('display.max_rows', args.n) | ||
pd.set_option('display.max_columns', None) | ||
pd.set_option('display.width', None) | ||
pd.set_option('display.max_colwidth', 22) | ||
|
||
print(mda) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters