Skip to main content

Create anki cards and export its in .apkg

Project description

Create anki cards and export it in .apkg

How to install

pip3 install dvmncards

How it works

The first step is to create a new deck:

deck - is a deck of cards.

If you want to create new deck :

deck = getEmptyCol()

Add a new card:

front - it's the front side of the card

back - it's a backside of card.

answer - it's an extra field for input type card.

css - it's a style of card.

add_new_card(deck, front, back,
                css=None, explination=None)

If you want to add an image, you need to:

image - it's a binary format of the image

name_deck - it's a name of deck it will use for the name of the image.

extension_image - it's an extension for image.

add_image(deck,image,name_deck='example',extension_image='.jpeg')

Export in .apkg extension:

export_path - it's the path where you will upload the file.

export_ankipkg(deck,export_path)

Examples

def create_anki_cards():
    #create new deck
    deck = getEmptyCol()

    #add new baicCard to deck
    add_new_card(deck,front,back)

    #add new inputCard to deck with new css 
    add_new_card(deck,front,back,css=css, explination=explination)

    #upload image to media deck
    add_image(deck,image,image_name='expame',extension_image='.jpeg')

    #export deck in .apkg
    export_ankipkg(deck,export_path)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dvmncards-0.0.2.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

dvmncards-0.0.2-py3-none-any.whl (20.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page