Skip to content

ohare93/brain-brew-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brain Brew Starter

A full working repo using Brain Brew 👍 This repo is for demonstration purposes, and gives a user an already working system to morph to fit their own needs. Though if you already have some Anki cards to sync then it is easier to simply delete most of this repo and use brain-brew to create it from scratch. See the seting up your own cards section below for more details.

If you get use of out this project, or wish to see it progress, please do consider supporting 🙏

Install steps

  1. Clone or fork repo
  2. Install general requirements
    1. Python 3.7+
    2. Pip
    3. Pipenv
  3. Create a new pipenv using the provided Pipfile with pipenv install. This will install Brain Brew from PyPi and it's requirements. (Note, you can simply run pip install brain-brew instead if you wish, but a virtual environment is recommended)
    1. Enter the virtual environment with pipenv shell if need be, in order to run the next steps.

Running Brain Brew

A Brain Brew recipe is run in the command line with brainbrew run [recipe] and takes a recipe file as an argument.

brainbrew run recipes/source_to_anki.yaml

Two sets of these recipes are provided in this repo under recipes/, each having their own export folder in build/.

  1. One which just converts normal words inside src/data/words.csv into a single note type.

  2. And another that does the same, but also uses the extra 'derivative' files nouns.csv and verbs.csv to add extra fields to certain entries in the words.csv.

Each set contains a recipe to convert from or to a CrowdAnki file.

Setting up your own cards for Import/Export

Change this repo to support your own flashcards! Simply follow these steps:

  1. Delete the following folders in this repo:

    1. /build
    2. /recipes
    3. /src
  2. Export your deck using CrowdAnki and place that export somewhere accessible

    • Remember to restart Anki after installing
  3. In the command line while in the main folder of this repo run brainbrew init [Your CrowdAnki Export Folder]

    • This will generate the entire repo for you, including the recipe files, source files, and build folder
  4. Run brainbrew run recipes/source_to_anki.yaml to generate the deck in the /build folder

Now you have a fully working repo 👏 If you experience any errors during this process, please open an issue (if one does not already exist).

This init command is not smart when it comes to pairing note to use advanced features such as csvs derivatives shared note model templates/styling. It simply just gives you a working base, which can then be customised to a more advanced setup! 👍

Source -> Anki

The deck in /build/deck.json should be identical to your original deck. Make changes in the csv files and run source_to_anki to update the crowdanki file.

Anki -> Source

Or make changes in Anki and export it back into source here by overwriting build/deck.json with a CrowdAnki export and run anki_to_source recipe to pull data back from

Making new cards

Simply add a value into a setup csv and run brain-brew with Csv to CrowdAnki! You do not need to fill in the guid, that will be automatically generated.

Alternatively, create a card in Anki and sync the changes back through into the csv. Use the power of git change compare to find what you need to keep.

Questions

If there is anything I have left out, or that could be clearer, do not hesitate to open an issue or discussion in either this repo or Brain Brew itself 👍

Thanks! 💯 🚀