try:
return markdown.markdown(open(file, "r").read(), extensions=["tables"])
except FileNotFoundError:
- print(f'lightcards: "{file}": No such file or directory')
- exit(1)
+ sys.exit(f'lightcards: "{file}": No such file or directory')
def parse_html(html):
def clean_text(inp):
return inp.get_text().rstrip()
- soup = BeautifulSoup(html, "html.parser")
+ soup = BeautifulSoup(html, "html.parser").find("table")
outp = []
for x in soup.find_all("tr"):