Typ2Anki
Typ2Anki is a tool designed to integrate flashcard creation seamlessly into your Typst-based notes. By utilizing a custom Typst package, you can create cards directly in your notes and sync them effortlessly to a selected Anki deck. This enables you to transform study material into flashcards without disrupting your Typst workflow.
- Create flashcards directly within your Typst documents.
- Sync these flashcards to a chosen Anki deck effortlessly.
- Streamlined workflow for note-taking and spaced repetition learning.
Table of Contents
Installation and Configuration
Installing AnkiConnect
- Open Anki and navigate to Tools > Add-ons.
- Click Get Add-ons and enter the following code to install AnkiConnect:
Alternatively, visit the AnkiConnect Add-on page to learn more.2055492159 - Restart Anki to activate the add-on.
- Verify that AnkiConnect is running by visiting http://localhost:8765 in your browser. If it loads, the add-on is properly installed and functioning.
Installing the Python Package
-
Make sure Python 3.8+ is installed on your system.
-
Install the Typ2Anki package using pip:
pip install typ2anki
-
Verify the installation:
typ2anki --help
Installing the Typst Package
-
Add the Typ2Anki package to your Typst document:
#import "@preview/typ2anki:0.1.0"
-
Place your custom configuration file (
ankiconf.typ) in the project directory for consistent flashcard rendering.// Custom imports for flashcards #import "@preview/pkgs" #let conf( doc, ) = { // Custom configurations doc }
Usage
Basic Workflow
-
Create a Typst file with flashcards:
#card( id: "001", target_deck: "Typst", Q: "What is Typst?", A: "A modern typesetting system." )
-
Create your
ankiconf.typfile with basic configurations:// Custom imports for flashcards #import "@preview/pkgs" #let conf( doc, ) = { // Custom configurations doc }
-
Use Typ2Anki to compile all files in the project directory:
typ2anki ./path/to/your/project -
Open your Anki deck to check the newly added flashcards.
Customizing Cards
To modify card appearance, you can define custom card logic:
#let custom-card(
id: "",
Q: "",
A: "",
..args
) = {
card(
id: id,
Q: Q,
A: A,
container: true,
show-labels: true
)
}
Troubleshooting
Common Issues
-
AnkiConnect not responding:
- Ensure Anki is running and AnkiConnect is installed correctly.
-
Typst file compilation errors:
- Check for syntax issues in your Typst file.
- Ensure your
ankiconf.typcontains the necessary imports and configurations.
Roadmap
- Command to Delete Cards: Implement a feature to remove specific cards from Anki.
- Efficiency Improvements: Optimize the syncing process for speed and reliability.
- Support for Other Card Types: Expand compatibility to include more complex card formats.
Future Plans
- Enhance user experience with more robust error handling and syncing options.
- Broaden integration with Typst to support various output formats.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests for bug fixes, feature enhancements, or documentation improvements.
License
This project is licensed under the MIT License.
Developed with ❤️ by sgomezsal. Let’s make learning efficient and enjoyable!
Metadata
Release files for typ2anki 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| typ2anki-0.1.1.tar.gz | 8.2 kB | Without provenance | Details for typ2anki-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| typ2anki-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for typ2anki-0.1.1-py3-none-any.whl |
Total release size: 16.0 kB
Release files / typ2anki-0.1.1.tar.gz
| Download URL | typ2anki-0.1.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ab8262fd3e075411d3fc32d77bcb46c78f2f044e83b285e11092b63de393142
|
|
BLAKE2b-256 checksum How to use checksums |
21a78dcba9d2577f7dbdc7f6bdf29f708692e5d6479c700493e3343e41080586
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Release files / typ2anki-0.1.1-py3-none-any.whl
| Download URL | typ2anki-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e2c72ef8d609b58a40a273b1dc3c093f1ea4dfd8442f6d4b5422f3938c3126b
|
|
BLAKE2b-256 checksum How to use checksums |
d983162580fbcec178bc0714769be1bbafcdecb1f18312d6550c99670c59f501
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Security for typ2anki 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.