Code Monkey home page Code Monkey logo

nbteditor's People

Contributors

mrghosti3 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

nbteditor's Issues

Watch server function

Implement functionality to get notifications of file changes and update NBT data (and probably if possible, YML if NBT changes). It should be easily enabled via CLI and opt-in. Flags could --watch with alias -w.

For now possible solution for this is to use inotify (7) syscall via nix crate.

Argument flag for user to specify data format on input/output

Would specify for the program what data format type for input/output data:

  • Compilation: when flag is specified, it will skip reading "magic bytes" and assume data is formatted as specified. If those arguments are not given than it resumes format detection via "magic bytes";
  • Decompilation: outputs data in a specified format (zlib/gzip if flags are given or if none than raw NBT).

Currently supported flags:

  • --gzip (alias -g) : for gzipped data
  • --zlib : for data archived in ZLib standart

Decompile NBT format to XML

Rewriting decompile/compile feature to output data in XML. Initially made output into YAML, but after some time the serde_yaml library would crash (due to OOM or recursion) as the NBT file would be to big.

Solutions:

  1. Write custom way to incrementally output XML from NBT. Currently had ran into an issue where it is difficult to properly output structured XML data from Compound tags as the idea of other tags is to be nested in and have name attribute like:
<compound>
    <int name="count">64</int>
    <string name="blockName">dirt</string>
</compound>
  1. Write a Serializer from serde crate and use it to incrementally output NBT into an XML file. Having issues understanding how the Serializer might work;
  2. Rewrite named-binary-tag crate with better API and data structures that would make easier to accomplish solution nr 1.

Implement export, import functionality

Make the program export NBT file into JSON, YAML or any other text based format so that user could edit the export version. After editing, user would run this program to import their changes back into NBT file.

Detection of whether input is NBT, gzip or xz data;

Currently the code works with the assumption that the given input is of gzip. But fails to read region files which are raw NBT. There should be a functionality to detect what type of file is passed.

The check order will be:

  1. is gzip archive;
  2. is xz archive;
  3. fallbacks to NBT.

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.