Skip to content

Instantly share code, notes, and snippets.

View Kraballa's full-sized avatar
🙂
looking for interesting things

Vinzent Brömauer Kraballa

🙂
looking for interesting things
View GitHub Profile
@Kraballa
Kraballa / encounter_checker.py
Last active October 19, 2020 18:50
pokecrystal encounter checker. check for pokemon without encounters and more
# made for people modifying pret/pokecrystal who want to
# check what pokemon need changes in their wild encounter
# rates. prints 2 tables, one containing a list of all
# pokemon without encounters, one containing all
# encounters sorted by their total overall probability
#
# 1. place this file in your ./tools folder
# 2. make sure the paths and encounter rates below are accurate (only if you changed them)
# 3. if you don't want to incorporate water encounters comment out the last 2 'parse_encounters' lines
@Kraballa
Kraballa / TextGenerator.cs
Created January 29, 2020 18:10
Procedual text generator. See comment for example. Inspired by tracery (http://www.crystalcodepalace.com/traceryTut.html)
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace TextGeneration
{
public static class TextGenerator
{
private static Random rand = new Random();
@Kraballa
Kraballa / InstantText.md
Last active July 15, 2019 20:41
Wiki entry suggestion detailing how to edit pret/pokecrystal to allow instant text.
@Kraballa
Kraballa / epub_generator.py
Last active January 11, 2022 23:18
Provides a class for easy epub file generation. Input files can be regular txt files or more advanced (x)html files. For installation simply get the library 'ebooklib' via pip. Made for Python 3.7.3
from ebooklib import epub
# HOW TO:
# 1. create instance of the class
# 2. set important metadata
# 3. add chapter files and give them a title
# 4. write the finished epub file to disc
class EbookGenerator():
def __init__(self):
@Kraballa
Kraballa / ebook_textractor.py
Last active March 28, 2022 08:33
Extracts plain text from epub files. Specify directory in `dir_to_epubs` variable. The extracted `.txt` files will be written to `./epub_text`.
from ebooklib import epub
import ebooklib
import re
import html
import os
#folder to epub files
dir_to_epubs = ''
#generate list of epub-files in specified directory