gnu-keywords/main.py

22 lines
608 B
Python

#!/usr/bin/env python3
# find keywords and exports them
# SPDX-FileCopyrightText: 2022 Beat Jäckle <beat@git,jdmweb2.ch>
# SPDX-License-Identifier: GPL-3.0-or-later
#
from datareader import DataReader
from gnukeywords import GnuKeywords
def main(args):
keywords = dict()
datareader = DataReader(datadir='./data/')
gnukeywords = GnuKeywords(lang='de')
for articlename, htmlstr in datareader:
keywords[articlename] = gnukeywords(htmlstr)
print(f"{articlename} -> {keywords[articlename]}")
return 0
if __name__ == '__main__':
import sys
sys.exit(main(sys.argv))