/knowclip

Quickly make Anki flashcards from video and audio files, with handy features like silence detection and subtitles integration.

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Knowclip

GitHub

A cross-platform desktop application for turning audio and video files into flashcards.

It works like this:

  1. Choose a media file.
  2. Make your clips (manually or automatically).
  3. Export your audio flashcards for use in Anki.

Currently being built with Electron, Create React App, Redux and RxJS. Audio processing is done with ffmpeg.

Knowclip

Development

To install NPM packages, use Yarn:

npm install

Once packages are installed, you may run the dev build:

npm start

Wait until you see that see a message about compilation completed (some warnings are OK). Then, in another terminal tab, open the Electron app:

npm run electron

Tests

Tests are run with Jest via Create React App.

Unit tests

npm run test

Integration tests

Integration tests use Spectron to make sure all the parts of the app are working together.

npm run integration

The disadvantage of integration tests is that they are slow to run. To speed things up while debugging them and writing new ones, you can run these scripts instead:

# run a dev server configured for integration tests
npm run start:integration

# run integration tests without closing
# the app at the end so you can inspect it
npm run integration:debug

Test CLI options

Any arguments you pass to the test scripts will be forwarded to Jest.

So if you wanted to say, run just one specific test, you can do something like this:

npm test -- -t "clips reducer"

Electron upgrade config checklist

Upgrading Electron version requires a few config files to be touched.