Configuration

class mnemosyne.libmnemosyne.configuration.Configuration(component_manager)
activate()
card_type_property(property_name, card_type, fact_key=None, default=None)
change_user_id(new_user_id)

When a client syncs for the first time with a server, we need to set the client’s user_id identical to the one of the server, in order for the uploaded anonymous logs to be consistent.

clone_card_type_properties(old_card_type, new_card_type)
component_type = 'config'
delete_card_type_properties(card_type)
determine_dirs()
fill_dirs()

Fill data_dir and config_dir. Do this even if they already exist, because we might have added new files since the last version.

load()
load_user_config()
machine_id()
save()
set_card_type_property(property_name, property_value, card_type, fact_key=None)

Set a property (like font, colour, ..) for a certain card type. If fact_key is None, then this will be applied to all fact keys.

This info is not stored in the database, but in the configuration, to allow different clients to have different settings, even though they exchange data during sync.

set_defaults()

Fill the config with default values. Is called after every load, since a new version of Mnemosyne might have introduced new keys.