You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/terms/tutorial/track.md
+17-9Lines changed: 17 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,20 +36,29 @@ By the end, you'll have tracked a service's privacy policy. You will also have a
36
36
37
37
For this tutorial, we will use the Privacy Policy of Open Terms Archive as an example.
38
38
39
-
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:
39
+
1. 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:
40
+
40
41
```json
41
42
{
42
43
"name": "Open Terms Archive"
43
44
}
44
45
```
45
46
46
-
Now, you can add terms you want to track to the declaration. For this example, we will use the Privacy Policy.
47
+
2. Find the URL of Open Terms Archive Privacy Policy by browsing [the website](https://opentermsarchive.org), copy the URL and fill the `fetch` field with.
47
48
48
-
You can go on the Open Terms Archive [website](https://opentermsarchive.org/) and copy the URL of its [Privacy Policy](https://opentermsarchive.org/en/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.
60
+
3. [Use a DOM inspector](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/Debugging_HTML#using_a_dom_inspector) on the Open Terms Archive [Privacy Policy page](https://opentermsarchive.org/en/privacy-policy) to get the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) of the content you want to extract. Add it to the `select` field. The final declaration should look like this:
51
61
52
-
The resulting declaration should look something like this:
53
62
```json
54
63
{
55
64
"name": "Open Terms Archive",
@@ -74,8 +83,7 @@ The resulting declaration should look something like this:
74
83
npx ota track
75
84
```
76
85
77
-
3. Verify the results:
78
-
- Check the extracted version, which should contain the Privacy Policy of Open Terms Archive in Markdown format without any other content (no header, footer…): `./data/versions/Open Terms Archive/Privacy Policy.md`.
79
-
- Check the snapshot, which is the original HTML document of the Open Terms Archive Privacy Policy: `./data/snapshots/Open Terms Archive/Privacy Policy.html`.
86
+
3. Verify the results by checking the extracted version in`./data/versions/Open Terms Archive/Privacy Policy.md` file, which should contain only the meaningful content of the Privacy Policy in Markdown format.
87
+
88
+
Congratulations! You have tracked your first terms locally.
80
89
81
-
Congratulations! You have tracked your first terms.
0 commit comments