This tutorial will guide you through creating your first Open Terms Archive collection.
By the end, you’ll have a working collection that tracks changes to a service’s privacy policy. You will also have a basic understanding of how to create a collection.
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
Create the configuration file for the collection:
mkdir config
declarations/Open Terms Archive.json
with the following content. For detailed instructions on how to structure it, follow the Tracking terms tutorial:{
"name": "Open Terms Archive",
"documents": {
"Privacy Policy": {
"fetch": "https://opentermsarchive.org/en/privacy-policy",
"select": ".textcontent"
}
}
}
metadata.yaml
:id: ota-tutorial
name: Tutorial collection
tagline: Learn how to create a collection
description: |
A step-by-step tutorial collection that guides through creating an Open Terms Archive collection.
Track terms and conditions from websites while learning the basics of declarations, configuration, and metadata.
languages: [en]
jurisdictions: [EU]
config/development.json
and set the tracking schedule to every minute:{
"trackingSchedule": "* * * * *"
}
Install the Open Terms Archive engine:
npm install --save @opentermsarchive/engine
Start the scheduled tracking of the declared terms:
npx ota track --schedule
After one minute, check the results:
./data/versions/Open Terms Archive/Privacy Policy.md
../data/snapshots/Open Terms Archive/Privacy Policy.html
.Congratulations! You have created your first collection.