Skip to main content

Quick project generation.

Installation

pip install arst

Creating a new project

Two shortcuts are installed: ars, and arst. These keys are consecutive if you’re using a Colemak keyboard layout.

ars generate project-type

or if a project is already created, and we want to reaply the templates, but with a tree diff for all the conflicting files. This will use the program specified in the ARS_DIFF_TOOL or in case the variable is not defined vimdiff:

arst generate project-type

This copies all the resources from the ~/.projects/project-type into the current folder. Files that have the .hbs extension will be used as templates, and copied with the extension removed.

The project type is sent as NAME into the handlebars templates.

Thus if you have a structure such as:

.projects/project-type
├── package.json.hbs
└── static
    └── index.html

After the ars project-type command you will have in your current folder:

.
├── package.json
└── static
    └── index.html

The package.json file will be parsed as expected.

If the file name from the project ends with .KEEP on subsequent calls from the same folder, it won’t be overwritten.

Parameters

Parameters can be also passed to the templates themselves. In case a parameter does not have a value, true will be set instead.

ars generate package-type name1=value name2 name3=3

This will generate a package-type project with the following parameters sent into the handlebars template:

{
    "templates" : ["package-type"],
    "name1" : "value",
    "name2" : true,
    "name3" : "3",
    "arg0": "name1",
    "arg1": "name2",
    "arg2": "name3"
}

Since the templating also happens to the file names themselves, so a file named {{name1}}.txt will be installed as value.txt. This is particularly useful in conjunction with the positional argument names, making possible scenarios such as:

ars generate new-model User

If in our project we have: {{arg0}}.html.hbs and {{arg0}}.js.hbs, they will be expanded as: User.html and User.js.

Extra Commands

Command

Description

diff

Diff a file against the template

edit

Edit a file from the project

generate

Generate or update the project sources

lls

List a folder from the project

ls

List the project folder

push

Push a file into the template

pwd

Display the project location

tree

Display the project tree

version

Print the current application version

Table: Extra Commands

Configuration

If you store your project files into a different folder, you can use the ARS_PROJECTS_FOLDER environment variable to point to the absolute path of it.

Implicitly when creating a new project, an .ars file will be created with the current settings, so if the project is changed, you can reaplly your project template. If you want not to have this file created, just add a .noars file in the project template.

Metadata

Release files for arst 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arst 1.3.0
File Size Uploaded
arst-1.3.0.tar.gz 11.2 kB Details

Release files / arst-1.3.0.tar.gz

Download URL arst-1.3.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7dba87226b94ac74cd1aa74c0bd6eefdad947def0c09a1034d3e2c33c5f721cb
BLAKE2b-256 checksum
How to use checksums
8a04c24bb3d9e2fac504905a42cda12fc8d252e043518d57fc2dea82e047e2bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release history Release notifications | RSS feed

This release

1.3.0 This release

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.3

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.21

1 release file

1.0.20

1 release file

1.0.19

1 release file

1.0.18

1 release file

1.0.17

1 release file

1.0.16

1 release file

1.0.15

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page