An open API service indexing awesome lists of open source software.

https://github.com/mlctrez/factbp

Library for manipulating Factorio blueprints
https://github.com/mlctrez/factbp

Last synced: 5 months ago
JSON representation

Library for manipulating Factorio blueprints

Awesome Lists containing this project

README

          

# factbp

## About

This library allows reading and writing factorio blueprint data. It supports reading and writing both the compressed
format and just the json format.

This library will handle the differences in json format between reading and writing a single blueprint or a blueprint
book containing nested blueprints or books.

Top level json element is either a single blueprint:

```json
{
"blueprint": {
"item": "blueprint",
"entities": []
}
}
```

Or a book, where blueprints array is blueprints or nested books.

```json
{
"blueprint_book": {
"item": "blueprint-book",
"blueprints": [
{
"blueprint_book": {
"item": "blueprint-book",
"blueprints": [
]
}
},
{
"blueprint": {
"item": "blueprint",
"entities": []
}
}
]
}
}
```

The Container struct handles reading and writing the top level object and the elements in the blueprints array.