Commit Graph

255 Commits

Author SHA1 Message Date
Phoenix616 16adb443e0
Add name of world to some errors 2020-11-28 14:40:02 +01:00
Nicolas F bc56346bad Initial 1.16 block work
- Add ancient debris
- Add basalt
- Add polished basalt
- Add soul campfire
2020-07-03 13:10:23 +02:00
Andrew Chin d6e21757db Show the Overviewer version in the "welcome" message
Old message:

    Welcome to Minecraft Overviewer!

New message:

    Welcome to Minecraft Overviewer version 0.15.75 (9605bd8)!

This might make is easier to quickly see what version of Overviewer
people are running when they ask for support
2020-06-27 13:48:07 -04:00
Nicolas F 76bbabb7de fix various logging.warn calls
Those are deprecated in favour of logging.warning now.
2019-12-11 18:42:35 +01:00
Nicolas F c13d3aae3c rename configParser to config_parser
CamelCase does not bode well in Python land, so it's best we rename
these ill-named files before the Guidoists get us and throw us into
a damp dungeon.
2019-07-24 09:18:02 +02:00
Nicolas F 106d332136 Catch KeyboardInterrupt so we don't barf a trace
Concerns issue #1531.

Future work can actually try to save state in this case, but especially
with multiprocessing, that might become a bit hairy.
2019-07-12 17:15:51 +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
Aaron Griffith 248ea42dd2 Merge branch 'master' into python3-fun-times 2019-06-21 22:08:58 -04:00
Nicolas F 522ee28219 overviewer: add warning for CentOS/RHEL 6
If you're using CentOS/RHEL 6, you probably already can't run
Overviewer due to our dependency on argparse breaking python2.6
compatibility. However, if you somehow managed to get python2.7
working on CentOS 6, you now get a nice warning telling you to
finally get off your butt and use something else.

This warning can be dropped once we move to Python 3, which is why
this code was added in the first place: CentOS 6 has no Python 3
package that is still supported by upstream, not even in EPEL.
2019-05-20 15:21:07 +02:00
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