AnkiBuild is a Go application designed to automate the creation of Anki flashcard packages (.apkg files) from configuration files.
Overview
This project facilitates the creation of Anki flashcard packages by providing a simple way to define questions and answers (QnAs) in .apkg.toml configuration files. The application will search for these configuration files within the current directory and its subdirectories to generate corresponding .apkg files.
Quick Start
Clone the repository.
Navigate to the root directory of the project.
Make sure you have Go installed on your machine.
Run go build to build the binary or go run main.go to directly run the application.
Example
Clone the repository.
execute go run . or make example
the .apkg file of ./example/example.apkg.toml are generated in ./example
Usage
To generate .apkg files:
Define your flashcards in .apkg.toml files within the project directory.
Make sure each .apkg.toml file follows the KnowledgePage struct defined in conf.go, which includes the title of the package and a slice of QnACards.
Run the binary or use go run main.go to start the application. This will generate .apkg files in the origin directory.
Project Structure
builder.go: Contains the logic to parse .apkg.toml files and build .apkg files.
conf.go: Defines the structures for the configuration files (KnowledgePage and QnACard).
main.go: The entry point of the application which invokes the build process.
apkg/: Root package of the apkg formatter writer.
Contributing
Contributions to AnkiBuild are welcome. Please ensure that your contributions adhere to the following guidelines:
Write clean, readable, and maintainable code.
Provide documentation for any new features or changes.
Submit Pull Requests with detailed descriptions of changes.
Make sure that the changes do not break existing functionality.