[Mod] Gutenberg [gutenberg]

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

[Mod] Gutenberg [gutenberg]

by duane » Wed Jun 22, 2016 05:14

This just lets you create books with actual books in them that you can read in game. Why would you want to do that? No idea. I just thought it was cool.

You should be able to download any Project Gutenberg text (as a .txt file), save it to your mods/gutenberg/books/ directory, and it will be available in the game. [You must be sure to give it a file name containing only letters, numbers, underscores, and periods, or the mod will not recognize it.] There is no special formatting, and images are not supported.

Note: The mod will create a cache file for each page of each book every time you start the game. This takes so little time on my ten-year-old laptop that I don't notice, but it could be an issue for someone. If you don't like your world directory cluttered, you may create a subdirectory in it called 'book_cache'. Cache files will be placed there instead.

Image

The source is available on github.

Code: LGPL2, textures: n/a

Mod dependencies: default

Download: https://github.com/duane-r/gutenberg/archive/master.zip

Recipes:

Combine the following to produce a random gutenberg book:
Paper, [empty], [empty]
[empty], Paper, [empty]
[empty], [empty], Paper
Attachments
gutenburg.jpg
gutenburg.jpg (127.78 KiB) Viewed 1282 times
Last edited by duane on Sun Jun 26, 2016 23:13, edited 5 times in total.
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

Problems

by duane » Wed Jun 22, 2016 05:14

None so far.
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: [Mod] Gutenberg [gutenberg]

by D00Med » Wed Jun 22, 2016 08:37

That's a really cool idea!
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Gutenberg [gutenberg]

by azekill_DIABLO » Wed Jun 22, 2016 12:29

what is the difference with ingame books?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Gutenberg [gutenberg]

by DS-minetest » Wed Jun 22, 2016 15:42

well, Gutenberg invented the printing press, books got written before, too.
so i suggest to rename the mod or create a way to duplicate the books, like a printing press node
Edit: i saw, you cant rewrite the books, its ok, nice idea, but noone will use it to read a real-life book with that lag, i now understand the name, because this website is called Gutenberg project
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Gutenberg [gutenberg]

by TheReaperKing » Wed Jun 22, 2016 19:24

So I imagine this would read any epub format books not just from that site, and is epub the only file type it reads? I was thinking this would be great because the kids could write their own books and I'd convert it to epub and we could put them in :) Or even for a game make like a journal or something. It looks great!
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: [Mod] Gutenberg [gutenberg]

by twoelk » Thu Jun 23, 2016 10:30

cool!

if I get the source right you can only load *.txt files and there is no formating beyond plain ascii of a txt file?
I had hoped for at least a subset of markdown (*.md)
I don,t know if a mod should be able to access content outside of the world folder but having the files in the "minetest-0.4.14\doc" folder as default content might be usefull - or at least fun.

I have been filling a minetest wiki with content for my roman map, maybe serving information with this mod is better or at least easier. I can imagine this usefull for teachers, though some more in-text navigation tools might be usefull for larger texts. Maybe you can find a way to generate a chapter list and only load one chapter at a time.

I will certainly test this thingy, I got several gigaloads of Gutenberg downloads I can throw at this ;-P
 

Aftermoth
Member
 
Posts: 22
Joined: Wed Apr 06, 2016 01:26

Re: [Mod] Gutenberg [gutenberg]

by Aftermoth » Fri Jun 24, 2016 10:58

You have just earned the cookie of your choice for spreading the word of Project Gutenberg to a new audience.

(You will have to get it yourself, though. This post only certifies your entitlement to said cookie without reservations.)
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

Re: [Mod] Gutenberg [gutenberg]

by duane » Fri Jun 24, 2016 19:00

Thanks for the comments everyone. I have rewritten the code to cache each page of each book in the world directory. Now only the requested page (eighteen lines) is read with each page turn. None of the text is permanently cached in memory.

azekill_DIABLO wrote:what is the difference with ingame books?


You have to write the in-game books yourself.


DS-minetest wrote:its ok, nice idea, but noone will use it to read a real-life book with that lag


Pages are now cached individually, so both the memory use and lag are minimal, unless your connection can't handle eighteen lines of text.


TheReaperKing wrote:So I imagine this would read any epub format books not just from that site, and is epub the only file type it reads?


It only reads text files.
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Gutenberg [gutenberg]

by TheReaperKing » Sat Jun 25, 2016 00:57

Once again, another awesome creation from Duane :)
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Gutenberg [gutenberg]

by Don » Sat Jun 25, 2016 14:20

+1
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Gutenberg [gutenberg]

by azekill_DIABLO » Sat Jun 25, 2016 15:41

+1
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
FreeLikeGNU
Member
 
Posts: 119
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Gutenberg [gutenberg]

by FreeLikeGNU » Sat Jun 25, 2016 16:37

A great book choice to demo! In case you might not know, this book was the basis for the movie John Carter, which is terribly underrated and I personally recommend it as well. You may also not know that I caught myself trying to click on the page advance button in Duane's screenshot because I like the story so much.
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

Re: [Mod] Gutenberg [gutenberg]

by duane » Sat Jun 25, 2016 20:35

FreeLikeGNU wrote:A great book choice to demo! In case you might not know, this book was the basis for the movie John Carter, which is terribly underrated and I personally recommend it as well. You may also not know that I caught myself trying to click on the page advance button in Duane's screenshot because I like the story so much.


+10

This was the first novel I ever read, long, long ago, and the reason I was never caught without a novel amongst my school books in all the years that followed.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: [Mod] Gutenberg [gutenberg]

by twoelk » Sun Jun 26, 2016 21:45

This is fun ;-P

one minor problems so far when importing original files from the Gutenberg project seems to be that some files have a dash or minus character in the name which crashes minetest at start if the gutenberg mod is activated.

Similarly the mod not only checks for information about titel and author but expects these and thus does not load the world if it does not find something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Title: Minetest Readme file

Author: The Minetest Development Team

in the file.

The attached file contains the menu_lua_api.txt, lua_api.txt, README.txt and world_format.txt of the stable Minetest 0.4.14 release with the needed author and title lines in case somebody would like to have them at hand in-game. Just unzip them to the books folder of the gutenberg mod.
Attachments
MinetestDocuments.zip
(70.48 KiB) Downloaded 58 times
Last edited by twoelk on Thu Jul 14, 2016 12:23, edited 1 time in total.
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

Re: [Mod] Gutenberg [gutenberg]

by duane » Sun Jun 26, 2016 23:30

twoelk wrote:one minor problems so far when importing original files from the Gutenberg project seems to be that some files have a dash or minus character in the name which crashes minetest at start if the gutenberg mod is activated.

Similarly the mod not only checks for information about titel and author but expects these and thus does not load the world if it does not find something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Title: Minetest Readme file

Author: The Minetest Development Team

in the file.


Ok, I've added a check for legal file names and a note to name the downloaded files carefully. It will now default to the file name for a title and 'Unknown' for the author, if it can't parse them.
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Gutenberg [gutenberg]

by TheReaperKing » Mon Jun 27, 2016 02:53

Not sure how easy it'd be, but what if it could handle images too? Maybe it'd be a separate mod but I was thinking it'd be cool for treasure maps and such and maybe the book cover.
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
Milan*
Member
 
Posts: 203
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

Re: [Mod] Gutenberg [gutenberg]

by Milan* » Fri Sep 30, 2016 11:14

woooo \o/ nice!
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] Gutenberg [gutenberg]

by hajo » Fri Dec 16, 2016 00:32

duane wrote:create books .. that you can read in game. ..
download any Project Gutenberg text (as a .txt file),
save it to your mods/gutenberg/books/ directory,
and it will be available in the game. ..
There is no special formatting, and images are not supported.

Recipe .. to produce a random gutenberg book:
Paper, [empty], [empty]
[empty], Paper, [empty]
[empty], [empty], Paper

A 'random' book from the textfiles stored in .\mods\gutenberg\books.
If there is only the book that comes with the mod-download,
every book you craft will be the same, "princess_of_mars".

Is there a way to re-roll books ?

Image
It would be nice to have some more buttons,
eg. to skip +/-10 pages, or jump to the start of the next/prev chapter.

Nevertheless, this is impressive.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
TheReaperKing
Member
 
Posts: 493
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Gutenberg [gutenberg]

by TheReaperKing » Mon Jan 23, 2017 02:35

I'm interested in having my students write the .txt files and add their books to the game especially to create city/town libraries. Is there a way to make it non random?
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com

Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com

Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

Re: [Mod] Gutenberg [gutenberg]

by duane » Mon Jan 23, 2017 23:52

TheReaperKing wrote:I'm interested in having my students write the .txt files and add their books to the game especially to create city/town libraries. Is there a way to make it non random?


I suppose that would be possible, if you could create a formspec that gave you a menu of titles to choose from, but I've no idea how to do that. I've been copying my formspecs from other projects.
 


Return to WIP Mods

Who is online

Users browsing this forum: Google [Bot] and 41 guests

cron