Regular expressions are expensive to recompile constantly, and while the
python regexp library currently caches reuse, it only does so to a point
and that is not a required behaviour.
Compiling regexps once is simply best practice. On top of this, the
regexp was duplicated in various places.
Doing so causes the ShipType to not be used in the UI, so you get a
'link' with just a space for the text.
Any user who purposefully sets their ship's name to a single space
can live with seeing the model name instead. Yes, I checked, the game
allows it.
* Note in monitor.py to update the docs if anything changed about the
'state' dictionary.
* Expand on arguments to all plugin call-ins.
* Particularly what the 'state' diction passed to journal_entry()
contains.
* The contents of the `data` dictionary passed to `cmdr_data()`.
A user accidentally copied a Journal file into the same directory, resulting in
a "Journal.<datetime>.<serial> - Copy.log" file. EDMC 3.99.0.0 then picked this
up and re-sent events to EDDN, EDSM, Inara.
So, let's be strict about the filenames we consider to be valid, live, Journal
files.
* Journal files have one basic form: Journal.YYMMDDHHMMSS.XX.log
* In addition the word 'Beta' can be inserted just after 'Journal'
So regex '^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$' matches both and nothing
else.
Test: The "copy to same directory" that originally triggered this. EDMC no
longer 'sees' the copy.
Test: Copied a Journal file out, renamed it to later date/time, copied that
back in. EDMC saw it correctly as a new file.
NB: Didn't test the "no emitter" version at monitor.py:251, but no reason to
think it won't also work.
closes#546
EDDB station link now triggers off this.system_population, which is
received via monitor passing 'Population' through in Startup, Location,
FSDJump and CarrierJump events.
One fewer use cases for systems.p (populated status in this case).
* Adds monitor.station_marketid, tracked at the same points as
monitor.station (name).
* Changes EDDB plugin to also track its own this.station_marketid so
that it can be used in /market-id/ EDDB URL.
This removes a use case for stations.p file.
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.