ucsschool.importer.frontend package

Submodules

ucsschool.importer.frontend.cmdline module

Base class for UCS@school import tool cmdline frontends.

class ucsschool.importer.frontend.cmdline.CommandLine[source]

Bases: object

import_initiator = 'unknown'
parse_cmdline()[source]
setup_logging(stdout=False, filename=None, uid=None, gid=None, mode=None)[source]
setup_config()[source]
configuration_files

IMPLEMENTME to add module specific configuration files: res = super(YouClass, self).configuration_files res.append(“/your/config.json”) return res

Returns:list of filenames
Return type:list(str)
do_import()[source]
prepare_import()[source]

Create a symlink file link_name that points to a file at source. If link_name exists and is a symlink, it will first be deleted. This is a wrapper around os.symlink(source, link_name).

Parameters:
  • source (str) – the file that the symlink should point to
  • link_name (str) – the symlink file to create
Returns:

None

Return type:

None

main()[source]

ucsschool.importer.frontend.parse_user_import_cmdline module

Default command line frontend for import.

class ucsschool.importer.frontend.parse_user_import_cmdline.ParseUserImportCmdline[source]

Bases: object

Setup a command line frontend.

Setup the parser. Override to add more arguments or change the defaults.

parse_cmdline()[source]

Parse the command line.

Returns:the object with the parsed arguments assigned to attributes
Return type:argparse.Namespace
apply_quirks(settings)[source]

Apply modifications that cannot be done automatically.

ucsschool.importer.frontend.user_import_cmdline module

UCS@school new import tool cmdline frontend.

class ucsschool.importer.frontend.user_import_cmdline.UserImportCommandLine[source]

Bases: ucsschool.importer.frontend.cmdline.CommandLine

import_initiator = 'commandline'
configuration_files

Add new user import specific configuration files.

Returns:list of filenames
Return type:list(str)