hascard: A TUI for reviewing notes using 'flashcards' written with markdown-like syntax.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Hascard is a text-based user interface for reviewing notes using flashcards. Cards are written in markdown-like syntax. Please see the README file on GitHub at https://github.com/Yvee1/hascard#readme for more information.


[Skip to Readme]

Properties

Versions 0.1.1.0, 0.1.1.0, 0.1.2.0, 0.1.4.0, 0.2.0.0, 0.2.1.0, 0.3.0.0, 0.3.0.1, 0.4.0.0, 0.5.0.0, 0.5.0.1, 0.5.0.2, 0.5.0.3, 0.5.0.3.1, 0.6.0.0, 0.6.0.1
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), brick (>=0.52.1 && <0.56), containers (>0.6.0 && <0.7), directory (>=1.3.3 && <1.4), filepath (>=1.4.2 && <1.5), hascard, microlens (>=0.4.11 && <0.5), microlens-platform (>=0.4.1 && <0.5), optparse-applicative (>=0.15.1 && <0.16), ordered-containers (>=0.2.2 && <0.3), parsec (>=3.1.13 && <3.2), process (>=1.6.5 && <1.7), strict (>=0.3.2 && <0.4), text (>=1.2.3 && <1.3), vector (>=0.12.0 && <0.13), vty (>=5.28.2 && <5.31), word-wrap (>=0.4.1 && <0.5) [details]
License BSD-3-Clause
Copyright 2020 Steven van den Broek
Author Steven van den Broek
Maintainer stevenvdb@live.nl
Category Application
Home page https://github.com/Yvee1/hascard#readme
Bug tracker https://github.com/Yvee1/hascard/issues
Source repo head: git clone https://github.com/Yvee1/hascard
Uploaded by Yvee1 at 2020-07-20T19:04:57Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for hascard-0.1.1.0

[back to package description]

hascard

A minimal commandline utility for reviewing notes. 'Flashcards' can be written in markdown-like syntax.

a recording of example usage of the hascard application

Contents

Installation

Binary

The binary used on my system is available under releases. If you run debian with the x86-64 architecture that binary should work for you too. To be able to run it from any directory, it has to be added to the PATH. This can be done by copying it to e.g. the /usr/local/bin directory.

Snapcraft

Hascard is also on snapcraft. Installation instructions are on that site. If you already have snap installed you can just install hascard via sudo snap install hascard. By default snap applications are isolated from the system and run in a sandbox. This means that hascard does not have permission to read or write any files on the system aside from those under %HOME/snap/hascard. To be able to read cards also in other directories under the home directory, hascard makes use of the home interface which might need to be enabled manually using sudo snap connect hascard:home :home.

Install from source

Another option is to build hascard and install it from source. For this you can use the Haskell build tool called stack, or nix. Then for example clone this repository somewhere:

git clone https://github.com/Yvee1/hascard.git
cd hascard

and do stack install hascard or nix-build respectively.

Cards

Decks of cards are written in .txt files. Cards are seperated with a line containing three dashes ---. For examples, see the /cards directory. In this section the 4 different cards are listed, with the syntax and how it is represented in the application.

Definition

This is the simplest card, it simply has a title and can be flipped to show the contents. For example the following card

# Word or question
Explanation or definition of this word, or the answer to the question.

will result in

Multiple choice

This is a typical multiple choice question. The question starts with a # and the choices follow. Only one answer is correct, and is indicated by a *, the other questions are preceded by a -. As an example, the following text

# Multiple choice question, (only one answer is right)
- Choice 1
* Choice 2 (this is the correct answer)
- Choice 3
- Choice 4

gets rendered as

Multiple answer

Multiple choice questions with multiple possible answers is also possible. Here again the question starts with # and the options follow. Preceding each option is a box [ ] that is filled with a * or a x if it is correct. For example

# Multiple answer question
[*] Option 1 (this is a correct answer)
[ ] Option 2
[*] Option 3 (this is a correct answer)
[ ] Option 4

results in

Open question

Open questions are also supported. The words that have to be filled in should be surrounded by underscores _. Multiple answer possibilities can also be given by seperating them with vertical bars |. As an example, the card

# Fill in the gaps
The symbol € is for the currency named _Euro_, and is used in the _EU|European Union_.

behaves like this

Miscellaneous info

Written in Haskell, UI built with brick and parsing of cards done with parsec. Recordings of the terminal were made using terminalizer.