forked from extern/StartTree
add basic pretty
This commit is contained in:
parent
4604d29deb
commit
040719487a
@ -4,6 +4,7 @@ import yaml
|
|||||||
import os
|
import os
|
||||||
from os.path import expanduser
|
from os.path import expanduser
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
# get home directory
|
# get home directory
|
||||||
home = expanduser("~")
|
home = expanduser("~")
|
||||||
@ -15,6 +16,12 @@ config_path = home + '/.config/StartTree/config.yaml'
|
|||||||
# get cache path
|
# get cache path
|
||||||
cache_dir = home + '/.cache/StartTree'
|
cache_dir = home + '/.cache/StartTree'
|
||||||
|
|
||||||
|
def prettifyHTML():
|
||||||
|
html = "<div><h1>Hello</h1></div>"
|
||||||
|
soup = BeautifulSoup(html, 'html.parser')
|
||||||
|
prettyHTML = print(soup.prettify())
|
||||||
|
return prettyHTML
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
# check if .config path exists
|
# check if .config path exists
|
||||||
if not os.path.isdir(home + '/.config'):
|
if not os.path.isdir(home + '/.config'):
|
||||||
|
Loading…
Reference in New Issue
Block a user