From a3cc31a8940a39125b5d94599481589444573bc5 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Mon, 20 Jun 2016 17:01:16 +0100 Subject: [PATCH] Option to save raw JSON data from Companion API --- EDMC.py | 4 +++ EDMarketConnector.py | 74 ++++++++++++++++++++++++++++++++------------ L10n/cs.strings | 14 ++++----- L10n/de.strings | 34 ++++++++++---------- L10n/en.template | 8 ++--- L10n/es.strings | 14 ++++----- L10n/fr.strings | 16 +++++----- L10n/it.strings | 14 ++++----- L10n/ja.strings | 8 ++--- L10n/lv.strings | 14 ++++----- L10n/nl.strings | 14 ++++----- L10n/pl.strings | 14 ++++----- L10n/ru.strings | 14 ++++----- L10n/sl.strings | 14 ++++----- L10n/uk.strings | 14 ++++----- README.md | 1 + 16 files changed, 155 insertions(+), 116 deletions(-) diff --git a/EDMC.py b/EDMC.py index 3da421ea..4e108249 100755 --- a/EDMC.py +++ b/EDMC.py @@ -48,6 +48,7 @@ try: parser.add_argument('-o', metavar='FILE', help='write station outfitting data to FILE in CSV format') parser.add_argument('-s', metavar='FILE', help='write station shipyard data to FILE in CSV format') parser.add_argument('-t', metavar='FILE', help='write player status to FILE in CSV format') + parser.add_argument('-d', metavar='FILE', help='write raw JSON data to FILE') parser.add_argument('-j', help=argparse.SUPPRESS) # Import JSON dump args = parser.parse_args() @@ -93,6 +94,9 @@ try: sys.exit(EXIT_SERVER) # stuff we can do when not docked + if args.d: + with open(args.d, 'wt') as h: + h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': ')).encode('utf-8')) if args.c: coriolis.export(data, args.c) if args.e: diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 5876c4cc..068f894b 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -13,6 +13,7 @@ from time import time, localtime, strftime import Tkinter as tk import ttk +import tkFileDialog import tkFont from ttkHyperlinkLabel import HyperlinkLabel @@ -135,9 +136,12 @@ class AppWindow: root.call('tk::unsupported::MacWindowStyle', 'style', root, 'document', 'closeBox horizontalZoom resizable') # https://www.tcl.tk/man/tcl/TkCmd/menu.htm - self.file_menu = tk.Menu(self.menubar, name='apple') - self.file_menu.add_command(command=lambda:self.w.call('tk::mac::standardAboutPanel')) - self.file_menu.add_command(command=lambda:self.updater.checkForUpdates()) + self.system_menu = tk.Menu(self.menubar, name='apple') + self.system_menu.add_command(command=lambda:self.w.call('tk::mac::standardAboutPanel')) + self.system_menu.add_command(command=lambda:self.updater.checkForUpdates()) + self.menubar.add_cascade(menu=self.system_menu) + self.file_menu = tk.Menu(self.menubar, name='file') + self.file_menu.add_command(command=self.save_raw) self.menubar.add_cascade(menu=self.file_menu) self.edit_menu = tk.Menu(self.menubar, name='edit') self.edit_menu.add_command(accelerator='Command-c', state=tk.DISABLED, command=self.copy) @@ -159,6 +163,7 @@ class AppWindow: else: self.file_menu = self.view_menu = tk.Menu(self.menubar, tearoff=tk.FALSE) self.file_menu.add_command(command=lambda:stats.StatsDialog(self)) + self.file_menu.add_command(command=self.save_raw) self.file_menu.add_command(command=lambda:self.updater.checkForUpdates()) self.file_menu.add_command(command=lambda:prefs.PreferencesDialog(self.w, self.postprefs)) self.file_menu.add_separator() @@ -170,10 +175,10 @@ class AppWindow: if platform == 'win32': # Must be added after at least one "real" menu entry self.always_ontop = tk.BooleanVar(value = config.getint('always_ontop')) - system_menu = tk.Menu(self.menubar, name='system', tearoff=tk.FALSE) - system_menu.add_separator() - system_menu.add_checkbutton(label=_('Always on top'), variable = self.always_ontop, command=self.ontop_changed) # Appearance setting - self.menubar.add_cascade(menu=system_menu) + self.system_menu = tk.Menu(self.menubar, name='system', tearoff=tk.FALSE) + self.system_menu.add_separator() + self.system_menu.add_checkbutton(label=_('Always on top'), variable = self.always_ontop, command=self.ontop_changed) # Appearance setting + self.menubar.add_cascade(menu=self.system_menu) self.w.bind('', self.copy) self.w.protocol("WM_DELETE_WINDOW", self.onexit) theme.register(self.menubar) # menus and children aren't automatically registered @@ -267,21 +272,26 @@ class AppWindow: self.system_label['text'] = _('System') + ':' # Main window self.station_label['text'] = _('Station') + ':' # Main window self.button['text'] = self.theme_button['text'] = _('Update') # Update button in main window - self.edit_menu.entryconfigure(0, label=_('Copy')) # As in Copy and Paste - self.view_menu.entryconfigure(0, label=_('Status')) # Menu item - self.file_menu.entryconfigure(1, label=_("Check for Updates...")) # Menu item if platform == 'darwin': - self.file_menu.entryconfigure(0, label=_("About {APP}").format(APP=applongname)) # App menu entry on OSX - self.menubar.entryconfigure(1, label=_('Edit')) # Menu title - self.menubar.entryconfigure(2, label=_('View')) # Menu title on OSX - self.menubar.entryconfigure(3, label=_('Window')) # Menu title on OSX - else: - self.file_menu.entryconfigure(2, label=_("Settings")) # Item in the File menu on Windows - self.file_menu.entryconfigure(4, label=_("Exit")) # Item in the File menu on Windows - self.menubar.entryconfigure(1, label=_('File')) # Menu title on Windows + self.menubar.entryconfigure(1, label=_('File')) # Menu title self.menubar.entryconfigure(2, label=_('Edit')) # Menu title - self.theme_file_menu['text'] = _('File') # Menu title on Windows + self.menubar.entryconfigure(3, label=_('View')) # Menu title on OSX + self.menubar.entryconfigure(4, label=_('Window')) # Menu title on OSX + self.system_menu.entryconfigure(0, label=_("About {APP}").format(APP=applongname)) # App menu entry on OSX + self.system_menu.entryconfigure(1, label=_("Check for Updates...")) # Menu item + self.file_menu.entryconfigure(0, label=_('Save Raw Data...')) # Menu item + self.view_menu.entryconfigure(0, label=_('Status')) # Menu item + else: + self.menubar.entryconfigure(1, label=_('File')) # Menu title + self.menubar.entryconfigure(2, label=_('Edit')) # Menu title + self.theme_file_menu['text'] = _('File') # Menu title self.theme_edit_menu['text'] = _('Edit') # Menu title + self.file_menu.entryconfigure(0, label=_('Status')) # Menu item + self.file_menu.entryconfigure(1, label=_('Save Raw Data...')) # Menu item + self.file_menu.entryconfigure(2, label=_("Check for Updates...")) # Menu item + self.file_menu.entryconfigure(3, label=_("Settings")) # Item in the File menu on Windows + self.file_menu.entryconfigure(5, label=_("Exit")) # Item in the File menu on Windows + self.edit_menu.entryconfigure(0, label=_('Copy')) # As in Copy and Paste def login(self): self.status['text'] = _('Logging in...') @@ -362,7 +372,7 @@ class AppWindow: if __debug__: # Recording if not isdir('dump'): mkdir('dump') with open('dump/%s%s.%s.json' % (data['lastSystem']['name'], data['commander'].get('docked') and '.'+data['lastStarport']['name'] or '', strftime('%Y-%m-%dT%H.%M.%S', localtime())), 'wt') as h: - h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True).encode('utf-8')) + h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': ')).encode('utf-8')) self.cmdr['text'] = data.get('commander') and data.get('commander').get('name') or '' self.system['text'] = data.get('lastSystem') and data.get('lastSystem').get('name') or '' @@ -554,6 +564,30 @@ class AppWindow: self.w.clipboard_clear() self.w.clipboard_append(self.station['text'] == self.STATION_UNDOCKED and self.system['text'] or '%s,%s' % (self.system['text'], self.station['text'])) + def save_raw(self): + self.status['text'] = _('Fetching data...') + self.w.update_idletasks() + + try: + data = self.session.query() + self.cmdr['text'] = data.get('commander') and data.get('commander').get('name') or '' + self.status['text'] = '' + f = tkFileDialog.asksaveasfilename(parent = self.w, + defaultextension = platform=='darwin' and '.json' or '', + filetypes = [('JSON', '.json'), ('All Files', '*')], + initialdir = config.get('outdir'), + initialfile = '%s%s.%s.json' % (data['lastSystem'].get('name', 'Unknown'), data['commander'].get('docked') and '.'+data['lastStarport'].get('name', 'Unknown') or '', strftime('%Y-%m-%dT%H.%M.%S', localtime()))) + if f: + with open(f, 'wt') as h: + h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': ')).encode('utf-8')) + except companion.VerificationRequired: + prefs.AuthenticationDialog(self.w, partial(self.verify, self.save_raw)) + except companion.ServerError as e: + self.status['text'] = str(e) + except Exception as e: + if __debug__: print_exc() + self.status['text'] = unicode(e) + def onexit(self, event=None): hotkeymgr.unregister() flightlog.close() diff --git a/L10n/cs.strings b/L10n/cs.strings index 195f77aa..c6ed05f2 100644 --- a/L10n/cs.strings +++ b/L10n/cs.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Čeština"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Jazyk"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Uložit syrová data..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Jméno CMDRa"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Chyba: Nelze se připojit k EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Chyba: Nelze získat data z obchodu!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Chyba: Připojení k EDDN vypršelo"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Načítání dat..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Soubor"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Knight"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Jazyk"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Naposledy aktualizováno {HH}:{MM}:{SS}"; diff --git a/L10n/de.strings b/L10n/de.strings index 9605298c..6fe73b6e 100644 --- a/L10n/de.strings +++ b/L10n/de.strings @@ -1,11 +1,17 @@ /* Language name */ "!Language" = "Deutsch"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Sprache"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Speichere Originaldaten..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander Name"; /* Use same text as E:D Launcher's verification dialog. [prefs.py] */ -"A verification code has now been sent to the{CR}email address associated with your Elite account." = "Ein Verifizierungscode wurde an die mit{CR}Elite verknüpfte Email Adresse gesendet."; +"A verification code has now been sent to the{CR}email address associated with your Elite account." = "Ein Verifizierungscode wurde an die mit{CR}Elite verknüpfte Email-Adresse gesendet."; /* App menu entry on OSX. [EDMarketConnector.py] */ "About {APP}" = "Über {APP}"; @@ -41,7 +47,7 @@ "Broker" = "Großhändler"; /* Folder selection button on Windows. [prefs.py] */ -"Browse..." = "Ordner..."; +"Browse..." = "Durchsuchen..."; /* Federation rank. [stats.py] */ "Cadet" = "Kadett"; @@ -80,7 +86,7 @@ "Copy" = "Kopieren"; /* Empire rank. [stats.py] */ -"Count" = "Anzahl"; +"Count" = "Graf"; /* Ranking. [stats.py] */ "CQC" = "CQC-Rang"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Fehler: Kann keine Verbindung zu EDSM aufbauen"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Fehler: Warenmarktdaten können nicht abgerufen werden!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Fehler: Zeitüberschreitung zum EDDN"; @@ -143,7 +146,7 @@ "Error: EDSM {MSG}" = "Fehler: EDSM {MSG}"; /* [companion.py] */ -"Error: Invalid Credentials" = "Fehler: Ungültige Logindaten"; +"Error: Invalid Credentials" = "Fehler: Ungültige Anmeldedaten"; /* [companion.py] */ "Error: Server is down" = "Fehler: Server nicht erreichbar"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Daten werden abgerufen..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Datei"; /* Section heading in settings. [prefs.py] */ @@ -200,7 +203,7 @@ "Identity" = "Identität"; /* Tab heading in settings on OSX. [prefs.py] */ -"Keyboard shortcut" = "Tastaturkurzbefehl"; +"Keyboard shortcut" = "Makro"; /* Empire rank. [stats.py] */ "King" = "König"; @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Ritter"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Sprache"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Zuletzt aktualisiert um {HH}:{MM}:{SS}"; @@ -266,7 +266,7 @@ "None" = "Keine Zuweisung"; /* Dark theme color setting. [prefs.py] */ -"Normal text" = "Standardmäßiger Text"; +"Normal text" = "Normaler Text"; /* Combat rank. [stats.py] */ "Novice" = "Neuling"; @@ -308,7 +308,7 @@ "Play sound" = "Ton abspielen"; /* [prefs.py] */ -"Please choose what data to save" = "Welche Dateien sollen gespeichert werden?"; +"Please choose what data to save" = "Bitte wähle zu speichernde Daten aus"; /* Use same text as E:D Launcher's verification dialog. [prefs.py] */ "Please enter the code into the box below." = "Bitte gib den Code unten ein"; @@ -395,10 +395,10 @@ "Ship" = "Schiff"; /* [prefs.py] */ -"Ship loadout in Coriolis format file" = "Schiffsladung als Coriolis Datei"; +"Ship loadout in Coriolis format file" = "Schiffsausstattung im Coriolis-Dateiformat"; /* [prefs.py] */ -"Ship loadout in E:D Shipyard format file" = "Schiffsladung als E:D-Shipyard Datei"; +"Ship loadout in E:D Shipyard format file" = "Schiffsausstattung im E:D-Shipyard-Dateiformat"; /* Status dialog title. [stats.py] */ "Ships" = "Schiffe"; @@ -446,7 +446,7 @@ "Vice Admiral" = "Vizeadmiral"; /* Menu title on OSX. [EDMarketConnector.py] */ -"View" = "Darstellung"; +"View" = "Ansicht"; /* Empire rank. [stats.py] */ "Viscount" = "Viscount"; diff --git a/L10n/en.template b/L10n/en.template index 65b86786..9f900d88 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -133,9 +133,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Error: Can't connect to EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Error: Can't get market data!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Error: Connection to EDDN timed out"; @@ -166,7 +163,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Fetching data..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "File"; /* Section heading in settings. [prefs.py] */ @@ -367,6 +364,9 @@ /* Federation rank. [stats.py] */ "Recruit" = "Recruit"; +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Save Raw Data..."; + /* Explorer rank. [stats.py] */ "Scout" = "Scout"; diff --git a/L10n/es.strings b/L10n/es.strings index 7b691bde..4ac4f24a 100644 --- a/L10n/es.strings +++ b/L10n/es.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Español"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Idioma"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Guardar Datos Sin Procesar..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Nombre de Comandante"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Error: No se puede conectar a EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Error: No se puede recibir los datos de mercado."; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Error: Conexión a EDDN expirada."; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Recopilando datos..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Archivo"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Caballero"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Idioma"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Última actualización: {HH}:{MM}:{SS}"; diff --git a/L10n/fr.strings b/L10n/fr.strings index 0061d23f..247d1677 100644 --- a/L10n/fr.strings +++ b/L10n/fr.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Français"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Langue"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Sauvegarder les Données Brutes..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander Name"; @@ -23,7 +29,7 @@ "Amateur" = "Amateur"; /* EDSM setting. [prefs.py] */ -"API Key" = "API Key"; +"API Key" = "Clé API"; /* Tab heading in settings. [prefs.py] */ "Appearance" = "Apparence"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Erreur : Connexion impossible à EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Erreur : Impossible d'obtenir les données du marché !"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Erreur : Connexion à EDDN expirée"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Récupération des données..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Fichier"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Chevalier"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Langue"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Dernière mise à jour à {HH}:{MM}:{SS}"; diff --git a/L10n/it.strings b/L10n/it.strings index 738772be..9f7ff878 100644 --- a/L10n/it.strings +++ b/L10n/it.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Italiano"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Lingua"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Salva i Dati Grezzi..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander Name"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Errore: Non riesco a connettermi a EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Errore: Non riesco a ottenere i dati del market !"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Errore: Connessione con EDDN scaduta"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Sto raccogliendo i dati..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "File"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Knight"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Lingua"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Ultimo aggiornamento alle {HH}:{MM}:{SS}"; diff --git a/L10n/ja.strings b/L10n/ja.strings index 52e1f7ac..bc7fd36e 100644 --- a/L10n/ja.strings +++ b/L10n/ja.strings @@ -4,6 +4,9 @@ /* Appearance setting prompt. [prefs.py] */ "Language" = "言語"; +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "生データの保存..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander Name"; @@ -136,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "エラー: EDSMに接続できません"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "エラー: 市場データを取得できません!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "エラー: EDDNへの接続がタイムアウトしました"; @@ -169,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "データを取得中..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "ファイル"; /* Section heading in settings. [prefs.py] */ diff --git a/L10n/lv.strings b/L10n/lv.strings index 6fa36a1b..f435ec95 100644 --- a/L10n/lv.strings +++ b/L10n/lv.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Latviešu"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Valoda"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Glābt Sākotnējos Datus..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander vārds"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Kļūda: Nevar savienoties ar EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Kļūda: Nevar iegūt tirgus datus"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Kļūda: Savienojums ar EDDN pārtraukts"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Iegūst datus..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Fails"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Bruņinieks"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Valoda"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Pēdējo reizi atjaunināts {HH}:{MM}:{SS}"; diff --git a/L10n/nl.strings b/L10n/nl.strings index c9592fb5..7f7acb2c 100644 --- a/L10n/nl.strings +++ b/L10n/nl.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Nederlands"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Taal"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Sla Raw-gegevens Op..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander Name"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Fout: Kan geen verbinding maken met EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Fout: Kan markt data niet ophalen!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Fout: Verbinding met EDDN geeft een time-out"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Data wordt opgehaald..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Bestand"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Knight"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Taal"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Voor het laatst ververst om {HH}:{MM}:{SS}"; diff --git a/L10n/pl.strings b/L10n/pl.strings index c9bdd824..0f00b3df 100644 --- a/L10n/pl.strings +++ b/L10n/pl.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Polski"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Język"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Zapisz Nieprzetworzone Dane..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander Name"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Błąd: Brak połączenia z EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Błąd: Nie można pobrać danych rynkowych!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Błąd: Przedłużające się połączenie z EDDN"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Pobieranie danych..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Plik"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Knight"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Język"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Ostatnia aktualizacja {HH}:{MM}:{SS}"; diff --git a/L10n/ru.strings b/L10n/ru.strings index ed86479f..e1f6d9ac 100644 --- a/L10n/ru.strings +++ b/L10n/ru.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Русский"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Язык"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Сохранять Сырые Данные..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Имя пилота"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Ошибка: не удалось подключиться к EDSM"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Ошибка: не удалось получить торговые данные!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Ошибка: сервер EDDN не отвечает"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Получаем данные..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Файл"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Рыцарь"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Язык"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Последнее обновление {HH}:{MM}:{SS}"; diff --git a/L10n/sl.strings b/L10n/sl.strings index 2bd5434b..fa0711cb 100644 --- a/L10n/sl.strings +++ b/L10n/sl.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Slovenščina"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Jezik"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Shrani Izvirne Podatke..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Commander ime"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Napaka: Povezava z EDSM ni mogoča"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Napaka: Ne morem sprejeti tržnih podatkov"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Napaka: Povezava z EDDN se je iztekla"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Nalagam podatke..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Datoteka"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Knight"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Jezik"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Zadnja osvežitev podatkov {HH}:{MM}:{SS} "; diff --git a/L10n/uk.strings b/L10n/uk.strings index 401fbae0..8316f6c1 100644 --- a/L10n/uk.strings +++ b/L10n/uk.strings @@ -1,6 +1,12 @@ /* Language name */ "!Language" = "Українська"; +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Мова"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Зберегти Дані Негативів..."; + /* EDSM setting. [prefs.py] */ "Commander Name" = "Ім`я пілота"; @@ -133,9 +139,6 @@ /* [edsm.py] */ "Error: Can't connect to EDSM" = "Помилка: Немає з`єднання з EDSM!"; -/* [EDMarketConnector.py] */ -"Error: Can't get market data!" = "Помилка: Не вдається отримати ринкові дані!"; - /* [EDMarketConnector.py] */ "Error: Connection to EDDN timed out" = "Помилка: Перевищено термін очикування з'єднання з EDDN!"; @@ -166,7 +169,7 @@ /* [EDMarketConnector.py] */ "Fetching data..." = "Отримання даних..."; -/* Menu title on Windows. [EDMarketConnector.py] */ +/* Menu title. [EDMarketConnector.py] */ "File" = "Файл"; /* Section heading in settings. [prefs.py] */ @@ -208,9 +211,6 @@ /* Empire rank. [stats.py] */ "Knight" = "Лицар"; -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Мова"; - /* [EDMarketConnector.py] */ "Last updated at {HH}:{MM}:{SS}" = "Останнє оновлення було {HH}:{MM}:{SS}"; diff --git a/README.md b/README.md index e1b9487e..2eee7114 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,7 @@ Arguments: -o FILE write station outfitting data to FILE in CSV format -s FILE write station shipyard data to FILE in CSV format -t FILE write player status to FILE in CSV format + -d FILE write raw JSON data to FILE ``` The program returns one of the following exit codes. Further information may be written to stderr.