All hexes require Hex Casting 0.10.x (not 0.10.2, there's a breaking Hermes bug), Hexal, and MoreIotas.
please help i'm literally going insane
Day 1
File to book converter
Use this to convert a text file into a paginated written book. You'll need to use a command block for the command it outputs, it's much too long for chat.
Code: Select all
from string import Template
import sys
from pathlib import Path
max_string = 1728
max_lines = 512 # needs testing
line_separator = "\\\\n"
full_filename = sys.argv[1]
filename = Path(full_filename).stem
strings = [""]
current_lines = 0
with open(full_filename, "r") as f:
for line in f.read().splitlines():
line += line_separator
if len(strings[-1]) + len(line) > max_string or current_lines >= max_lines:
strings.append(line)
current_lines = 1
else:
strings[-1] += line
current_lines += 1
command_template = Template("""give @p written_book{pages: [$pages], title: "$title", author: "$author"}""")
page_template = Template("""'{"text":"$text"}'""")
command = command_template.substitute({
"pages": ", ".join(
page_template.substitute({"text": string.removesuffix(line_separator)})
for string in strings
),
"title": filename,
"author": "object_Object",
})
print(command)
Use this to send the contents of a written book to a linked wisp.
Code: Select all
{
0
{
send_iota
}
scribe_refl
thoth
}
Code: Select all
{
consideration {
listen
recitation
gemini_dec
null
equality
{
bookkeeper v
charon
}
{
bookkeeper - // no-op, not a placeholder
}
flock_dis
augur_exalt
hermes
breaking_refl
separation
read_ravenmind
gemini_dec
null
inequality
jester
0
0
2
flock_gam
augur_exalt
write_ravenmind
consideration {
input_pur
read_ravenmind
flock_dis
rotation
gemini_dec
null
inequality
jester
2
fisherman_ii
-1
multiplicative
augur_exalt
additive
undertaker
dioscuri
maximus
rotation_ii
augur_exalt
jester
2
flock_gam
write_ravenmind
consideration }
jester
thoth
read_ravenmind
0
selection_dist
reveal
bookkeeper vv
consideration }
mind
compass
900 // some big number
summon_cyclic_wisp
mind
compass
entity_prfn_wisp
link
}
Code: Select all
{
consideration {
listen
recitation
gemini_dec
null
equality
{
bookkeeper v
charon
}
{
bookkeeper -
}
flock_dis
augur_exalt
hermes
breaking_refl
separation
read_ravenmind
gemini_dec
null
inequality
jester
0
0
0
3
flock_gam
0
2
flock_gam
augur_exalt
write_ravenmind
consideration {
input_pur
read_ravenmind
flock_dis
rotation
gemini_dec
null
inequality
jester
2
fisherman_ii
-1
multiplicative
augur_exalt
additive
jester
flock_dis
3
fisherman_ii
dioscuri
dioscuri
maximus
rotation_ii
augur_exalt
rotation_ii
dioscuri
minimus
rotation_ii
augur_exalt
2
fisherman_ii
dioscuri
maximus
rotation_ii
augur_exalt
jester
2
fisherman
4
fisherman_ii
dioscuri
minimus
rotation_ii
augur_exalt
3
fisherman
dioscuri
maximus
rotation_ii
augur_exalt
rotation_ii
3
flock_gam
jester
2
flock_gam
write_ravenmind
consideration }
jester
thoth
read_ravenmind
0
selection_dist
flock_dis
additive
additive
reveal
bookkeeper vv
consideration }
mind
compass
900 // some big number
summon_cyclic_wisp
mind
compass
entity_prfn_wisp
link
}