Skip to content
Snippets Groups Projects
Commit 96ac300f authored by tuhe's avatar tuhe
Browse files

testing again

parent f7823646
Branches
No related tags found
No related merge requests found
Pipeline #7467 passed
......@@ -184,9 +184,9 @@ def set_svg_background_images(lecture_tex, verbose=False,
if not v.endswith("png"):
os.remove(v)
for v in glob.glob(SVG_OSVG_DIR + "/x_do_not_edit*.pdf"):
# for v in glob.glob(SVG_OSVG_DIR + "/x_do_not_edit*.pdf"):
# if not v.endswith("png"):
os.remove(v)
# os.remove(v)
# Not sure I want to do add this as an option right now. It makes everything slower...
# for f in glob.glob(lecture_tex[:-4] + '_NO_SVGS*'):
......
......@@ -65,13 +65,16 @@ def slider_cli(latexfile=None, interactive=True, verbose=False, clean=False, ver
if "\\begin{document}" in s and "{beamer}" in s and "_NO_SVGS" not in name:
print("Main file found!")
mfiles.append(name)
if len(mfiles) != 1:
print("Too candidate files found")
if len(mfiles) > 1:
print("Too candidate files found:")
print(mfiles)
sys.exit()
elif len(mfiles) == 0:
print("Please specify a LaTeX index file. For instance:\n> slider index.tex")
sys.exit()
else:
latexfile = mfiles[0]
# latexfile = "index.tex"
if not latexfile.endswith(".tex"):
latexfile += ".tex"
latexfile = os.path.join(wdir, latexfile)
......
......@@ -22,7 +22,7 @@ base_slide = """
% This slideshow is made using slider. Install using: pip install beamer-slider
% check http://gitlab.compute.dtu.dk/tuhe/slider for more information.
\\begin{frame}\\osvg{myoverlay} % Use the \\osvg{labelname} - tag to create new overlays. Run the command `slider` in the terminal and check the ./osvgs directory for the svg files!
\\title{Slide with an overlay}
\\frametitle{Slide with an overlay}
This is some example text!
\\end{frame}
......
tests/test_images/index_a.png

11.7 KiB

......@@ -43,9 +43,9 @@ class TestSlider(TestCase):
shutil.rmtree("./automatic")
os.mkdir("automatic")
if os.path.isdir("./test_images"):
shutil.rmtree("./test_images")
os.mkdir("./test_images")
if os.path.isdir("./tests_images"):
shutil.rmtree("./tests_images")
os.mkdir("./tests_images")
slider_cli("automatic/index.tex", interactive=False)
......@@ -74,8 +74,9 @@ class TestSlider(TestCase):
pdf2png("automatic/index.pdf", fout="tests_images/index_front.png", page_to_convert=1)
shutil.copyfile("automatic/index.pdf", "tests_images/index.pdf")
def test_second_page_before_compile(self):
assert_images_equal("automatic/index_a.png", "expected/index_a.png")
# Not a too great idea to test this because of the date.
# def test_second_page_before_compile(self):
# assert_images_equal("automatic/index_a.png", "expected/index_a.png")
def test_second_page_after_compile(self):
assert_images_equal("automatic/index_b.png", "expected/index_b.png")
......
No preview for this file type
tests/tests_images/index_a.png

15.4 KiB

File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment