feat: multi-platform support for fav.py and new categories#37
Merged
feat: multi-platform support for fav.py and new categories#37
Conversation
- Add YouTube, SoundCloud, and generic URL support to fav.py with og:title/og:image scraping and PIL square-cropping for music categories - Extract platform icon detection into reusable platform-icon.liquid include - Refactor album_link icon in fav.liquid to use new include - Hide score circle in song/album layouts when no score is set - Add redirect field to all category templates - Sanitize special characters from titles, filenames, and creator names - Include exact timestamp in date field for proper sort ordering
…scraping, and data-driven category config Refactor fav.py into a data-driven category system (CATEGORY_FIELDS, SQUARE_CROP_CATEGORIES, etc.) for easy addition of new categories. Add support for episodes (IMDB TV episode scraping with parent show image/link, season/episode numbers, director), books (Goodreads JSON-LD), articles, videos, and podcasts (og: meta scraping). Add show/show_link display to fav.liquid with IMDB icon, season/episode metadata, publication display, and episodes icon to category-icon.liquid.
53c129b to
1c745a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fav.pyinto a data-driven category system for easy addition of new categoriesplatform-icon.liquidinclude for platform detectionfav.pyDocumentationUsage
Supported Categories
albumssongsplaylistsartistsmoviesshowsepisodesbooksarticlespodcastsvideosField Overrides
Override any auto-scraped or template field by appending
key=valueargs:Adding a New Category
CATEGORY_FIELDSdict with the frontmatter fields for that categorySPOTIFY_CATEGORIES,IMDB_CATEGORIES,GOODREADS_CATEGORIES,OG_SCRAPE_CATEGORIES) or add a newelifblockSQUARE_CROP_CATEGORIESif images should be square-croppedPERFECT_THRESHOLDSwith(field_name, threshold)for auto-perfect detection_includes/scripts/category-icon.liquidConfiguration Constants
CATEGORY_FIELDS— Maps each category to its extra frontmatter fieldsSQUARE_CROP_CATEGORIES— Categories with square-cropped images (music)SPOTIFY_CATEGORIES— Categories using the Spotify APIIMDB_CATEGORIES— Categories scraped from IMDB (movies, shows, episodes)GOODREADS_CATEGORIES— Categories scraped from Goodreads (books)OG_SCRAPE_CATEGORIES— Categories using generic og: meta tag scrapingPERFECT_THRESHOLDS— Auto-setperfect: truewhen score/stars meet thresholdExamples
Test plan