Skip to main content

CLI app to create files with templates.

Project description

ftemplates

A CLI application to create files with templates.

Abstract

This project is a command-line interface application that allows you to create your own templates for any kind of file and use them to create new files easily with a few commands.

Rationale

Many times the files we use follows some kind of pattern or predefined structure. Sometimes we end up writing that structure ourselves to frame better some workflow. Those structures driven by conventions or personal preferences commonly stay the same or change slowly. Writing them over and over again is tedious and inconsistent. Instead of relying in our busy memory to rebuild the structure of some .ipynb or README files who been handy in the past, automate the process with templates and a CLI.

Installation

Using pip

$ pip install ftemplates

Using poetry

$ poetry add ftemplates  // Adding as dependency to poetry's pyproject.toml.

Usage

In the terminal run ftemp or ftemp --help to know what to do. From there all its functionality should be easy to use.

Examples

// List all available templates.
$ ftemp list  

// Create new file using a template.
$ ftemp create --new-file python_template.py new_file.py

// Create new template using a file.
$ ftemp create --new-template file4template.ipynb notebook_template.ipynb

// Override template with new template.
$ ftemp create --new-template --override updated_file4template.md markdown_template.md

Q&A

What was your personal motivation to create this project?

I create this project to create jupyter notebook files (.ipynb) with a custom structure to frame data science workflows better. The structure of the file was already developed by me (you can find it as the data_science_notebook.ipynb built-in template), but copying and pasting the file manually over and over was suboptimal. "I want to create notebooks with predefined structure with a simple command" gave birth this project.

Why the names of the commands and built-in templates are too long and explicit?

The project try to be as clear as possible enforcing legibility and intuitive usage. Reading it will be beneficial for understanding. Typing it will be a curse, so make your own 2-4 character aliases, write them once and understand them whenever you read them with a single look. Therefore both things will be meeting their purposes: self-documented commands giving legibility and aliases giving practicality.

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

ftemplates-0.1.10.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

ftemplates-0.1.10-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file ftemplates-0.1.10.tar.gz.

File metadata

  • Download URL: ftemplates-0.1.10.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.8 Windows/10

File hashes

Hashes for ftemplates-0.1.10.tar.gz
Algorithm Hash digest
SHA256 7709af7dbcbaf1b734a7560ab66ef8ed680a6bea9c711f1d81b9ffdde9ba2f83
MD5 2b943b124d5d468cedf12c03dfb1b22c
BLAKE2b-256 262217dee5a8f7d1d7d5bdff1da8dbc5b711c52c6e3e229c88ca3b49a32ca024

See more details on using hashes here.

File details

Details for the file ftemplates-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: ftemplates-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.8 Windows/10

File hashes

Hashes for ftemplates-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a33ed063b69d42bb9ca53943f4da886a192e828fb4604d79dc7031d4680fe43e
MD5 0077585015b1ee967a6976ce6ef3f336
BLAKE2b-256 ed42365c774a25d4900518e8e4e63c30c69ee276c395453082f835c333fec8cb

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