Skip to content

kumquat-ir/textboxer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textboxer

A python script/lib for making custom textboxes that look like they are from games.

Requirements

Python 3.10
Pillow

Image and font files from the appropriate game are required for it to work, and are not included in this repository.
Each game "style" also requires some metadata files specifying the layout, example ones for OMORI and Oneshot are included.
Data format reference can be found in the examples directory.

Invoking

Textboxes can be created by either using generate(), which gives the most flexibility, or parsestr(), which is less flexible but more appropriate for something like a Discord bot.
(parsestrlist() can also be used, but will probably be removed later, since you can use the presplit kwarg of parsestr() for the same sort of thing)

The syntax for parsestr() is defined in the str key in the parse.json of the style.

gen_help() can be called to create a help message that is accurate to the currently available styles, including parsestr() syntax and recognized flags.

Examples

generate("oneshot", {"main": "My rams clock at 1333 megaherds."}, {"face": "shepherd"})
or parsestr("oneshot shepherd My rams clock at 1333 megaherds.")

tmpg8ljys17

Screenshot from 2020-06-21 19-39-47

generate("omori", {"main": "Hi, OMORI! Cliff-faced as usual, I see.\nYou should totally smile more! I've always liked your smile.", "name": "MARI"}, {"face": "mari_dw_smile2"})
or parsestr("omori MARI mari_dw_smile2 Hi, OMORI! Cliff-faced as usual, I see.\nYou should totally smile more! I've always liked your smile.")

tmpvga6r7hj

image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages