From a22e8c1e132837ec241e6996107cc28716123df6 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Thu, 23 Jan 2025 08:05:16 -1000 Subject: [PATCH] Add support for HTML tables. Contains a breaking change. table renamed to datatable. --- blog/contacts.scroll | 2 +- blog/heatrix.scroll | 2 +- blog/plot.scroll | 2 +- blog/scrollsets.scroll | 2 +- blog/tables.scroll | 10 +-- package.json | 2 +- parserLeetsheet.scroll | 2 +- parsers/concepts.parsers | 2 +- parsers/disk.parsers | 2 +- parsers/heatrix.parsers | 6 +- parsers/html.parsers | 49 ++++++++++++- parsers/leetsheet.parsers | 2 +- parsers/posts.parsers | 8 +- parsers/root.parsers | 2 +- parsers/tables.parsers | 18 ++--- releaseNotes.scroll | 142 ++++++++++++++++++++---------------- tests/contacts.scroll | 2 +- tests/dateTransforms.scroll | 2 +- tests/heatrix.scroll | 2 +- tests/maps.scroll | 2 +- tests/posts.scroll | 2 +- tests/scroll.test.js | 2 +- tests/tableDates.scroll | 2 +- tests/tables.scroll | 18 ++--- tests/tabularData.scroll | 8 +- tests/top-sinks.scroll | 2 +- tutorial.scroll | 4 +- 27 files changed, 181 insertions(+), 118 deletions(-) diff --git a/blog/contacts.scroll b/blog/contacts.scroll index a5a88d68a..9fdd5eb56 100644 --- a/blog/contacts.scroll +++ b/blog/contacts.scroll @@ -49,7 +49,7 @@ code theme gazette mediumColumns 1 printTitle - table + datatable printTable tableSearch diff --git a/blog/heatrix.scroll b/blog/heatrix.scroll index c01020ad4..522785f56 100644 --- a/blog/heatrix.scroll +++ b/blog/heatrix.scroll @@ -59,7 +59,7 @@ aboveAsCode ## Use your own custom color palettes and set your own thresholds: heatrixAdvanced - table + datatable h10;w30 '2015 '2016 '2017 '2018 '2019 '2020 '2021 '2022 '2023 '2024 h30;w30; 0 0 5 1 2 11 15 10 12 56 diff --git a/blog/plot.scroll b/blog/plot.scroll index 6135e6d8f..329615764 100644 --- a/blog/plot.scroll +++ b/blog/plot.scroll @@ -64,7 +64,7 @@ planets.csv # Step 3: Add inline data belowAsCode -table +datatable scatterplot title The Simpson Family x age diff --git a/blog/scrollsets.scroll b/blog/scrollsets.scroll index 09e7d21a7..0aa49b19e 100644 --- a/blog/scrollsets.scroll +++ b/blog/scrollsets.scroll @@ -33,7 +33,7 @@ ScrollSets are normal plain text files written in Scroll that also contain measu https://scroll.pub/ Scroll match 1 -ScrollSets are line oriented but represent a table(s). You might call them _deconstructed csvs_ or _deconstructed spreadsheets_. +ScrollSets are line oriented but represent a datatable(s). You might call them _deconstructed csvs_ or _deconstructed spreadsheets_. - Use LLMs to *instantly generate ScrollSets* that are ready for human verification and improvement. - Intermingle structured data with markup to *annotate any and every part of a ScrollSets* while still generating strict tabular files for data analysis tools. diff --git a/blog/tables.scroll b/blog/tables.scroll index a02db9246..736b720d0 100644 --- a/blog/tables.scroll +++ b/blog/tables.scroll @@ -2,7 +2,7 @@ authors Breck Yunits https://twitter.com/breckyunits Breck Yunits date 8/09/2024 tags All -title Tables: a microlang for data science +title Datatables: a microlang for data science header.scroll keyboardNav @@ -11,7 +11,7 @@ printAuthors mediumColumns 1 -Tables, aka spreadsheets, are arguably the most important _visual_ thought tool. +Datatables, aka spreadsheets, are arguably the most important _visual_ thought tool. dateline But no one has designed the perfect _textual_ language for manipulating them. @@ -20,20 +20,20 @@ Until now. endSnippet -# Say hello to Tables +# Say hello to Datatables youtube https://www.youtube.com/watch?v=lO8blNtYYBA br center scrollButton Try now - https://try.scroll.pub/#scroll%0A%20theme%20gazette%0A%20%0A%20expander%20Presidents%0A%20https%3A%2F%2Fohayo.breckyunits.com%2Fohayo%2Fpackages%2Fsamples%2Fpresidents.csv%0A%20%20groupBy%20Party%0A%20%20%20orderBy%20-count%0A%20%20%20%20printTable%0A%20%20scatterplot%0A%20%20%20x%20number%0A%20%20%20y%20Party%0A%20%20%20fill%20Party%0A%20%0A%20expander%20Elements%0A%20https%3A%2F%2Fohayo.breckyunits.com%2Fohayo%2Fpackages%2Fsamples%2Fperiodic-table.csv%0A%20%20scatterplot%0A%20%20%20x%20Year%0A%20%20%20y%20AtomicNumber%0A%20%20%20fill%20Radioactive%0A%20%20%20symbol%20Metal%0A%20%0A%20%2F%2F%20expander%20Inline%20Data%0A%20table%0A%20%20scatterplot%0A%20%20%20title%20Top%2050%20programming%20language%20projects%20on%20GitHub.%0A%20%20%20x%20appeared%0A%20%20%20y%20rank%0A%20%20%20radius%20githubStars%0A%20%20%20label%20name%0A%20%20orderBy%20appeared%0A%20%20%20sparkline%0A%20%20%20%20y%20githubStars%0A%20%20%20%20color%20green%0A%20%20%20select%20name%20githubStars%0A%20%20%20%20heatrix%0A%20%20data%0A%20%20%20rank%2Cname%2Cappeared%2CgithubStars%0A%20%20%203%2CPython%2C1991%2C61378%0A%20%20%204%2CJava%2C1995%2C19037%0A%20%20%208%2CPerl%2C1987%2C1886%0A%20%20%209%2CRuby%2C1995%2C21790%0A%20%20%2010%2CPHP%2C1995%2C37688%0A%20%20%2013%2CGo%2C2009%2C121611%0A%20%20%2014%2CTypeScript%2C2012%2C99410%0A%20%20%2018%2CPowerShell%2C2006%2C44220%0A%20%20%2020%2CRust%2C2010%2C95455%0A%20%20%2021%2CSwift%2C2014%2C67064%0A%20%20%2025%2CKotlin%2C2011%2C48462%0A%20%20%2027%2CClojure%2C2007%2C10392%0A%20%20%2028%2CCoffeeScript%2C2009%2C16466%0A%20%20%2029%2CElixir%2C2011%2C24093%0A%20%20%2030%2CErlang%2C1986%2C11203%0A%20%20%2034%2CJulia%2C2012%2C45137%0A%20%20%2041%2CRacket%2C1994%2C4741%0A%20%20%2042%2CSolidity%2C2014%2C22794%0A%20%20%2043%2CWebAssembly%2C2015%2C6621%0A%20%20%2045%2CZig%2C2015%2C32864%0A%20%20%2047%2CNim%2C2008%2C16308%0A%20%20%2050%2CTOML%2C2013%2C19332 + https://try.scroll.pub/#scroll%0A%20theme%20gazette%0A%20%0A%20expander%20Presidents%0A%20https%3A%2F%2Fohayo.breckyunits.com%2Fohayo%2Fpackages%2Fsamples%2Fpresidents.csv%0A%20%20groupBy%20Party%0A%20%20%20orderBy%20-count%0A%20%20%20%20printTable%0A%20%20scatterplot%0A%20%20%20x%20number%0A%20%20%20y%20Party%0A%20%20%20fill%20Party%0A%20%0A%20expander%20Elements%0A%20https%3A%2F%2Fohayo.breckyunits.com%2Fohayo%2Fpackages%2Fsamples%2Fperiodic-table.csv%0A%20%20scatterplot%0A%20%20%20x%20Year%0A%20%20%20y%20AtomicNumber%0A%20%20%20fill%20Radioactive%0A%20%20%20symbol%20Metal%0A%20%0A%20%2F%2F%20expander%20Inline%20Data%0A%20datatable%0A%20%20scatterplot%0A%20%20%20title%20Top%2050%20programming%20language%20projects%20on%20GitHub.%0A%20%20%20x%20appeared%0A%20%20%20y%20rank%0A%20%20%20radius%20githubStars%0A%20%20%20label%20name%0A%20%20orderBy%20appeared%0A%20%20%20sparkline%0A%20%20%20%20y%20githubStars%0A%20%20%20%20color%20green%0A%20%20%20select%20name%20githubStars%0A%20%20%20%20heatrix%0A%20%20data%0A%20%20%20rank%2Cname%2Cappeared%2CgithubStars%0A%20%20%203%2CPython%2C1991%2C61378%0A%20%20%204%2CJava%2C1995%2C19037%0A%20%20%208%2CPerl%2C1987%2C1886%0A%20%20%209%2CRuby%2C1995%2C21790%0A%20%20%2010%2CPHP%2C1995%2C37688%0A%20%20%2013%2CGo%2C2009%2C121611%0A%20%20%2014%2CTypeScript%2C2012%2C99410%0A%20%20%2018%2CPowerShell%2C2006%2C44220%0A%20%20%2020%2CRust%2C2010%2C95455%0A%20%20%2021%2CSwift%2C2014%2C67064%0A%20%20%2025%2CKotlin%2C2011%2C48462%0A%20%20%2027%2CClojure%2C2007%2C10392%0A%20%20%2028%2CCoffeeScript%2C2009%2C16466%0A%20%20%2029%2CElixir%2C2011%2C24093%0A%20%20%2030%2CErlang%2C1986%2C11203%0A%20%20%2034%2CJulia%2C2012%2C45137%0A%20%20%2041%2CRacket%2C1994%2C4741%0A%20%20%2042%2CSolidity%2C2014%2C22794%0A%20%20%2043%2CWebAssembly%2C2015%2C6621%0A%20%20%2045%2CZig%2C2015%2C32864%0A%20%20%2047%2CNim%2C2008%2C16308%0A%20%20%2050%2CTOML%2C2013%2C19332 **** # Acknowledgements -Tables evolved over the past decade primarily by: +Datatables evolved over the past decade primarily by: - just doing what Hadley Wickham did in dplyr https://dplyr.tidyverse.org/ dplyr diff --git a/package.json b/package.json index 9fa485c88..360b8e900 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll-cli", - "version": "168.8.0", + "version": "169.0.0", "description": "A language for scientists of all ages. A curated collection of tools for refining and sharing thoughts.", "main": "scroll.js", "engines": { diff --git a/parserLeetsheet.scroll b/parserLeetsheet.scroll index b84d258fd..3aa56d09b 100644 --- a/parserLeetsheet.scroll +++ b/parserLeetsheet.scroll @@ -38,7 +38,7 @@ br thinColumns 1 expander Parser usage rankings A rough _estimate_ of parser usage in Parsers. -table +datatable printTable data count id diff --git a/parsers/concepts.parsers b/parsers/concepts.parsers index b63c9ba1d..78313e98c 100644 --- a/parsers/concepts.parsers +++ b/parsers/concepts.parsers @@ -1,5 +1,5 @@ scrollConceptsParser - description Load concepts as table. + description Load concepts as datatable. extends abstractDatatableProviderParser cue concepts atoms cueAtom diff --git a/parsers/disk.parsers b/parsers/disk.parsers index bd4ead5be..2539c4d50 100644 --- a/parsers/disk.parsers +++ b/parsers/disk.parsers @@ -1,6 +1,6 @@ scrollDiskParser extends scrollTableParser - description Output file into as table. + description Output file into as datatable. cue disk javascript delimiter = "json" diff --git a/parsers/heatrix.parsers b/parsers/heatrix.parsers index 579b8fe09..23264677b 100644 --- a/parsers/heatrix.parsers +++ b/parsers/heatrix.parsers @@ -16,7 +16,7 @@ heatrixParser buildHtml() { // A hacky but simple way to do this for now. const advanced = new Particle("heatrixAdvanced") - advanced.appendLineAndSubparticles("table", "\n " + this.tableData.replace(/\n/g, "\n ")) + advanced.appendLineAndSubparticles("datatable", "\n " + this.tableData.replace(/\n/g, "\n ")) const particle = this.appendSibling("heatrixAdvanced", advanced.subparticlesToString()) const html = particle.buildHtml() particle.destroy() @@ -51,7 +51,7 @@ heatrixAdvancedParser description Advanced heatrix. example heatrix - table + datatable %h10; '2007 '2008 '2009 12 4 323 @@ -94,7 +94,7 @@ heatrixAdvancedParser numbers.unshift(0) return generateColorBinningString(numbers, colors); } - const table = particle.getParticle("table").subparticlesToString() + const table = particle.getParticle("datatable").subparticlesToString() const scale = particle.getParticle("scale")?.subparticlesToString() || buildScale(table) const thresholds = [] const colors = [] diff --git a/parsers/html.parsers b/parsers/html.parsers index 0f5f337e0..affa49ab7 100644 --- a/parsers/html.parsers +++ b/parsers/html.parsers @@ -341,4 +341,51 @@ htmlBlockquoteParser cue blockquote example blockquote - p A wise quote \ No newline at end of file + p A wise quote + +htmlTableParser + extends abstractHtmlElementParser + cue table + example + table + tr + th Header 1 + th Header 2 + tr + td Cell 1 + td Cell 2 + +htmlTrParser + extends abstractHtmlElementParser + cue tr + example + tr + td Cell 1 + +htmlTdParser + extends abstractHtmlElementParser + cue td + example + td Cell content + +htmlThParser + extends abstractHtmlElementParser + cue th + example + th Header content + +htmlTheadParser + extends abstractHtmlElementParser + cue thead + example + thead + tr + th Header 1 + +htmlTbodyParser + extends abstractHtmlElementParser + cue tbody + example + tbody + tr + td Cell 1 \ No newline at end of file diff --git a/parsers/leetsheet.parsers b/parsers/leetsheet.parsers index 55c271d4f..ab3152937 100644 --- a/parsers/leetsheet.parsers +++ b/parsers/leetsheet.parsers @@ -14,7 +14,7 @@ printUsageStatsParser } buildHtml() { // A hacky but simple way to do this for now. - const particle = this.appendSibling("table") + const particle = this.appendSibling("datatable") particle.appendLine("delimiter ") particle.appendLine("printTable") const dataParticle = particle.appendLine("data") diff --git a/parsers/posts.parsers b/parsers/posts.parsers index 86799bc37..6ac307ab1 100644 --- a/parsers/posts.parsers +++ b/parsers/posts.parsers @@ -1,5 +1,5 @@ abstractPostsParser - description Load posts as table. + description Load posts as datatable. extends abstractDatatableProviderParser cueFromId atoms cueAtom @@ -41,10 +41,10 @@ abstractPostsParser scrollPostsParser popularity 0.000024 cue posts - description Posts as table. + description Posts as datatable. extends abstractPostsParser example - // Print a search table: + // Print a search datatable: posts printTable tableSearch @@ -56,7 +56,7 @@ scrollPostsParser scrollPostsMetaParser popularity 0.000024 cue postsMeta - description Post meta as table. + description Post meta as datatable. extends abstractPostsParser javascript columnNames = ["date", "year", "title", "permalink", "authors", "tags", "wordCount", "minutes"] diff --git a/parsers/root.parsers b/parsers/root.parsers index b1e68e4bc..3ca2ab49c 100644 --- a/parsers/root.parsers +++ b/parsers/root.parsers @@ -357,7 +357,7 @@ scrollParser } get scrollVersion() { // currently manually updated - return "168.8.0" + return "169.0.0" } // Use the first paragraph for the description // todo: add a particle method version of get that gets you the first particle. (actulaly make get return array?) diff --git a/parsers/tables.parsers b/parsers/tables.parsers index c1513812f..63963b0e1 100644 --- a/parsers/tables.parsers +++ b/parsers/tables.parsers @@ -125,7 +125,7 @@ printColumnParser printTableParser popularity 0.001085 cueFromId - description Print table. + description Print datatable. extends abstractTableVisualizationParser javascript get tableHeader() { @@ -244,9 +244,9 @@ abstractDatatableProviderParser scrollTableParser extends abstractDatatableProviderParser popularity 0.002133 - cue table + cue datatable example - table + datatable printTable data year,count @@ -357,7 +357,7 @@ scrollWhereParser atoms cueAtom columnNameAtom comparisonAtom catchAllAtomType constantAtom example - table iris.csv + datatable iris.csv where Species = setosa javascript get coreTable() { @@ -433,7 +433,7 @@ scrollComposeParser cue compose atoms cueAtom newColumnNameAtom example - table + datatable compose sentence My name is {name} printTable javascript @@ -532,12 +532,12 @@ scrollShuffleParser description Randomly reorder rows. cue shuffle example - table data.csv + datatable data.csv shuffle printTable javascript get coreTable() { - // Create a copy of the table to avoid modifying original + // Create a copy of the datatable to avoid modifying original const rows = this.parent.coreTable.slice() // Fisher-Yates shuffle algorithm for (let i = rows.length - 1; i > 0; i--) { @@ -549,7 +549,7 @@ scrollShuffleParser scrollTransposeParser extends abstractTableTransformParser - description Tranpose table. + description Tranpose datatable. cue transpose javascript get coreTable() { @@ -689,7 +689,7 @@ scrollSummarizeParser description Generate summary statistics for each column. cue summarize example - table data.csv + datatable data.csv summarize printTable javascript diff --git a/releaseNotes.scroll b/releaseNotes.scroll index d3751b774..c5486df28 100644 --- a/releaseNotes.scroll +++ b/releaseNotes.scroll @@ -22,6 +22,22 @@ ciBadges.scroll br thinColumns +📦 169.0.0 1/23/2025 +Usage shows users expect HTML to just work in Scroll, so I am moving all Scroll cues with namespace conflicts to new available words and adding all HTML cues as parsers. + +This release moves `table` to `datatable`, so now `table` refers to the HTML element. + +To upgrade, just rename all uses of `table` to `datatable`. Or you can always just add an alias Parser if you don't want to do that for some reason. + +🎉 added htmlTableParser +🎉 added htmlTrParser +🎉 added htmlTdParser +🎉 added htmlThParser +🎉 added htmlTheadParser +🎉 added htmlTbodyParser +🎉 improvements to `toStamp` parser +⚠️ BREAKING: renamed the old `table` parser to `datatable` + 📦 168.8.0 1/20/2025 🎉 added htmlStrongParser 🎉 added htmlEmParser @@ -173,14 +189,14 @@ This release adds a simple `class` parser, and renames the existing advanced one ⚠️ BREAKING: (no one should be affected) CSS and Javascript tags will no longer be included by default when compiling snippets 📦 164.12.0 1/02/2025 -🎉 added support for URLS with query strings as table data source +🎉 added support for URLS with query strings as datatable data source 📦 164.11.0 12/29/2024 -🎉 added slashComment support to table flows -🎉 added assertRowCount parser for fast testing of table transformers +🎉 added slashComment support to datatable flows +🎉 added assertRowCount parser for fast testing of datatable transformers 🏥 fix regression where empty and nonEmpty filters were not working 🏥 fix "first" reduction to select the first non-blank value -🏥 fix syntax highlighting in table flows +🏥 fix syntax highlighting in datatable flows 📦 164.10.0 12/29/2024 🎉 added scrollModalParser @@ -235,7 +251,7 @@ This release adds a simple `class` parser, and renames the existing advanced one 🎉 added `summarize` parser 📦 163.1.0 12/15/2024 -🎉 column names in table particles now try to match users intent (case insensitive and close match). +🎉 column names in datatable particles now try to match users intent (case insensitive and close match). 🎉 new `assertIgnoreBelowErrorsParser` for automated testing purposes 📦 163.0.0 12/13/2024 @@ -370,7 +386,7 @@ So we use the hidden file convention for separating files you want to track from 🎉 Upgraded ScrollSDK 📦 154.1.0 11/15/2024 -🎉 JSON table parser now handles more common kinds of json data +🎉 JSON datatable parser now handles more common kinds of json data - Thanks TBD! https://x.com/tbdr/status/1857446832923652190 @@ -400,7 +416,7 @@ So we use the hidden file convention for separating files you want to track from 🏥 fixed regression where parsers were printing 📦 150.0.0 11/13/2024 -🎉 added `concepts` parser for loading concepts in a file into a table +🎉 added `concepts` parser for loading concepts in a file into a datatable ⚠️ BREAKING: (no one should be affected) nearly all Scroll code is now available to Scroll in the browser. Some internal APIs may have changed if using Scroll programmatically. This is prep work for the major release coming imminently which brings the full power of PPS to the browser, including ability to write Parsers, fully user Scrollsets, and more, dynamically, clientside in browser. @@ -433,11 +449,11 @@ This is prep work for the major release coming imminently which brings the full 🎉 added `buildTsv` parser 🎉 added `buildJson` parser -🎉 added `posts` parser for iterating over posts as a table -🎉 added `postsMeta` parser for iterating over post metadata as a table +🎉 added `posts` parser for iterating over posts as a datatable +🎉 added `postsMeta` parser for iterating over post metadata as a datatable 🎉 added `assertBuildIncludes` -🎉 `printTable` combined with `buildTsv/Csv/Json` will now save the table to disk. -⚠️ BREAKING: removed `loop`. `tables` can do everything loops could, much better. +🎉 `printTable` combined with `buildTsv/Csv/Json` will now save the datatable to disk. +⚠️ BREAKING: removed `loop`. `datatables` can do everything loops could, much better. ⚠️ BREAKING: removed `printCsv` parser ⚠️ BREAKING: removed `printSearchTable` parser. Can now be done with: @@ -448,14 +464,14 @@ code 📦 147.1.0 11/11/2024 🎉 added `shuffle` parser -🎉 added `iris` parser for easier quick testing/demoing of scroll tables +🎉 added `iris` parser for easier quick testing/demoing of scroll datatables 📦 147.0.0 11/09/2024 🎉 added `quickRunScriptParser` to run python, php, ruby, perl, and sh scripts and include output in compiled output - Thanks to TBD for the idea https://x.com/tbdr TBD https://x.com/tbdr/status/1855391565373641140 idea -🏥 match less in quick tables +🏥 match less in quick datatables ⚠️ BREAKING: (no one should be affected) if you have a line that is just a filename like *.(py|rb|sh|php|pl), it will now attempt to run that script 📦 146.4.0 11/09/2024 @@ -509,10 +525,10 @@ Expect Def parsers to evolve quickly. 🎉 improved how long ago magic column to handle timestamps better and also show original date on hover 📦 145.6.0 10/27/2024 -🎉 added magic `last[Verbed]` columns to tables which now renders a "how long ago" value +🎉 added magic `last[Verbed]` columns to datatables which now renders a "how long ago" value 📦 145.5.1 10/26/2024 -🏥 table fix for missing values +🏥 datatable fix for missing values 📦 145.5.0 10/25/2024 🎉 new internal build API to support single file building @@ -583,7 +599,7 @@ Expect Def parsers to evolve quickly. 📦 141.0.0 10/12/2024 🎉 updated ScrollSDK -🏥 bug fix in maps nested under tables. Thanks TD for the report! +🏥 bug fix in maps nested under datatables. Thanks TD for the report! ⚠️ BREAKING: `firstAtom` is now `cue` everywhere 📦 140.0.0 10/12/2024 @@ -594,7 +610,7 @@ Expect Def parsers to evolve quickly. 🎉 added qrcode parser 📦 139.0.1 10/11/2024 -🏥 bug fix in quick tables. Thanks TD for the report! +🏥 bug fix in quick datatables. Thanks TD for the report! 📦 139.0.0 10/11/2024 🎉 the quickTable parser now works with JSON files as well. @@ -635,21 +651,21 @@ code 🎉 added `tiles` parser to maps 📦 137.1.0 10/05/2024 -🎉 added `rank` parser to tables +🎉 added `rank` parser to datatables 📦 137.0.0 10/04/2024 -🎉 maps now takes a table +🎉 maps now takes a datatable 🎉 maps now supports fullscreen 🎉 maps now supports custom hover template strings 🎉 maps now supports color 🎉 maps now supports fillColor 🎉 maps now supports radius 🎉 maps now supports fillOpacity -🎉 added `compute` table parser -⚠️ BREAKING: remove "points" parser. maps now takes a table as input. +🎉 added `compute` datatable parser +⚠️ BREAKING: remove "points" parser. maps now takes a datatable as input. 📦 136.12.0 10/04/2024 -🎉 `table` now accepts urls +🎉 `datatable` now accepts urls 🎉 build now works in web version 📦 136.11.1 10/02/2024 @@ -674,10 +690,10 @@ code 🎉 added `printColumn` parser 📦 136.5.0 9/27/2024 -🎉 added `disk` parser which generates a table from local disk contents +🎉 added `disk` parser which generates a datatable from local disk contents 📦 136.4.1 9/27/2024 -🏥 type fix in table links +🏥 type fix in datatable links 📦 136.4.0 9/27/2024 🎉 new aftertext relative link parser. relative links with 33% fewer words. @@ -690,9 +706,9 @@ code $1.html 📦 136.3.0 9/27/2024 -🎉 new expand/collapse button on tables and removed confusing zoom in/zoom out -🎉 copy button on tables now generates just data, no more header/footer cruft -🎉 removed rarely used csv button on tables in favor of better copy button +🎉 new expand/collapse button on datatables and removed confusing zoom in/zoom out +🎉 copy button on datatables now generates just data, no more header/footer cruft +🎉 removed rarely used csv button on datatables in favor of better copy button 📦 136.2.1 9/26/2024 🏥 container style fix when in snippets @@ -720,17 +736,17 @@ code ⚠️ BREAKING: (no one should be affected) if you have lines starting with a sequence like tag#id or tag.someClassName, they will now get matched to HAML parser. 📦 133.6.0 9/24/2024 -🎉 added `links` parser to tables +🎉 added `links` parser to datatables 📦 133.5.0 9/24/2024 -🎉 added `compose` parser to tables +🎉 added `compose` parser to datatables 📦 133.4.0 9/24/2024 🎉 added `quickIncludeJsonParser` parser 📦 133.3.0 9/24/2024 🎉 added `cloc` parser -🎉 you can now use quickHtml in table flows +🎉 you can now use quickHtml in datatable flows 📦 133.2.0 9/22/2024 🎉 added `favIcon` parser @@ -797,12 +813,12 @@ code 🎉 upstream ScrollSetCLI 📦 130.2.1 9/8/2024 -🏥 table loop fixes -🏥 table json parsing fixes +🏥 datatable loop fixes +🏥 datatable json parsing fixes 📦 130.2.0 9/8/2024 -🎉 added `limit` parser to tables -🎉 `loop` parser can now loop over tables +🎉 added `limit` parser to datatables +🎉 `loop` parser can now loop over datatables 📦 130.1.1 9/5/2024 🎉 oneTextarea max height @@ -819,7 +835,7 @@ code ⚠️ BREAKING: (no one should be effected) if you had any lines that were just [filename].(scroll|parser), those will now be parsed as imports 📦 128.0.1 9/4/2024 -🏥 better handling of circular dependencies with tables +🏥 better handling of circular dependencies with datatables 📦 128.0.0 9/4/2024 🎉 added `quickVideo` parser for including videos. @@ -900,12 +916,12 @@ chat 🎉 switch `youTube` parser to `youtube` (all lowercase). Deprecate old spelling. 📦 125.0.1 8/29/2024 -🏥 particles table fix +🏥 particles datatable fix 📦 125.0.0 8/29/2024 🎉 upgraded ScrollSDK to 84 ⚠️ BREAKING: ScrollSDK updates require updating any Parsers with new "Particle" nomenclature -⚠️ BREAKING: `tree` is no longer a table format. Use `particles` instead. +⚠️ BREAKING: `tree` is no longer a datatable format. Use `particles` instead. 📦 124.1.0 8/28/2024 🎉 added `buildPdf` parser. Currently requires MacOS + Chrome. @@ -923,11 +939,11 @@ codeWithHeader contacts.scroll After: codeWithHeader contacts.scroll buildConcepts - table + datatable printTable 📦 123.3.0 8/27/2024 -🎉 ending a column with "Url" in tables will now print the column name linked rather than url +🎉 ending a column with "Url" in datatables will now print the column name linked rather than url 📦 123.2.0 8/26/2024 🎉 added popularity table to leetsheet @@ -1041,7 +1057,7 @@ music tests/sipOfCoffee.m4a 📦 118.3.0 8/6/2024 🎉 `fetch` now writes to localStorage in browser environment. -🎉 `table` now can read from localStorage in browser environment. +🎉 `datatable` now can read from localStorage in browser environment. 🏥 handle empty values in `groupBy` parser 📦 118.2.2 8/6/2024 @@ -1057,28 +1073,28 @@ music tests/sipOfCoffee.m4a 🎉 `tableSearch` now adds copy and CSV buttons. 📦 118.0.0 8/6/2024 -🎉 tables: added delimiter autodetection -🎉 tables: added columnName autocomplete -🎉 tables: added `transpose` parser +🎉 datatables: added delimiter autodetection +🎉 datatables: added columnName autocomplete +🎉 datatables: added `transpose` parser 🎉 scatterplot: added x, y, and other autocompletes ⚠️ BREAKING: `sparkline [columnName]` is now `sparkline\n y [columnName]` 📦 117.1.0 8/5/2024 -🎉 tables: added `groupBy` parser for "pivot tables" +🎉 datatables: added `groupBy` parser for "pivot tables" 📦 117.0.1 8/5/2024 🏥 fix highlight bug in where parser 📦 117.0.0 8/5/2024 -🎉 tables: added `select` parser -🎉 tables: added `orderBy` parser -🎉 tables: added `rename` parser -🎉 tables: added `reverse` parser +🎉 datatables: added `select` parser +🎉 datatables: added `orderBy` parser +🎉 datatables: added `rename` parser +🎉 datatables: added `reverse` parser 🎉 added `fetch` parser ⚠️ BREAKING: (no one should be affected) Scroll now requires NodeJS >= 18.0.0. 📦 116.0.0 8/3/2024 -⚠️ BREAKING: `scatterplot` now gets data from `table`. +⚠️ BREAKING: `scatterplot` now gets data from `datatable`. 📦 115.2.0 8/3/2024 🏥 fix extra space in related snippets @@ -1090,24 +1106,24 @@ music tests/sipOfCoffee.m4a 🏥 more regression fixes. 📦 115.0.1 8/3/2024 -🏥 fix table regression. +🏥 fix datatable regression. 📦 115.0.0 8/3/2024 -🎉 `table [filename].[json|tsv|csv]` to load and print a table from disk -🎉 `sparkline` now can take a table as input: +🎉 `datatable [filename].[json|tsv|csv]` to load and print a datatable from disk +🎉 `sparkline` now can take a datatable as input: code - table posts.csv + datatable posts.csv sparkline y wordCount -⚠️ BREAKING: removed support for root level TSV. Not useful enough. Convert any root TSV to a standard table. -⚠️ BREAKING: removed `printTable` at root level. Now works nested under table +⚠️ BREAKING: removed support for root level TSV. Not useful enough. Convert any root TSV to a standard datatable. +⚠️ BREAKING: removed `printTable` at root level. Now works nested under datatable ⚠️ BREAKING: removed `spaceTable`. See below to migrate. ⚠️ BREAKING: removed `tabTable`. See below to migrate. ⚠️ BREAKING: removed `treeTable`. See below to migrate. ⚠️ BREAKING: removed `commaTable`. See below to migrate. ⚠️ BREAKING: removed `pipeTable`. See below to migrate. -⚠️ BREAKING: `table` now takes delimiter and data parsers. Usage: -table +⚠️ BREAKING: `datatable` now takes delimiter and data parsers. Usage: +datatable delimiter , printTable data @@ -1242,7 +1258,7 @@ Replace: authors $2\n $1 $2 🎉 added `center` parser! first blink, now center! 📦 108.1.0 7/15/2024 -🎉 table style improvements +🎉 datatable style improvements 📦 108.0.0 7/15/2024 ⚠️ BREAKING: (no one should be affected) Renamed `printCheatSheet` to `printLeetSheet` @@ -1308,7 +1324,7 @@ code 🎉 build scrollsets first and so the outputs can be used to build html files 📦 102.1.0 7/07/2024 -🎉 integrate feedback from h4l to make tables expand on click +🎉 integrate feedback from h4l to make datatables expand on click https://www.reddit.com/r/programming/comments/1dwvezp/comment/lc0ytu6/ feedback from h4l 📦 102.0.0 7/06/2024 @@ -2153,7 +2169,7 @@ belowAsCode 3 📦 55.4.0 1/30/2023 🎉 added `table` parser which supports custom delimiters: -table +datatable delimiter && data name&&score @@ -2642,7 +2658,7 @@ code 🎉 added `treeTable` belowAsCode -table +datatable delimiter particles printTable data @@ -2755,7 +2771,7 @@ code ⚠️ if you have tables with a column ending in "Link" beware the new behavior belowAsCode -table +datatable delimiter | printTable data @@ -2924,7 +2940,7 @@ code 📦 17.1.0 05/25/2021 🎉 pipeTable -table +datatable delimiter | printTable data diff --git a/tests/contacts.scroll b/tests/contacts.scroll index f0246e658..e840ce043 100644 --- a/tests/contacts.scroll +++ b/tests/contacts.scroll @@ -6,7 +6,7 @@ title My Contacts theme gazette mediumColumns 1 printTitle -table +datatable printTable tableSearch diff --git a/tests/dateTransforms.scroll b/tests/dateTransforms.scroll index 8bc75788f..c82933b48 100644 --- a/tests/dateTransforms.scroll +++ b/tests/dateTransforms.scroll @@ -1,6 +1,6 @@ buildHtml -table +datatable splitYear splitMonth splitDayOfMonth diff --git a/tests/heatrix.scroll b/tests/heatrix.scroll index 992c9abda..a083caba7 100644 --- a/tests/heatrix.scroll +++ b/tests/heatrix.scroll @@ -17,7 +17,7 @@ heatrix # Test Size and Number escaping and custom colors heatrixAdvanced - table + datatable h10;w30 '2007 '2008 '2009 '2010 '2011 '2012 '2013 '2014 '2015 '2016 '2017 '2018 '2019 '2020 '2021 '2022 '2023 '2024 h30;w30; 4 11 23 37 3 14 12 0 0 0 5 1 2 11 15 10 12 56 diff --git a/tests/maps.scroll b/tests/maps.scroll index 705ed636b..ea2fa4885 100644 --- a/tests/maps.scroll +++ b/tests/maps.scroll @@ -8,7 +8,7 @@ map # Custom -table +datatable delimiter particles map lat 37.0854 diff --git a/tests/posts.scroll b/tests/posts.scroll index c4b181116..eeebba01c 100644 --- a/tests/posts.scroll +++ b/tests/posts.scroll @@ -23,7 +23,7 @@ posts index subfolder/index --- -table +datatable data color #2a2d34ff diff --git a/tests/scroll.test.js b/tests/scroll.test.js index c154f72f5..4f9dc3d09 100755 --- a/tests/scroll.test.js +++ b/tests/scroll.test.js @@ -68,7 +68,7 @@ testParticles.endSnippet = async areEqual => { testParticles.tableWithLinks = async areEqual => { const tests = [ { - text: `table + text: `datatable delimiter , printTable data diff --git a/tests/tableDates.scroll b/tests/tableDates.scroll index a3afc62e3..989d3aed4 100644 --- a/tests/tableDates.scroll +++ b/tests/tableDates.scroll @@ -6,7 +6,7 @@ container # Date tests tableSearch -table +datatable printTable data lastChanged diff --git a/tests/tables.scroll b/tests/tables.scroll index 7abac23a3..d74ddeaff 100644 --- a/tests/tables.scroll +++ b/tests/tables.scroll @@ -10,10 +10,10 @@ sparkline 5 7 27 87 300 17 10 5 --- -# Sparkline from table -table +# Sparkline from datatable +datatable delimiter , - ? Whats in table? + ? Whats in datatable? printTable ? Show a sparkline? sparkline @@ -22,7 +22,7 @@ table ? What if we add a filter? where score > 4 heatrix - ? Whats left in table? + ? Whats left in datatable? printTable data score @@ -40,7 +40,7 @@ contacts.csv --- # Transforms -table +datatable printTable orderBy -score -types rank @@ -63,7 +63,7 @@ table # Impute -table +datatable impute year printTable sparkline @@ -78,7 +78,7 @@ table # Timestamps -table +datatable printTable compose statement The name of the folder is {folder} printTable @@ -110,7 +110,7 @@ contacts.json # Where tests -table +datatable where year startsWith 20 printTable where year endsWith 20 @@ -141,7 +141,7 @@ iris --- # Empty and non empty -table +datatable where name notEmpty assertRowCount 2 where score empty diff --git a/tests/tabularData.scroll b/tests/tabularData.scroll index a7379d3f4..20690cdf8 100644 --- a/tests/tabularData.scroll +++ b/tests/tabularData.scroll @@ -12,7 +12,7 @@ A test of TSV data endSnippet -table +datatable printTable data Index Name Diameter Height Covered 5 10 15 20 25 30 35 40 45 50 55 @@ -22,8 +22,8 @@ table 4 SF 4 4.5 FALSE 128.8 113.9 102.5 95.9 90.5 86.3 83.6 81.6 79.8 78.2 76.6 5 Aruba 3 3.75 FALSE 130.8 114.6 104.9 98.9 92.3 87.6 85.4 82.9 81.1 80.2 78 -## Putting print table after a table: -table +## Putting printTable after a datatable: +datatable data name score joe 2 @@ -32,7 +32,7 @@ table # Dropdown sections expander Full Table -table +datatable printTable data Rows LogLinear Quadratic Before After diff --git a/tests/top-sinks.scroll b/tests/top-sinks.scroll index ab07b2420..b8dcb6e7c 100644 --- a/tests/top-sinks.scroll +++ b/tests/top-sinks.scroll @@ -4,7 +4,7 @@ buildTxt date 1/11/2019 replace NUM_SINKS 283 replace TABLE - table + datatable delimiter | printTable data diff --git a/tutorial.scroll b/tutorial.scroll index e460c6c5b..9f8f5efb1 100644 --- a/tutorial.scroll +++ b/tutorial.scroll @@ -96,9 +96,9 @@ belowAsCode 2 [x] Learn that checklists support nesting ## 5. Tables -Use the `table` parser to make tables: +Use the `datatable` parser to make tables: belowAsCode -table +datatable printTable data Name,Rank