Mokuro: Read Japanese manga with selectable text inside a browser

naw, hotdog is a goober it’s super easy to install and only takes like 2 min :stuck_out_tongue_winking_eye:

seriously though yeah this stuff is a royal pain! it’s like going back to 1980 and manually making things work. definitely not straightforward at all. I think we have a lot of wk users that are programmers and do things that the average user doesn’t, which makes things seem easier than they are

when do we put the pen back on the cap :wink:

3 Likes

Haha true, there is definitely a bias there

3 Likes

Guilty as charged, this is literally me:

We had an assignment just like this in elementary school, we had to guide our teacher through making a sandwich, except we had to describe every single little step, and he was very thourough.
“First get the bread”
“Where’s the bread?”
“In the pantry”
“Where’s the pantry?”
“Over there”
“Well how do I get there?”
“Walk!”
*Walks forward into counter
Turn around first and then walk
I think about that every time I have to explain something.
But it kinda seems like a damned if you do damned if you don’t situation, if you assume they know too much then they make mistakes, and if you assume they know nothing and explain every step they might frustrated like “Yeah I know that, I wasn’t born yesterday.” And it’s hard enough to gauge someone’s knowledge in person, doing everything online must make it a thousand times harder.

I swear at least half the users here are programmers or software developers. Very useful for technical stuff like this :+1:


Anyway, is this it?

6 Likes

congrats!!! enjoy the manga reading!!!

3 Likes

Yup that’s it :slight_smile: you should have an html file that you just open normally in your browser. Then you can use Yomichan or all the plugins you usually use in your browser and also select text!

3 Likes

Was it supposed to make an html file? What’s in the picture is everything it spit out.

1 Like

If you open the folder or the parent folder you gave it as a source, can you see the html file?

4 Likes

If you’re using the latest version, it will give you the picture folder (the folder you started with), an ocr folder (you don’t really need it), and html file and a mokuro file.

On my computer (Mac), the OCR folder, html file, and mokuro file will be in the parent folder for the picture folder. That is, if I have /Users/Magyarapointe/Desktop/Manga/MangaVol1 as the picture folder, the ocr folder, html and mokuro file are in /Users/Magyarapointe/Desktop/Manga

If you’re reading the manga on the web site reader.mokuro.app, you need the picture folder and the mokuro file. I usually zip them together, and upload the zip file to the website.

If you’re using something else that is browser based, you need the html file and the picture folder.

I usually zip together the picture folder, mokuro file and html file, that way I can read the manga wherever I want.

There’s also another program that can make a pdf from your mokuro’ed manga, but whenever I’ve used it, it has always been very hit and miss.

2 Likes

IT’S WORKING IT’S WORKING IT’S WORKING

I feel like I need a cigarette and I don’t even smoke

Thank you everyone for being so patient :heart:

8 Likes

Help Needed: Issues Loading Manga into Mokuro via Safari

I’m having trouble getting my manga files to load into Mokuro using the Safari browser on my iOS device. Here’s a breakdown of the issues I’m encountering:

Problems:

  1. Loading Manga via Google Drive:

    • Following the instructions to add my zipped manga files to the Mokuro-reader folder in Google Drive.
    • Receiving error messages such as “something went wrong” and “fetching catalog stalls,” or nothing happens at all.
  2. Loading Manga via File Upload:

    • Trying to upload files directly, but I’m met with similar issues where “something went wrong” or nothing happens.

Environment:

  • Device: iOS 17.5.1
  • Mokuro-Reader: Latest version as of April 24, 2023
  • Browser: Safari
  • Storage: Google Drive

File Formats Tried:

  • mokuro-file-mangaUnZipped-folder.zip
  • mokuro-file-mangaZipped-folder.zip
  • mokuro-file-html-file-mangaZipped-folder.zip
  • mokuro-file-html-file-mangaUnZipped-folder.zip
  • mangaPNG-folder.zip
  • mangaORC-JSONManga-folder.zip
  • mokuro-file-mangaORC-JSONManga-folder.zip
  • mokuro-file-mangaORC-JSON-Manga-PNG-folder.zip
  • mokuro-file-html-file-mangaORC-JSON-Manga-PNG-folder.zip

Instructions Followed:

For Google Drive:

  • “Add your zipped manga files to the mokuro-reader folder in your Google Drive.”

For Upload:

  • “What to upload? On mobile, uploading via directory is not supported so you will need to zip your manga first and then upload it via choose files.”

Despite trying multiple zip formats, I can’t seem to get it to work. Does anyone have experience with this setup or suggestions on how to resolve these issues?

I do know it works as I had a successful attempt for iOS


but have not been able to reproduce it again

Thanks in advance for your help!

That’s strange. I do this on a daily basis on my iPhone, my iPad, my Vision Pro, so it definitely works.

I use either zip files from my iCloud storage OR the google drive mokuro-reader

My zipped files contain the mokuro file and the unzipped manga images (jpg), sometimes the html too.

The only issues I’ve had (if I didn’t make a mistake in zipping the file, like forgetting something) is when I try to upload several files at once; to do that, you need to zip the global manga folder (for example, if I have a Manga A folder with volumes 1-2-3-4 inside, I need to zip the Manga A folder but leave inside volumes 1-2-3-4 image folders unzipped, with the relevant mokuro files too


What does the error message say ? It should appear briefly in the lower right corner of the reader.mokuro.app catalog page

EDIT : are you by any chance using this ?

Mokuro Reader

I tried too, because there was Yomichan bundled with it, which I prefer to 10ten, but it was unstable with large dictionary files.

I went back to the mokuro web reader here, which definitely works… with 10ten

Another idea : what are you zipping the files on ? I haven’t had any problem using my Mac (M2 MacBook Pro, Sonoma 14.5) but sometimes hidden files are added by the OS and they don’t always play nice with programs. I had trouble with files zipped on my Mac which I wanted to view in TachiDesk, removing the hidden files (I have a shortcut for this) fixed the problem. I haven’t had to do it with mokuro, though.

EDIT 2 :

or maybe you are using this (the original Mokuro-reader) ? In which case, it seems to be a known bug. But the web-hosted version works fine.

Q: does the above mean that when you are using iCloud storage you are using the Upload option within mokuro-reader app? and google connect for google drive mokuro-reader?

Got it! I have this as well and now I know for certain that this is correct thanks.

I was not aware one is able to do this but now I am aware of it and will be implementing this once I am able to fix the current issue. Thanks for this tip!

You are correct, the error is on the lower right corner.
error: something went wrong
and at times no error message is displayed at all.

I apologize as in the details section of my first message I referenced it incorrectly.
I am not using: Moruko reader: github/fsestini
I am using and the issues are with: Mokuro Reader app: web reader
I will be using 10ten as a iOS Yomichan alternative

local env:

  • macOS: 13.6.3 (22G436)
  • MacBook Pro: 16-inch, 2019, 2.6 GHz 6-Core Intel Core i7
  • mokuro converter: v0.2.1 latest

I am using macOS’s built-in utility: Archive Utility : right-click a file/folder and select: Compress

What are you using?

Because I was originally using PNGs I have to adhere to your process, I have started everything from the beginning. Below is a detail step-by-step of what I am doing, implementing what I have learnt from your recommendations.

Yes, that’s right. I use Upload with iCloud, google-connect for Google Drive

I’m also using Archive Utility. And a newer MacOs, but that’s it

The only difference is I didn’t update mokuro recently, so I am using one of the old beta versions
which I installed through

pip3 install git+https://github.com/kha-white/mokuro.git@web-reader

a little under 3 months ago. I suppose you don’t have trouble generating the mokuro file ? For what it’s worth, I’m using python 3.9.13 through pyenv, though I don’t think this is the issue, because then you would have problem running mokuro.

I’m not at home right now, but I’ll try with a regular 0.2.1 install when I come back and let you know if I run into problems.

1 Like

So I’ve tried again with a mokuro 0.2.1 install, and it works. Here’s what I did, step by step

Install python 3.9.12 through pyenv (so as not to mess up my usual set up with 3.9.13, just in case), then install mokuro using only pip3 install mokuro with this 3.9.12 python

Downloaded a brand new, never-converted-before manga from my Amazon.co.jp account, ran it through Calibre for DRM-removing magic and conversion to zip, extracted a folder containing only the images in jpeg format

Checked that I was using the new, 3.9.12, python install and ran mokuro on the images folder

Success running mokuro !

Zipped the images folder, html file and mokuro file using the standard, Archive Utility Compress function. I didn’t do anything special to remove hidden files


Zipped

Transferred the zipped file to my iCloud folder.

Switched to my iPhone, loaded the web reader in Safari, and used the upload icon in the top right corner (the middle one) to load the zipped file from iCloud


Success !

So I don’t know what’s going wrong on your side. I would say either a Python error, but then you should have an error converting the file ? Or something with hidden files when zipping…

EDIT : I’ve just read your new post : I think this comes from you starting with a zipped images folder…

3 Likes

A detailed description of the process as stated above:

I download personal mangas from google drive

zip manga png folder from google drive:

Screenshot 2024-07-28 at 23.55.27

confirm file/path location:

mokuro-reader  ls -l                                                                                                                                                                                                                                                            
-rw-r--r--   1  staff  61565815  7 28 21:53 全1話-20240728T141849Z-001.zip

run the mokuro manga OCR process:

I change name from 全1話-20240728T141849Z-001.zip → TheBlackMagicOfLamia-001.zip

mokuro /Users/MyUSers/mokuro-reader/TheBlackMagicOfLamia-001.zip

terminal confirmation:

Found 1 volumes:

/Users/MyUSers/mokuro-reader/TheBlackMagicOfLamia-001.zip (unprocessed)

Each of the paths above will be treated as one volume.

.....

Processing pages...: 100%|

2024-07-28 23:48:45.876 | INFO     | mokuro.run:run:146 - Processed successfully: 1/1

finder confirmation:

Screenshot 2024-07-28 at 23.50.13

zip unzipped manga png folder + .mokuro file + .html file:

Screenshot 2024-07-29 at 0.05.18

I wonder if the below file/ folder path causes an issue? do you have a flat file/folder path?

Screenshot 2024-07-29 at 0.07.02

confirmed zipped file

Screenshot 2024-07-29 at 0.09.46

mokuro-reader app: using google driver

confirm zipped file

Screenshot 2024-07-29 at 0.18.37

iPad:


ERROR: something went wrong

mokuro-reader app: using iOS files app

confirm zipped file:

Screenshot 2024-07-29 at 0.19.16




nothing happens

1 Like

It looks like we posted at the same time ! The only difference I see is that you’re running mokuro on a zipped folder (your image folder is zipped at first), and mine isn’t.

Try running it on the unzipped image folder, maybe ?

2 Likes

great timing! thanks again for your valuable help!
Will be proceeding with your advice now

2 Likes

Pardon me, do you mind quickly confirming the img folder structure please:
Are there any subdirectories?
PLUTO 1/img.jpg?
PLUTO 1/subdirectory/img.jpg?

1 Like

No. The folder (here) is named PLUTO 1, and inside there are only the images, numbered 00001.jpeg to 00213.jpeg.

When converting from a kindle file, you need to simplify the folder structure

2 Likes

Followed all instructions to the letter! and nothing!
So there’s something wrong with my images! and not the process itself!

This might the issue! Will look into the image issue and keep you up to date!
Thanks again for all your help!

run the mokuro command

mokuro /Users/MyUSers/mokuro-reader/TheBlackMagicOfLamia001

commands successfully runs and processes the img folder

Found 1 volumes:

/Users/MyUSers/mokuro-reader/TheBlackMagicOfLamia001 (unprocessed)

Each of the paths above will be treated as one volume.

2024-07-29 01:04:47.196 | INFO     | mokuro.run:run:133 - Processing 1/1: /Users/MyUSers/mokuro-reader/TheBlackMagicOfLamia001
Processing pages...:   0%|                                                                                                                                                                                                                                                                           | 0/84 [00:00<?, ?it/s]2024-07-29 01:04:47.226 | INFO     | mokuro.manga_page_ocr:__init__:41 - Initializing text detector, using device cpu
2024-07-29 01:04:47.667 | INFO     | manga_ocr.ocr:__init__:15 - Loading OCR model from kha-white/manga-ocr-base
2024-07-29 01:04:52.910 | INFO     | manga_ocr.ocr:__init__:28 - Using MPS
2024-07-29 01:04:58.275 | INFO     | manga_ocr.ocr:__init__:38 - OCR ready

Processing pages...: 100%|

2024-07-29 01:14:44.115 | INFO     | mokuro.run:run:146 - Processed successfully: 1/1

zip all 3 items: .mokuro + html + manga folder with png images

image folder structure:

TheBlackMagicOfLamia001/IMG_0519.PNG

Screenshot 2024-07-29 at 1.27.04

don’t know why I keep getting a generic naming after zipping file!!

Screenshot 2024-07-29 at 1.31.46




1 Like