News:

Although Kureha One is an international community, posts should be made in English. JP/CN/KR is only tolerated for topics where the original media was in JP/CN/KR.
Posting in other languages will result in account termination with extreme prejudice without notice.

Main Menu

[WN][PDF] Lazy Life: Is This Aristocracy? The Story Takes a Different Turn

Started by Jokasan, February 26, 2025, 09:00:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jokasan

NU Link : https://www.novelupdates.com/series/lazy-life-is-this-aristocracy-the-story-takes-a-different-turn-so-i-desperately-forge-ahead-with-magic/

NU description :
I am Suzuki Hajime, who accidentally died at a party due to the gods getting drunk. As an apology, I was reincarnated into another world.
Excited at the prospect, I became a noble. However, to my dismay, it turned out that my father was a commoner who rose to nobility, resulting in me being despised. The territory I was given turned out to be nothing but a vast wasteland.
Born as the second son of a noble family, I spend my days lazily using magic for land development. My goal? To achieve passive income by the time I reach adulthood.

Note : Mc is very obsessed with the concept of "Laziness"

Jokasan

#1
This 6(more coming in the future) PDF files are taken from the website "story seedling".
It involves me copying the chapter content from the website one by one, and since the copied content appears in Chinese characters, I executed some VBA code in word to make it readable.
I've also added Chapter headers. Each PDF contains 50 chapters. Since WebToEpub cannot support Storyseedling anymore because the extracted content is blank, I have taken stuff into my own hands to create 3 more pdfs.
The first 3 are created by WebToEpub, and the last few are created by yours truly.
Don't expect professionalism. I created this for my own sake after all, and just wanted to share for fun.

https://mega.nz/folder/VtNWCJzY#ukotRnrzclM1FpDCu8dDXQ

Mega folder link

If the mega link expire, comment below and I will fix.


Sharing is caring

Thank you very much for your work!
If you would be so kind, would you share your "VBA code on word execution method"?

Last time I made a text file from story seedling I had to run an application to screenshot each chapter into an image and then run an OCR to copy-paste them together.
If there is a better method I'd be happy to share what I make!

Jokasan

#4
Sub ReplaceChineseWithAlphabets()
    Dim dict As Object
    Set dict = CreateObject("Scripting.Dictionary")

    ' Mapping Unicode Chinese characters to alphabets (Corrected)
    SafeAddKey dict, ChrW(&H2F5B), "a"
    SafeAddKey dict, ChrW(&H2F52), "A"
    SafeAddKey dict, ChrW(&H2F5D), "b"
    SafeAddKey dict, ChrW(&H2F53), "B"
    SafeAddKey dict, ChrW(&H2F5E), "c"
    SafeAddKey dict, ChrW(&H2F44), "C"
    SafeAddKey dict, ChrW(&H2F5F), "d"
    SafeAddKey dict, ChrW(&H2F45), "D"
    SafeAddKey dict, ChrW(&H2F60), "e"
    SafeAddKey dict, ChrW(&H2F46), "E"
    SafeAddKey dict, ChrW(&H2F61), "f"
    SafeAddKey dict, ChrW(&H2F47), "F"
    SafeAddKey dict, ChrW(&H2F62), "g"
    SafeAddKey dict, ChrW(&H2F48), "G"
    SafeAddKey dict, ChrW(&H2F63), "h"
    SafeAddKey dict, ChrW(&H2F49), "H"
    SafeAddKey dict, ChrW(&H2F64), "i"
    SafeAddKey dict, ChrW(&H2F4A), "I"
    SafeAddKey dict, ChrW(&H2F65), "j"
    SafeAddKey dict, ChrW(&H2F4B), "J"
    SafeAddKey dict, ChrW(&H2F66), "k"
    SafeAddKey dict, ChrW(&H2F4C), "K"
    SafeAddKey dict, ChrW(&H2F67), "l"
    SafeAddKey dict, ChrW(&H2F4D), "L"
    SafeAddKey dict, ChrW(&H2F68), "m"
    SafeAddKey dict, ChrW(&H2F4E), "M"
    SafeAddKey dict, ChrW(&H2F69), "n"
    SafeAddKey dict, ChrW(&H2F4F), "N"
    SafeAddKey dict, ChrW(&H2F6A), "o"
    SafeAddKey dict, ChrW(&H2F50), "O"
    SafeAddKey dict, ChrW(&H2F6B), "p"
    SafeAddKey dict, ChrW(&H2F51), "P"
    SafeAddKey dict, ChrW(&H2F6C), "q"
    SafeAddKey dict, ChrW(&H2F52), "Q"
    SafeAddKey dict, ChrW(&H2F6D), "r"
    SafeAddKey dict, ChrW(&H2F53), "R"
    SafeAddKey dict, ChrW(&H2F6E), "s"
    SafeAddKey dict, ChrW(&H2F54), "S"
    SafeAddKey dict, ChrW(&H2F6F), "t"
    SafeAddKey dict, ChrW(&H2F55), "T"
    SafeAddKey dict, ChrW(&H2F70), "u"
    SafeAddKey dict, ChrW(&H2F56), "U"
    SafeAddKey dict, ChrW(&H2F71), "v"
    SafeAddKey dict, ChrW(&H2F57), "V"
    SafeAddKey dict, ChrW(&H2F72), "w"
    SafeAddKey dict, ChrW(&H2F58), "W"
    SafeAddKey dict, ChrW(&H2F73), "x"
    SafeAddKey dict, ChrW(&H2F59), "X"
    SafeAddKey dict, ChrW(&H2F74), "y"
    SafeAddKey dict, ChrW(&H2F5A), "Y"
    SafeAddKey dict, ChrW(&H2F75), "z"
    SafeAddKey dict, ChrW(&H2F5C), "Z"

    ' Get text from Word document
    Dim text As String
    text = ActiveDocument.Range.text

    ' Step 1: Remove all numbers and English letters (A-Z, a-z, 0-9)
    Dim i As Integer
    Dim newText As String
    newText = ""

    For i = 1 To Len(text)
        Dim ch As String
        ch = Mid(text, i, 1)
       
        ' Check if character is NOT a letter or number
        If Not ch Like "[A-Za-z0-9]" Then
            newText = newText & ch
        End If
    Next i

    ' Step 2: Replace Chinese characters with their mapped values
    Dim key As Variant
    For Each key In dict.Keys
        newText = Replace(newText, key, dict(key))
    Next key

    ' Output modified text back to document
    ActiveDocument.Range.text = newText
End Sub

' Function to safely add keys to dictionary without duplicates
Sub SafeAddKey(d As Object, key As String, value As String)
    If Not d.Exists(key) Then
        d.Add key, value
    End If
End Sub

This code removes all alphabets and numbers, and converts the remaining chinese char into alphabets.

Jokasan

The above code isn't perfect. Step 2 is to
Find and Replace, case sensitive,
1) All B becomes R
2) All "Z" becomes a
3) All "⽂" becomes A
4) All "⽃" becomes B
5) Find and Replace "This content is owned by Story Seedling. If you are reading this on a site other than storyseedling.com, please report it to us."

If you need the chapter heading vba code too, you can tell me.