| 1 |
#!@Python3_EXECUTABLE@ |
| 2 |
# |
| 3 |
# SPDX-FileCopyrightText: 2016 Varun Joshi <[email protected]> |
| 4 |
# |
| 5 |
# SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 6 |
|
| 7 |
import sys |
| 8 |
import json |
| 9 |
|
| 10 |
writer_data = json.loads(sys.stdin.read()) |
| 11 |
|
| 12 |
def write(): |
| 13 |
path = writer_data.get('path') |
| 14 |
mimetype = writer_data.get('mimetype', '') |
| 15 |
properties = writer_data.get('properties', '') |
| 16 |
|
| 17 |
output = open(path, 'w') |
| 18 |
output.write(json.dumps(properties)) |
| 19 |
|
| 20 |
return_status = {} |
| 21 |
return_status['status'] = 'OK' |
| 22 |
return_status['error'] = '' |
| 23 |
|
| 24 |
print(json.dumps(return_status)) |
| 25 |
|
| 26 |
if __name__ == "__main__": |
| 27 |
write() |