This tutorial will guide you through tracking your first terms.
By the end, you’ll have tracked a service’s privacy policy. You will also have a basic understanding of how to run the engine to track terms.
Create a new directory:
mkdir ota-tutorial-declarations
cd ota-tutorial-declarations
Create a declarations
directory inside the project. This is where you will declare the service and terms you want to track:
mkdir declarations
For this tutorial, we will use the Privacy Policy of Open Terms Archive as an example.
Create a file declarations/Open Terms Archive.json
. The name of the file is the name of the service that will be tracked. The first thing to declare is the tracked service name:json { "name": "Open Terms Archive" }
Now, you can add terms you want to track to the declaration. For this example, we will use the Privacy Policy.
You can go on the Open Terms Archive website and copy the URL of its Privacy Policy to fill the fetch
field.
And you can inspect the HTML of the page to get the selector of the content you want to extract to fill the select
field.
The resulting declaration should look something like this:json { "name": "Open Terms Archive", "documents": { "Privacy Policy": { "fetch": "https://opentermsarchive.org/en/privacy-policy", "select": ".textcontent" } } }
Install the Open Terms Archive engine:
npm install --save @opentermsarchive/engine
Start a one time tracking of the declared terms:
npx ota track
Verify the results:
./data/versions/Open Terms Archive/Privacy Policy.md
../data/snapshots/Open Terms Archive/Privacy Policy.html
.Congratulations! You have tracked your first terms.