Here is my script based on RogueKitsune's work on previous page
What does it do:
Produces Anilist compatible xml export out of user's Mangadex Library.
Doesn't likely work in MyAnimeList (haven't tested).
Only list of mangas and read status are transferred. Thus score, read volumes, read...