1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

1209 Commits

Author SHA1 Message Date
Athanasius
27d7265c86 Cleanup of EDMC.py and related code. All flags tested.
Mostly the usual file-mode versus .encode('utf-8') tweaks, but also
one list() needed around a <dict>.values().
2020-06-21 16:23:01 +01:00
Athanasius
69bcb9d6fa EDMC.py: Small fix to exception handling.
Now stymied on further work due to game patch today and CAPI being
down.
2020-06-21 16:23:01 +01:00
Athanasius
ddf2babaaa Fixes up "EDMC.py -j" for python3 2020-06-21 16:23:01 +01:00
Athanasius
67708fd090 Initial work on getting the EDMC.py CLI to work under python3
*) Fix up print usage
  *) cPickle -> cpickle
  *) "EDMC.py -p <cmdr name>" appears to have never been properly
  updated for multi-account support.
2020-06-21 16:23:01 +01:00
Athanasius
a8c0ec3ab9 Updates prefs.py for "import tkinter.filedialog" 2020-06-21 16:23:01 +01:00
Athanasius
2440cf4a67 platform is always just 'linux' under python3 2020-06-21 16:23:01 +01:00
Athanasius
71e5f10457 Minor cleanup. 2020-06-21 16:23:01 +01:00
Athanasius
78073790df update.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
6ff9dbc3bf plugins/edsy.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
02bcbf2685 plugins/eddb.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
725cf6f1e8 Need to int() a division if passing where an int is required 2020-06-21 16:23:01 +01:00
Athanasius
074cf8a119 Updates generation of ships.p and modules.p
In doing so also fixes up outfitting.py for Int_DroneControl_ResourceSiphon
2020-06-21 16:23:01 +01:00
Athanasius
2c26216e13 dashboard.py: Missed de-future'ing old_div 2020-06-21 16:23:01 +01:00
Athanasius
6925abf93b theme.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
3900e3e4ab protocol.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
4a7f4cd450 plugins/inara.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
35867cd3f9 plugins/edsm.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
93a65b02f5 plugins/eddn.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
143d6e717a plugins/eddn.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
cc30f8e913 monitor.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
5a4f47be8b l10n.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
40a0c09f6d config.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
5783ce7ea0 dashboard.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
d4a263aab1 companion.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
6adb64913e Revert "Switches to .format() for startup code."
This reverts commit 11194c1374e4e325b523e6a348503dd0bc0d1a6b.
2020-06-21 16:23:00 +01:00
Athanasius
83e925325e EDMarketConnector.py: De-future 2020-06-21 16:23:00 +01:00
Athanasius
868a294b6b Switches to .format() for startup code. 2020-06-21 16:23:00 +01:00
Athanasius
faf5bee834 Fixes plugins/eddn massaging of economies and prohibited data 2020-06-21 16:23:00 +01:00
Athanasius
2208fdf686 Removes problematic .encode('utf-8')'s in companion.py 2020-06-21 16:23:00 +01:00
Athanasius
a0096c3d6e TODO: 'Hotkey' setting works.
Tested with:

  	NumPad 5 (revealed s/unichr/chr/ issue)
	F1
	Ctrl+Shift+F1
	Shift+Ins
	Shift+Del
2020-06-21 16:23:00 +01:00
Athanasius
a2fbf88e21 Fixes Trade Dangerous .prices export.
Confirmed by Snake Man on EDCD Discordin #edmc

Snake Man : looks ok I guess (never done much of these manual imports)

	python3 trade.py import ../Daurtu.Panshin.Terminal.2019-09-12T12.29.27.prices
	NOTE: Import complete: 93 updated items over 1 stations in 1 systems

Snake Man : trade.py market -vv daurtu/panshin command looks fine too. and trade.py run --cap 500 --cr 20m --ly 12 --fr daurtu/pans gives trading results, looks good indeed
2020-06-21 16:23:00 +01:00
Athanasius
8237a94f72 Fixes __debug__ dump/ file writing.
Similarly to the 'Save Raw Data' fix in 9ccca42b31102fd713b26a7a8223472d364772ab
2020-06-21 16:23:00 +01:00
Athanasius
a56c48437b Fixes File > 'Save Raw Data'
Another str versus bytes issue.  We *do* need the .encode('utf-8') in
this case, else it will assume Windows cp1252 encoding which then can't
encode some characters.  So we switch to binary file mode instead.
2020-06-21 16:23:00 +01:00
Athanasius
753fdedbdf Fixes plugins/coriolis.py to appear in settings, and confirms click-through works
*) Code and imports brought in line with edsy plugin
  *) 'Coriolis' now appears in Settings > Configuration > Shipyard
    dropdown
  *) Confirmed that with this active a valid build opens on coriolis.io
2020-06-21 16:23:00 +01:00
Athanasius
1fbdfcc113 Applies "log to file" necessary fix, whether we're forcing it or not. 2020-06-21 16:23:00 +01:00
Athanasius
0d893c1c56 Gets plugins/edsy.py working. The usual string vs. bytes shenanigans. 2020-06-21 16:23:00 +01:00
Athanasius
5079f8fdc6 Fixes registry browser lookup, and confirms EDDB system/station lookups work 2020-06-21 16:23:00 +01:00
Athanasius
ce460712e2 Ensure we definitely can add mandatory fields to EDDN messages
This came to light due to python3 not liking try['StarPos'] =
list(this.coordinates) if this.coordinates was None.  As the comment
says these three fields are mandatory, ensure we can actually set them
appropriately, and display an error if not.
2020-06-21 16:23:00 +01:00
Athanasius
bebc3648b8 plugins/inara.py: No need for encode('utf-8') 2020-06-21 16:23:00 +01:00
Athanasius
0f38e3e824 Removes un-necessary encode('utf-8') 2020-06-21 16:23:00 +01:00
Athanasius
fd4acae9a5 plugins/eddn.py: encode() un-necessary 2020-06-21 16:23:00 +01:00
Athanasius
e73db981a8 Fixes EDDN sending to be working.
NB: Due to, I assume, EDDN relay de-duplication of messages, it's been
difficult to 100% test this.  No errors thrown, and stock/release EDMC
also doesn't result in a new message arriving at my EDDN consumer.
2020-06-21 16:23:00 +01:00
Athanasius
e7545e174f Use .items() instead of .iteritems() 2020-06-21 16:23:00 +01:00
Athanasius
662d35f0bb Fixes str/bytes issues on "Last updated at" UI update 2020-06-21 16:23:00 +01:00
Athanasius
ee588e2f1f Fixes generation of market CSV files 2020-06-21 16:23:00 +01:00
Athanasius
a25d22123b Fixes do_GET()'s use of .write() 2020-06-21 16:23:00 +01:00
Athanasius
d00472c2cd Fixes Frontier oAuth2 initiation 2020-06-21 16:23:00 +01:00
Athanasius
90b05d22c5 Now runs without console errors so far as pressing 'Update' is concerned.
There's an error on the console about an iterator when doing so
though.
2020-06-21 16:23:00 +01:00
Athanasius
d0ae621387 Running EDMarketConnector.py 'works'.
First pass utilising 'futurize' to do most of the work.

  There's an issue with ur'\"' in l10n.py which I'm not sure how to
properly fix.

  This now has errors when hitting the 'Update' button.
2020-06-21 16:23:00 +01:00
Athanasius
a8631e5bb8 Gives up and uses full URL for python3 branch 2020-06-20 12:20:32 +01:00