0
Commit Graph

59 Commits

Author SHA1 Message Date
Nicolas F
0d3d630104 Get rid of config global state, improve tests
While dicking around with the tests I noticed that you could make
them fail if you ran them twice. Many hours were spent investigating,
and it turns out that Overviewer's config stuff has global state that
gets modified by having parsed configurations actually modify the
default config values. Not good!

We can fix this by having settingsDefinition return a dict of the
defaults, instead of assigning it to module-level names.

We can also get rid of test_all.py, because what it would do with
pytest is run all tests *twice*. Instead, do the module path stuff
in __init__.py. Also, instead of throwing a non-specific Exception
if exmaple isn't checked out, just skip the test thank you very much.

This is the weirdest rabbit hole I've ever gone down and I haven't
slept in about 30 hours. I'm going to push this commit, and if it
breaks anything, I'll be blissfully asleep as the unwashed masses
begin to riot over exception this traceback that.
2019-07-24 17:02:39 +02:00
Nicolas F
204bcd0310 Add "center" config option
This option allows you to specify your own initial center for a
tileset, which is useful if your map is extremely asymmetric or
you don't really care about what's around the spawn.

Future work needs to be done on the JS side in order to fix the
fromWorldToLatLng and friends, as they're currently off by -24 in X
and +24 in Z direction.

Closes #1350.
2019-07-06 19:06:15 +02:00
Nicolas F
e348a548b6 Initial Python 3 port
Many things work, some don't. Notably, genPOI doesn't work, and
there's some signedness comparison stuff going on in the C extension.

This also completely drops support for Python 2, as maintaining a C
extension for both Python 2 and 3 is a pain and not worth it for the
9 months that Python 2 is still going to be supported upstream.

The documentation needs to be adjusted as well.

All of the few tests we have pass, and rendering a map works, both
with a configuration file and without. We can also use optimizeimages.

Concerns #1528.
2019-03-17 17:57:07 +01:00
Nicolas F
61ebd35240 Add WebP image format support
Since Firefox 65 added support for WebP, users may be interested
in having maps that use WebP images. Support for this is added in
this commit, along with documentation for it.

A new option, "imglossless", controls whether we write out lossless
or lossy WebP images. The generic name "imglossless" as opposed to
a more specific "webplossless" was chosen in case future image
formats we also implement also support lossless/lossy modes in the
same format (JPEG-XL? AV1 image format?).

It's an okay meme but lossy mode really falls apart on our sorts
of images on the more zoomed out composite tiles, resulting in
pretty blurry messes. Might be due to a PSNR bias in the encoder,
which is to be expected from Google.
2019-03-04 17:04:09 +01:00
Nicolas F
f1909e9684 Remove memcached support
Apparently we had memcached support. It was never worth it, and put
a weird md5 hash calculation in the path of regular caching. Seeing
as it was completely undocumented, I doubt anyone has ever used it.
2017-03-16 14:45:19 +01:00
CounterPillow
09477ed8a0 Rewrote image optimisation stuff.
The old one was broken anyway.
2014-03-04 00:39:59 +01:00
Andrew Chin
7089eef005 Add a minzoom option
This only affects what's written to overviewerConfig.js.  That is, it
does not change the amount of tiles rendered (it's exactly analogous to
maxzom)

Closes #994
2013-12-26 23:04:20 -05:00
Nicolas Frattaroli
3986e10af2 Added option showlocationmarker 2013-05-13 15:38:54 +02:00
Nicolas Frattaroli
0783cdbee7 Changed default poititle to "Markers"
I feel this is more accurate and it has been bugging me for a
while now.
2013-05-13 14:32:50 +02:00
CounterPillow
b13f0044e2 manualpois is now a per-render option 2012-12-31 18:54:31 +01:00
Thomas Lake
223b326df1 Add option to configure maxzoom and appropriate documentation 2012-11-28 20:24:29 -05:00
Thomas Lake
fcfe3063c3 Add custom web assets support 2012-08-12 15:27:07 +01:00
Andrew Chin
8c9de7a575 Allow the poiTitle setting to be tileset-specific. Added docs
Closes #761
2012-07-28 20:53:03 -04:00
Andrew Chin
b571761648 Merge branch 'devel' 2012-07-20 22:10:27 -04:00
CounterPillow
63b72aabaa Added defaultzoom config option 2012-07-15 05:53:15 +02:00
Andrew Chin
5d43227edf Merge remote branch 'origin/master' into JSObserver 2012-06-10 14:59:17 -04:00
Aaron Griffith
7ef5f8c5e3 Merge remote-tracking branch 'fabiann/remote-tiles' into devel 2012-05-06 12:52:42 -04:00
Richard Pastrick
5974919973 Make the rerenderprob value print a decent error since it does have to be between 0.0 and 1.0 instead of just
that it is a float.

Remove 0.0 and 1.0 as valid values
2012-05-02 16:31:30 -07:00
Fabian Norman
9caa94eacf Merge branch 'remote-tiles' of git:Minecraft-Overviewer into remote-tiles 2012-05-02 01:12:46 -07:00
Fabian Norman
8ffcec347a Merge remote branch 'source/master' into remote-tiles
Conflicts:
	overviewer.py
2012-05-02 01:04:13 -07:00
Fabian Norman
e69717f476 Prevent null being set in overviewerConfig.js 2012-05-02 00:43:53 -07:00
Fabian Norman
85567cae42 Initial changes to add the base option to the config file. 2012-04-25 19:42:18 -07:00
Andrew Chin
d97c3547f9 Merge branch master into devel
Conflicts:
	docs/config.rst
	overviewer.py
	overviewer_core/settingsDefinition.py
	overviewer_core/tileset.py
2012-04-15 11:03:16 -04:00
Richard Pastrick
3ded0cfa9e Add validator and definition for beginnings of overlay python glue so that only the right overlays
show up for a specific render
2012-04-09 11:49:03 -07:00
Thomas Lake
55df1bcf78 Add new Javascript observer
Output render progress onto the rendered map using Javascript
A minimum period between updates can be specified
2012-04-08 23:03:26 +01:00
Thomas Lake
36aa6ed011 Add 'showspawn' render option
Allow users to hide the spawn marker that is normally generated for
overworld levels
2012-04-08 13:04:13 +01:00
Andrew Chin
cb448cc58f Added a --simple-output option
This option turns off fancy output options like colors or progress bars.

Address #649
2012-04-07 21:16:58 -04:00
Andrew Chin
d6602caa04 Output to stdout instead of stderr
Fixes #645
2012-04-07 20:19:24 -04:00
aheadley
99f2cae7a8 fix configurable observer 2012-03-22 21:19:56 -04:00
aheadley
863c6b1154 make observer a setting, need to update docs 2012-03-22 17:32:28 -04:00
Andrew Chin
6b77d54555 Reimplement signs/POIs 2012-03-11 11:44:38 -04:00
Andrew Brown
fe55d5343c added a "changelist" option 2012-03-06 23:37:29 -05:00
Aaron Griffith
fde63ec221 renders are now ordered according to their order in the config file 2012-03-05 13:37:05 -05:00
Andrew Brown
98c23fd970 added a memcached option. It's really slow though. don't use it. 2012-03-04 22:25:38 -05:00
Andrew Brown
344639c0cf this option was implemented as "crop" 2012-03-01 22:02:28 -05:00
Andrew Brown
f43498d033 Added a "crop" feature to render subsets of worlds 2012-02-26 20:19:26 -05:00
Andrew Brown
195e08d4a1 Determine an appropriate rendercheck mode automatically 2012-02-25 20:07:07 -05:00
Andrew Brown
0b7e42110c Merge commit 'b2c3759' into rewrite 2012-02-15 18:13:01 -05:00
Andrew Brown
aaf8e1d7cb Changed "worldname" to "world" in configfile
Also brought tests up to date. All tests pass now.
2012-02-14 20:39:05 -05:00
Richard Pastrick
b2c37593c6 Update documentation with a few more of the configuration options and removed stochasticrender options since it seems to have been replaced with rerenderprob. 2012-02-14 11:11:47 -08:00
Andrew Brown
9fc9c2a781 set a default image quality 2012-02-12 15:55:03 -05:00
Andrew Chin
14306f7e8a Bring docs and code in sync 2012-02-12 13:45:43 -05:00
Andrew Brown
9319fee138 added processes option to command line and config file
Also the config file parser now just looks for all Settings objects in
settingsDefinitions.py, not the items in __all__
2012-02-08 21:05:02 -05:00
Andrew Brown
50ebdd7f2c clarified some comments and conformed some function names 2012-02-05 00:20:58 -05:00
Andrew Brown
324100206b changed the semantics of required and default in settings definitions.
I think it makes more logical sense now. Essentially, the default is
always used if the user doesn't specify a value. If there is no user
specified value and the default is None, then the action depends on the
value of required. required=True means raise an error. required=False
means silently omit that setting.
2012-02-04 22:06:29 -05:00
Andrew Brown
6d95d80a73 overhaul to configParser. Parsing config works now. 2012-02-04 21:23:44 -05:00
Andrew Chin
2497a8a806 Part of an attempt to make config parser a little more generic 2012-01-28 18:57:12 -05:00
Andrew Chin
8297f4c0a3 northdirection glue 2012-01-22 23:25:56 -05:00
Andrew Chin
163dd66a38 Create RegionSets via the World object 2012-01-21 19:04:21 -05:00
Andrew Chin
514e99dcd2 overviewer.js now uses backbone.js for much of it's multiworld handling 2012-01-14 23:33:34 -05:00