first commit
This commit is contained in:
commit
a3dbf9cbe3
16 files changed
+471
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import bs4
|
||||
from .formatters import formatters
|
||||
|
||||
|
||||
def main():
|
||||
with open("test.html", "r") as file:
|
||||
soup = bs4.BeautifulSoup(file, "html.parser")
|
||||
|
||||
for formatter in formatters:
|
||||
formatter.format(soup)
|
||||
|
||||
formatter = bs4.formatter.HTMLFormatter(indent=4)
|
||||
with open("out.html", "w") as file:
|
||||
file.write("{% load static %}\n")
|
||||
file.write(soup.prettify(formatter=formatter))
|
||||
|
||||
|
||||
def command_entry():
|
||||
print("ok")
|
||||
Reference in new issue
Block a user