Reorganize document lib
This change reduces the amount of symlinks required per document.
This commit is contained in:
parent
24c84801f1
commit
4bd6eb9dca
16 changed files with 14 additions and 15 deletions
1
showbits-thermal-printer/src/documents/egg/lib
Symbolic link
1
showbits-thermal-printer/src/documents/egg/lib
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../lib
|
||||
|
|
@ -1 +0,0 @@
|
|||
../lib.typ
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#import "@preview/oxifmt:0.2.1": strfmt
|
||||
#import "@preview/suiji:0.3.0": *
|
||||
#import "lib.typ";
|
||||
#import "lib/main.typ" as lib;
|
||||
#show: it => lib.init(it)
|
||||
|
||||
#let data = json("data.json")
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../plugin.wasm
|
||||
1
showbits-thermal-printer/src/documents/image/lib
Symbolic link
1
showbits-thermal-printer/src/documents/image/lib
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../lib
|
||||
|
|
@ -1 +0,0 @@
|
|||
../lib.typ
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
#import "lib.typ";
|
||||
#import "lib/main.typ" as lib;
|
||||
#show: it => lib.init(it)
|
||||
|
||||
#let data = json("data.json")
|
||||
|
||||
#let dithered = lib.dither(
|
||||
"image.png",
|
||||
read("image.png", encoding: none),
|
||||
bright: data.bright,
|
||||
algorithm: data.algo,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../plugin.wasm
|
||||
|
|
@ -43,11 +43,10 @@
|
|||
}
|
||||
|
||||
#let dither(
|
||||
path,
|
||||
data,
|
||||
bright: true,
|
||||
algorithm: "floyd-steinberg",
|
||||
) = layout(size => {
|
||||
let data = read(path, encoding: none)
|
||||
let dithered = p.dither(
|
||||
data,
|
||||
_length_to_bytes(size.width),
|
||||
1
showbits-thermal-printer/src/documents/lib/plugin.wasm
Symbolic link
1
showbits-thermal-printer/src/documents/lib/plugin.wasm
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../../../showbits-typst-plugin/target/wasm32-unknown-unknown/release/showbits_typst_plugin.wasm
|
||||
|
|
@ -1 +0,0 @@
|
|||
../../../showbits-typst-plugin/target/wasm32-unknown-unknown/release/showbits_typst_plugin.wasm
|
||||
1
showbits-thermal-printer/src/documents/text/lib
Symbolic link
1
showbits-thermal-printer/src/documents/text/lib
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../lib
|
||||
|
|
@ -1 +0,0 @@
|
|||
../lib.typ
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#import "lib.typ";
|
||||
#import "lib/main.typ" as lib;
|
||||
#show: it => lib.init(it)
|
||||
|
||||
#let data = json("data.json")
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../plugin.wasm
|
||||
Loading…
Add table
Add a link
Reference in a new issue