Skip to content
Snippets Groups Projects
Commit d3194736 authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Merge branch '85-admin-berechtigung-fur-initialisation' into 'development'

Resolve "Admin-Berechtigung für Initialisation"

See merge request !33
parents 4003731b a20935ea
Branches
Tags
2 merge requests!43Implements #73, cleans up example file,,!33Resolve "Admin-Berechtigung für Initialisation"
Pipeline #591962 passed
......@@ -29,7 +29,7 @@ classdef config < handle
obj.configFileName, ' found.' newline,...
'Please enter the required information manually'];
disp(msg);
obj.configData = obj.wizard('initilise');
obj.configData = obj.wizard('initialise');
m = input('Do you want to save the config, Y/N [Y]:','s');
if ismember(m,{'Y','y'})
obj.writeConfig(fullfile(pwd));
......
......@@ -4,15 +4,15 @@ function config = wizard(mode)
config = struct();
switch mode
case 'initilise'
case 'initialise'
config.Author = inputRequired('your Name');
config.ProjectID = inputRequired('your Project Number');
msg = ['Do you want to add a remote path?' newline,...
msg = ['Do you want to add an export path?' newline,...
'Otherwise your files will be stored locally.' newline,...
'You can add this later by rerunning the initilisation.'];
'You can add this later by rerunning the initiliasation.'];
disp(msg);
m = input('Do you want add a remothe path, Y/N [Y]:','s');
m = input('Do you want to add an export path? Y/N [Y]:','s');
if ismember(m,{'Y','y'})
config.ServerPath = uigetdir();
......@@ -27,7 +27,7 @@ function usrTxt = inputRequired(msg)
%Input Dialog that repeats if left empty
inputRequired = true;
while inputRequired
prompt = ['Please enter ', msg , ':'];
prompt = ['Please enter ', msg , ': '];
inpt = input(prompt,'s');
if isempty(inpt)
disp('Input must not be empty!');
......
......@@ -16,7 +16,8 @@ arguments
options.ProjectID (1,:) {mustBeText}= ''
options.Fontsize (1,1) {mustBeInteger} = 8
options.Color (1,3) {mustBeNonnegative} = 0.65*[1 1 1] % grey
options.Location (1,:) {mustBeText} = 'east'
options.Location (1,:) {mustBeMember(options.Location,{'north','east',...
'southeast','south','west','custom'})} = 'east'
options.DistanceToAxis {mustBeReal} = .01 % relative distance
options.Position (1,2) {mustBeVector} = [1,0.4] % default for east
options.Rotation (1,1) {mustBeReal} = NaN
......
%% This is the PlotID Initialisation file
% Please run this script before using PlotID
%% Step 1: Add plotID location to you MATLAB path
% This is necessary to use PlotID in your personal MATLAB Scripts
addpath(pwd);
savepath;
%% Section 2 Config File
%% Section 1 Config File
% To make things easy, you should use the config file. The following wizard
% will help you create one:
writeConfig = true;
......@@ -18,7 +13,7 @@ if isfile('config.json')
end
if writeConfig
config = PlotID.config.wizard('initilise');
config = PlotID.config.wizard('initialise');
fid = fopen('config.json','w');
txt = jsonencode(config,'PrettyPrint',true);
fwrite(fid,txt);
......@@ -26,4 +21,5 @@ if writeConfig
end
%%
clc
disp('Initialisition done.')
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment