How to get Diff between two Docupedia Page Versions based on Threshold#
Introduction#
As an extension to getting a diff between two page versions, the Fetcher can be configured to get a page version relative to a certain date threshold.
For example, you want to verify that a page was modified after a certain date. You
could now configure the fetcher to compare the latest page version (offset 0
) with
the latest one before a certain date threshold (still offset 0
but with an extra
date threshold set).
Adjust the qg-config.yml file#
Take the config file from How to get Diff between two Docupedia Page Versions.
Insert line 15 (see below) with the
DOCUPEDIA_PAGE_DIFF_DATE_THRESHOLD
. If bothDOCUPEDIA_PAGE_DIFF_DATE_THRESHOLD
andDOCUPEDIA_PAGE_DIFF_VERSIONS
are set, the Fetcher will produce the diff between latest Docupedia page version and the previous one before the setDOCUPEDIA_PAGE_DIFF_DATE_THRESHOLD
value. In the case below, it will be the most recent page version just before end of January 2023.
6autopilots:
7 docupedia-autopilot:
8 run: |
9 docupedia-fetcher
10 filecheck exists "${{ env.OUTPUT_NAME }}.html"
11 env:
12 DOCUPEDIA_PAGE_ID: ${{ env.DOCUPEDIA_PAGE_ID }}
13 DOCUPEDIA_PAT: ${{ secrets.DOCUPEDIA_PAT }}
14 DOCUPEDIA_URL: ${{ env.DOCUPEDIA_URL }}
15 DOCUPEDIA_PAGE_DIFF_DATE_THRESHOLD: "2023-01-31T23:59:59.999Z"
16 DOCUPEDIA_PAGE_DIFF_VERSIONS: 0,0
17 OUTPUT_NAME: docupedia_content
Upload and run the config#
You can now upload the config to the Yaku service and run it. You should then find the downloaded diff information in the evidence zip file.