tikzify 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tikzify",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "exports": "./src/index.ts",
6
6
  "files": [
package/src/book.ts CHANGED
@@ -24,7 +24,6 @@ export const Book = z.object({
24
24
  color: color,
25
25
  title: z.string().max(256),
26
26
  author: z.string().max(256),
27
- date: z.coerce.date(),
28
27
  heroJpgBase64: z.string().max(256_000),
29
28
 
30
29
  // OTHER PAGES
@@ -90,7 +89,7 @@ ${defineColors(colors)}
90
89
  \begin{document}
91
90
 
92
91
  \pagestyle{bigpagenumbers}
93
-
92
+ \thispagestyle{empty}
94
93
  \pagecolor{c${colors[book.color]}!60}
95
94
 
96
95
  \vspace*{\fill}
@@ -104,12 +103,12 @@ ${defineColors(colors)}
104
103
  \vspace{1cm}
105
104
  \Huge \textbf{${book.title}}\\[1cm]
106
105
  \LARGE ${book.author} \\[1cm]
107
- \normalsize \today \\[2cm]
106
+ \normalsize \today
108
107
  \end{center}
109
108
  \vspace*{\fill}
110
109
 
111
110
  \newpage
112
- \nopagecolor
111
+ \setcounter{page}{1}
113
112
 
114
113
  ${book.pages.map((page, i) => {
115
114
  const [c1, c2] = page.gradient
package/src/server.ts CHANGED
@@ -46,6 +46,7 @@ async function book(req: Request) {
46
46
  const book = Book.parse(body)
47
47
 
48
48
  const tmp = await tmpDir()
49
+ await writeFile(`${tmp}/hero.jpg`, Buffer.from(book.heroJpgBase64, 'base64'))
49
50
  await Promise.all(book.pages.map(async (page, i) => {
50
51
  console.log(`Writing page ${i} jpg`)
51
52
  writeFile(`${tmp}/${i}.jpg`, Buffer.from(page.jpgBase64, 'base64'))