Script Request


#1

I have a script for NHK easynews that allows me to turn on and off the furigana. It’s really useful. What I’d love now would be if someone could make roughly the same thing but for real books. Thanks in advance!


#2

I’ll need ten years and a research grant


#3
akranis said... I'll need ten years and a research grant
 If the furigana need to be actual Japanese characters, then I bet it'll take at least twelve years.

#4
Mempo said...
akranis said... I'll need ten years and a research grant
 If the furigana need to be actual Japanese characters, then I bet it'll take at least twelve years.
 Just to clarify: it's more for the purpose of turning them off in children's books and manga. Will that shorten development time?

I actually tried making a script myself, but when I ran it on volume 1 of Dragonball, I kept ending up with a 'ripped pages' error.

#5

Is real books a website/program or are you asking for something that can proactively scan your screen for kanji+furigana and remove the furigana part?


#6
Lostick said... Is real books a website/program or are you asking for something that can proactively scan your screen for kanji+furigana and remove the furigana part?
 Real Books is a task I've been running IRL for decades now. After an initial 5-7 years of difficulty, I hadn't had any real problems with it until recently - when I started trying it in Japanese.

#7
riccyjay said...
Mempo said...
akranis said... I'll need ten years and a research grant
 If the furigana need to be actual Japanese characters, then I bet it'll take at least twelve years.
 Just to clarify: it's more for the purpose of turning them off in children's books and manga. Will that shorten development time?

I actually tried making a script myself, but when I ran it on volume 1 of Dragonball, I kept ending up with a 'ripped pages' error.
 Ow, bummer. That's gonna take ages to debug. Have you tried catching the error, or just ignore it?

#8
Mempo said...
riccyjay said...
Mempo said...
akranis said... I'll need ten years and a research grant
 If the furigana need to be actual Japanese characters, then I bet it'll take at least twelve years.
 Just to clarify: it's more for the purpose of turning them off in children's books and manga. Will that shorten development time?

I actually tried making a script myself, but when I ran it on volume 1 of Dragonball, I kept ending up with a 'ripped pages' error.
 Ow, bummer. That's gonna take ages to debug. Have you tried catching the error, or just ignore it?
 I did catch the error. But since I couldn't work out how to fix it I just used the source as kindling.

#9

This is something of a hack, I admit, but try this:

function hideFurigana() {
    int squintFactor = 0; // 0 = no squinting
    while (book.read().checkFuriganaVisible()) {
        squintFactor++;
        foreach (eyeLid in body.getEyelids()) {
            eyeLid.setSquintFactor(squintFactor);
        }
    }
    // Oops! Squinted too much! Better unsquint a bit
    if (!book.read().checkKanjiVisible()) {
        squintFactor–;
        foreach (eyeLid in body.getEyelids()) {
            eyeLid.setSquintFactor(squintFactor);
        }
    }
}

function showFurigana() {
    // Reset squint factor
    foreach (eyeLid in body.getEyelids()) {
        eyeLid.setSquintFactor(0);
    }
}

Also, I’m not used to coding without continuous debugging, so if you encounter any bugs, let me know and I’ll try to get them fixed in the next version.


#10
crihak said...Also, I'm not used to coding without continuous debugging, so if you encounter any bugs, let me know and I'll try to get them fixed in the next version.
 If he encounters a bug, he can just close the book and reopen it again.  That'll squash it.

#11
crihak said... This is something of a hack, I admit, but try this:

function hideFurigana() {
    int squintFactor = 0; // 0 = no squinting
    while (book.read().checkFuriganaVisible()) {
        squintFactor++;
        foreach (eyeLid in body.getEyelids()) {
            eyeLid.setSquintFactor(squintFactor);
        }
    }
    // Oops! Squinted too much! Better unsquint a bit
    if (!book.read().checkKanjiVisible()) {
        squintFactor--;
        foreach (eyeLid in body.getEyelids()) {
            eyeLid.setSquintFactor(squintFactor);
        }
    }
}

function showFurigana() {
    // Reset squint factor
    foreach (eyeLid in body.getEyelids()) {
        eyeLid.setSquintFactor(0);
    }
}

Also, I'm not used to coding without continuous debugging, so if you encounter any bugs, let me know and I'll try to get them fixed in the next version.
 You're brilliant XD

#12
rfindley said...
crihak said...Also, I'm not used to coding without continuous debugging, so if you encounter any bugs, let me know and I'll try to get them fixed in the next version.
 If he encounters a bug, he can just close the book and reopen it again.  That'll squash it.
Yeah, or restart his nervous system. 

#13
crihak said...
rfindley said...
crihak said...Also, I'm not used to coding without continuous debugging, so if you encounter any bugs, let me know and I'll try to get them fixed in the next version.
 If he encounters a bug, he can just close the book and reopen it again.  That'll squash it.
Yeah, or restart his nervous system. 
 I recommend electric-shock therapy using 2000 volts of electricity. Can confirm 100% safe.



#14
Calfuray said...
crihak said... This is something of a hack, I admit, but try this:

function hideFurigana() {
    int squintFactor = 0; // 0 = no squinting
    while (book.read().checkFuriganaVisible()) {
        squintFactor++;
        foreach (eyeLid in body.getEyelids()) {
            eyeLid.setSquintFactor(squintFactor);
        }
    }
    // Oops! Squinted too much! Better unsquint a bit
    if (!book.read().checkKanjiVisible()) {
        squintFactor--;
        foreach (eyeLid in body.getEyelids()) {
            eyeLid.setSquintFactor(squintFactor);
        }
    }
}

function showFurigana() {
    // Reset squint factor
    foreach (eyeLid in body.getEyelids()) {
        eyeLid.setSquintFactor(0);
    }
}

Also, I'm not used to coding without continuous debugging, so if you encounter any bugs, let me know and I'll try to get them fixed in the next version.
 This looks great, but how should I run it? I tried scrawling it in block characters across the pages with a maker pen but all I got was an obscured reading.

(Also this:)

Calfuray said... You're brilliant XD

#15
riccyjay said...
Calfuray said...

 This looks great, but how should I run it? I tried scrawling it in block characters across the pages with a maker pen but all I got was an obscured reading.
 Try to find any unused USB-ports on your body. If you don't have any available, there's also a hacky alternative. Because the program is so small, you could try to load it onto a floppy disk. After that, you need to crack one of your output ports so it accepts the floppy as input device. I've heard this is an unpleasant, yet necessary part of the process. You may have to apply some force for this to work. After that, rebooting the BODIES and clearing the eyes of any fluids created during the installation process should do the trick. Good luck!

#16
Danny1145 said...
crihak said...
rfindley said...
crihak said...Also, I'm not used to coding without continuous debugging, so if you encounter any bugs, let me know and I'll try to get them fixed in the next version.
 If he encounters a bug, he can just close the book and reopen it again.  That'll squash it.
Yeah, or restart his nervous system. 
 I recommend electric-shock therapy using 2000 volts of electricity. Can confirm 100% safe.


 This seems completely legit and I fully support this method.

#17

As always, there’s a relevant XKCD strip:
http://xkcd.com/1425/


#18
Mempo said...
riccyjay said...
Calfuray said...

 This looks great, but how should I run it? I tried scrawling it in block characters across the pages with a maker pen but all I got was an obscured reading.
 Try to find any unused USB-ports on your body. If you don't have any available, there's also a hacky alternative. Because the program is so small, you could try to load it onto a floppy disk. After that, you need to crack one of your output ports so it accepts the floppy as input device. I've heard this is an unpleasant, yet necessary part of the process. You may have to apply some force for this to work. After that, rebooting the BODIES and clearing the eyes of any fluids created during the installation process should do the trick. Good luck!
 I tried this but now my eyes won't stop squinting and I can't find an eject button for the floppy.

#19
Gorgophone said...
Mempo said...
riccyjay said...
Calfuray said...

 This looks great, but how should I run it? I tried scrawling it in block characters across the pages with a maker pen but all I got was an obscured reading.
 Try to find any unused USB-ports on your body. If you don't have any available, there's also a hacky alternative. Because the program is so small, you could try to load it onto a floppy disk. After that, you need to crack one of your output ports so it accepts the floppy as input device. I've heard this is an unpleasant, yet necessary part of the process. You may have to apply some force for this to work. After that, rebooting the BODIES and clearing the eyes of any fluids created during the installation process should do the trick. Good luck!
 I tried this but now my eyes won't stop squinting and I can't find an eject button for the floppy.
 Pretty sure there are pills for that. Ask the nearest doctor and/or IT nerd for 'eject pills'

#20
Gorgophone said...
Mempo said...
riccyjay said...
Calfuray said...

 This looks great, but how should I run it? I tried scrawling it in block characters across the pages with a maker pen but all I got was an obscured reading.
 Try to find any unused USB-ports on your body. If you don't have any available, there's also a hacky alternative. Because the program is so small, you could try to load it onto a floppy disk. After that, you need to crack one of your output ports so it accepts the floppy as input device. I've heard this is an unpleasant, yet necessary part of the process. You may have to apply some force for this to work. After that, rebooting the BODIES and clearing the eyes of any fluids created during the installation process should do the trick. Good luck!
 I tried this but now my eyes won't stop squinting and I can't find an eject button for the floppy.
Did you try to run showFurigana()? That one should reset the squinting, but maybe I need to have another look at the documentation, I may be calling the wrong method... Nevertheless, rest assured that I have noted the bug and will work towards resolving it if I ever release a bug fix!

In the meantime, did you try the electroshock therapy method for restarting your nervous system?