thewilley / text2book Goto Github PK
View Code? Open in Web Editor NEWA web app to convert text to Minecraft books
Home Page: https://thewilley.github.io/Text2Book/
License: MIT License
A web app to convert text to Minecraft books
Home Page: https://thewilley.github.io/Text2Book/
License: MIT License
Due to a strange error where I couldn't log in for no apparent reason an admin friend of mine used text2book's commands function to put some books in the game for me.
However they both started and ended up with square brackets and for some reason these square brackets ended up in the title, instead of in the text. It has also eaten a quotation mark.
I am aware this is very much an edge case
For example, this one is supposed to start with a [
After further research, it seems like the testing methodology was created in vain, as a small yet important detail was glanced over. The testing document explains that we use the data from a Minecraft world to get the contents of a book within a players inventory. The assumption was that the text displayed in the book GUI would be the same within the .dat
file located in the world folder. However, the problem is that the book contents is not truncated within the .dat
file, it is done on demand when opening the book GUI. This can even be confirmed when looking at Minecraft's source code:
this.cachedComponents = itextcomponent != null ? GuiUtilRenderComponents.splitText(itextcomponent, 116, this.fontRenderer, true, true) : null;
Essentially the text is split into an array of strings in such a way that they'll fit on a single line on a page. Looking in the .dat
file itself we can also confirm that the text is in fact not truncated beforehand, as string which should be way out of page bounds are still stored:
Item 6 contains a very long string
The book GUI removes the overflowing text
Unless we modify the Minecraft source code, there is basically nothing that can be done about this. The test is essentially useless, as it effectively compares its own output with itself, which always yields a positive test result. I have made some attempts at a solution (including converting the source code to javascript) but to no avail. The testing methodology may have to be changed if a solution cannot be found. I won't put too much time into this if the solution turns out to be more work than worth.
I wrote 12 minecraft book pages of stuff for an SMP I'm on, but only the first page worked properly.
Testing it, each text copy page thing has all the previous pages as well, not just its page! So the last one has the entire book!
It starts with some text in square brackets, then continues outside the square brackets.
The code is quite hard to follow as it is now. Refactoring it might be a good idea, splitting functions into multiple files, changing variable names, etc.
The same goes for the README file, as it's rather cluttered.
It seems to replace line breaks with a space, which is an issue when you want a line break (e.g. in a recipe book or something).
As outlined in #12, the bedrock version of Minecraft only supports 50 pages, while the java version supports 100. A toggle should be added to to switch to either "bedrock mode" or "java mode" in order to support both versions.
Currently the amount of lines per page is hard-coded to 14, since this is the maximum amount of lines per page. Allowing the user to adjust this value could be useful if they for some reason would not want to use the entire page.
When generating a large amount of text, it can take a while for React to create all textboxes which contains the app results. Pagination would be an easily solution to reduce loading times.
Users may want to extract all generated commands / text into a text file, e.g, for sharing.
If the "Generate Text" option is checked, and the user tries to press "Generate" while no author or title it entered, the app will strait up refuse to generate anything. This is unintentional, as neither an author or title is needed to generate text, but it is required to generate a command.
The program generates the commands correctly, however, java doesnt display some words at the end of pages sometimes, though the same words that arent showing on java show up on bedrock
also if you check my profile i have forked it for 50 page limit so it works with bedrock (this took me a hour to find the simple line XD)
i am getting an error saying ''website inaccessible, this website took too long to responds''
yes, i am using the right url
it isn't working in google chrome either
Originally posted by @BIock64 in #16 (comment)
Sorry about this but it seems like it doesn't always take into account the space taken up by a line break when splitting books up. In the most recent lore book I made it put in one line's worth more text than actually fit in a page that had a line break in the middle.
Presently, a numerical identifier in the form of [n]
is appended to the book title during command generation to facilitate differentiation among generated books. Nevertheless, users may desire the option to exclude automatic numbering from their book titles, and this capability should be made available to them.
The webpage strips out quotation marks and apostrophes (" and ')
so i'm trying to go on the text2book website, but my browser (opera gx) keeps giving me errors, saying the website is inaccessible. is there any reason for this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.