Commit fbbf2344 authored by Etienne Nadji's avatar Etienne Nadji

modifié : plugin/vepub_css.py

	modifié :         plugin/vim_epub.vim
parent afefe1d0
......@@ -8,6 +8,21 @@
from __future__ import unicode_literals
def make_fontdef_summary(sources,output_file):
if sources:
with open(output_file,"w") as out:
#out.write("\t+-------------------------+\n")
#out.write("\t| EPUB's font definitions |\n")
#out.write("\t+-------------------------+\n\n")
fonts = []
for font_def in sources:
print font_def["url"].split("/")[-1]
else:
return False
def find_font_face_src(css_file):
"""
Return a list of dictionnaries as:
......
......@@ -340,7 +340,7 @@ with Open_EPUB(vim.buffers) as epubs:
if have_tmp_path:
epubs.extract()
css_to_open = []
cssf = []
for css in available_css_files:
css_file = "{0}{1}".format(epubs.temporary_epub["path"],css)
defs = cssparse.find_font_face_src(css_file)
......@@ -349,10 +349,10 @@ with Open_EPUB(vim.buffers) as epubs:
if defs:
for fdef in defs:
if fdef["url"] in font_name:
css_to_open.append([css,fdef["line"]])
cssf.append([css,fdef["line"]])
if css_to_open:
pass
if cssf:
cssparse.make_fontdef_summary(cssf)
# * xhtml *
# SI des fichiers (X)HTML
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment