*! version 2.1.3

Title

mkproject -- Creates project folder with some boilerplate code

Syntax

mkproject
proj_abbrev
[, template(template)
dir(directory) ]

mkproject
[, query
create(filename)
remove(template_name)
default(template_name)
resetdefault
replace]

Main
template(template) choose the template for the projects. The
query option displays a list of templates available and the default

dir(directory) specifies the directory in which the project
directory is to be created

query displays a list of templates available

Modify templates
create(filename) create a template from filename

remove(template_name) removes the template template_name

default(template_name) set the default template to template_name

resetdefault sets the default template back to long

replace allow an existing template to be replaced when using the
create() option

Description

The purpose of mkproject is to create a standard directory structure and
some files with boilerplate code in order to help get a project started. There
is usually a set of commands that are included in every .do file a person makes,
like clear _all or log using. What those commands are can differ
from person to person, but most persons have such a standard set. Similarly, a
project usually has a standard set of directories and files. Starting a new
project thus involves a number of steps that could easily be automated.
Automating has the advantage of reducing the amount of work you need to do.
However, the more important advantage of automating the start of a project is
that it makes it easier to maintain your own workflow: it is so easy to start
"quick and dirty" and promise to yourself that you will fix that "later". If the
start is automated, then you don't need to fix it.

The mkproject command automates the beginning of a project. It comes with
a set of "templates" I find useful. A template contains all the actions (like
create sub-directories, create files, run other Stata commands) that
mkproject will take when it creates a new project. Since everybody's
workflow is different, mkproject allows users to create their own template.

You can get a list of available templates at your computer by typing
mkproject, query. It will show for each template a short label, which can
give a quick idea of what templates could potentially be useful for you. You can
also click on the name of the template to open a helpfile for that template.

Other

Additional .do files with boilerplate code can be created with boilerplate.

Adding new templates is discussed in this helpfile.

This command was inspired by the book by Scott Long (2009).

Example

. mkproject foo, dir(c:/temp) template(long)

. mkproject, query

Reference

J. Scott Long (2009) The Workflow of Data Analysis Using Stata. College Station, TX: Stata Press.

Author

Maarten Buis, University of Konstanz

maarten.buis@uni.kn