Hi Daniel, Aligned the naming but for the tools it is probably over the top ...
We currently have - csv - dataframe - excel - exec - freemarker - grok - gson - jsonpath - jsoup - properties - system - uuid - xml - yaml Which would change to - csv - dataFrame - excel - exec - freeMarker - grok - gson - jsonPath - jsoup - properties - system - uuid - xml - yaml or - CSV - dataFrame - excel - exec - freeMarker - grok - gson - jsonPath - jsoup - properties - system - UUID - XML - YAML Thanks in advance, Siegfried Goeschl > On 08.07.2020, at 10:44, Daniel Dekany <daniel.dek...@gmail.com> wrote: > > As in plain English it's rather "data source" than "datasource", thus the > variable name should stay "dataSource". Whether one aesthetically likes it > or not, that's the convention in Java circles. For same reason it should be > tools.dataFrame (instead of tools.dataframe), and dataSource.mimeType > (instead of dataSource.mimetype). (Actually, if we follow the incorrect > variant of camel case that Java officially uses, then it's > dataSource.MIMEType, but that's too much even for me... :) and most > importantly, people use both the official and correct camel case with Java > API-s, so it won't surprise.) > > BTW, for some reason I don't know, traditionally, FTL uses snake-case (like > s?upper_case), and then some all-lower-case (like <#elseif x>). So that's > unfortunate, as the variables it will see, and the Java API-s templates > call, certainly use camel case. But for a good while, you can also opt for > camel case in FTL, and write things like s?upperCase, <#elseIf x>, etc. No > configuration needed, and it's enforced that the whole template uses the > same convention consistently, for the FTL parts. > > > On Wed, Jul 8, 2020 at 7:42 AM Siegfried Goeschl < > siegfried.goes...@gmail.com> wrote: > >> HI folks, >> >> I'm using now a map for the tools, e.g. >> >> FreeMarker CLI Tools >> >> ------------------------------------------------------------------------------ >> <#list tools?keys?sort as name> >> - ${name?right_pad(20)} : ${tools[name]} >> </#list> >> >> FreeMarker CLI Tools >> >> ------------------------------------------------------------------------------ >> - csv : Process CSV files using Apache Commons CSV (see >> https://commons.apache.org/proper/commons-csv/) >> - dataframe : Bridge to [nRo/DataFrame]( >> https://github.com/nRo/DataFrame) >> - excel : Process Excels files (XLS, XLSX) using Apache POI >> (see https://poi.apache.org) >> - exec : Execute command line tools using Apache Commons >> Exec (see https://commons.apache.org/proper/commons-exec/) >> - freemarker : Expose advanced Apache FreeMarker classes >> - grok : Process text files using Grok expressions (see >> https://github.com/thekrakken/java-grok) >> - gson : Process JSON files using GSON (see >> https://github.com/google/gson) >> - jsonpath : Process JSON files using Java JSON Path (see >> https://github.com/json-path/JsonPath) >> - jsoup : Process HTML files using Jsoup (see >> https://jsoup.org) >> - properties : Process JDK properties files >> - system : Expose System-related utility methods >> - uuid : Create UUIDs >> - xml : Process XML files using Apache FreeMarker (see >> https://freemarker.apache.org/docs/xgui.html) >> - yaml : Process YAML files using SnakeYAML(see >> https://bitbucket.org/asomov/snakeyaml/wiki/Home) >> >> >> And also renamed "DataSources" to "dataSources" >> >> FreeMarker CLI DataSources >> >> ------------------------------------------------------------------------------ >> <#list dataSources.list as dataSource> >> [#${dataSource?counter}]: name=${dataSource.name}, >> group=${dataSource.group}, mimeType=${dataSource.mimetype}, >> charset=${dataSource.charset}, length=${dataSource.length} Bytes >> URI : ${dataSource.uri} >> </#list> >> FreeMarker CLI DataSources >> >> ------------------------------------------------------------------------------ >> [#1]: name=github-users.json, group=default, mimeType=application/json, >> charset=UTF-8, length=7,168 Bytes >> URI : >> file:/Users/sgoeschl/work/github/apache/freemarker-generator/freemarker-generator-cli/examples/data/json/github-users.json >> [#2]: name=contract.csv, group=default, mimeType=text/csv, charset=UTF-8, >> length=6,328 Bytes >> URI : >> file:/Users/sgoeschl/work/github/apache/freemarker-generator/freemarker-generator-cli/examples/data/csv/contract.csv >> [#3]: name=foo, group=bar, mimeType=text/csv, charset=UTF-8, length=6,328 >> Bytes >> URI : >> file:/Users/sgoeschl/work/github/apache/freemarker-generator/freemarker-generator-cli/examples/data/csv/contract.csv >> >> Shall we stick to the "dataSources" or rename to "datasources"? I hate >> this camel-case but would to like to settle my doubts >> >> Thanks in advance, >> >> Siegfried Goeschl >> >> > > -- > Best regards, > Daniel Dekany