<commit_before>#!/usr/bin/python

import os
import sys
from argparse import ArgumentParser
from paste.deploy.loadwsgi import appconfig
from skylines.assets import Environment

# Build paths
base_path = os.path.dirname(sys.argv[0])

# Create argument parser
parser = ArgumentParser(description='Generate concatenated and minified CSS and JS assets.')
parser.add_argument('conf_path', nargs='?', metavar='config.ini',
                    default='/etc/skylines/production.ini',
                    help='path to the configuration INI file')
parser.add_argument('bundles_path', nargs='?', metavar='bundles.yaml',
                    default=None,
                    help='path to the bundles YAML file')

# Parse arguments
args = parser.parse_args()

# Load config from file
conf = appconfig('config:' + os.path.abspath(args.conf_path))

# Create assets environment
env = Environment(conf)

# Load the bundles from the YAML file
if args.bundles_path is None:
    args.bundles_path = conf['webassets.bundles_file']

print 'Loading bundles from {}'.format(args.bundles_path)
env.load_bundles(args.bundles_path)

# Generate the assets/bundles
for bundle in env:
    print 'Generating bundle: {}'.format(bundle)
    bundle.build()<commit_msg>generate_assets: Print only the output filename<commit_after>#!/usr/bin/python

import os
import sys
from argparse import ArgumentParser
from paste.deploy.loadwsgi import appconfig
from skylines.assets import Environment

# Build paths
base_path = os.path.dirname(sys.argv[0])

# Create argument parser
parser = ArgumentParser(description='Generate concatenated and minified CSS and JS assets.')
parser.add_argument('conf_path', nargs='?', metavar='config.ini',
                    default='/etc/skylines/production.ini',
                    help='path to the configuration INI file')
parser.add_argument('bundles_path', nargs='?', metavar='bundles.yaml',
                    default=None,
                    help='path to the bundles YAML file')

# Parse arguments
args = parser.parse_args()

# Load config from file
conf = appconfig('config:' + os.path.abspath(args.conf_path))

# Create assets environment
env = Environment(conf)

# Load the bundles from the YAML file
if args.bundles_path is None:
    args.bundles_path = conf['webassets.bundles_file']

print 'Loading bundles from {}'.format(args.bundles_path)
env.load_bundles(args.bundles_path)

# Generate the assets/bundles
for bundle in env:
    print 'Generating bundle: {}'.format(bundle.output)
    bundle.build()
{'fraction_non_alphanumeric': 0.10744130521289295, 'fraction_numerical': 0.0007958615200955034, 'mean_word_length': 4.038076152304609, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7176305', 'n_tokens_mistral': 755, 'n_tokens_neox': 728, 'n_words': 204}