Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (20 sloc) 621 Bytes
import click
import toml
import os
snap_userdata = os.environ['SNAP_USER_DATA']
@click.option('--name', prompt='enter your name', help='enter user name')
@click.option('--age', prompt='enter your age', help='enter user age')
def init(name,
config = f"""
# This is a OLI Box TOML config file.
title = "OLI BOX Config"
name = '{name}'
age = '{age}'
parsed_config = toml.loads(config)
formatted_config = toml.dumps(parsed_config)
with open(snap_userdata + '/config.toml', 'w') as f:
You can’t perform that action at this time.