Skip to content

Commit 00c6702

Browse files
committed
Comments from ahalle and tmathern
1 parent 561ac54 commit 00c6702

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

docs/tasks/includes/_python-get-resources.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ _NOTE: Need to add example of using `reader.resource_to_stream()`._
77

88
```py
99
try:
10-
# Create a reader from a file path
10+
# Create a reader from a file path.
1111
reader = c2pa.Reader.from_file("path/to/media_file.jpg")
1212

1313
# Get the active manifest.
1414
manifest = reader.get_active_manifest()
1515
if manifest != None:
1616

17-
# get the uri to the manifest's thumbnail and write it to a file
17+
# get the uri to the manifest's thumbnail and write it to a file.
1818
uri = manifest["thumbnail"]["identifier"]
1919
reader.resource_to_file(uri, "thumbnail_v2.jpg")
2020

docs/tasks/includes/_python-read.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ An asset file may contain many manifests in a manifest store. The most recent ma
77

88
```py
99
try:
10-
# Create a reader from a file path
10+
# Create a reader from a file path.
1111
reader = c2pa.Reader.from_file("path/to/media_file.jpg")
1212

13-
# Alternatively, create a reader from a stream
13+
# Alternatively, create a reader from a stream.
1414
stream = open("path/to/media_file.jpg", "rb")
1515
reader = c2pa.Reader("image/jpeg", stream)
1616

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
This is how to set up your code to use the Python library.
22

33
```python
4-
# Import the C2PA Python package
4+
# Import the C2PA Python package.
55
from c2pa import *
66

7-
# Import standard general-purpose packages
7+
# Import standard general-purpose packages.
88
import os
99
import io
1010
import logging
1111
import json
1212
import base64
1313

14-
# Import web packages used in example implementation
14+
# Import web packages used in example implementation.
1515
from flask import Flask, request, abort
1616
from flask_cors import CORS
1717
from waitress import serve
1818

19-
# Import AWS SDK package (to use KMS)
19+
# Import AWS SDK package (to use KMS).
2020
import boto3
2121
```

docs/tasks/includes/_rust-read.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Use [`from_stream`](https://docs.rs/c2pa/latest/c2pa/struct.Reader.html#method.f
1818

1919
```rust
2020
use std::io::Cursor;
21-
2221
use c2pa::Reader;
22+
2323
let mut stream = Cursor::new(include_bytes!("../tests/fixtures/CA.jpg"));
2424
let reader = Reader::from_stream("image/jpeg", stream).unwrap();
2525
println!("{}", reader.json());

docs/tasks/includes/_rust-setup.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
This is how to setup your code to use the Rust library.
22

3+
:::tip
4+
The files used in this example are in the C2PA Rust library [`sdk/tests/fixtures`](https://github.com/contentauth/c2pa-rs/tree/main/sdk/tests/fixtures) directory.
5+
:::
6+
37
```rust
48
use std::{
59
io::{Cursor, Write},
@@ -8,7 +12,6 @@ use std::{
812

913
use anyhow::Result;
1014
use c2pa::{settings::load_settings_from_str, Builder, CallbackSigner, Reader};
11-
1215
use c2pa_crypto::raw_signature::SigningAlg;
1316
use serde_json::json;
1417

0 commit comments

Comments
 (0)