Skip to content

Commit d3446ba

Browse files
committed
Edit procedures
1 parent 4c6f061 commit d3446ba

7 files changed

+47
-51
lines changed

articles/ai-services/immersive-reader/how-to-launch-immersive-reader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rwallerms
66
manager: nitinme
77
ms.service: azure-ai-immersive-reader
88
ms.topic: how-to
9-
ms.date: 02/14/2024
9+
ms.date: 02/21/2024
1010
ms.author: rwaller
1111
ms.custom: devx-track-js, devx-track-extended-java, devx-track-python
1212
zone_pivot_groups: immersive-reader-how-to-guides

articles/ai-services/immersive-reader/includes/how-to/how-to-launch-immersive-reader-android.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: rwallerms
33
manager: nitinme
44
ms.service: azure-ai-immersive-reader
55
ms.topic: include
6-
ms.date: 02/14/2024
6+
ms.date: 02/21/2024
77
ms.author: rwaller
88
---
99

@@ -12,14 +12,25 @@ ms.author: rwaller
1212
* An Azure subscription. You can [create one for free](https://azure.microsoft.com/free/ai-services).
1313
* An Immersive Reader resource configured for Microsoft Entra authentication. Follow [these instructions](../../how-to-create-immersive-reader.md) to get set up. Save the output of your session into a text file so you can configure the environment properties.
1414
* [Git](https://git-scm.com).
15-
* [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk).
15+
* Clone the [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk) from GitHub.
1616
* [Android Studio](https://developer.android.com/studio).
1717

1818
## Configure authentication credentials
1919

20-
1. Start Android Studio, and open the project from the *immersive-reader-sdk/js/samples/quickstart-java-android* directory (Java) or the *immersive-reader-sdk/js/samples/quickstart-kotlin* directory (Kotlin).
20+
1. Start Android Studio, and open the Immersive Reader SDK project from the *immersive-reader-sdk/js/samples/quickstart-java-android* directory (Java) or the *immersive-reader-sdk/js/samples/quickstart-kotlin* directory (Kotlin).
2121

22-
1. Create a file named *.env* inside the **/assets** folder. Add the following names and values, and supply values as appropriate. Don't commit this file into source control because it contains secrets that shouldn't be made public.
22+
> [!TIP]
23+
> You might need to let the system update the Gradle plugins to at least version 8.
24+
25+
1. To create a new assets folder, right-click on **app** and select **Folder** -> **Assets Folder** from the dropdown.
26+
27+
:::image type="content" source="../../media/how-tos/android-studio-assets-folder.png" alt-text="Screenshot of the Assets folder option.":::
28+
29+
1. Right-click on **assets** and select **New** -> **File**. Name the file **env**.
30+
31+
:::image type="content" source="../../media/how-tos/android-studio-create-env-file.png" alt-text="Screenshot of name input field to create the env file.":::
32+
33+
1. Add the following names and values, and supply values as appropriate. Don't commit this file into source control because it contains secrets that shouldn't be made public.
2334

2435
```text
2536
TENANT_ID=<YOUR_TENANT_ID>

articles/ai-services/immersive-reader/includes/how-to/how-to-launch-immersive-reader-ios.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: rwallerms
33
manager: nitinme
44
ms.service: azure-ai-immersive-reader
55
ms.topic: include
6-
ms.date: 02/14/2024
6+
ms.date: 02/21/2024
77
ms.author: rwaller
88
---
99

@@ -12,12 +12,12 @@ ms.author: rwaller
1212
* An Azure subscription. You can [create one for free](https://azure.microsoft.com/free/ai-services).
1313
* An Immersive Reader resource configured for Microsoft Entra authentication. Follow [these instructions](../../how-to-create-immersive-reader.md) to get set up. Save the output of your session into a text file so you can configure the environment properties.
1414
* [macOS](https://www.apple.com/macos) and [Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
15-
* [Git](https://git-scm.com/).
16-
* [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk).
15+
* [Git](https://git-scm.com).
16+
* Clone the [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk) from GitHub.
1717

1818
## Configure authentication credentials
1919

20-
1. Open Xcode, and open the *immersive-reader-sdk/js/samples/ios/quickstart-swift* directory or the *immersive-reader-sdk/js/samples/ios/quickstart-swift.xcodeproj* directory.
20+
1. In Xcode, select **Open Existing Project**. Open the file *immersive-reader-sdk/js/samples/ios/quickstart-swift.xcodeproj*.
2121
1. On the top menu, select **Product** > **Scheme** > **Edit Scheme**.
2222
1. In the **Run** view, select the **Arguments** tab.
2323
1. In the **Environment Variables** section, add the following names and values. Supply the values given when you created your Immersive Reader resource.
@@ -33,9 +33,9 @@ Don't commit this change into source control because it contains secrets that sh
3333
3434
## Start the Immersive Reader with sample content
3535
36-
In Xcode, select **Ctrl+R** to run the project.
36+
In Xcode, select a device simulator, then run the project from the controls or enter **Ctrl+R**.
3737
38-
## Next steps
38+
## Next step
3939
4040
> [!div class="nextstepaction"]
4141
> [Explore the Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk)

articles/ai-services/immersive-reader/includes/how-to/how-to-launch-immersive-reader-nodejs.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: rwallerms
33
manager: nitinme
44
ms.service: azure-ai-immersive-reader
55
ms.topic: include
6-
ms.date: 02/14/2024
6+
ms.date: 02/21/2024
77
ms.author: rwaller
88
---
99

@@ -32,22 +32,28 @@ yarn add request
3232
yarn add dotenv
3333
```
3434

35+
Install the axios and qs libraries with the following command:
36+
37+
```bash
38+
npm install axios qs
39+
```
40+
3541
<a name='acquire-an-azure-ad-authentication-token'></a>
3642

37-
## Acquire a Microsoft Entra authentication token
43+
## Set up authentication
3844

3945
Next, write a backend API to retrieve a Microsoft Entra authentication token.
4046

41-
You need some values from the Microsoft Entra auth configuration prerequisite step above for this part. Refer back to the text file you saved of that session.
47+
You need some values from the Microsoft Entra auth configuration prerequisite step for this part. Refer back to the text file you saved from that session.
4248

4349
````text
4450
TenantId => Azure subscription TenantId
45-
ClientId => Azure AD ApplicationId
46-
ClientSecret => Azure AD Application Service Principal password
51+
ClientId => Microsoft Entra ApplicationId
52+
ClientSecret => Microsoft Entra Application Service Principal password
4753
Subdomain => Immersive Reader resource subdomain (resource 'Name' if the resource was created in the Azure portal, or 'CustomSubDomain' option if the resource was created with Azure CLI PowerShell. Check the Azure portal for the subdomain on the Endpoint in the resource Overview page, for example, 'https://[SUBDOMAIN].cognitiveservices.azure.com/')
4854
````
4955

50-
Once you have these values, create a new file called *.env*, and paste the following code into it, supplying your custom property values from above. Do not include quotation marks or the "{" and "}" characters.
56+
Create a new file called *.env* in the root of your project. Paste the following code into it, supplying the values given when you created your Immersive Reader resource. Don't include quotation marks or the `{` and `}` characters.
5157

5258
```text
5359
TENANT_ID={YOUR_TENANT_ID}
@@ -56,9 +62,9 @@ CLIENT_SECRET={YOUR_CLIENT_SECRET}
5662
SUBDOMAIN={YOUR_SUBDOMAIN}
5763
```
5864

59-
Be sure not to commit this file into source control, as it contains secrets that should not be made public.
65+
Be sure not to commit this file into source control, as it contains secrets that shouldn't be made public.
6066

61-
Next, open *app.js* and add the following to the top of the file. This loads the properties defined in the .env file as environment variables into Node.
67+
Next, open *app.js* and add the following to the top of the file. This loads the properties defined in the *.env* file as environment variables into Node.
6268

6369
```javascript
6470
require('dotenv').config();
@@ -172,15 +178,15 @@ The **getimmersivereaderlaunchparams** API endpoint should be secured behind som
172178
173179
## Specify the language of your content
174180
175-
The Immersive Reader has support for many different languages. You can specify the language of your content by following the steps below.
181+
The Immersive Reader has support for many different languages. You can specify the language of your content by following these steps.
176182
177183
1. Open *views\index.pug* and add the following code below the `p(id=content)` tag that you added in the previous step. This code adds some content Spanish content to your page.
178184
179185
```pug
180186
p(id='content-spanish') El estudio de las formas terrestres de la Tierra se llama geografía física. Los accidentes geográficos pueden ser montañas y valles. También pueden ser glaciares, lagos o ríos.
181187
```
182188
183-
2. In the JavaScript code, add the following above the call to `ImmersiveReader.launchAsync`. This code passes the Spanish content into the Immersive Reader.
189+
2. In *views\index.pug*, add the following code above the call to `ImmersiveReader.launchAsync`. This code passes the Spanish content into the Immersive Reader.
184190
185191
```pug
186192
content.chunks.push({

articles/ai-services/immersive-reader/includes/how-to/how-to-launch-immersive-reader-python.md

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: rwallerms
33
manager: nitinme
44
ms.service: azure-ai-immersive-reader
55
ms.topic: include
6-
ms.date: 02/14/2024
6+
ms.date: 02/21/2024
77
ms.author: rwaller
88
---
99

@@ -12,10 +12,10 @@ ms.author: rwaller
1212
* An Azure subscription. You can [create one for free](https://azure.microsoft.com/free/ai-services).
1313
* An Immersive Reader resource configured for Microsoft Entra authentication. Follow [these instructions](../../how-to-create-immersive-reader.md) to get set up. Save the output of your session into a text file so you can configure the environment properties.
1414
* An IDE such as [Visual Studio Code](https://code.visualstudio.com).
15+
* [Git](https://git-scm.com).
16+
* Clone the [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk) from GitHub.
1517

1618
You can install the following tools as part of the instructions in this guide:
17-
* [Git](https://git-scm.com)
18-
* [Immersive Reader SDK](https://github.com/microsoft/immersive-reader-sdk)
1919
* [Python](https://www.python.org/downloads/) and [pip](https://docs.python.org/3/installing/index.html). Starting with Python 3.4, pip is included by default with the Python binary installers.
2020
* [Flask](https://flask.palletsprojects.com/en/2.3.x/)
2121
* [Jinja](http://jinja.pocoo.org/docs/2.10/)
@@ -24,7 +24,7 @@ You can install the following tools as part of the instructions in this guide:
2424

2525
## Configure authentication credentials
2626

27-
Create a new file called *.env*, and paste the following names and values into it. Supply the values given when you created your Immersive Reader resource.
27+
Create a new file called *.env* in the root directory of your project. Paste the following names and values into it. Supply the values given when you created your Immersive Reader resource.
2828

2929
```text
3030
TENANT_ID={YOUR_TENANT_ID}
@@ -39,16 +39,6 @@ Secure the **getimmersivereadertoken** API endpoint behind some form of authenti
3939

4040
## Create a Python web app on Windows
4141

42-
Create a Python web app by using Flask on Windows.
43-
44-
Install [Git](https://git-scm.com).
45-
46-
After Git is installed, open a command prompt and clone the Immersive Reader SDK Git repository to a folder on your computer.
47-
48-
```cmd
49-
git clone https://github.com/microsoft/immersive-reader-sdk.git
50-
```
51-
5242
Install [Python](https://www.python.org/downloads/).
5343

5444
Select the **Add Python to PATH** check box, and select **Custom installation**.
@@ -157,24 +147,12 @@ Open your browser, and go to `http://localhost:5000`.
157147

158148
## Create a Python web app on OSX
159149

160-
Create a Python web app by using Flask on OSX.
161-
162-
Install [Git](https://git-scm.com).
163-
164-
After Git is installed, open Terminal and clone the Immersive Reader SDK Git repository to a folder on your computer.
165-
166-
```bash
167-
git clone https://github.com/microsoft/immersive-reader-sdk.git
168-
```
169-
170150
Install [Python](https://www.python.org/downloads/).
171151

172-
The Python root folder, for example, `Python312`, should now be in the Applications folder.
173-
174-
After the Python installation is finished, open Terminal and use `cd` into the Python Scripts folder.
152+
The Python root folder, for example, `Python312`, should now be in the Applications folder. Open Terminal and use `cd` to go into the Python folder.
175153

176154
```bash
177-
cd Python312/Scripts
155+
cd Python312
178156
```
179157

180158
Install pip.
@@ -198,7 +176,8 @@ sudo nano /etc/paths
198176
- Go to the bottom of the file, and enter the path you want to add as the last item of the list, for example, `PATH=$PATH:/usr/local/bin`.
199177
- Select **CTRL+X** to quit.
200178
- Enter **Y** to save the modified buffer.
201-
- That's it! To test it, in a new Terminal window, enter `echo $PATH`.
179+
180+
That's it! To test it, in a new Terminal window, enter `echo $PATH`.
202181

203182
Install Flask.
204183

@@ -282,7 +261,7 @@ To reactivate the environment, run `workon quickstart-python` from the sample pr
282261
workon quickstart-python
283262
```
284263

285-
## Start the Immersive Reader with sample content
264+
### Start the Immersive Reader with sample content
286265

287266
When the environment is active, run the sample project by entering `flask run` from the sample project root folder.
288267

92 KB
Loading
2.93 KB
Loading

0 commit comments

Comments
 (0)