Giter Site home page Giter Site logo

Comments (13)

ShDis avatar ShDis commented on June 24, 2024 1

Maybe just require BMAreaControl to use the area config from it? Oh, and also add an option to use BMAreaControl area settings into config.
But the most important filter is null text checker, 100% sure. There are a lot of empty signs in mobfarms like "ffffff". "wwww", etc. But mostly with no text at all or just spaces :)

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024 1

Yeah I also just checked the Overviewer docs, to see what they used, and indeed, they use Python.
https://docs.overviewer.org/en/latest/signs/
I think I'll also use Python then, to keep it simple for people to switch to this.
And I don't necessarily mind using Python for this either, as it's a fine language for scripting stuff like this

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024 1

I've been experimenting with Jython a bit, and from my first tests, it seems pretty cool, but it does inflate the size of the plugin to like 50 megabytes, from the half a megabyte that it currently is...

from bluemapsignextractor.

ShDis avatar ShDis commented on June 24, 2024 1

I've never heard of Groovy before (okay, maybe 1 time or 2, sounds familiar).
But I don't think that's the problem. There are no other similar tools to solve the "sign problem". So any solution is great, even a 124mb size (honestly, I don't really care about its size because my server folder without backups is about 130gb).
If the solution is on Groovy - good, then I'll learn how to use it.
And if it's easy to use, the solution will be twice as good :ะท

from bluemapsignextractor.

ShDis avatar ShDis commented on June 24, 2024 1

But as a "half-programmer", I really like the way you try to make the implementation as good as possible

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024 1

Oh my goodness, I have finally got it to work!!!
image
It's printing stuff from a Python script, running on my test server! ๐Ÿฅณ

With a million thanks to Blue for sending how he does it!

We are back in business! ๐Ÿ˜Ž
I'll go to sleep now, but I'll try and get a prototype of filtering working soon!

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024

I am leaning towards integrating LuaJ for this, to allow users to script exactly which signs they want to keep and which ones they want to remove.
Perhaps I'll include some templates that can be easily used or adapted.

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024

Regarding your suggestion of using BlueMap Area Control areas, I don't think I would be doing exactly that, due to wanting to keep my add-ons as independent of each other as possible.
Instead, I'll try and see if I can add a way to filter out the signs from un-rendered areas on the BlueMap itself. This should have effectively the same effect.
Likely with the BlueMapMap#getTileFilter() method.

I may have to make this add-on softdepend on BMAC, though, to ensure that it loads after BMCAC, so BMAC has the time to set up its tile filter first. (But not any actual interaction code)
Or I just add a 10-second delay before this plugin starts the sign extraction process. Maybe that'll be simpler...

from bluemapsignextractor.

ShDis avatar ShDis commented on June 24, 2024

LuaJ for this, to allow users to script exactly which signs they want to keep and which ones they want to remove

In Overviewer there was an option to filter signs via a python function added to the config or so.
As a temporary solution I made this script for myself to filter the results

import json
with open('markers world original.json', 'r',encoding='UTF8') as file:
    data = json.load(file)
filtered_signs = {key: value for key, value in data['signs']['markers'].items() if ((value['position']['x'] > -4600.0 and value['position']['x'] < 7000.0 and value['position']['z'] > -3500.0 and value['position']['z'] < 1600.0) and value['position']['y'] >= 60.0)}
data['signs']['markers'] = filtered_signs
with open('markers world.json', 'w') as file:
    json.dump(data, file, indent=2)

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024

And it also doesn't seem to want to properly compile. It runs fine in IntelliJ, but when I package up the plugin as a .jar, and try to run it, it doesn't work; it can't find the Jython Script Engine.
It's most certainly in there, though, as the jar has bloated to the aforementioned 50 megabytes.

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024

I've found an alternative Python runtime for Java: https://github.com/oracle/graalpython
When I tried it out just now, it was a LOT simpler to integrate and package up, and I have now succeeded in running Python code on my Minecraft server!!

However, this comes at the cost of a ridiculous jar size of 124.4 megabytes... ๐Ÿ˜ฑ

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024

I am considering using Groovy instead of Python. All these giant jar sizes are making me depressed. Groovy should be a LOT more reasonable.
@ShDis, what would you think about this?
Do you think it'll be easy enough for people who are used to Python to pick up Groovy?

from bluemapsignextractor.

TechnicJelle avatar TechnicJelle commented on June 24, 2024

I'd like all the things I make to be as simple as possible for people to use, while still allowing advanced users the power they need, as well :)

I've been playing around with Jython again this evening, without much success, sadly.
Although I have been somewhat convinced to have the scripting feature as like, as addon.
So by default, it just works like this, but if you download the Jython jar and put it into the config directory, it'll load it, and run the filter script.
Only, I've not been successful in loading the jar file dynamically, yet.
It's proving a lot more challenging than I'd hoped.

from bluemapsignextractor.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.