0
Commit Graph

246 Commits

Author SHA1 Message Date
Nicolas F
7085b048de overviewer: fix shell quoting check in edge case
If you supply an option that can't possibly be a world or an output
but isn't recognised, Overviewer would barf.
2019-03-18 19:36:24 +01: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
d6ed0bd416 overviewer: use print_function
PYTHON 3 SOON POGGERS
2019-03-14 16:03:35 +01:00
Nicolas F
3a923c2932 overviewer: warn about shell quoting issues
This reimplements the warning about missing quotes on the command
line that was removed with the previous commit.
2019-03-09 18:47:49 +01:00
Nicolas F
25f0907d05 overviewer: replace optparse with argparse
optparse is deprecated, and switching to argparse is mostly but not
entirely trivial. Nicely telling the user about shell quoting had
to be removed because I didn't see an easy way to do that with
argparse.
2019-03-08 16:48:31 +01:00
Nicolas F
849e5d690e overviewer: fix git hash being after line break
Apparently that comma had its reasons for being there because
Python2's print works in weird ways. We can do this better though
by using string concatenation.
2019-03-07 16:04:56 +01:00
Nicolas F
e4924c3d73 overviewer: misc style fixes
except as instead of comma, get rid of strange superfluous comma
after print.
2019-03-07 16:02:14 +01:00
Nicolas F
ef66efd140 overviewer: code style and consistency fixes
A good sprinkling of PEP8 fixes. We're also getting rid of some
odd manual linebreaks in the output messages, and making sure to
end sentences with a period where appropriate. Help messages have
also been made more consistent, e.g. "Tries" -> "Try" and so forth.
2019-03-06 14:27:04 +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
gmcnew
9427566fec Partial texture path fixes 2018-08-02 02:25:10 +00:00
Nicolas F
ebdc4016d7 world: Don't call sys.exit here, raise something
A world being unsupported may not be a fatal application error in
all instances where this codepath in world.py is used, hence
throwing an exception is more sensible.
2018-05-09 14:25:05 +02: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
Andrew Chin
095b87b667 Added some explanatory text about corrupt worlds 2016-12-19 11:08:35 -05:00
Andrew Chin
3938d1889c Better error handling of errors when a world fails to open.
A common case is a corrupt (or empty) level.dat file.  This condition
wasn't properly caught, yielding a less-than-useful stack trace.  Even
more concerning is that this could happen when a user is just running
"overviewer.py" to get a world listing.

This has been fixed to improve the user experience
2016-12-19 10:50:01 -05:00
Nicolas F
c7d86eca76 Change shebang to python2 instead of python 2016-12-06 15:01:20 +01:00
Socolin
bd476d5781 Fix render when using rotation and crop
The rotation should be applied after the crop. This order was changed in this commit b6ac54a2b6
2016-03-04 22:09:10 -05:00
MasterofJOKers
4b9d0a5c87 Merge branch 'master' into my_genpoi
Conflicts:
	overviewer_core/aux_files/genPOI.py
2015-02-08 14:19:21 +01:00
Andrew Chin
d696df2a1f Don't crash if no renders/regionsets are found 2015-02-07 21:32:24 -05:00
Gizmokid2005
d3185734c4 Skip missing dimensions
This fixes overviewer/Minecraft-Overviewer #1202 for renders
2015-02-05 13:52:31 -05:00
Nicolas F
3c3db5d909 Add warning if Overviewer is run as root 2014-10-18 17:44:59 +02:00
MasterofJOKers
61339b1c42 genPOI: add option --skip-players
If one simply wants to add some manual POIs, no player files have to be
parsed.
2014-08-03 23:26:23 +02:00
matrixhacker
b6ac54a2b6 Added the ability to specify multiple crop zones. 2014-05-09 23:44:46 -04:00
Aaron Griffith
a39c45d473 Merge pull request #1087 from rymate1234/master
Add a small message stating where the render is and how to open it
2014-05-06 18:25:31 -04:00
Andrew Chin
9487d6f5bd Added a --check-version option 2014-05-03 00:23:10 -04:00
Aaron Griffith
7c23d6e86a added rendercheck mode 3, the identity function of rendercheck modes! 2014-05-01 16:48:28 -04:00
rymate1234
9a3305932e Add a small message stating where the render is and how to open it 2014-04-11 16:10:56 +02:00
Andrew Chin
65d6e3bcd1 Remove SizeOnDisk from table of detected worlds
This fields hasn't been properly filled in for many many releases.
We could detect this value some other way, but i'm not sure the value in
doing this
2014-02-21 22:23:25 -05:00
Andrew Chin
d9e907913e Added some more printouts when Overviewer is first starting
Often, when people ask questions about Overviewer, "all it says is
'Welcome to Overivwer'" is a common question.  Enable a little more
logging info at the start of Overviewer to hopefully make it more clear
that something is happening
2014-02-21 22:11:29 -05:00
Andrew Chin
c7ee8560d3 Fixes for locale issues
There were some problems when a level.dat contained a non-ascii name, or
when a level.dat lived in a directory with a non-ascii name.

Paths returned by os.listdir are encoded, so we need to decode them
before printing them.  When calculating the max length of the enumerated
world names, were we for some reason calling str() before taking the
len().  The had the effect of converting unicode strings into
non-unicode strings, which is not the correct thing to do.
2014-02-16 13:35:16 -05:00
Andrew Chin
a2780197cb Fix up python3 detection 2014-01-06 08:47:03 -05: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
Andrew Chin
2deaff6dac Have overviewer --version --verbose print some helpful information 2013-12-14 18:40:05 -05:00
Aaron Griffith
df732bfa25 Revert "Merge remote-tracking branch 'exhuma/master', PR #963"
This reverts commit e26727943f, reversing
changes made to 7bbb077704.
2013-12-02 07:40:00 -05:00
Aaron Griffith
a8a2a191b8 Revert "used LOG instead of logging on a few stragglers"
This reverts commit 144cff18e3.
2013-12-02 07:35:10 -05:00
Aaron Griffith
144cff18e3 used LOG instead of logging on a few stragglers 2013-12-01 16:39:45 -05:00
Aaron Griffith
e26727943f Merge remote-tracking branch 'exhuma/master', PR #963
Conflicts:
	overviewer.py
	overviewer_core/aux_files/genPOI.py
	overviewer_core/textures.py
2013-12-01 16:35:28 -05:00
Robin
5bc3f13b4f Exit if already running (pid file) 2013-11-26 20:38:38 +01:00
Robin
c56e12d94d Fix indentation 2013-11-26 20:14:06 +01:00
Robin
f71ede45f8 Exit if pid file already exists 2013-11-26 20:08:05 +01:00
Robin
681d990f90 Added pid option 2013-11-21 05:52:55 +01:00
Andrew Chin
85f1112813 Overviewer now require 1.7 textures or newer 2013-10-30 20:57:37 -04:00
Aaron Griffith
809ce79a20 fixed --check-terrain with --config 2013-08-15 22:10:44 -04:00
Andrew Chin
183da128b8 More agressive texture cache
Especially with regard to jarfile loading
2013-08-03 12:59:13 -04:00
Michel Albert
8e29ca7875 Removed second logger.
The root logger for "overviewer" is now named "`overviewer_core`".
2013-07-31 20:24:45 +02:00
Michel Albert
c991135e40 Log messages routed to stdout/stderr as appropriate.
This also uses a dedicated logger instead of passing everything to the
root logger. `overviewer_core` still needs to be updated to reflect
this.

Additionally, `logger.configure` has been simplified.
2013-07-28 14:50:01 +02:00
Andrew Brown
80bf4ec806 Edited the texture-finding code for 1.6
Now correctly avoids globbing problems. Removed a bit of irrelevant code
for old style minecraft.jar. Tweaked error messages for resource packs
instead of texture files.
2013-07-04 17:58:00 -04:00
Andrew Chin
57ab387b29 Fixed default texture loading
Now accounts for the versions directory, which is maintained by the new
launcher
2013-07-02 19:05:17 -04:00
Nicolas Frattaroli
3986e10af2 Added option showlocationmarker 2013-05-13 15:38:54 +02:00
Andrew Chin
9452af8898 Added some debug stuff
Hopefully this will be useful in tracking down dimension/rendermode
issues
2013-03-26 22:09:40 -04:00
Nicolas Frattaroli
cacf1498b8 Add option to skip scanning for POIs in regions
Sometimes, people just use --genpoi for manual POIs. This option
allows them to save some time by not handling entities.
2013-03-19 18:10:24 +01:00