Skip to content

Commit 634ee5d

Browse files
committed
adding ability to create pdf of content
1 parent f012e92 commit 634ee5d

File tree

8 files changed

+2329
-1
lines changed

8 files changed

+2329
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
.vscode/launch.json
88
.vscode/ipch
99
.ipynb_checkpoints
10+
/node_modules

3-transport/lessons/3-visualize-location-data/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Your first step is to create an Azure Maps account. The easiest way to do this i
5151

5252
1. The service will deploy and you can visit it by clicking 'Go to resource' in the next screen.
5353

54-
2. Navigate to your new Azure Maps Account Authentication screen. Here, you discover that you have two ways to authenticate your maps in a web app: using Active Directory (AD) or 'Shared Key Authentication', also known as Subscription Key. We'll use the latter, for simplicity. Copy the Primary Key value and make a note of it!
54+
1. Navigate to your new Azure Maps Account Authentication screen. Here, you discover that you have two ways to authenticate your maps in a web app: using Active Directory (AD) or 'Shared Key Authentication', also known as Subscription Key. We'll use the latter, for simplicity. Copy the Primary Key value and make a note of it!
5555

5656
✅ You will be able to rotate and swap keys at will using the Shared Keys; switch your app to use the Secondary Key while rotating the Primary Key if needed.
5757

3-transport/lessons/3-visualize-location-data/code/index.html

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<script type='text/javascript'>
88

99
function init() {
10+
11+
1012
fetch("https://gpssensorjimb.blob.core.windows.net/gps-data/?restype=container&comp=list")
1113
.then(response => response.text())
1214
.then(str => new window.DOMParser().parseFromString(str, "text/xml"))

docs/_sidebar.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
- Introduction
2+
- [1](../1-getting-started/lessons/1-introduction-to-iot/README.md)
3+
- [2](../1-getting-started/lessons/2-deeper-dive/README.md)
4+
- [3](../1-getting-started/lessons/3-sensors-and-actuators/README.md)
5+
- [4](../1-getting-started/lessons/4-connect-internet/README.md)
6+
7+
- Farm
8+
- [5](../2-farm/lessons/1-predict-plant-growth/README.md)
9+
- [6](../2-farm/lessons/2-detect-soil-moisture/README.md)
10+
- [7](../2-farm/lessons/3-automated-plant-watering/README.md)
11+
- [8](../2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md)
12+
- [9](../2-farm/lessons/5-migrate-application-to-the-cloud/README.md)
13+
- [10](../2-farm/lessons/6-keep-your-plant-secure/README.md)
14+
15+
16+
- Transport
17+
- [11](../3-transport/lessons/1-location-tracking/README.md)
18+
- [12](../3-transport/lessons/2-store-location-data/README.md)
19+
- [13](../3-transport/lessons/3-visualize-location-data/README.md)
20+
- [14](../3-transport/lessons/4-geofences/README.md)
21+
22+
- Manufacturing
23+
- [15](../4-manufacturing/lessons/1-train-fruit-detector/README.md)
24+
- [16](../4-manufacturing/lessons/2-check-fruit-from-device/README.md)
25+
- [17](../4-manufacturing/lessons/3-run-fruit-detector-edge/README.md)
26+
- [18](../4-manufacturing/lessons/4-trigger-fruit-detector/README.md)
27+
28+
29+
- Retail
30+
- [19](../5-retail/lessons/1-train-stock-detector/README.md)
31+
- [20](../5-retail/lessons/2-check-stock-device/README.md)
32+
33+
- Consumer
34+
- [21](../6-consumer/lessons/1-speech-recognition/README.md)
35+
- [22](../6-consumer/lessons/2-language-understanding/README.md)
36+
- [23](../6-consumer/lessons/3-spoken-feedback/README.md)
37+
- [24](../6-consumer/lessons/4-multiple-language-support/README.md)

docsifytopdf.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
contents: ['docs/_sidebar.md'], // array of "table of contents" files path
3+
pathToPublic: 'pdf/readme.pdf', // path where pdf will stored
4+
pdfOptions: {
5+
margin: { top: '100px', bottom: '100px' }
6+
}, // reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions
7+
removeTemp: true, // remove generated .md and .html or not
8+
emulateMedia: 'print', // mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)
9+
};

0 commit comments

Comments
 (0)