<commit_before>Shots
=====

Shots is a templating language for Flask that strives for simplicity and speed.

Adding Shots to a Flask app is super simple.

1. Download the shots package
2. Put it in the same directory as app.py (or whatever your main file is called)
3. Write some Shots for your app and save them in your normal templates/ directory
4. In app.py, instead of calling render_template, instantiate a Shot and render it (passing any parameters you want)
5. Run your app

Check out [the docs](http://flaskshots.herokuapp.com/docs) for language details.

Here is one of the smallest Shots you can have:

###index.shot

```html
title : A Little Shot

a : This is a little Shot
```

###app.py

```python
from flask import Flask
from shots import Shot

app = Flask(__name__)

@app.route('/')
def index():
	return Shot('index').render()
	
if __name__ == '__main__':
	app.run()
```

###Look under the hood

To see the HTML output of a Shot, run:

```bash
python shots/shot.py {{ filename relative to templates folder }} [-d]
```

The -j (for jinja) flag will let you see a template before Jinja2 has processed it.  
The -l (for log) flag will let you see the step-by-step process of the parser.
<commit_msg>favicon now doesnt need an extension<commit_after>Shots
=====

Shots is a templating language for Flask that strives for simplicity and speed.

Adding Shots to a Flask app is super simple.

1. Download the shots package
2. Put it in the same directory as app.py (or whatever your main file is called)
3. Write some Shots for your app and save them in your normal templates/ directory
4. In app.py, instead of calling render_template, instantiate a Shot and render it (passing any parameters you want)
5. Run your app

Check out [the docs](http://flaskshots.herokuapp.com/docs) for language details.

Here is one of the smallest Shots you can have:

###index.shot

```html
title : A Little Shot

h1 : This is a little Shot
```

###app.py

```python
from flask import Flask
from shots import Shot

app = Flask(__name__)

@app.route('/')
def index():
	return Shot('index').render()
	
if __name__ == '__main__':
	app.run()
```

###Look under the hood

To see the HTML output of a Shot, run:

```bash
python shots/shot.py {{ filename relative to templates folder }} [-d]
```

The -j (for jinja) flag will let you see a template before Jinja2 has processed it.  
The -l (for log) flag will let you see the step-by-step process of the parser.

{'fraction_non_alphanumeric': 0.09477124183006536, 'fraction_numerical': 0.0053104575163398695, 'mean_word_length': 3.898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3968528', 'n_tokens_mistral': 778, 'n_tokens_neox': 735, 'n_words': 373}