Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Fanfic-fr.net #670

Open
Nicbobbo6 opened this issue Mar 12, 2021 · 2 comments
Open

Add support for Fanfic-fr.net #670

Nicbobbo6 opened this issue Mar 12, 2021 · 2 comments

Comments

@Nicbobbo6
Copy link

The main URL of stories are like this one: https://www.fanfic-fr.net/fanfics/Animes-Mangas/N/Naruto/The-Almighty-/68755.html
On this page there is a list of all chapters and a link to a printable version of these chapters. For exemple, a chapter link and his printable link :
https://www.fanfic-fr.net/fanfics/Animes-Mangas/N/Naruto/The-Almighty-/68755/318292.html
https://www.fanfic-fr.net/fanfics/imprimer/Animes-Mangas/N/Naruto/The-Almighty-/68755/318292.html

I'm a .Net dev, so i thinks i can help with the job but i need some tips to know how to start.
Thanks you for you're help and you're time.

@JimmXinu
Copy link
Owner

That's a pretty good candidate site for FFF. It's fanfiction and appears to have a consistent author - story - chapter structure.

I'll assume you know how to get a fork and working directory created--there are many git/github tutorials.

The code for each supported site in FFF is in an 'adapter' file in fanficfare/adapters. Each needs to be imported into fanficfare/adapters/__init__.py. For a new site, create a new adapter file and add the import. There are also two copies of the default setting (fanficfare/defaults.ini & calibre-plugin/plugin-defaults.ini) that usually need a section added.

For testing and development, I find it easiest to work with the CLI in the code dir by setting PYTHONPATH=. (how depends on OS) and calling FFF directly with a script/batch file containing python fanficfare\cli.py --save-cache -d <url>.

Putting use_basic_cache:true in your personal.ini under the new site name and using --save-cache will save and re-use downloaded pages--saves a lot of site hits when testing metadata parsing. Delete the global_* files to clear the cache and use usecache=False in the code when you need to force new fetches; such as when you need to log in.

Also, FFF still needs to be compatible with Python2.7 and Python3 for older versions of Calibre.

adapter_efpfanficnet.py is an example of an existing, non-English site adapter.

@HazelSh
Copy link

HazelSh commented Mar 20, 2021

For testing and development, I find it easiest to work with the CLI in the code dir by setting

I just installed with setup.py in develop mode. Means it runs as a command, anywhere, but it's always executing my local up-to-date version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants