X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=lightcards%2Fparse.py;h=6f3c25f6baf0d40b75fbdcfcf6ecbe4e850fae98;hb=da5f204dfb0e33a99bba1fa00842b253bf9947e0;hp=457da136f4b30b503f3350dfdcf3f9dd7d58150c;hpb=df1f0b77c2104505501b9e1b342f6268cf108c8d;p=lightcards.git diff --git a/lightcards/parse.py b/lightcards/parse.py index 457da13..6f3c25f 100755 --- a/lightcards/parse.py +++ b/lightcards/parse.py @@ -6,6 +6,8 @@ import sys from bs4 import BeautifulSoup import markdown +from .deck import Card + def md2html(file): with open(file, "r", encoding="utf-8") as input_file: @@ -26,7 +28,7 @@ def parse_html(html): outp = [] for x in soup.find_all("tr"): - outp.append([clean_text(y) for y in x.find_all("td")]) + outp.append(Card([clean_text(y) for y in x.find_all("td")])) return ([clean_text(x) for x in soup.find_all("th")], clean_list(outp))