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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file dvmncards-0.0.2.tar.gz.

File metadata

  • Download URL: dvmncards-0.0.2.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for dvmncards-0.0.2.tar.gz
Algorithm Hash digest
SHA256 82f6caad316b7e55a2ceb37874a92a268e5db1b2cffd101d5d701da8a40b3bd3
MD5 bf0ca95c0f5fcc24cd96ea91a392050f
BLAKE2b-256 606c947490134d89fb1b4fe9ca8a98f0f3af30265725b778d030a9c9fe7d3222

See more details on using hashes here.

File details

Details for the file dvmncards-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dvmncards-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for dvmncards-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ca5c67e7f946024d3577f4df512dc6d0d6c9130993aba32db576d1cd21f329c
MD5 d0e34476e79ca31e51df53b9012722a4
BLAKE2b-256 5440d7bff7ee7978f1715b3819a7ba640db834d9857a918e5f58e4c957b0c073

See more details on using hashes here.

Supported by

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