Skip to content

specht/copypasta

Repository files navigation

This is copypasta

Copypasta is a straightforward way to implement for loops in text files. For example,

#{for i in range(5)}
#{i + 1}, check!
#{end}

becomes:

1, check!

2, check!

3, check!

4, check!

5, check!

The leading blank line results from the newline after the for block.

Call with:

$ ./copypasta.py test-range.txt.cp

Syntax

You can start a for loop with for [key] in [values] where values should be something which is iterable in Python, such as a list or a range. Every for statement must be matched with an end statement.

About

A for loop for text files of any kind.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages