AnkiBuild is a Go application designed to automate the creation of Anki flashcard packages (.apkg files) from configuration files.
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.
- Clone the repository.
- Navigate to the root directory of the project.
- Make sure you have Go installed on your machine.
- Run
go buildto build the binary orgo run main.goto directly run the application.
- Clone the repository.
- execute
go run .ormake example - the .apkg file of
./example/example.apkg.tomlare generated in./example
To generate .apkg files:
- Define your flashcards in
.apkg.tomlfiles within the project directory. - Make sure each
.apkg.tomlfile follows theKnowledgePagestruct defined inconf.go, which includes the title of the package and a slice of QnACards. - Run the binary or use
go run main.goto start the application. This will generate.apkgfiles in the origin directory.
configuration detail @see FORMAT
builder.go: Contains the logic to parse.apkg.tomlfiles and build.apkgfiles.conf.go: Defines the structures for the configuration files (KnowledgePageandQnACard).main.go: The entry point of the application which invokes the build process.apkg/: Root package of the apkg formatter writer.
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.
This project is licensed under the MIT License.
- Bagaking - Initial work
Feel free to contact the maintainers of this project if you have any questions or feedback.
- Anki - for providing an awesome flashcard application.
- BurntSushi - for the
tomlpackage used in parsing configuration files. - Contributors to the
anki_barnandgoulppackages for their utility functions in the project.