Skip to main content

Video generator for language exam

Project description

Installation

pip3 install --verbose exam2pptvideo 

Usage

Please refer to api docs.

Execute usage

  • Validate ppt template
exam_pptx_validate --pptx [pptx file]
  • Convert exam csv file into ppt file
exam_csv2pptx --sourcecsv [exam csv file] --lang [language] --title [title shown in ppt] --destpptx [pptx file]
  • Convert ppt into pdf and images
exam_pptx2media --sourcepptx [pptx file] --destdir [dest directory storing pdf and images]
  • Convert ppt into videos
exam_pptx2video --sourcepptx [pptx file] --destdir [dest directory storing videos] --lang es

Package usage

from exam2pptvideo import SpanishExamPPT, SpanishExamVideo
from exam2pptvideo.lib import pptx2pdf, pdf2images
 
def csv2pptx(sourcecsv, title, lang, destpptx):
  _PPTS = {
    "es": SpanishExamPPT
  }

  _PPT = _PPTS[lang]

  vp = _PPT(sourcecsv, title)
  vp.convert_to_ppt(destpptx)

def pptx2video(sourcepptx, lang, destdir):
  _VIDEOS = {
    "es": SpanishExamVideo
  }

  _VIDEO = _VIDEOS[lang]

  ev = _VIDEO(sourcepptx)

  ev.create_videos(destdir)

def pptx2pdf2images(sourcepptx, destdir):
  pdf = pptx2pdf(sourcepptx, destdir)
  images_len = pdf2images(pdf, destdir)

Development

Clone project

git clone https://github.com/qishe-ttt/exam2pptvideo 

Install poetry

Install dependencies

poetry update

Test

poetry run pytest -rP --capture=sys

which run tests under tests/*

Execute

poetry run exam_pptx_validate --help
poetry run exam_csv2pptx --help
poetry run exam_pptx2media --help
poetry run exam_pptx2video --help

Create sphinx docs

poetry shell
cd apidocs
sphinx-apidoc -f -o source ../exam2pptvideo
make html
python -m http.server -d build/html

Host docs on github pages

cp -rf apidocs/build/html/* docs/

Build

  • Change version in pyproject.toml and exam2pptvideo/__init__.py
  • Build python package by poetry build

Git commit and push

Publish from local dev env

  • Set pypi test environment variables in poetry, refer to poetry doc
  • Publish to pypi test by poetry publish -r test

Publish through CI

git tag [x.x.x]
git push origin master

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

exam2pptvideo-0.1.5.tar.gz (13.1 MB view details)

Uploaded Source

Built Distribution

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

exam2pptvideo-0.1.5-py3-none-any.whl (13.2 MB view details)

Uploaded Python 3

File details

Details for the file exam2pptvideo-0.1.5.tar.gz.

File metadata

  • Download URL: exam2pptvideo-0.1.5.tar.gz
  • Upload date:
  • Size: 13.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.2 Linux/5.8.0-1039-azure

File hashes

Hashes for exam2pptvideo-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4fc5231452d9368bf3b30e0ddc6ea91a99ce2495b8acc35434bdbc022a8a8e2b
MD5 13a9a64e9a0bf114ef63cc1064b9b04c
BLAKE2b-256 d19e172a93d55f809da00af40e59adccb126e9687145cfbebf7dc30fb461ec8a

See more details on using hashes here.

File details

Details for the file exam2pptvideo-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: exam2pptvideo-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.2 Linux/5.8.0-1039-azure

File hashes

Hashes for exam2pptvideo-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cd93fb4746c0ce833de2dc9d5e49453e308737b3c1e5f3034c61b77808833285
MD5 88d070a36bc8916d56b62377cfad1d64
BLAKE2b-256 c38fe05a7d199f67bcc8e394a07fb9029869cd57060ea1ec7a3aca2f39ed088e

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