sitediff icon indicating copy to clipboard operation
sitediff copied to clipboard

Where should the output be?

Open jontelm opened this issue 4 years ago • 7 comments

---
before:
  url: https://www.a.com
  regions:
    - name: title
      selector: h1.title
  output:
    - title
after:
  url: https://beta.b.com
  regions:
    - name: title
      selector: h1.title
  output:
    - title
settings: {}

The diff is the fully html page and not only the h1.title as I trying to make it.

Where should output be set?

jontelm avatar Jul 22 '20 14:07 jontelm

The output key should be at the root level. Just remove the indent from what you have there. Let me know how it works out for you... this is a new feature and it will be great to get some feedback. Thanks!

cleaver avatar Jul 22 '20 14:07 cleaver

Hi @jontelm the output should be a section in top level, after "settings"

gardon avatar Jul 22 '20 14:07 gardon

Like this?

---
before:
  url: https://www.a.com
  regions:
    - name: title
      selector: h1.title
after:
  url: https://beta.a.com
  regions:
    - name: title
      selector: h1.title
settings: {}
output:
  - title

result:

Invalid configuration: Unknown configuration key (.../sitediff.yaml): 'output'

jontelm avatar Jul 23 '20 07:07 jontelm

---
before:
  url: https://www.a.com
  regions:
    - name: title
      selector: h1.title
after:
  url: https://beta.a.com
  regions:
    - name: title
      selector: h1.title
output:
  - title
settings: {}

Same problem

Btw using version sitediff-1.0.0

jontelm avatar Jul 23 '20 07:07 jontelm

For the moment you'll need to use master branch. We'll have a 1.1.0 release out soon with this and a few other features.

cleaver avatar Jul 23 '20 13:07 cleaver

Ok, now it works but this don't seems to be working? selector: 'h1.title' don't work but 'h1'

Possible to access meta and title tags?

<head>
  <title>HTML Elements Reference</title>
  <meta name="description" content="Free Web tutorials">
</head>

jontelm avatar Jul 23 '20 14:07 jontelm

Once you use a named region, you'll only get the named regions for the diff. In order to get the h1.title and head elements, you'll need to use two named regions.

kirk-brown-ew avatar Jul 11 '22 21:07 kirk-brown-ew

It is possible to look at the meta and title tags.

kirk-brown-ew avatar Dec 20 '22 02:12 kirk-brown-ew