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
- Host: GitHub
- URL: https://github.com/mlctrez/factbp
- Owner: mlctrez
- Created: 2021-11-03T16:24:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T21:40:16.000Z (over 2 years ago)
- Last Synced: 2025-10-17T22:51:42.061Z (9 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.