You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good evening, does anyone have any suggestions or know how I could add videos via the geanki library in Python? I tried to create using the code below but the video does not appear. I’ve already tried using just {{PathVideo}}, the video loads with the MPV but the video has to be in the indicated path, I wanted the video to be already inside this file when exporting the .apkg file to send to other people.
# Crie um deck
deck = genanki.Deck(
2059400110,
'A meu Deck Anki')
# Crie uma carta
carta = genanki.Note(
model=modelo_carta,
fields=['The book is on the table', 'O livro está na mesa', "videos/cut_10_17.87_to_22.559.mp4"])
# Adicione a carta ao deck
deck.add_note(carta)
# Exporte o deck para um arquivo .apkg
genanki.Package(deck).write_to_file('meu_deck_anki2.apkg')`
The text was updated successfully, but these errors were encountered:
It seems to be broken because according to README command my_package.media_files.append(pathToFile) should work. It actually works, but only for images
Good evening, does anyone have any suggestions or know how I could add videos via the geanki library in Python? I tried to create using the code below but the video does not appear. I’ve already tried using just {{PathVideo}}, the video loads with the MPV but the video has to be in the indicated path, I wanted the video to be already inside this file when exporting the .apkg file to send to other people.
`# Crie um modelo de carta
modelo_carta = genanki.Model(
1607392319,
'Modelo de Carta Simples',
fields=[
{'name': 'Frente'},
{'name': 'Verso'},
{'name': 'video'}
],
templates=[
{
'name': 'Carta Padrão',
'qfmt': '
{{Frente}}
',
'afmt': '
{{Verso}}
},
])
The text was updated successfully, but these errors were encountered: