cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

Docs: the locale in the architecture, registries, formulas and macros; roadmap

Dami committed 06611e6
commit
06611e674b879d9e0468c745abb6b47d07068450
parent
aeaf904123e84332564b1ccd88ce720aafea0a25
author
Dami <dami.etoile@gmail.com>
5 files changed, +26 -4
MROADMAP.md3++-
Mdocs/contributing/architecture.md17++++++++++++++++-
Mdocs/contributing/extending.md1+
Mdocs/formulas/README.md5+++++
Mdocs/reference/macro-api.md4++--
M ROADMAP.md +2 -1
M docs/contributing/architecture.md +16 -1
@@ -16,6 +16,7 @@ internal/functions the function library: the FuncDef table, evaluation, decimal
1616 internal/value cell values, number formats, typed-entry parsing, the clock1717 internal/formula the formula language: references, lexer, parser, printer, rewriting1818 internal/numfmt number formats, rounding, General, date serials19+internal/locale the locales: separators, date order, currency, formula separators1920 internal/fileio import and export: CSV, TSV, XLSX, SQLite, Parquet, Lotus .wk12021 internal/chart chart layout, text rendering and kitty image encoding2122 internal/jev the API key's resolution, answer cache and TypeSafe client
@@ -58,7 +59,21 @@ internal/functions ---> internal/formula |
5859 internal/value ---> internal/numfmt <------+5960 ```6061 61-(`sheet` also uses `formula`, `value` and `numfmt` directly.)62+(`sheet` also uses `formula`, `value` and `numfmt` directly. Below63+them all, `internal/locale` holds the table of locales and depends on64+nothing.)65+66+- `internal/locale` is the conventions of each locale: decimal and67+ thousands separators, date order and patterns, currency symbol and68+ place, and the formula separators that follow from the decimal one.69+ Cells, formulas and files keep en-US's form whatever the locale; the70+ packages above translate at the edges, where entries are typed and71+ shown: `value.Canonicalize` and `Localize` for typed values,72+ `formula.Delocalize` and `Localize` for formulas (one byte for one,73+ so positions carry over), `numfmt.FormatIn` and `Format.CodeIn` for74+ display, and `sheet.CanonicalEntry` and `LocalEntry` for whole75+ entries. The workbook's locale is a file setting beside decimal76+ arithmetic ([Locale](../sheets/locale.md)).6277 6378 - `internal/formula` is the language: `Addr` and `Rect`, A1 references6479 with their `$` markers, sheet names in references and their quoting,
M docs/contributing/extending.md +1 -0
M docs/formulas/README.md +5 -0
M docs/reference/macro-api.md +2 -2
@@ -62,8 +62,8 @@ is already in the formulas that use it.
6262 | `move(cols=0, rows=0)` | Move the active cell, dropping the selection |6363 | `extend(cols=0, rows=0, whole=None)` | Select from the active cell to `cols`, `rows` away; `whole="columns"` or `"rows"` selects whole ones |6464 | `jump(to, extend=False)` | Move as keys do: `"up"`, `"down"`, `"left"`, `"right"` (Ctrl+arrows, to the edge of the data), `"home"` (column A), `"start"` (A1), `"end"` (the last used cell) |65-| `enter(text, fill=False, origin=None)` | Type into the active cell and accept, as Enter does without moving; `fill=True` fills every selected cell (Ctrl+Enter). With `origin`, a formula is taken as typed at that cell and its relative references move with the distance to the active cell |66-| `paste_text(text)` | Paste tab-separated text from the active cell, as pasting from another program |65+| `enter(text, fill=False, origin=None)` | Type into the active cell and accept, as Enter does without moving; `fill=True` fills every selected cell (Ctrl+Enter). With `origin`, a formula is taken as typed at that cell and its relative references move with the distance to the active cell. `text` is in en-US's form (`1.5`, `9/26/2026`, `=ROUND(A1, 2)`) whatever the file's [locale](../sheets/locale.md), as a recording writes it, so a macro does the same everywhere |66+| `paste_text(text)` | Paste tab-separated text from the active cell, as pasting from another program: read in the file's [locale](../sheets/locale.md) |6767 | `fill(to=None, rows=0, cols=0)` | Drag the fill handle: continue the selection's series or copy it over `to`, or `rows` down (up if negative), or `cols` right (left if negative) |6868 6969 ## Sheets