Giter VIP home page Giter VIP logo

feed-creator's Introduction

Feed Creator

Leverage GitHub Actions to effortlessly generate and update ATOM feeds from webpages.

This process is scheduled to run daily at 4 AM, 10 AM, and 4 PM.

Configuration

  1. Fork this repo.
  2. In Settings Pages select Github Actions as a Build and deployment source.
  3. Generate a config.json based on config.schema.json
  4. Create the following secrets and variable in Settings Secrets and variables Actions, or by using the GitHub CLI :
    name type description
    PASSWORD secret A password to access your feeds located in a secret folder
    CONFIG secret Your config.json encoded in base 64. cat config.json | base64 | gh secret set CONFIG
    BASE_URL variable The deployment URL used by Github Pages (ex: https://guillemcanal.github.io/feed-creator), it's used to generate an OPML file with your feed subscriptions.
  5. Run Actions / Generate and Deploy Atom feeds to Pages.

Config example

{
    // List of content extraction providers
    "providers": [
        {
            // Regex matching a feed URL
            "match": "^https://example.com",
            // Used to generate the title of the feed
            "feedTitle": {
                "selector": "h1"
            },
            // Used to retrieve items for the feed
            "items": {
                "selector": ".feed-items",
            },
            // Used to generate the title of an item
            "title": {
                "selector": ".item-title"
            },
            // Used to generate the URL of an item
            "link": {
                "selector": ".item-link",
                "attr": "href"
            },
            // Used to generate the published and updated attributes of an item
            "date": {
                "selector": "time",
                // Use a date format to create a datetime object (optional)
                "dateFormat": "M d,Y H:i"
            },
            // Used to generate the description of an item (optional)
            "description": {
                "selector": "a.magnet-link",
                "attr": "href",
                // Decorate the extracted text (optional)
                "template": "<a href=\"%s\">download</a>"
            }
        }
    ],
    // List of URLs used to generate Atom feeds
    "urls": [
        "https://example.com/news",
        "https://example.com/articles"
    ]
}

...

feed-creator's People

Contributors

guillemcanal avatar

Stargazers

Younes Diouri avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.