You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
524 B
21 lines
524 B
1 year ago
|
import tomli
|
||
|
from column import Column
|
||
|
from parse_rss_feeds import parse_rss_feeds
|
||
|
|
||
|
|
||
|
with open("columns.toml", "rb") as f:
|
||
|
feeds_dict = tomli.load(f)
|
||
|
|
||
|
feeds_file = feeds_dict["column"]
|
||
|
columns = []
|
||
|
for feed_from_file in feeds_file:
|
||
|
entries = parse_rss_feeds(feed_from_file["urls"])
|
||
|
title = feed_from_file["title"]
|
||
|
column = Column(title=title, entries=entries)
|
||
|
if "limit" in feed_from_file:
|
||
|
print(feed_from_file["limit"])
|
||
|
columns.append(column)
|
||
|
|
||
|
for column in columns:
|
||
|
print(column.title)
|