@@ -8,7 +8,7 @@ common sense styling.
8
8
9
9
Lein:
10
10
```
11
- [org.clojars.mjdowney/excel-clj "1.0 .0"]
11
+ [org.clojars.mjdowney/excel-clj "1.1 .0"]
12
12
```
13
13
14
14
- [ Getting Started] ( #getting-started )
@@ -92,6 +92,30 @@ the balances corresponding to an account hierarchy.
92
92
93
93
![ An excel sheet is opened] ( resources/quick-open-tree.png )
94
94
95
+ Trees are pretty flexible — the only requirement that we impose is that their
96
+ leaves have the format ` [string-label, map-of-numbers] ` . We construct trees
97
+ using the same arguments we'd give to ` clojure.core/tree-seq ` , plus a walk
98
+ function.
99
+
100
+ We could make a tree for some part of our file system for example:
101
+
102
+ ``` clojure
103
+ (require '[excel-clj.tree :as tree] '[clojure.java.io :as io])
104
+ => nil
105
+
106
+ (let [src-tree
107
+ (tree/walk
108
+ (fn [f xs]
109
+ (if-not (seq xs)
110
+ [(.getName f) {:size (.length f)}]
111
+ [(str (.getName f) " /" ) xs]))
112
+ #(.isDirectory %) #(.listFiles %) (io/file " ." ))]
113
+ (excel/quick-open
114
+ {" Source Tree" (excel/tree [" Source" [src-tree]] :data-format :number )}))
115
+ ```
116
+
117
+ ![ An excel sheet is opened] ( resources/file-tree.png )
118
+
95
119
96
120
### PDF Generation
97
121
@@ -188,11 +212,6 @@ that includes optional style data / cell merging instructions.
188
212
![ A spreadsheet with a merged title] ( resources/manual-grid.png )
189
213
190
214
## Roadmap
191
- - Tree flexibility. [ tree.clj] ( src/excel_clj/tree.clj ) should be able to work
192
- with any data shape given the same functions as [ ` clojure.core/tree-seq ` ] ( https://clojuredocs.org/clojure.core/tree-seq ) .
193
- Additionally, it should provide hooks for custom ways to aggregate columns
194
- (instead of expecting ` Number ` data and summing it) and whether or not to display
195
- sub-category level totals vs just grand totals.
196
215
197
216
- Templates! There's no reason to do all of the styling work programmatically.
198
217
We should be able to download [ some cool Google Sheets template] ( https://docs.google.com/spreadsheets/u/0/?usp=mkt_sheets_tpl )
@@ -225,7 +244,7 @@ that includes optional style data / cell merging instructions.
225
244
226
245
![ Filled in template draft] ( resources/filled-template-draft.png )
227
246
228
- - Reading & editing existing spradsheets . This should go hand in hand with
247
+ - Reading & editing existing spreadsheets . This should go hand in hand with
229
248
template generation.
230
249
231
250
- Formulas! We don't have them. I'm envisioning a syntax where a table column
0 commit comments