spell-cards.love/README.md

61 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

# A flashcard app for drilling spellings of words
2022-08-14 16:17:53 +00:00
A flashcard app for spellings of words based on audio recordings. Press `Tab`
to toggle to "teacher" mode where you can add words and record audio for them.
2023-01-08 16:11:15 +00:00
2023-07-01 20:22:05 +00:00
This repo is an example of a [Freewheeling App](http://akkartik.name/freewheeling),
designed above all to be easy to run, easy to modify and easy to share.
2022-06-07 01:33:44 +00:00
2023-01-25 02:46:40 +00:00
## Getting started
Install [LÖVE](https://love2d.org). It's just a 5MB download, open-source and
extremely well-behaved.
[Run the app using LÖVE.](https://love2d.org/wiki/Getting_Started#Running_Games)
2022-06-07 01:33:44 +00:00
new file-system format for freewheeling apps 1. No more version history, now we have just the contents of the current version. 2. Editing a definition no longer changes the order in which definitions load. This should make repos easier to browse, and more amenable to modify. You don't need driver.love anymore. And a stable order eliminates some gotchas. For example: using driver.love, define `Foo = 3` in a definition define `Bar = Foo + 1` edit and redefine `Foo = 4` Before this commit, you'd get an error when you restart the app. Definitions used to be loaded in version order, and editing a definition would move it to the end of the load order, potentially after definitions using it. I mostly avoided this by keeping top-level definitions independent. It's fine to refer to any definition inside a function body, we only need to be careful with initializers for global variables which run immediately while loading. After this commit you can still end up in a weird state if you modify a definition that other later definitions use. In the above example, you will now see Foo = 4 and Bar = 4. But when you restart, Foo = 4 and Bar = 5. But that's no more confusing than Emacs's C-x C-e. It's still a good idea to keep top-level definitions order-independent. It's just confusing in a similar way to existing tools if you fail to do so. And your tools won't tend to break as badly. Why did I ever do my weird version history thing? I think it's my deep aversion to risking losing any data entered. (Even though the app currently will seem to lose data in those situations. You'd need to leave your tools to find the data.) Now I rely on driver.love's undo to avoid data loss, but once you shut it down you're stuck with what you have on disk. Or in git. I also wasn't aware for a long time of any primitives for deleting files. This might have colored my choices a lot.
2023-04-16 18:15:03 +00:00
## Hacking
2023-01-25 02:36:49 +00:00
To modify it live without restarting the app each time, download [the driver
2023-01-23 08:49:48 +00:00
app](https://git.sr.ht/~akkartik/driver.love). Here's an example session
using a different freewheeling app:
2022-06-07 01:33:44 +00:00
2023-01-08 16:11:15 +00:00
![making changes without restarting the app](assets/2.gif)
2022-06-07 01:33:44 +00:00
2023-05-30 08:14:38 +00:00
[Some reference documentation on how to create your own apps.](reference.md)
2023-12-14 02:19:34 +00:00
If the app being modified by the driver lives in a .love file, your changes
will go into the [save directory](https://love2d.org/wiki/love.filesystem.getSaveDirectory).
If it lives in a directory (like this repo), your changes will go straight
into the same directory.
new file-system format for freewheeling apps 1. No more version history, now we have just the contents of the current version. 2. Editing a definition no longer changes the order in which definitions load. This should make repos easier to browse, and more amenable to modify. You don't need driver.love anymore. And a stable order eliminates some gotchas. For example: using driver.love, define `Foo = 3` in a definition define `Bar = Foo + 1` edit and redefine `Foo = 4` Before this commit, you'd get an error when you restart the app. Definitions used to be loaded in version order, and editing a definition would move it to the end of the load order, potentially after definitions using it. I mostly avoided this by keeping top-level definitions independent. It's fine to refer to any definition inside a function body, we only need to be careful with initializers for global variables which run immediately while loading. After this commit you can still end up in a weird state if you modify a definition that other later definitions use. In the above example, you will now see Foo = 4 and Bar = 4. But when you restart, Foo = 4 and Bar = 5. But that's no more confusing than Emacs's C-x C-e. It's still a good idea to keep top-level definitions order-independent. It's just confusing in a similar way to existing tools if you fail to do so. And your tools won't tend to break as badly. Why did I ever do my weird version history thing? I think it's my deep aversion to risking losing any data entered. (Even though the app currently will seem to lose data in those situations. You'd need to leave your tools to find the data.) Now I rely on driver.love's undo to avoid data loss, but once you shut it down you're stuck with what you have on disk. Or in git. I also wasn't aware for a long time of any primitives for deleting files. This might have colored my choices a lot.
2023-04-16 18:15:03 +00:00
2022-06-07 01:33:44 +00:00
## Keyboard shortcuts
* `#` to toggle between teacher and student mode
2023-01-08 16:11:15 +00:00
In teaching mode:
* `ctrl+n` to add a new word
2022-06-07 01:33:44 +00:00
2022-08-14 16:17:53 +00:00
Exclusively tested so far with a US keyboard layout. If
2022-06-07 20:48:59 +00:00
you use a different layout, please let me know if things worked, or if you
2022-06-09 19:16:03 +00:00
found anything amiss: http://akkartik.name/contact
2022-06-07 20:48:59 +00:00
2022-05-30 00:03:01 +00:00
## Known issues
2022-05-21 17:36:27 +00:00
2022-06-07 01:33:44 +00:00
## Mirrors and Forks
2023-01-19 04:30:37 +00:00
This repo is a fork of [lines.love](http://akkartik.name/lines.html), an
editor for plain text where you can also seamlessly insert line drawings.
Its immediate upstream is [the template repo for freewheeling apps](https://git.sr.ht/~akkartik/template-live-editor).
Updates to it can be downloaded from the following mirrors:
2022-06-15 20:35:55 +00:00
* https://git.sr.ht/~akkartik/spell-cards.love
2024-01-31 23:35:15 +00:00
* https://tildegit.org/akkartik/spell-cards.love
2024-03-11 04:51:57 +00:00
* https://git.merveilles.town/akkartik/spell-cards.love
2023-07-01 20:13:29 +00:00
* https://nest.pijul.com/akkartik/spell-cards.love (using the Pijul version control system)
2022-07-02 22:23:44 +00:00
2022-08-14 16:17:53 +00:00
Further forks are encouraged. If you show me your fork, I'll link to it here.
2022-07-02 22:23:44 +00:00
2022-06-07 01:33:44 +00:00
## Feedback
[Most appreciated.](http://akkartik.name/contact)