@@ -57,6 +57,7 @@ public static void main(String[] args) throws Exception {
57
57
FileUtils .write (new File ("../llms.txt" ), b , Charset .defaultCharset ());
58
58
59
59
writeInput ();
60
+ writeWidget ();
60
61
}
61
62
62
63
static void writeInput () throws Exception {
@@ -81,4 +82,24 @@ static void writeInput() throws Exception {
81
82
FileUtils .write (new File ("../dashjoin-docs/docs/appendix-inputs.md" ), b ,
82
83
Charset .defaultCharset ());
83
84
}
85
+
86
+ static void writeWidget () throws Exception {
87
+ StringBuffer b = new StringBuffer ();
88
+ b .append ("# Appendix: Form Input Types\n " );
89
+ Map <String , List <Example >> list = om .readValue (new File ("../dashjoin-docs/llms/widget.json" ),
90
+ new TypeReference <Map <String , List <Example >>>() {});
91
+
92
+ for (Entry <String , List <Example >> entry : list .entrySet ())
93
+ for (Example e : entry .getValue ()) {
94
+ if (e .language == null )
95
+ e .language = e .code instanceof String ? "jsonata" : "json" ;
96
+ b .append ("## " + e .title + "\n " );
97
+ b .append (e .description + "\n " );
98
+ b .append ("```json\n " );
99
+ b .append (om .writerWithDefaultPrettyPrinter ().writeValueAsString (e .code ) + "\n ```\n " );
100
+ }
101
+
102
+ FileUtils .write (new File ("../dashjoin-docs/docs/appendix-widgets.md" ), b ,
103
+ Charset .defaultCharset ());
104
+ }
84
105
}
0 commit comments