Skip to content
/ NFT Public

NFT e.g. New From Template A helper script to quickly create files from a standard template.

Notifications You must be signed in to change notification settings

dan-rds/NFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT

A python script for quickly creating a New File form a Template

Installing

$ pip install nft

Running

Just like that, we should be in business. NFT works something like the touch command but instead of creating empty files, nft creates boilerplate files from the template. The first time you run nft, it will ask a few questions to better fill out the template. Try it out with something like:

$ nft test.java

Which created the following file:

/*-------------------------------------
test.java
temp_project
    by Daniel Richards (ddrichar@ucsc.edu)
    Copyright © 2019 Daniel Richards. All rights reserved.
--------------------------------------*/

import java.util.*;
import java.lang.*;
import java.io.*;

public class test
{
        public static void main(String args[])
        {
                System.out.println("New Java file created from template");
        }
}

Other File Types

NFT can make the following kinds of source files:

  • C files and headers
  • Java
  • Python
  • Ruby
  • Shell (bash and Csh)

NFT can also build non-source files. The standard README types are included:

  • README (txt)
  • README.md (markdown)
  • README.rst (restructured text)

Any of these can be run as follows:

$ nft README.md

NOTE

If you want to reenter your name or email or recompile the list of templates (if you added a new template) use:

$ nft setup

Authors

License

See ./LICENSE

About

NFT e.g. New From Template A helper script to quickly create files from a standard template.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published