Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Bubbles: A simple and expandable C++ project template with [Googletest](https://github.com/google/googletest) and [Boost](https://www.boost.org/) included.

## Initializing Project

```bash
python3 initproject.py "project_name"
```

## Building && Testing

```bash
Expand Down
21 changes: 21 additions & 0 deletions initproject.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import sys

def main(args):
if not args:
print('Please enter a project name')
exit(1)

if " " in args[0]:
print('Please remove spaces and special characters from the project name')
exit(1)

with open('./CMakeLists.txt', 'r+') as f:
print(f'Changing project name to {args[0]}')
contents = f.read().replace('bubbles', args[0])
f.seek(0)
f.write(contents)
f.truncate()

if __name__ == '__main__':
main(sys.argv[1::])