Skip to content

Feature for adding extra templated output to the diff #38

Description

@simonw

For this project: https://github.com/simonw/scrape-hacker-news-by-domain

I want to include latest links in the human readable output that link to https://news.ycombinator.com/latest?id=41459472 for each item.

I'm going to try using Python format strings like this:

csv-diff --format json simon-previous.json simon.json --key id --extra latest 'https://news.ycombinator.com/latest?id={id}'

Activity

  1. simonw commented on Sep 6, 2024

    @simonw
    OwnerAuthor

    Got that working:

    3 rows changed
    
      id: 41459472
        points: "24" => "25"
        numComments: "5" => "6"
      extras:
        latest: https://news.ycombinator.com/latest?id=41459472
    
      id: 41434857
        points: "1" => "2"
      extras:
        latest: https://news.ycombinator.com/latest?id=41434857
    
      id: 41427834
        points: "2" => "3"
      extras:
        latest: https://news.ycombinator.com/latest?id=41427834
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions