aboutsummaryrefslogtreecommitdiff
path: root/load_descriptions.py
blob: f8e2ecf1ba4e189b9dee1934b13726f69044b991 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

import debian.deb822
import pandas as pd

if __name__ == '__main__':
    descs = debian.deb822.Packages.iter_paragraphs(sys.stdin)
    df = pd.DataFrame([dict(p) for p in descs])
    store = pd.HDFStore('pkg.h5')
    store['descriptions'] = df
    store.close()