[abandoned mod] Gutenberg [gutenberg]

User avatar
duane
Member
 
Posts: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

[abandoned mod] Gutenberg [gutenberg]

by duane » Wed Jun 22, 2016 05:14

Note: I'm not working on this anymore.

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
(127.78 KiB) Not downloaded yet
Last edited by duane on Thu May 31, 2018 22:05, edited 6 times in total.
Believe in people and you don't need to believe anything else.
 

User avatar
duane
Member
 
Posts: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Problems

by duane » Wed Jun 22, 2016 05:14

None so far.
Believe in people and you don't need to believe anything else.
 

User avatar
D00Med
Member
 
Posts: 937
Joined: Sat Feb 07, 2015 22:49
Location: Australia...somewhere
GitHub: D00Med
 

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

User avatar
DS-minetest
Member
 
Posts: 1022
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
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: 529
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!
Resources on happiness and life management - http://MikesHappyPlace.com
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: 1257
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

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: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
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.
Believe in people and you don't need to believe anything else.
 

User avatar
TheReaperKing
Member
 
Posts: 529
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 :)
Resources on happiness and life management - http://MikesHappyPlace.com
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: 1642
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: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
FreeLikeGNU
Member
 
Posts: 125
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: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
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.
Believe in people and you don't need to believe anything else.
 

twoelk
Member
 
Posts: 1257
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

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
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 21 times
Last edited by twoelk on Thu Jul 14, 2016 12:23, edited 1 time in total.
 

User avatar
duane
Member
 
Posts: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
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
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.
Believe in people and you don't need to believe anything else.
 

User avatar
TheReaperKing
Member
 
Posts: 529
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.
Resources on happiness and life management - http://MikesHappyPlace.com
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: 248
Joined: Thu May 28, 2015 06:45
Location: Germany
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

Re: [Mod] Gutenberg [gutenberg]

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

woooo \o/ nice!
Illuna Minetestservers | Mastodon | [ matrix ] | I may host you a Minetestserver, just contact me.
 

hajo
Member
 
Posts: 596
Joined: Thu Oct 13, 2016 10:45
Location: DE

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.
 

User avatar
TheReaperKing
Member
 
Posts: 529
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?
Resources on happiness and life management - http://MikesHappyPlace.com
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: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
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.
Believe in people and you don't need to believe anything else.
 

User avatar
Cross_over
Member
 
Posts: 10
Joined: Fri Nov 10, 2017 18:28
In-game: Cross_over

Re: [Mod] Gutenberg [gutenberg]

by Cross_over » Sun Nov 12, 2017 15:06

I have downloaded another txt book from PG to test but i only get the princess of mars, what im doing wrong?
 

User avatar
duane
Member
 
Posts: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: [Mod] Gutenberg [gutenberg]

by duane » Mon Nov 13, 2017 02:38

Cross_over wrote:I have downloaded another txt book from PG to test but i only get the princess of mars, what im doing wrong?


Just put the text file (no other type) in the books directory of the mod.
Believe in people and you don't need to believe anything else.
 


Return to WIP Mods



Who is online

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