Skip to content

5ouma/opml-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OPML Generator

πŸ“° Generate OPML file via TOML file easily

GitHub Release JSR JSR Score
GitHub code size in bytes GitHub repo size GitHub last commit GitHub commit activity
CI Release pre-commit.ci status codecov



πŸ“Š Usage

OPML Generator has 2 ways to convert TOML to OPML.

πŸ’» On Local

  1. Prepare your TOML file (Reference: feeds.toml)

  2. Run this command

    deno run -A jsr:@5ouma/opml-generator
    
  3. Outputs are stored in the outputs directory separated by lists


πŸ™ On GitHub Actions

  1. Create two GitHub Gist:

  2. Prepare your repository to run

  3. Add Actions secrets from Settings > Secrets and variables | Actions in the sidebar

    🌍 Environment Variables

  4. Add this workflow file to .github/workflows:

    name: ⬆️ Update OPML in Gist
    
    on:
      schedule: [cron: 0 0 * * *]
      workflow_dispatch:
    
    jobs:
      Update:
        runs-on: Ubuntu-Latest
    
        steps:
          - name: πŸ¦• Setup Deno
            uses: denoland/setup-deno@v1
            with:
              deno-version: v1.x
    
          - name: ⬇️ Download the TOML and OPML repository
            run: |
              git clone "https://gist.github.com/${{ secrets.TOML_GIST_ID }}.git" feeds
              git clone "https://gist.github.com/${{ secrets.OPML_GIST_ID }}.git" outputs
    
          - name: 🧰 Generate OPML file
            run: deno run -A jsr:@5ouma/opml-generator --feeds=./feeds/feeds.toml --outputs=./outputs
    
          - name: ⬆️ Upload OPML file
            env:
              GH_TOKEN: ${{ secrets.TOKEN }}
            run: |
              git -C 'outputs' add -AN
              while read -r file; do
                gh gist edit ${{ secrets.OPML_GIST_ID }} "./outputs/$file" -a "./outputs/$file"
              done < <(git -C 'outputs' diff --name-only HEAD)

πŸŽ‰ Automatically update every 0 a.m. UTC



🌍 Environment Variables

Name Description GitHub Actions requires
TOML_GIST_ID Gist ID for feeds.toml yes
OPML_GIST_ID Gist ID for outputs yes
TOKEN Personal Access Token yes
NITTER_DOMAIN Nitter RSS domain no



πŸ—žοΈ Subscribe OPML

For Inoreader, please see the official blog, OPML subscriptions.
For other RSS readers, please see each help page.



πŸ†˜ Help



🎽 Contributing

I happily welcome your contributions! Before you contribute, I would recommend reading CONTRIBUTING.md for a better development experience.