adam-james-v / badspreadsheet

A Clojure Spreadsheet for building design tools.
MIT License
101 stars 1 forks source link

badspreadsheet

Warning This is a prototype, so please set your expectations accordingly.

A Clojure Spreadsheet for building design tools.

Badspreadsheet is an experimental tool that I've built to help make little CAD tools and design explorations on a 2D canvas.

I'm making this prototype open to let others try it out and to explore some questions, figure out how to fix obvious design and usage issues, and to see what ideas other people might have.

Features

Check out these videos, which show things off nicely:

https://github.com/adam-james-v/badspreadsheet/assets/21064735/78a3b36f-68b1-48f5-9f73-dd8d7612d710

https://github.com/adam-james-v/badspreadsheet/assets/21064735/b66c29af-17dd-4a67-8804-20b4a7208a8e

Getting Started

If you're interested in just quickly playing around with the prototype, I'd recommend downloading the jar and running it that way. It's also not too hard to clone the repository and run the code yourself if you're used to using Clojure's CLI tool. Finally, if you're a Clojure dev, it could be fun to use badspreadsheet as a library and really poke around.

Run the Jar

Otherwise, you can

Run from Source

If you want to run from source you can:

Build from Source

If you're comfortable with Clojure, you can do the following:

As a Library

To use badspreadsheet as a library, you can add this to your deps.edn:

{badspreadsheet/badspreadsheet {:git/url "https://github.com/adam-james-v/badspreadsheet"
                                :git/sha "GET LATEST"}}

Acknowledgements

(Shall surely add more as I go)

Open Questions and Known Problems

Usage

After starting badspreadsheet, you can open your browser to the proper localhost port. There are a few cells with explanations for usage there. Here are the tables as well:

Keyboard Shortcuts

Keys Action
Enter Creates a new entity when cursor is over an empty space.
Ctrl-Arrows Move the highlighted cell(s).
Shift-Up/Down Arrows Cycles the active cell through editor, value, control, or off display modes.
Ctrl-Shift-Arrows Resize the highlighted cell.
Ctrl-s Save the Entities to 'out.edn'
Ctrl-d Delete the highlighted entity. Careful, there's no undo yet!

Sheet Functions

Function Behaviour
(c# id) Link the cell id to the cell you're currently editing. Gets its value and re-renders whenever the referenced cell updates
(l# [x y]) Link the cell at the specified absolute location to the cell you're currently editing. Warning: this doesn't work perfectly yet.
(t# ms) Create a cell whose value increases every number of milliseconds ms

Contributing

badspreadsheet is in its prototype phase, and contributions are welcome! If you're interested in contributing, open an issue!

License

This project is licensed under the MIT License - see the LICENSE file for details.