Skip to content

FLEx Scratchpad 0.2.0-beta.1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Oct 02:00
ded47ea

FLEx Scratchpad 0.2.0-beta.1 for Windows, a pre-release. What is new since the 0.1.0 release is listed first; try it alongside your work and keep 0.1.0 at hand. It is tested by hand on real FieldWorks projects, and it will still have rough edges. Please report what breaks.

FLEx Scratchpad is a notebook for FieldWorks: notes in tabs and folders that show live FLEx lexical entries and interlinear examples, read straight from your project (never written to). Highlight words in an example, put examples in tables, number them, collect them into an example collection and export that as a FLEx text.

New since 0.1.0

  • ⎘ Copy, for a note, Word, PowerPoint and LingTeX Word. The ⎘ TSV button is now ⎘ Copy with a ▾ beside it. ⎘ Copy puts both an example's reference and a formatted copy on the clipboard, so a note pastes the example again and Word, PowerPoint, Excel or a web page paste a formatted example (a table per line, the translation in quotes, the text's abbreviation and line numbers linked into FLEx). Under ▾: Copy for LingTeX Word (FLEx's own rows, a column per morpheme, each translation followed by its reference such as (DOG 1.1)), Copy as HTML (for web, Word, PowerPoint, other) and Copy example source ({{flex}} code). Charts, entries, selected lines and rows, tables (Table ▾ → ⎘ Copy the table), copied cells and the pivot copy the same way.

  • Slides the way you want them. The slideshow and PowerPoint exports open a dialog listing the note's blocks: tick New slide where a slide begins, untick Show to leave a block out. It starts at one example per slide, and several examples, a chart and the text between them can share a slide. Choose a theme (Classic, Dark, Paper, High contrast, Forest), your own background, text and accent colours and a font. The ticks and the look are remembered.

  • Recordings in PowerPoint. Each example and chart with time-aligned lines gets its recording beside it on its slide: a ▶ that plays it in the slide show, with PowerPoint's own player bar (AAC through the bundled ffmpeg, else WAV).

  • A design prompt for an AI assistant. The web page and slideshow exports can save a prompt beside the file (<name>.design-prompt.md) for Claude Design or another assistant: restyle the plain page, keep every word, gloss and number, the alignment and the players. The prompt is editable in the export dialog, and your version is kept.

  • Long examples and charts in PowerPoint. PowerPoint never fits a table to its slide, and a long example came out with its words broken inside their cells and its translation drawn over the next line. The writer now measures everything: no word column is narrower than its words, a long line wraps onto further rows, the type shrinks from 18 to 12 pt to fit, and what still does not fit continues on a "(cont.)" slide (16 pt), a long chart with its header rows repeated. PowerPoint files still want a look-through and some adjusting by hand after export; the export dialog says so.

  • A chart's own rows in the exports. An exported chart object showed every row of the chart instead of the rows it names (rows=1-2); every interlinear export now keeps the punctuation on the Word line.

New in 0.1.0 since 0.1.0-beta.2

Everything below arrived in the pre-release 0.1.0-beta.3 or since.

  • Recordings kept in lameta. Picking a missing recording inside a lameta project now makes the program remember the whole project, so every session's recordings are found. The guide and the export dialog now advise keeping whole-text recordings out of the FLEx project's own LinkedFiles folder, where FieldWorks' Send/Receive fails on files of more than a few megabytes.
  • The bar / line / pie chart block is gone. It was never what a linguist's notebook needed and it muddled the word "chart", which here means FieldWorks' text charts. A note that still holds a ```chart block shows it as a code block; a picture made in another program can be attached instead. Text charts and tables stay.
  • A user guide on the website (rulingants.github.io/flex-scratchpad/guide): everything the program does, section by section with a table of contents, every picture taken from the real program. Also: a quotation in a note exported without its > markers (the web page and Word exports kept them).
  • A FLEx concordance search becomes a collection. Run the concordance (or complex concordance) in FieldWorks, File › Export Concordance Results…, then + New ▾ → New collection from a FLEx concordance export… and choose that CSV: every line it lists is placed in your project (the text by its name in any writing system, the line by FLEx's number, the baseline checked) and becomes an example, in the file's order; what could not be placed is listed at the end of the collection.
  • Copy a few lines of an example, or a few rows of a chart. Click line numbers (Shift for a range) or Ctrl+click chart row labels, then Copy: pasted into a note they are a new example of just those lines; pasted into a sheet they are FLEx's rows, a chart's with its headers.
  • A chart as an example, an example as a chart. A chart object's ⋯ menu turns it into an interlinear example of every line its rows touch; an example's ⋯ menu turns it into the rows of the text's chart that hold its lines. Inclusive both ways; trim the range afterwards as usual.
  • Merged chart cells, your way. A cell merged with its empty neighbour counted under both columns for the visual filters; the chart's ⋯ menu › Merged cells now chooses: both columns · both named, one border · the owner's look, both for the rules · the owner only. And merged cells are a filter target of their own (Merged cells in the ⚑ popover: any, merged right / left, or a column merged a given way — "PRED merged right").
  • Marker chips under the words in the one-column and grouped chart views ("on a line of their own" and "no longer than the words" now do what they say), and the ⚑ popover and the chart's ⋯ menu have a title bar with a ✕ that stays in view while they scroll.
  • Text charts. FieldWorks' constituent charts (Texts & Words › Text Chart) in your notes: a whole chart, a range of rows or a block of columns, always with its column headings; FLEx's moved-text, clause and chart markers; the free translations spliced in as you like (a row after each segment's rows, a Free column, a tip for the clicked cell, or hidden); words, cells, rows and columns styled with a click; the chart's plain-text grid saved in the note file so it reads without the program; HTML and Word exports, and an export of the chart itself as FieldWorks' chart XML or as JSON. Notes are found with marker:Topic. A chart note is a note that is one chart, with your own columns: a choice list shared by the notebook, free notes, or a rule that fills each row from its markers and columns and can colour the whole row. Chart markers are styled like text tags (for a chart, a note, a folder, the tab, the text or the whole notebook, or in a visual filter), and a marker can colour its whole row. Search the charts: words, col:Subject, marker:Topic, lex:kabir, gloss:…, clause:…, moved; insert the matching rows, see which columns a lexical item sits in, or collect the rows into a collection that finds new rows later. An example can show the chart columns its words sit in, drawn like tags; a chart can show the text's markup tags in its cells; a pivot counts rows by marker and column; an entry card tells which columns the item sits in.
  • Exports, for every kind of note. A web page with the recordings embedded (one compressed clip per example or chart, written into the file; a ▶ per line plays it and lights the line, a bar pauses and stops; charts light the cells of the playing line); Word with text charts on landscape pages and the words of a cell aligned over their glosses; Excel with the note, each chart as a table and as flat rows to filter and pivot, and an Examples sheet with one row per line; PDF (on Windows written straight to the file you choose; elsewhere the print dialog's Save as PDF); a slideshow (one web page, a slide per heading, example, chart and table, with the players); and PowerPoint. A chart note's custom columns and rule colours come along everywhere. (The direct PDF has not yet been tried on a real Windows machine; if it fails you get the print dialog.)
  • Charts play: ▶ beside the first row of each line of the text (and one for all of them), ▶§ a whole sentence and ▶¶ a whole paragraph; the cells that hold the playing line light up. Chart columns resize by dragging a heading's edge (a wide chart scrolls sideways), the header rows stay put while you scroll down a long chart, and the row labels stay put while it scrolls sideways. A column heading hides its column; Hide empty columns, Zoom, and a one-column layout (each row in one cell, word groups labelled with their columns — for the discourse work where visual filters by column and marker matter more than the columns) are in the chart's menu; Change the chart… puts another of the project's charts in the same object or chart note. A chart note's custom columns can sit left or right of the chart and be frozen. The sentence and paragraph boundaries are drawn under the free translation row. The ⚑ button (markers, the text's tags, visual filters) is on every chart, markers or not, and now lists the chart's columns too: style a column's cells (a tint, a border, a colour, bold…) or hide it, for this chart, a note, a folder, the tab, the text, the notebook or a visual filter — a header group styles its columns as one box, and the chart's structure is there as well: dependent, speech and song clauses, the [2a] clause markers, and preposed or postposed text (with the look of the column it came from or sits in, and a label such as ‹‹ Subj). A group heading's box switches everything under it on, off, or back to the mix it had; groups with nothing in the chart start folded. Markers in cells with no words can be hidden for a chart (and shown or hidden per marker), and in the one-column layout a cell whose chips are all hidden draws nothing at all. A chart note's rule columns have a Builder (conditions picked from the chart's markers, columns, clause types and word fields, with contains / matches pattern / a writing system / "in this column"), and the rule language and the chart search take regular expressions on any word field (txt:/^ka-/i, gls@fr:/…/, col:Subject[txt:/^ka-/]). A rule can show the row's markers as chips (@markers:/^ShdArg/), draw its text as a chip, and join a row to the one above (no line between them, the row style on both). The chart search has its own ▦ Search charts button (Ctrl+Shift+K) and a Build a search… dialog; wherever a pattern can be typed, a link names the flavour (JavaScript in rules, Python in the search) and opens regex101 set to it. README › Query languages documents all three languages. A ▥ Groups layout shows one cell per header group with the sub-columns' words inside, styled by their own columns' rules; and in the one-column and groups layouts Line up on (the ⋯ menu) lines the text of chosen columns up on one axis across the rows — centred, or by their left or right edges — the rest of each row flowing to its left and right. A cell merged with its neighbour in FLEx now counts for both columns in searches, rules and layouts, and is drawn with both columns' looks (the chart's ⋯ menu can keep it to the owner column). The sentence and paragraph boundary lines are visual-filter targets too (⚑ › Chart structure): their style, thickness and colour, or hidden. Marker chips can go on a line of their own under the words, wrapped to the words' width, so a column is never widened by them; Line up on takes a whole header group; and the chart menus, ⚑ popovers and settings dialogs now always stay inside the window and scroll (the Merged cells and Marker chips choices sit right under Layout). Merged cells has a further choice, both columns named but only the owner's border, and merged cells are a visual-filter target of their own: any, by the side they extend into, or by owner column ("PRED merged right"). Marker chips on a line of their own now sit under the words in every layout. The ⚑ popover and the chart menu have a sticky title bar with a ✕. Dependent, speech and song clause rows take every look a cell or a word has: a tint, a highlight on the words, a border round the row (style, thickness, colour), brackets round its content, the words' colour, bold, italic, underline; and a colour of the words now really colours them, in clause rows, columns, cells and moved text alike. A row's own popover (click its label) takes any colour from a colour picker, as the row's background or its words' colour. A chart note's custom columns have a fourth kind, a checkbox. Exports no longer freeze the program. The questions come first (the recordings? where to save?), then the export runs in the background with a progress bar in the sidebar, under the FLEx status: reading the examples from FLEx, preparing the recordings (one of N), writing the file. Several exports queue up; click the bar to see them, stop one, or take a waiting one out. The recordings of a web page export are written into the file by the program itself instead of passing through the window, which is what froze it. Any other click that waits on the program shows a Working… sign in the same place. Dragging a chart column's edge now changes that column only: the others keep their widths, and the chart grows or shrinks (it used to stretch to the window, so the columns next to the dragged one swelled).
  • Word exports in LingTeX-Word's style: every expanded example is a LingTeX Interlinear table with the add-in's paragraph styles, grammatical glosses in small capitals, Word's own (1) numbering with a. b. for the lines, the free translation in quotes and the line's FLEx number as a link that opens the text in FLEx. A collapsed example, an inline chip or an object in a table cell exports as a link into FLEx (the text's abbreviation and line numbers) in every format.
  • Never the sample data in place of your notebook. When the page came up before the program behind it had answered, it used to fall back to the built-in demo notebook after 15 s — which looked like lost data. Inside the app the page now waits visibly (Waiting for the app…), reloads itself twice, and takes the program's answer whenever it comes; the log says what the page received (bridge: …) and carries pywebview's own messages.
  • Troubleshooting: flex-scratchpad -v in a terminal logs every call, every FLEx read and every file written; the installed program writes the same to a log file; --devtools turns the browser developer tools on; --dump-charts writes a chart as the project returns it; --dump "TITLE" --seg 11.1 prints one line of a text raw; --doubled-morphs [TEXT] lists the word analyses whose Morphemes line repeats the word (what FieldWorks' own import makes of a word glossed in two languages with no morphemes) and where they are used — read-only, with a FLExTools module to remove them available on request. The program no longer stops on a console that cannot show a character such as →.
  • Attach files to a note. A chip opens the file in its own program; a web page (such as a FlexText Editor listening page) previews inside the note. Pictures and videos show in the note. Files are copied into the notebook, or linked if you prefer.
  • Back up your notebook to a OneDrive, Google Drive or Dropbox folder, or to S3-compatible storage (encryption optional, keys kept in Windows Credential Manager). It keeps old versions, shows a progress bar, backs up when you close the program, shows how much space notes and backups use, and can clean up. Settings › Backup & storage.
  • Examples stay on their lines when you split, merge or delete lines in FLEx, and are found again by their text when a paragraph is rebuilt.
  • Playback lights the line that is playing and follows it; the player stays in view, and a bar at the bottom of the window can always pause or stop whatever is playing.
  • Exporting a collection as a FLEx text now writes one audio file for the text by default: each example's audio in order, with a click between examples, named like the .flextext and saved beside it (the FlexText Audio Segmenter pairs them by name). One small file per line is still a choice. Examples whose texts use different baseline writing systems become one .flextext each, with their own audio.
  • FLEx text markup tags from FieldWorks' Text Tagging view are drawn in examples — as a bar under the words, or on the text itself: brackets round the tagged words, a marker, a tile or a border round the words and their lines, a colour. Styles are set for the whole project, a tab, a folder or chosen examples (the most specific wins), and visual filters are named sets of styles you switch on and off together, like Logos's. The rail's FLEx tags lists the tags your notes use; click one to see only those notes, with the examples that carry it marked. Notes are also found with tagged:Topic, and the FLEx object dialog's FLEx tags lists every place a tag is used in the project.
  • Notes read without the program: each FLEx example and entry is also saved in the note's file as plain text (the lines the example shows, and a link that opens it in FLEx), so a note makes sense in any text editor or Markdown viewer. The program itself never shows that copy, and keeps it up to date when the example changes in FLEx.
  • The parts of the left pane (Tabs, Folders, Tags, FLEx tags) fold with a click on their heading and the dividers between them drag; headings always stay in view.
  • Nested lists: Tab / Shift+Tab (or Ctrl+] / Ctrl+[, the toolbar's ⇥ ⇤, the block menu) step list items in and out; each level gets its own bullet and nested numbers read a. b. and i. ii. List items are single-spaced.
  • Links: click a link and a strip under it offers Follow · Edit · Copy · Unlink (Ctrl+click still follows at once). Ctrl+K or the 🔗 button inserts a link (the selected text, an address from the clipboard), edits or removes the one under the caret, or links to another note. Ctrl+/ lists every keyboard shortcut; new ones: Ctrl+E code, Ctrl+Shift+X strikethrough, Ctrl+Shift+7 / 8 / 9 lists, Ctrl+Alt+0 plain text, Ctrl+Shift+Enter a paragraph above, Ctrl+D duplicate, F2 rename, Ctrl+Shift+N a new collection.
  • Promote / demote all headings: in the H ▾ menu (Ctrl+Alt+[ / ]) and the ⋮ menu of selected blocks: every heading in the note or the selection moves one level, keeping their distances.
  • Tag styles: a border rule has a line style (solid, dashed, dotted, double) and a thickness; a tile rule has a colour of its own.
  • Collections from a rule: New collection from tagged lines… gathers every line in the project carrying the FLEx text markup tags you tick (groups, or a visual filter's tags, in one go); ⟳ Find new lines later adds what is new in the project, and Edit rule… changes the tags.
  • A bar between blocks: rest the pointer in the gap between two blocks (or under the last one) for + Paragraph · + Example · + Table · + More ▾ and − Above / − Below. It waits until the pointer rests in the gap, a − button asks twice, every removal has Undo in its message, and Settings can switch it off. A table's bar now shows once you click into the table, with Delete row / column in its Row ▾ / Column ▾ menus (with Undo too).
  • Markers hidden: only the markup that applies where the caret is shows — the ** round the word you are in, the ### of the heading line you are on — nothing else.
  • Sticky headings: the headings above the part of a long note you are reading stay at the top of the window; their ▾ collapses that section where you are and takes you to the heading. Switch it off in the H ▾ menu or in Settings.
  • Examples in a collection fold to chips; empty FLEx lines (left by Shift+Enter) are left out; Texts used lists the FLEx texts a note, a selection or a folder draws on.
  • Fixes: "Close now, finish in the background" on the backup-before-closing screen now closes the window at once (the backup used to have to reach a point where it could be stopped first); a chart's sticky header no longer stays behind when you open another note; the FLEx object dialog's text preview loads the rest of a long text as you scroll (it stopped at 60 lines); a note with many examples of one text no longer shows some of them "from the snapshot" on Windows (two of them wrote the snapshot at the same moment), and a finished backup is no longer reported as failed when its record could not be written at that instant — every file the program writes now waits a moment for Windows to let go of it; with Markdown markers hidden, typing after making a heading or a list item lands after the hidden marker, never before it; one Backspace removes a whole line break; styling inside a preview no longer jumps to the top; closing the program no longer ends in an error message.

Known issues

  • A web page export with the recordings embedded can make the window stop responding until it is done (minutes for a long note) in 0.1.0-beta.3 and earlier; let it finish, or export without the recordings. Fixed in 0.1.0: exports run in the background with a progress bar (#20).
  • Slideshow and PowerPoint exports are still rough: PowerPoint files need adjusting by hand after export (long examples and charts are wrapped, shrunk or continued on "(cont.)" slides; where slides break is chosen in the export dialog). Word's LingTeX example tables look right but do not yet re-render correctly with the LingTeX-Word add-in. Word, PDF and web page exports come out well (#21).

Download

  • FLEx-Scratchpad-Setup-…exe: the installer. Per user, no administrator rights; it adds a Start menu entry and appears in Settings › Apps. Running a newer Setup upgrades in place; your notebooks and settings are kept.
  • FLEx-Scratchpad-…-windows-portable.zip: the same program, no installer. Unzip anywhere and run FLEx Scratchpad.exe.

ffmpeg (for cutting audio clips from any recording) and rclone (for backups to S3-compatible storage) are included; nothing is downloaded when the program runs.

Needs

  • Windows 10 or 11, 64-bit.
  • FieldWorks 9 on the same computer to read a FLEx project. Without it you can open a .flextext file or try the built-in demo.
  • Microsoft Edge WebView2 Runtime (Windows 11 has it; Setup says so if this computer lacks it).

Before you run it

The program isn't signed yet, so Windows SmartScreen may say "Windows protected your PC": choose More info, then Run anyway.

If something does not work, FLEx Scratchpad.exe --selftest report.json (from a command prompt in the program's folder) writes what the program can and cannot find; attach that file to an issue.