Skip to content

This is a Python script to apply a custom XSLT stylesheet to a MyAnimeList XML ex[prt, generating a HTML file with styled MyAnimeList data.

License

Notifications You must be signed in to change notification settings

mjsandagi/styling-myanimelist-exports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyAnimeList XML Styling

This is a program that applies an XSLT stylesheet (based on the MyAnimeList UI) to an XML file exported from MyAnimeList.net to generate an HTML file with customized styling. The provided XSLT stylesheet will format the anime list data and apply specific CSS styles to the HTML output.

Usage

  1. Export your MyAnimeList from MyAnimeList.net as an XML file. Save it as myanimelist.xml in the same directory as the Python script. If myanimelist.xml already exists, or for some reason you want to use a different file name, you can change the file name in the Python script.

  2. Run the Python script main.py:

    python main.py

The script will read the myanimelist.xml and myanimelist.xslt files, apply the XSLT transformation, insert app.js for styling, and save the result as styled_myanimelist.html in the same directory.

Open styled_myanimelist.html in your web browser to view your styled anime list.

Colouring Feature

This program has been enhanced with a colouring feature that helps you visually distinguish different anime entry statuses as follows:

Watching Tile Completed Tile On Hold Tile Dropped Tile Plan to Watch Tile

How it Works

The Python script uses the lxml.etree library to parse the XML and XSLT files. It applies the XSLT transformation to the XML data, resulting in an HTML output with the specified styling from the XSLT stylesheet.

The XSLT stylesheet (myanimelist.xslt) includes a modern, minimalistic MyAnimeList-based theme. It formats the user information and each anime entry using specific HTML elements and CSS classes. The CSS styles are defined within the XSLT stylesheet to apply the desired appearance to the HTML output.

Note: Make sure you have the 'lxml' library installed before running the Python script. If you don't have it installed, you can install it using pip:

pip install lxml

The app.js file then styles and manipulates the anime list entries based on their status. It applies different background colours to the anime entries based on their status and sorts the entries in the form {all watching, all completed, all on-hold, all dropped, and finally all that you plan to watch}.

Enjoy styling and organizing your anime list!

License

Copyright (C) 2023 mjsandagi https://github.com/mjsandagi/

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

About

This is a Python script to apply a custom XSLT stylesheet to a MyAnimeList XML ex[prt, generating a HTML file with styled MyAnimeList data.

Topics

Resources

License

Stars

Watchers

Forks