docs: export website as LaTeX document
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@251 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
parent
03b3c1fe57
commit
1a2c4dae2b
3 changed files with 4288 additions and 5 deletions
bonus2/src/ch/usi/inf/atelier/group1
docs/website_as_latex
|
@ -16,7 +16,7 @@ import java.util.*
|
|||
|
||||
class HtmlParser(private val singlePage: Boolean) {
|
||||
private val content = StringBuilder()
|
||||
private var outName = "${SimpleDateFormat("yyyy-MM-dd_hh:mm").format(Date())}.html"
|
||||
private var outName = "${SimpleDateFormat("yyyy-MM-dd_hh-mm").format(Date())}.html"
|
||||
|
||||
/**
|
||||
* Parse a jekyll html file to a LaTex Document
|
||||
|
|
|
@ -5,6 +5,8 @@ package ch.usi.inf.atelier.group1.jekyll
|
|||
|
||||
import org.jsoup.Jsoup
|
||||
import org.jsoup.parser.Parser
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
class HtmlToLatexWriter(private var content: String, private val singlePage: Boolean) {
|
||||
|
@ -306,11 +308,12 @@ class HtmlToLatexWriter(private var content: String, private val singlePage: Boo
|
|||
private const val TITLE = "\\title{%1\$s}"
|
||||
private const val LINK = "\\underline{\\href{%1\$s}{%2\$s}}"
|
||||
|
||||
private const val HEADER =
|
||||
private val HEADER = "% File autogenerated using the Bonus 2 program at " +
|
||||
"${SimpleDateFormat("yyyy-MM-dd hh:mm").format(Date())}\n" +
|
||||
"\\documentclass[hidelinks,12pt,a4paper,numbers=enddot]{scrartcl}\n\n" +
|
||||
"\\usepackage[margin=2cm]{geometry}\n" +
|
||||
"\\usepackage{hyperref}\n" +
|
||||
"\\usepackage[utf8]{inputenc}"
|
||||
"\\usepackage[margin=2cm]{geometry}\n" +
|
||||
"\\usepackage{hyperref}\n" +
|
||||
"\\usepackage[utf8]{inputenc}"
|
||||
|
||||
private val SPECIAL_CHARS_HTML =
|
||||
arrayOf("&", "<", ">", "'",
|
||||
|
|
4280
docs/website_as_latex/2018-11-18_08-50.tex
Normal file
4280
docs/website_as_latex/2018-11-18_08-50.tex
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue