flamebyrd: (Default)
[personal profile] flamebyrd
So where am I up to with this? What I have right now you can give a folder of AO3-generated HTML files and it will output a list of works, including their tags, and format the works according to a custom template.

It works pretty well... as long as you have used all the metadata fields AO3 supports.

If, for example, your work doesn't have a category, or a relationship, or isn't in a series, it outputs ugly templating placeholders. This is because I based it on makesite.py, which has a very basic templating system.

There are multiple ways I could get around this, such as:
a) Add a(nother) field to the configuration to allow us to define the format, label and wrapper for every metadata field. Achieves the aim in a flexible way but is fiddly and requires more documentation.
b) Replace the individual metadata fields with one big metadata block that are all formatted the same way. Not flexible if you want to display work metadata in a Non-AO3 way.
c) Just give in and implement Jinja2 templating, which allows the use of if/else/then structures in the templates, among many other features. Will still require some documentation but at least it's a useful skill for people who are new to it (as opposed to learning something unique to this system). I've never used it before but I have used the PHP equivalent so hopefully it's transferable.

So I think I'm going to have to go with option c. (The list of changes in my git fork is going to be ridiculous.) This will still be useful if I decide to output Hugo-friendly Markdown in the future.

List of features it currently supports

What goes in: A folder of AO3-generated HTML files

What comes out: A directory of static HTML files, and index pages listing said files, including their metadata.

Features Implemented
- Merge tags: Option to merge fandoms into one, e.g. display all MCU fandoms as one fandom, merge LotR the book and LotR the movie into one fandom
- "Umbrella" fandoms: Group fandoms into one "bucket" but still retain their original fandom labels
- Ignore tags: Option to completely ignore certain tags
- Ignore series: When grouping by series and in work metadata, ignore a particular series - useful e.g. if you have set up a "My MCU works" series
- Media tags: Identify which freeform tags you have that define the medium of the work (fanfiction, fanart, fanvid, etc)
- Metadata grouping: On a works index, group works by a metadata field (e.g. fandom). Currently only works for fandoms.
- Series: Group works by series.

Still to come:
- Chaptered works: Option to split chaptered works into individual chapters
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 15th, 2025 02:42 pm
Powered by Dreamwidth Studios