make_directories.py
def main(start=1, end=26):
    """Run program creating git branches, directories and files for AoC."""
    for day_num in range(start, end):
        day_name = 'day{}'.format(day_num)
        call(['git', 'checkout', '-b', day_name])
        path = os.path.join(HERE, day_name)
        os.mkdir(path)

        for fmt in FILENAMES:
            dest_filename = fmt.format(day_name)
            dest_filepath = os.path.join(path, dest_filename)
            template_filename = fmt.format('template')
            template_filepath = os.path.join(HERE, 'templates', template_filename)
            call(['cp', template_filepath, dest_filepath])
            call(['git', 'add', dest_filepath])
        call(['touch', os.path.join(path, '__init__.py')])
        call(['git', 'add', os.path.join(path, '__init__.py')])
        call(['git', 'commit', '-m', 'Committing {} files.'.format(day_name)])
        call(['git', 'checkout', RETURN_TO])
Run program creating git branches, directories and files for AoC.
Run program creating git branches, directories and files for AoC.
Run program creating git branches directories and files for AoC .
def main(start=1, end=26):
    for day_num in range(start, end):
        day_name = 'day{}'.format(day_num)
        call(['git', 'checkout', '-b', day_name])
        path = os.path.join(HERE, day_name)
        os.mkdir(path)
        for fmt in FILENAMES:
            dest_filename = fmt.format(day_name)
            dest_filepath = os.path.join(path, dest_filename)
            template_filename = fmt.format('template')
            template_filepath = os.path.join(HERE, 'templates', template_filename)
            call(['cp', template_filepath, dest_filepath])
            call(['git', 'add', dest_filepath])
        call(['touch', os.path.join(path, '__init__.py')])
        call(['git', 'add', os.path.join(path, '__init__.py')])
        call(['git', 'commit', '-m', 'Committing {} files.'.format(day_name)])
        call(['git', 'checkout', RETURN_TO])
def main ( start = 1 , end = 26 ) : for day_num in range ( start , end ) : day_name = 'day{}' . format ( day_num ) call ( [ 'git' , 'checkout' , '-b' , day_name ] ) path = os . path . join ( HERE , day_name ) os . mkdir ( path ) for fmt in FILENAMES : dest_filename = fmt . format ( day_name ) dest_filepath = os . path . join ( path , dest_filename ) template_filename = fmt . format ( 'template' ) template_filepath = os . path . join ( HERE , 'templates' , template_filename ) call ( [ 'cp' , template_filepath , dest_filepath ] ) call ( [ 'git' , 'add' , dest_filepath ] ) call ( [ 'touch' , os . path . join ( path , '__init__.py' ) ] ) call ( [ 'git' , 'add' , os . path . join ( path , '__init__.py' ) ] ) call ( [ 'git' , 'commit' , '-m' , 'Committing {} files.' . format ( day_name ) ] ) call ( [ 'git' , 'checkout' , RETURN_TO ] )
Run program creating git branches, directories and files for AoC.
Run program creating git branches directories and files for AoC .
"""Run program creating git branches, directories and files for AoC."""
start
end