Skip to main content

Pączek filler - simple script for filling out single template files

Project description

Pączek filler

This tool tries to fill in a space next to cookiecutter, giving the user ability to reuse functionality stored in a single file across different projects.

Setup a folder with files you reuse in your project. Set the PACZEK_FILLINGS environment variable to point that folder. Run paczek - will display list of files from which you can choose a file that will be put in your current directory. If the file ends with .tpl you will be asked for values that will be put inside the template.

Please remember, redundancy can be removed and files can me merged using git.

Requirements

Usage

There are two commands:

  • paczek
  • paczekfiller <template_filepath> <target_filepath>

paczek

paczek is a script that uses fzf to prodive you with a list of template files, from your template files folder.

If the file has extension tpl, then it is passed to paczekfiller. paczekfiller detects Jinja2 variables in that file, asks you to provide values for then. Finally, it substitutes the variables with the value and saves the file in your current directory with the the file name without tpl.

If the file is without .tpl, then paczek copies it to your current folder, using cp

paczekfiller

paczekfiller fills out a jinja2 template file and saves it under given target filepath.

<template_filepath> is an absolute path.

config

Environment variables used by command paczek:

  • PACZEK_FILLINGS stores path to folder with template files

templates

Variables are extracted from templates. Variables names are used in user prompt. The "_" are changed into spaces (" ").

So, for a variable {{Some_variable}}, script will prompt user with this: Some variable:

Installation

pip install paczekfiller

Licence

MIT type.

Authors

paczekfiller was written by Kris Urbanski <kris@whereibend.space>_.

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

paczekfiller-0.1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

paczekfiller-0.1.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file paczekfiller-0.1.4.tar.gz.

File metadata

  • Download URL: paczekfiller-0.1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for paczekfiller-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c8899dad9bda953d028d342edb73af80e88316e0eebcd0ed86b09032789cd817
MD5 bbae6fe4563f25283fc577db14dca607
BLAKE2b-256 d89aa887760749dc27f57cb72f72ab6725658c461d4e787e0c7bf31d32a989e6

See more details on using hashes here.

File details

Details for the file paczekfiller-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: paczekfiller-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for paczekfiller-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ca369a8cf5f5e892b747336ef32ea97da3fa2a49cd225ff6caa6bbe5c084b51e
MD5 a1d5a29b62d60cad2bea4a3efde53c60
BLAKE2b-256 1c0f3bbb965432d88c2aa1c8f313f9fdb6fafae11035d788f781ffd9b4b52b28

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