Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple sheets in asc, csv, ssv, tsv formats #102

Open
edemaine opened this issue Nov 10, 2022 · 0 comments
Open

Multiple sheets in asc, csv, ssv, tsv formats #102

edemaine opened this issue Nov 10, 2022 · 0 comments

Comments

@edemaine
Copy link
Owner

edemaine commented Nov 10, 2022

Currently, only spreadsheet formats like .xls/.xlsx support multiple sheets in a single file. It'd be nice to support this in other formats like ASCII art (.asc) and delimiter separated (.csv, .ssv, .tsv). Example applications:

  • GUI probably wants to work in a simple format like tsv, or at least have that option
  • If we define a way for mappings to work with an entire Drawings, e.g. for multiple overlaid drawings (Multiple overlaid drawings #97).
  • Convenient way to cluster drawings together, e.g. subfigures of a figure or a sequence of frames.

The challenge of course is defining a sheet delimiter format. One idea that comes to mind is to use an ASCII control code, followed by a sheet name. Some options that seem to fit:

  • 1 ^A SOH Start of Header indicates "head of data broadcast/message"
  • 2 ^B STX Start of Text indicates "end of header, start of text" (so could be ^A<sheet name>^B)
  • 3 ^C ETX End of Text indicates "end of text"
  • 4 ^D EOT End of Transmission indicates "end of transmission of one or more texts"
  • 11 ^K \v Vertical tab , which is for "vertical tabulation"
  • 12 ^L \f Form feed, which indicates "go to new page"

A simple proposal would be that ^A indicates a sheet name that occupies the rest of the line, and is terminated by ^B or a newline.

Alternatively, we might want to use headers to do more than just specify subsheets, for example to inline multiple text files into one (#68). This might just be a different extension, like .multi; but then we ideally need a way to put subsheets that doesn't involve a second level of ^A. One possibility is to use # for sheets:

^Aaliases.txt
A = locking 2-toggle, rotated 90, flipped
^Adrawing.asc#sheet1
  |
--A--
  |
^Adrawing.asc#sheet2
  |
--A
  |

In Vim, you can enter ^A via ^V^A. In VSCode, the insert-unicode extension seems like a decent way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant