Skip to content

Commit

Permalink
version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ammdias committed Dec 20, 2023
1 parent 33c5a7c commit 6f45039
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 35 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Secure Simple Text Editor

Changes list:

* 1.2: Program now respects config file installation path configuration.

* 1.1: Added uninstall option.

* 1.0: Possibility of saving with GnuPG public keys.
Expand Down
4 changes: 2 additions & 2 deletions CONFIG.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

DOC = 'Installation script for Secure Simple Text Editor.'
COPYRIGHT_YEAR = '2019'
VERSION = '1.1'
DATE = '2023-12-09'
VERSION = '1.2'
DATE = '2023-12-20'
AUTHOR = 'António Manuel Dias <ammdias@gmail.com>'
LICENSE = '''
This program is free software: you can redistribute it and/or modify
Expand Down
9 changes: 6 additions & 3 deletions INSTALL.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def yesno(question):
if not os.path.exists(os.path.join(CONFIG_DIR, i)):
print(f'... {i}')
shutil.copy2(os.path.join(PKG_DIR, i), CONFIG_DIR)
_log('config_file', os.path.join(CONFIG_DIR, i))
_log('config_file', os.path.join(CONFIG_DIR, i))
except Exception as e:
_quit(f"Could not copy configuration files. Reason:\n{e}")

Expand All @@ -236,8 +236,11 @@ def yesno(question):
print('\nApplication successfully installed.\n')


except KeyboardInterrupt:
print("\nInstallation interrupted by user.\n", file=sys.stderr)
_rollback()

except Exception as e:
print(e, file=sys.stderr)
print("\nInstallation interrupted by user or unknown error.\n", file=sys.stderr)
print(f"\nUnexpected error:\n{e}\n", file=sys.stderr)
_rollback()

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Secure Simple Text Editor
=========================
version 1.1
version 1.2

Copyright (C) 2019 António Manuel Dias

Expand Down
2 changes: 1 addition & 1 deletion __version__
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.1
1.2
Binary file modified locales/pt_PT/LC_MESSAGES/sste.mo
Binary file not shown.
20 changes: 10 additions & 10 deletions locales/pt_PT/LC_MESSAGES/sste.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
"Project-Id-Version: 1.1\n"
"POT-Creation-Date: 2023-12-09 20:13+0000\n"
"Project-Id-Version: 1.2\n"
"POT-Creation-Date: 2023-12-20 17:43+0000\n"
"PO-Revision-Date: 2023-12-09 20:20+WET\n"
"Last-Translator: António Manuel Dias <ammdias@gmail.com>\n"
"Language-Team: pt_PT <ammdias>\n"
Expand Down Expand Up @@ -63,7 +63,7 @@ msgstr "_Ficheiro"
msgid "_New"
msgstr "_Novo"

#: seditor.py:321
#: seditor.py:359
msgid "Ctrl+N"
msgstr "Ctrl+N"

Expand Down Expand Up @@ -810,31 +810,31 @@ msgstr ""
"\n"
" $ python3 UNINSTALL.py\n"

#: sste.py:67
#: sste.py:79
msgid "file to open"
msgstr "ficheiro a abrir"

#: sste.py:70
#: sste.py:82
msgid "GnuPG command, including complete path if not on PATH"
msgstr "Comando do GnuPG, incluindo a localização completa se não estiver no PATH"

#: sste.py:73
#: sste.py:85
msgid "show copyright information."
msgstr "mostrar licença de utilização."

#: sste.py:76
#: sste.py:88
msgid "show warranty information."
msgstr "mostrar garantia."

#: sste.py:79
#: sste.py:91
msgid "show version information."
msgstr "mostrar versão da aplicação."

#: sste.py:82
#: sste.py:94
msgid "uninstall application"
msgstr "desinstalar aplicação"

#: sste.py:106
#: sste.py:126
msgid ""
"Could not load '.config' file.\n"
"Starting with default configuration."
Expand Down
24 changes: 12 additions & 12 deletions locales/sste.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2023-12-09 20:28+0000\n"
"POT-Creation-Date: 2023-12-20 18:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -323,7 +323,7 @@ msgstr ""
msgid "[ New secure text file ]"
msgstr ""

#: setext.py:61
#: setext.py:65
msgid ""
"Editor for secure (encrypted) simple text files\n"
"(C) 2019 António Manuel Dias\n"
Expand All @@ -342,7 +342,7 @@ msgid ""
"along with this program. If not, see <https://www.gnu.org/licenses/>."
msgstr ""

#: setext.py:77
#: setext.py:81
msgid ""
"From the Preamble of the GNU General Public License:\n"
" \n"
Expand Down Expand Up @@ -380,7 +380,7 @@ msgid ""
"If it's missing please refer to http://www.gnu.org/licenses/gpl.txt\n"
msgstr ""

#: setext.py:113
#: setext.py:117
msgid ""
"From the GNU General Public License:\n"
" \n"
Expand Down Expand Up @@ -409,7 +409,7 @@ msgid ""
"HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n"
msgstr ""

#: setext.py:144
#: setext.py:148
msgid ""
"\n"
"Secure Simple Text Editor\n"
Expand Down Expand Up @@ -566,31 +566,31 @@ msgid ""
" $ python3 UNINSTALL.py\n"
msgstr ""

#: sste.py:67
#: sste.py:79
msgid "file to open"
msgstr ""

#: sste.py:70
#: sste.py:82
msgid "GnuPG command, including complete path if not on PATH"
msgstr ""

#: sste.py:73
#: sste.py:85
msgid "show copyright information."
msgstr ""

#: sste.py:76
#: sste.py:88
msgid "show warranty information."
msgstr ""

#: sste.py:79
#: sste.py:91
msgid "show version information."
msgstr ""

#: sste.py:82
#: sste.py:94
msgid "uninstall application"
msgstr ""

#: sste.py:114
#: sste.py:126
msgid ""
"Could not load '.config' file.\n"
"Starting with default configuration."
Expand Down
10 changes: 7 additions & 3 deletions setext.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

__version__ = '1.1'
__date__ = '2023-12-09'
__version__ = '1.2'
__date__ = '2023-12-20'
__license__ ='GNU General Public License version 3'
__author__ = 'António Manuel Dias <ammdias@gmail.com>'

Expand Down Expand Up @@ -54,8 +54,12 @@ def labelUnderline(label):
#------------------------------------------------------------------------------
# Legal stuff constants

try:
SSTE_VERSION = open(os.path.join(sys.path[0], '__version__')).read().strip()
except:
SSTE_VERSION = __version__

SSTE_NAME = 'Secure Simple Text Editor'
SSTE_VERSION = '1.1'
SSTE_WEBSITE = 'https://github.com/ammdias/sste'
SSTE_WEBSITE_LABEL = 'AMMDIAS'
SSTE_SHORT_COPYRIGHT = _('''Editor for secure (encrypted) simple text files
Expand Down
2 changes: 1 addition & 1 deletion sste.desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.1
Version=1.2
Name=SSTE
GenericName=Secure Simple Text Editor
Comment=Simple text editor that reads and saves GnuPG symmetric encripted files
Expand Down
16 changes: 14 additions & 2 deletions sste.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

__version__ = '1.1'
__date__ = '2023-12-09'
__version__ = '1.2'
__date__ = '2023-12-14'
__license__ ='GNU General Public License version 3'
__author__ = 'António Manuel Dias <ammdias@gmail.com>'

Expand All @@ -44,6 +44,18 @@
os.path.expanduser(os.path.join('~', '.config', 'sste'))
)

# read install log to check original config file path
try:
for i in open(os.path.join(sys.path[0], 'install.log')).readlines():
ptype, sep, path = i.strip().partition(':')
if '' in (ptype, sep, path):
break # invalid log, ignore
if ptype == 'config_file':
config_files = (path, *config_files)
break
except:
pass # error reading log, ignore

for i in config_files:
if os.path.exists(i):
break
Expand Down

0 comments on commit 6f45039

Please sign in to comment.