Commit graph

60 commits

Author SHA1 Message Date
Anmol Sethi
5a5d48bdbc
d2cli: Move main code into d2cli so it can be imported from tests
Updates #903
2023-02-27 15:04:02 -08:00
Anmol Sethi
f64b5c010d
IsContainerOnly -> IsFolderOnly 2023-02-27 14:39:09 -08:00
Anmol Sethi
78b09f5007
BoardContainer -> IsContainerOnly
As discussed on slack.
2023-02-27 14:39:08 -08:00
Anmol Sethi
65437b954d
main: Don't render board containers in renderPDF
cc @berniexie
2023-02-27 13:50:03 -08:00
Anmol Sethi
e4fac7840f
cli: Improve multiboard output
- Boards with subboards are now selfcontained folders with index.svg/png as
  the root board render.
- Boards that are only containers of other boards are not rendered. For example a
  scenario with no modifications and only steps only has its steps
  rendered.
- Boards with sibling boards of another type are rendered under a
  subdirectory indicating their type to separate them. For example a
  board with layers and scenarios has its layers rendered into subfolder
  layers and scenarios into subfolder scenarios.

cc @berniexie see BoardContainer field on d2target.Board for the field
you were looking for to skip renders for PDFs too.
2023-02-27 13:50:03 -08:00
Anmol Sethi
06548f1543
cli: Document -dark-theme gotcha
Updates #831
2023-02-25 10:39:21 -08:00
Bernard Xie
96c963d59b
typo 2023-02-24 13:43:24 -08:00
Bernard Xie
f1f95ba818
Merge branch 'master' into 120/pdf-export 2023-02-23 12:55:58 -08:00
Bernard Xie
ea00b1a4ce
diff timestamps for pdf vs regular render 2023-02-21 14:34:10 -08:00
Bernard Xie
59ae571552
Update main.go 2023-02-21 14:26:23 -08:00
Bernard Xie
0d1c3c019d
Merge branch 'master' into 120/pdf-export 2023-02-21 14:26:18 -08:00
Vojtěch Fošnár
75102f3d40
fix CLI option, update and hopefully fix tests 2023-02-20 20:09:17 +01:00
Vojtěch Fošnár
d8525f5225
Merge branch 'terrastruct:master' into master 2023-02-20 19:54:39 +01:00
Vojtěch Fošnár
1d710c0356
better CLI and fixes 2023-02-20 11:11:24 +01:00
Vojtěch Fošnár
6e64949b9e
use pointer for DarkThemeID 2023-02-19 15:33:40 +01:00
Vojtěch Fošnár
6a89beaeb1
merge updates 2023-02-19 12:32:44 +01:00
Alexander Wang
5ff1909935
container dimensions 2023-02-18 23:35:18 -08:00
Anmol Sethi
0bb56a83ef
watch: Fix duplicate logs and remove timestamps
Instead we log the duration each layer's full compilation took.
2023-02-16 06:09:57 -08:00
Bernard Xie
fe564d7147
Remove isScenario checker 2023-02-15 11:17:06 -08:00
Bernard Xie
948c176ece
better comment 2023-02-14 17:44:26 -08:00
Bernard Xie
31fdaad555
fix watch mode for pdf gen 2023-02-14 17:39:59 -08:00
Bernard Xie
890a7d8b2c
pdf exports 2023-02-14 17:28:42 -08:00
Alexander Wang
3ce28f3ac5
force appendix flag 2023-02-05 01:09:36 -08:00
Alexander Wang
bec0332619
update cli docs 2023-02-05 00:34:43 -08:00
Vojtěch Fošnár
f2af2d717d
renamed --dark_theme option to --dark-theme 2023-01-30 12:46:27 +01:00
Vojtěch Fošnár
01928a5032
review fixes 2023-01-30 12:06:54 +01:00
Vojtěch Fošnár
462bd1e23d
resolve conflicts 2023-01-27 21:08:01 +01:00
Anmol Sethi
d80b2d3842
cli: Output layers under subdirectory 2023-01-27 11:01:16 -08:00
Anmol Sethi
caef5a5a8f
cli: Add support for rendering layers/scenarios/steps 2023-01-27 10:41:25 -08:00
Anmol Sethi
fe16543a6d
Dockerfile: Add playwright support for rendering PNGs
Closes #594
2023-01-24 01:14:30 -08:00
Vojtěch Fošnár
5b32cf58b6
fix typos 2023-01-13 13:12:18 +01:00
Vojtěch Fošnár
a972b5b0ee
removed --sketch_bg and added --dark_theme option 2023-01-09 22:16:22 +01:00
Vojtěch Fošnár
a81ab2d73e
support for prefers-color-scheme 2023-01-09 19:16:28 +01:00
Vojtěch Fošnár
8f903d72e1
add --sketch_bg option 2023-01-07 10:46:37 +01:00
Vojtěch Fošnár
34d15da5ba
make bgColor and fgColor variables instead of hardcoded values for generated SVGs 2023-01-06 19:32:56 +01:00
Anmol Sethi
5b4a20a6c6
d2plugin: Dedup plugins array
Closes #590
2023-01-03 14:48:23 -08:00
Alexander Wang
f10c7cfb5c
ok 2022-12-30 17:30:25 -08:00
Alexander Wang
c0eefc9447
ok 2022-12-30 17:28:21 -08:00
Alexander Wang
85e87c8c2c
add help 2022-12-30 13:19:48 -08:00
Alexander Wang
e6f9779e49
clean 2022-12-30 11:33:56 -08:00
Alexander Wang
fc5f58323c
add ctx, implement exec 2022-12-30 11:33:32 -08:00
Alexander Wang
35ccc05d39
refactor 2022-12-30 00:09:28 -08:00
Alexander Wang
eccec7afdd
elk 2022-12-29 22:43:01 -08:00
Alexander Wang
590caa243c
works 2022-12-29 21:11:45 -08:00
Alexander Wang
51e281d3f6
update tests 2022-12-28 16:42:22 -08:00
Alexander Wang
3aebfaf1d2
save 2022-12-27 20:29:51 -08:00
Alexander Wang
3a9a784342
wip 2022-12-21 23:13:52 -08:00
Alexander Wang
07fb1a3d86
implement sketch 2022-12-21 20:55:27 -08:00
Anmol Sethi
f7d63213c7
fmt 2022-12-18 12:26:58 -08:00
Anmol Sethi
cffb29c919
d2: Add trailing newline to svg output
The convention. Also makes log messages clearer when input/output is -
as without the newline, you get this occasionally:

</style><style type="text/css"><![CDATA[]]></style></svg>success: successfully compiled - to -
2022-12-18 11:08:30 -08:00