m-haisham / novelsave

This is a tool to download and convert novels from popular sites to e-books.
Apache License 2.0
36 stars 7 forks source link

Website Request: https://chrysanthemumgarden.com/ #22

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi. 🤗 Is it possible to add this https://chrysanthemumgarden.com/ site?

m-haisham commented 3 years ago

I'll see to it as soon as i can... shouldnt take longer that a day

ghost commented 3 years ago

Thank you so much. ❤

ghost commented 3 years ago

I also would like to bring to your attention that https://chrysanthemumgarden.com/ has a protection in the form of a jumble code that makes some paragraphs gibberish in all the chapters.

m-haisham commented 3 years ago

Noted

m-haisham commented 3 years ago

The website uses a jumbled type face.

@font-face{
    font-family: opensans-jumbld;
    src: url(fonts/OpenSans-Jumbld2.woff2) format('woff2'), url(fonts/OpenSans-Jumbld2.woff) format('woff'), url(fonts/OpenSans-Jumbld2.ttf) format('truetype');
    font-weight: 400;
    font-style: normal
}

.jum {
    font-family: opensans-jumbld!important;
}

They dont offer an .otf font file, which is the only type that supports epub

I could come with a workaround by creating a map.. but that is gonna take some time to fully map

ghost commented 3 years ago

It's fine, take your time and thank you so much for the efforts..

m-haisham commented 3 years ago

Progress

I have put it on hold as I need to manually write down the correct version and I found it a very time consuming process.

The font-face only seems to map ascii letters with lowercase and uppercase mapping to different chars. That means 26*2=52 to characters map.

my progress so far is

mapped: 31, not mapped: 21
need to be mapped: ['j', 'q', 'A', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'Y']
jumbled not used: ['d', 'p', 'A', 'B', 'C', 'E', 'F', 'G', 'H', 'K', 'L', 'M', 'N', 'O', 'Q', 'S', 'T', 'U', 'V', 'X', 'Y']

Together with this and some more observation it can be confirmed that, lowercase maps to lowercase and uppercase maps only to uppercase.

Data

~If you'd like to help with the mapping you can upload the data as such~

Pc tlr fjg lr atf rbecv bo atf yjrxfayjii gtsatwlmjiis ybecmlcu bc atf ugbecv. Rlf Jtejc fztjifr, tlr ujhf qjrrlcu ecvfg Zjgx’r jgwr, tf ibmxfv atf qbrlalbcr bo atf batfg akb bqqbcfcar jr kfii jr Itbe Dlc jcv Zjb Wljc.

In his ear is the sound of the basketball rhythmically bouncing on the ground. Nie Chuan exhales, his gaze passing under Mark’s arms, he locked the positions of the other two opponents as well as Zhou Bin and Mao Xian.

~Where, the first line is jumbled and the second the mapped translation. Again I would like to emphasize proper capitalization is extremely important~

Edit: look at comment below

m-haisham commented 3 years ago

I'll be getting the font maps from the font files... but there seems to be more than one font-face

m-haisham commented 3 years ago

Pushed a commit c71a7ead935e8c2cd7497d639c60e906e71d141c

Install latest via

pip install git+https://github.com/mHaisham/novelsave.git

then you should be able to download from https://chrysanthemumgarden.com.

if you encounter any edge cases or errors, please create a new issue.