Giter VIP home page Giter VIP logo

paczekfiller's Introduction

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 <[email protected]>_.

paczekfiller's People

Contributors

przor3n avatar kr1surb4n avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.