def generate_blanks(amount=5):
    """Generate documents when we're running out of expired posts."""
    print("Generating %d blank documents:" % amount)

    res = _db.view("usage/highest_id", reduce=True)
    if len(res) == 0:
        base_id = 0
    else:
        base_id = res.rows[0].value + 1

    print(base_id % " - Starting at %d")

    for i in range(base_id, base_id+amount):
        doc = { "_id": str(i), "new": True }
        try:
            _db.save(doc)
        except couchdb.ResourceConflict:
            pass
dataset/ETHPy150Open tamentis/vimpaste/vimpaste/db.py/generate_blanks/swapped operands of `%`