Skip to main content

PPT generator for language learning

Project description

Installation

pip3 install --verbose linguappt 

Usage

Please refer to api docs.

Execute usage

  • Validate ppt template
lingua_pptx_validate --pptx [pptx file]
  • Convert vocabulary csv file into ppt file
lingua_vocabppt --sourcecsv [vocab csv file] --lang [language] --title [title shown in ppt] --destpptx [pptx file]
  • Convert phrase csv file into ppt file
lingua_phraseppt --sourcecsv [phrase csv file] --lang [language] --title [title shown in ppt] --destpptx [pptx file]
  • Convert ppt into pdf
lingua_pptx2pdf --sourcepptx [pptx file] --destdir [dest directory storing pdf and images]

Package usage

from linguappt import SpanishVocabPPT, EnglishVocabPPT
from linguappt import EnglishPhrasePPT, SpanishPhrasePPT

def vocabppt(sourcecsv, title, lang, destpptx):
  _PPTS = {
    "en": EnglishVocabPPT,
    "es": SpanishVocabPPT
  }

  _PPT = _PPTS[lang]

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

def phraseppt(sourcecsv, title, lang, destpptx):
  _PPTS = {
    "en": EnglishPhrasePPT,
    "es": SpanishPhrasePPT
  }

  _PPT = _PPTS[lang]

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


Development

Clone project

git clone https://github.com/qishe-nlp/linguappt.git

Install poetry

Install dependencies

poetry update

Test

poetry run pytest -rP --capture=sys

which run tests under tests/*

Execute

poetry run lingua_pptx_validate --help
poetry run lingua_vocabppt --help
poetry run lingua_phraseppt --help

poetry run lingua_pptx2pdf2images --help
poetry run lingua_csv2media --help

Create sphinx docs

poetry shell
cd apidocs
sphinx-apidoc -f -o source ../linguappt
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 linguappt/__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

linguappt-0.1.22.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

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

linguappt-0.1.22-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file linguappt-0.1.22.tar.gz.

File metadata

  • Download URL: linguappt-0.1.22.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1028-azure

File hashes

Hashes for linguappt-0.1.22.tar.gz
Algorithm Hash digest
SHA256 a5f7e90d88f94f64ed9574d7f06b70bb2add713c74a4f42a970ef75c999cf23f
MD5 8fc496f4ff9fce72fe9400a9079ceed2
BLAKE2b-256 925c88037d7e77cf9a2d875b307adf607393e48a2569273665d9b6260dca4684

See more details on using hashes here.

File details

Details for the file linguappt-0.1.22-py3-none-any.whl.

File metadata

  • Download URL: linguappt-0.1.22-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1028-azure

File hashes

Hashes for linguappt-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 bd502ffb81e3458fbf1b26166be9a4582b42a43d13752d2fda7a581174b1626a
MD5 8e03c447ca8e7b8fc3a89337df9864cc
BLAKE2b-256 8917597e0f71f3a85e94a0bdc11aa0edf5d2bbae5dbe61434fc82370f880ba84

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