Skip to content

Commit

Permalink
Merge pull request #7 from infeeeee/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
infeeeee authored Jul 28, 2019
2 parents 98f845f + 5b8d2b2 commit 1c8cb60
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Command line client for [Kimai2](https://www.kimai.org/), the open source, self-hosted time tracker.

![interactive restart gif](assets/interactive-restart.gif)

To use this program you have to install Kimai2 first!

This client is still under developement. See planned features in the next section
Expand Down Expand Up @@ -66,6 +68,8 @@ Two usage modes: interactive and classic ui

### Interactive ui

![interactive start gif](assets/interactive-start.gif)

If you start without any commands, you will get to the interactive UI. Use your keyboard's arrow keys for navigation. On the `Start new measurement` menu item you can search for project and activity names.

You can exit with ctrl+c any time.
Expand Down Expand Up @@ -108,7 +112,9 @@ kimai2-cmd start "foo" "bar bar"

### Settings and first run

All settings stored in the settings.ini file. Place this file to the same directory as the executable. If no settings file found you will drop to the interactive UI, where you can add your settings.
All settings stored in the settings.ini file. Place this file to the same directory as the executable. If no settings file found you will drop to the interactive UI, where you can add your settings:

![interactive settings gif](assets/interactive-settings.gif)

You can create your settings.ini file manually, by downloading, renaming and editing [settings.ini.example](https://github.com/infeeeee/kimai2-cmd/blob/master/settings.ini.example).

Expand Down
Binary file added assets/interactive-restart.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/interactive-settings.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/interactive-start.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 17 additions & 6 deletions kimai2-innosetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ ArchitecturesAllowed=x64

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "createini"; Description: "Create settings.ini during installation"; GroupDescription: "Server settings"; Flags: checkedonce

[Files]
Source: "builds\kimai2-cmd.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "settings.ini.example"; DestDir: "{userappdata}\kimai2-cmd"; DestName: "settings.ini"; Flags: onlyifdoesntexist uninsneveruninstall recursesubdirs; AfterInstall: InitializeWizard
Source: "settings.ini.example"; DestDir: "{userappdata}\kimai2-cmd"; DestName: "settings.ini"; Flags: onlyifdoesntexist uninsneveruninstall recursesubdirs; Tasks: createini

[Icons]
Name: "{group}\kimai2-cmd"; Filename: "{app}\kimai2-cmd.exe"
Expand All @@ -41,9 +42,9 @@ Name: "{commondesktop}\kimai2-cmd"; Filename: "{app}\kimai2-cmd.exe"; Tasks: des
Filename: "{app}\kimai2-cmd.exe"; Description: "{cm:LaunchProgram,kimai2-cmd}"; Flags: nowait postinstall skipifsilent

[INI]
Filename: "{userappdata}\kimai2-cmd\settings.ini"; Section: "serversettings"; Key: "kimaiurl"; String: "{code:GetKimaiUrl}"
Filename: "{userappdata}\kimai2-cmd\settings.ini"; Section: "serversettings"; Key: "username"; String: "{code:GetUserName}"
Filename: "{userappdata}\kimai2-cmd\settings.ini"; Section: "serversettings"; Key: "password"; String: "{code:GetPassword}"
Filename: "{userappdata}\kimai2-cmd\settings.ini"; Section: "serversettings"; Key: "kimaiurl"; String: "{code:GetKimaiUrl}"; Tasks: createini
Filename: "{userappdata}\kimai2-cmd\settings.ini"; Section: "serversettings"; Key: "username"; String: "{code:GetUserName}"; Tasks: createini
Filename: "{userappdata}\kimai2-cmd\settings.ini"; Section: "serversettings"; Key: "password"; String: "{code:GetPassword}"; Tasks: createini

[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
Expand All @@ -55,14 +56,24 @@ var AuthPage: TInputQueryWizardPage;
procedure InitializeWizard;
begin
AuthPage := CreateInputQueryPage(wpInstalling,
AuthPage := CreateInputQueryPage(wpSelectTasks,
'Kimai2 settings', 'Please enter your server url and account information',
'');
'You can modify this later in AppData\Roaming\kimai2-cmd\settings.ini');
AuthPage.Add('Kimai2 url:', False);
AuthPage.Add('Username:', False);
AuthPage.Add('API password:', False);
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
{ Skip pages that shouldn't be shown }
if (PageID = AuthPage.ID) and ( not WizardIsTaskSelected('createini')) then
Result := True
else
Result := False;
end;
function AuthForm_NextButtonClick(Page: TWizardPage): Boolean;
begin
Result := True;
Expand Down

0 comments on commit 1c8cb60

Please sign in to comment.