Memium
Project description
Memium
When you have to stop and look things up, it breaks up your flow. Adding this knowledge to long-term memory builds fluency, and being fluent at something makes it much more fun! The faster you can get from crawling to running, the more enjoyable it is.
Unfortunately, we forget most of what we read, even stuff we care about.
It turns out that if you ask questions of the texts you read, and ask those questions of yourself in the future, you learn much more! But writing questions and quizzing yourself can feel quite mechanical. What if you wrote questions as part of your notes, and then your computer could quiz you in the future? That's the purpose of Memium. It extracts questions from your notes like
Q. Why can spaced repetition result in more enjoyable learning?
A. It enables faster bootstrapping to proficiency, which is more fun!
And adding them to a spaced repetition service like Anki.
This is an implementation of Andy Matuschak's Personal Mnemonic Medium.
Use as an application
If you want to sync markdown notes to Anki, here's how to get started!
- In Anki, install the AnkiConnect add-on
Command line interface
- Install Memium in its own virtual environment with pipx,
> pipx install memium
- Import your notes!
> memium --input-dir [YOUR_INPUT_DIR]
In Docker container
- Install Orbstack or Docker Desktop.
- Setup a container
$INPUT_DIR="PATH_TO_YOUR_INPUT_DIR"
docker run -i \
--name=memium \
-e HOST_INPUT_DIR=$INPUT_DIR \
-v $INPUT_DIR:/input \
--restart unless-stopped \
ghcr.io/martinbernstorff/memium:latest \
memium \
--input-dir /input/
This will start a docker container which updates your deck from $INPUT_DIR
. In case of updated files, it will sync the difference (create new prompts and delete deleted prompts) to Anki.
If you want to continuously sync the directory, set the --watch-seconds [UPDATE_SECONDS]
argument as well.
Keeping the package update can be a bit of a chore, which can be automated with WatchTower.
Use as library
If you would like to build build your own Python application on top of the abstractions added here, you can install the library from pypi:
pip install memium
Pipeline abstractions
The library is built as a pipeline illustrated below. Left describes the abstract pipeline, defined by interfaces. The right path describes an implementation of those interfaces from markdown to Anki, which is available in the CLI.
graph TD
FD["File on disk"]
DP["Prompts at Destination"]
FD -- DocumentSource --> Document
Document -- PromptExtractor --> Prompt
Prompt -- Destination --> DP
MD["Markdown file"]
Prompts["[QAPrompt | ClozePrompt]"]
Anki["Cards in the Anki app"]
MD -- MarkdownDocumentSource --> Document
Document -- "[QAPromptExtractor, \nClozePromptExtractor]" --> Prompts
Prompts -- AnkiConnectDestination --> Anki
Contributing
Setting up a dev environment
- Install Orbstack or Docker Desktop. Make sure to complete the full install process before continuing.
- If not installed, install VSCode
- Press this link
- Complete the setup process
Submitting a PR
Feel free to submit pull requests! If you want to run the entire pipeline locally, run:
inv validate_ci
💬 Where to ask questions
Type | |
---|---|
🚨 Bug Reports | GitHub Issue Tracker |
🎁 Feature Requests & Ideas | GitHub Issue Tracker |
👩💻 Usage Questions | GitHub Discussions |
🗯 General Discussion | GitHub Discussions |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file memium-0.25.12.tar.gz
.
File metadata
- Download URL: memium-0.25.12.tar.gz
- Upload date:
- Size: 124.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 103af51e36461d0a7e7ce0bb6a4a30c71cae48623528bfe65e0aab9df0b7a574 |
|
MD5 | 17048a8b4ea459b1846e9a62acb3b3dd |
|
BLAKE2b-256 | 0d4dbd3d24b8e8b62911f4dbd3afbafd7c261f0c14074c98465b2539ac678bad |
Provenance
The following attestation bundles were made for memium-0.25.12.tar.gz
:
Publisher:
release.yml
on MartinBernstorff/Memium
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
memium-0.25.12.tar.gz
- Subject digest:
103af51e36461d0a7e7ce0bb6a4a30c71cae48623528bfe65e0aab9df0b7a574
- Sigstore transparency entry: 151691920
- Sigstore integration time:
- Predicate type:
File details
Details for the file memium-0.25.12-py3-none-any.whl
.
File metadata
- Download URL: memium-0.25.12-py3-none-any.whl
- Upload date:
- Size: 47.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8e789213f4d2bb03e4783d0e96642922cbf30baf9950e0c8ebee78b3009955d |
|
MD5 | 31e7a439237106e64506ab284e5a1072 |
|
BLAKE2b-256 | 0bc6be86f1dc7e6ef0d5050ab906813bc8960efc07f9dd59604dbf9751d7ca3e |
Provenance
The following attestation bundles were made for memium-0.25.12-py3-none-any.whl
:
Publisher:
release.yml
on MartinBernstorff/Memium
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
memium-0.25.12-py3-none-any.whl
- Subject digest:
b8e789213f4d2bb03e4783d0e96642922cbf30baf9950e0c8ebee78b3009955d
- Sigstore transparency entry: 151691921
- Sigstore integration time:
- Predicate type: