chore(pdf): fix build, switch latex package
This commit is contained in:
parent
6848758ee4
commit
e95eb73d87
@ -22,8 +22,8 @@ let
|
||||
uniworx.uniworx.components.exes.uniworx
|
||||
prev.dockerTools.binSh findutils coreutils
|
||||
cups # needed for interface with print center
|
||||
# texlive.combined.scheme-medium # Causes container to be too large! However, might be needed by the pandoc library to produce PDFs, but nix ought to include the necessary parts already
|
||||
texlive.combined.scheme-basic # for PDFLaTeX for pandoc PDF creation
|
||||
texlive.combined.scheme-medium # Causes container to be too large! However, might be needed by the pandoc library to produce PDFs, but nix ought to include the necessary parts already
|
||||
#texlive.combined.scheme-basic # for PDFLaTeX for pandoc PDF creation
|
||||
# pandoc # just for manual testing within the pod, remove for production, since we use the library instead!
|
||||
curl wget netcat # just for manual testing within the pod, remove for production!
|
||||
openldap # just for manual testing within the pod, remove for production!
|
||||
|
||||
20
routes
20
routes
@ -54,8 +54,8 @@
|
||||
!/users/functionary-invite AdminFunctionaryInviteR GET POST
|
||||
!/users/add AdminUserAddR GET POST
|
||||
/admin AdminR GET
|
||||
/admin/test AdminTestR GET POST
|
||||
/admin/test/pdf AdminTestPdfR GET
|
||||
/admin/test AdminTestR GET POST
|
||||
/admin/test/pdf AdminTestPdfR GET
|
||||
/admin/errMsg AdminErrMsgR GET POST
|
||||
/admin/tokens AdminTokensR GET POST
|
||||
/admin/crontab AdminCrontabR GET
|
||||
@ -69,7 +69,7 @@
|
||||
/info/glossary GlossaryR GET !free
|
||||
/info/faq FaqR GET !free
|
||||
/version VersionR GET !free
|
||||
/status StatusR GET !free
|
||||
/status StatusR GET !free
|
||||
|
||||
/help HelpR GET POST !free
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
/grades EEGradesR GET POST !exam-office
|
||||
/staff-invite EEStaffInviteR GET POST
|
||||
/correct EECorrectR GET POST
|
||||
|
||||
|
||||
|
||||
/term TermShowR GET !free
|
||||
/term/current TermCurrentR GET !free
|
||||
@ -110,7 +110,7 @@
|
||||
!/school/new SchoolNewR GET POST
|
||||
/school/#SchoolId SchoolR:
|
||||
/ SchoolEditR GET POST
|
||||
|
||||
|
||||
|
||||
/allocation/ AllocationListR GET !free
|
||||
!/allocation/new AllocationNewR GET POST !allocation-admin
|
||||
@ -255,17 +255,17 @@
|
||||
|
||||
!/*WellKnownFileName WellKnownR GET !free
|
||||
|
||||
-- for users
|
||||
/qualification QualificationAllR GET !free
|
||||
/qualification/#SchoolId QualificationSchoolR GET !free
|
||||
-- for users
|
||||
/qualification QualificationAllR GET !free
|
||||
/qualification/#SchoolId QualificationSchoolR GET !free -- TODO
|
||||
/qualification/#SchoolId/#QualificationShorthand QualificationR GET !free -- must be logged in though
|
||||
-- OSIS CSV Export Demo
|
||||
/lms LmsAllR GET POST
|
||||
/lms/#SchoolId LmsSchoolR GET
|
||||
/lms/#SchoolId/#QualificationShorthand LmsR GET POST
|
||||
/lms/#SchoolId/#QualificationShorthand/edit LmsEditR GET POST
|
||||
/lms/#SchoolId/#QualificationShorthand/users LmsUsersR GET
|
||||
/lms/#SchoolId/#QualificationShorthand/users/direct LmsUsersDirectR GET
|
||||
/lms/#SchoolId/#QualificationShorthand/users LmsUsersR GET
|
||||
/lms/#SchoolId/#QualificationShorthand/users/direct LmsUsersDirectR GET
|
||||
/lms/#SchoolId/#QualificationShorthand/userlist LmsUserlistR GET POST
|
||||
/lms/#SchoolId/#QualificationShorthand/userlist/upload LmsUserlistUploadR GET POST
|
||||
/lms/#SchoolId/#QualificationShorthand/userlist/direct LmsUserlistDirectR POST
|
||||
|
||||
@ -71,6 +71,6 @@ let
|
||||
in pkgs.mkShell {
|
||||
name = "uni2work";
|
||||
nativeBuildInputs = [develop inDevelop killallUni2work diffRunning]
|
||||
++ (with pkgs; [ nodejs-14_x postgresql_12 openldap google-chrome exiftool memcached minio minio-client gup skopeo texlive.combined.scheme-basic ])
|
||||
++ (with pkgs; [ nodejs-14_x postgresql_12 openldap google-chrome exiftool memcached minio minio-client gup skopeo texlive.combined.scheme-medium ])
|
||||
++ (with pkgs.haskellPackages; [ stack yesod-bin hlint cabal-install weeder profiteur ]);
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ postAdminTestR = do
|
||||
|
||||
getAdminTestPdfR :: Handler TypedContent
|
||||
getAdminTestPdfR = do
|
||||
let -- typePDF = "application/pdf" :: ContentType
|
||||
-- typePDF = Settings.Mime.mimeLookup "pdfdemo.pdf"
|
||||
-- let -- typePDF = "application/pdf" :: ContentType
|
||||
-- typePDF = Settings.Mime.mimeLookup "pdfdemo.pdf"
|
||||
content <- liftIO . P.runIO $ do
|
||||
tmpl <- P.compileDefaultTemplate "latex"
|
||||
let
|
||||
@ -285,7 +285,8 @@ getAdminTestPdfR = do
|
||||
texopts = []
|
||||
writeropts = def { P.writerTemplate = Just tmpl }
|
||||
doc <- P.readMarkdown def md
|
||||
P.makePDF "pdflatex" texopts P.writeLaTeX writeropts doc
|
||||
P.makePDF "pdflatex" texopts P.writeLaTeX writeropts doc -- xcolor.sty not found
|
||||
-- P.makePDF "lualatex" texopts P.writeLaTeX writeropts doc -- unicode-math.sty not found
|
||||
case content of
|
||||
Right (Right bs) -> do
|
||||
liftIO $ L.writeFile "generated.pdf" bs
|
||||
|
||||
@ -66,6 +66,9 @@
|
||||
Some icons: ^{isVisible False} ^{hasComment True}
|
||||
|
||||
<section>
|
||||
<h2>Download a generated PDF
|
||||
Here is a
|
||||
<a href=@{AdminTestPdfR}>Download-Link
|
||||
<h2>
|
||||
Erzeugtes PDF herunterladen:
|
||||
Hier ist ein
|
||||
<a href=@{AdminTestPdfR}>
|
||||
Download-Link
|
||||
für eine PDF Vorschau.
|
||||
@ -67,6 +67,9 @@
|
||||
Some icons: ^{isVisible False} ^{hasComment True}
|
||||
|
||||
<section>
|
||||
<h2>Download a generated PDF
|
||||
<h2>
|
||||
Download a generated PDF
|
||||
Here is a
|
||||
<a href=@{AdminTestPdfR}>Download-Link
|
||||
<a href=@{AdminTestPdfR}>
|
||||
Download-Link
|
||||
for a preview.
|
||||
Loading…
Reference in New Issue
Block a user