Skip to content

Commit

Permalink
Details nov24, nicening some messages at fresh startup... (#62)
Browse files Browse the repository at this point in the history
Nicening some output as fresh startup
  • Loading branch information
quintijn authored Nov 26, 2024
1 parent fe8dc81 commit 9b40ae7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
name = "unimacro"
authors = [{name = "Quintijn Hoogenboom (maintainer)", email = "q.hoogenboom@antenna.nl"}]
dynamic = ["description"]
version = "4.1.7.dev1"
version = "4.1.7.dev2"
requires-python = ">=3.10"
readme = "README.md"

Expand Down
11 changes: 6 additions & 5 deletions src/unimacro/natlinkutilsbj.py
Original file line number Diff line number Diff line change
Expand Up @@ -2057,9 +2057,10 @@ def startInifile(self):

commandDir = os.path.join(userDir,
self.language +"_inifiles")
inifile = os.path.join(commandDir, inifile_stem + '.ini')
inifile_name = inifile_stem + '.ini'
inifile = os.path.join(commandDir, inifile_name)
if not os.path.isfile(inifile):
print(f'\tCannot find inifile: {inifile}')
print(f'\n\tCannot find inifile: {inifile_name}')
self.lookForExampleInifile(commandDir, inifile_stem + '.ini')
if not os.path.isfile(inifile):
print(f'\tcannot find an example inifile for {inifile_stem}')
Expand All @@ -2076,7 +2077,7 @@ def startInifile(self):
except KeyError:
commandWord = "edit"
name = self.getName()
self.message(f'===Created new inifile for grammar "{inifile_stem}"\n===Please edit this file by calling the command "{commandWord} {name}"')
self.message(f'\tCreated new inifile: "{inifile}"\n\tYou can inspect and edit this file by calling the command "{commandWord} {name}"\n')
self.inifile = inifile
#self.ini = inivars.IniVars(self.inifile, repairErrors=1)

Expand Down Expand Up @@ -2160,10 +2161,10 @@ def lookForExampleInifile(self, commandDir, fileName):
if not os.path.isfile(inifile):
if inifileSamples:
sample = inifileSamples[0]
print('\ttake sample inifile: %s'% sample)
print('\tTake sample inifile: %s'% sample)
shutil.copyfile(sample, inifile)
else:
print('could not find a valid sample inifile "%s" in directories: %s'%\
print('Could not find a valid sample inifile "%s" in directories: %s'%\
(fileName, sampleDirs))

def TryToMakeDefaultInifile(self, commandDir, inifileName, language):
Expand Down

0 comments on commit 9b40ae7

Please sign in to comment.