Skip to content

Python program to automate the generation of PDF certificates from a PPTX model (PowerPoint file).

License

Notifications You must be signed in to change notification settings

ifpeopensource/certificate-generator

Repository files navigation

Certificate Generator

Contador de linguagens Tamanho do repositório Último commit Issues License

Programa em Python para automatizar a geração de certificados PDF a partir de um modelo em PPTX (arquivo do PowerPoint).

Dependências

Para o funcionamento do programa, é necessário ter instalado as seguintes dependências:

Como utilizar

  1. Instale as dependências

    • Linux - APT

      1. Instale o LibreOffice

        sudo apt update
        sudo apt install libreoffice
      2. Crie um virtual environment para o Python 3.7+ e instale as dependências do programa

        python3 -m venv venv
        source venv/bin/activate
        pip install -r requirements.txt
  2. Crie um arquivo names.txt com os nomes das pessoas separados por linha.

  3. Crie um arquivo model.pptx com o slide modelo do certificado.

    • Os campos com o texto {{name}} serão substituídos pelos nomes das pessoas.
  4. Rode o programa.

    python main.py -d names.txt --name-only ./output_file.pdf
  5. Os certificados serão gerados no diretório ./output. Caso o parâmetro seja informado, um arquivo PDF contendo todos os certificados será gerado.

Opções

Opção Descrição
-m, --model TEXT Caminho do arquivo modelo [padrão: ./model.pptx]
-d, --data TEXT Caminho do arquivo de dados [necessário]
--multiple-fields / --name-only Devem ser preenchidos múltiplos campos ou apenas os campos de nome
-o, --output-dir TEXT Diretório de saída [padrão: ./output]
-a, --align [left | center | right | justify] Alinhamento do parágrafo [padrão: left]
-f, --font-size INTEGER Tamanho da fonte [padrão: 18]
-c, --color TEXT Cor da fonte [padrão: 000000]
--help Exibe a mensagem de ajuda

Time

Este projeto é mantido por esses incríveis contribuidores.

🤝 Contribuir

Contribuições, issues e pedidos de features são bem-vindos!
Sinta-se livre para checar a página de issues.

  • Crie um fork;
  • Crie um branch com a sua feature: git checkout -b my-feature;
  • Faça um commit com as mudanças: git commit -m 'feat: My new feature';
  • Faça um push para o seu branch: git push origin my-feature.

Após a sua pull request ser aceita, você pode excluir o seu branch.

Demonstre o seu apoio

Dê uma ⭐️ se este projeto lhe ajudou!

📝 Licença

Este projeto está sob a licença MIT. Veja o arquivo LICENSE para mais detalhes.


Feito com ♥ no IFPE Open Source

English

Program in Python to automate the generation of PDF certificates from a PPTX model (PowerPoint file).

Dependencies

For the program to work, it is necessary to have installed the following dependencies:

Usage

  1. Install dependencies

    • Linux - APT

      1. Install LibreOffice

        sudo apt update
        sudo apt install libreoffice
      2. Create virtual environment and install dependencies

        python3 -m venv venv
        source venv/bin/activate
        pip install -r requirements.txt
  2. Create a names.txt file with the names of the people you want to display;

  3. Create a model.pptx file with the certificate model slide;

    • The fields with {{name}} will be replaced with the person name;
  4. Run the program

    python main.py -d names.txt --name-only ./output_file.pdf
  5. The output files will be generated in the ./output directory. If the parameter is informed, a PDF file containing all the certificates will be generated.

Options

Option Description
-m, --model TEXT Model file path [default: ./model.pptx]
-d, --data TEXT Data file path [required]
--multiple-fields / --name-only Whether to fill in multiple fields or just name fields
-o, --output-dir TEXT Output directory [default: ./output]
-a, --align [left | center | right | justify] Paragraph alignment [default: left]
-f, --font-size INTEGER Font size [default: 18]
-c, --color TEXT Font color [default: 000000]
--help Show help message

Team

This project is maintained by these incredible contributors.

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check the issues page.

  • Create a fork;
  • Create a branch with your feature: git checkout -b my-feature;
  • Commit changes: git commit -m 'feat: My new feature';
  • Push to your branch: git push origin my-feature.

After your pull request is accepted, you can delete your branch.

Show your support

Give a ⭐️ if this project helped you!

📝 License

This project is licensed under the MIT license. See the file LICENSE for more details.


Made with ♥ at IFPE Open Source

About

Python program to automate the generation of PDF certificates from a PPTX model (PowerPoint file).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages