easy-sgr 0.1.1

An easy to use Select Graphics Rendition(SGR) library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Prepends README.md to lib.rs 

print('Copying start')

with open('./src/lib.rs', 'r') as lib_file:
    lines = [line for line in lib_file if not line.startswith('//!')]

with open('./src/lib.rs', 'w') as lib_file:
    for line in open('./README.md').readlines()[4:]:
        if len(line) == 1:
            lib_file.write(f'//!\n')
        else:
            lib_file.write(f'//! {line}')

    for line in lines:
        lib_file.write(line)

print('Copying complete')