Skip to content

Commit

Permalink
adding ability to create pdf of content
Browse files Browse the repository at this point in the history
  • Loading branch information
jlooper committed Jun 22, 2021
1 parent f012e92 commit 634ee5d
Show file tree
Hide file tree
Showing 8 changed files with 2,329 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@
.vscode/launch.json
.vscode/ipch
.ipynb_checkpoints
/node_modules
2 changes: 1 addition & 1 deletion 3-transport/lessons/3-visualize-location-data/README.md
Expand Up @@ -51,7 +51,7 @@ Your first step is to create an Azure Maps account. The easiest way to do this i

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

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!
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!

✅ 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.

Expand Down
2 changes: 2 additions & 0 deletions 3-transport/lessons/3-visualize-location-data/code/index.html
Expand Up @@ -7,6 +7,8 @@
<script type='text/javascript'>

function init() {


fetch("https://gpssensorjimb.blob.core.windows.net/gps-data/?restype=container&comp=list")
.then(response => response.text())
.then(str => new window.DOMParser().parseFromString(str, "text/xml"))
Expand Down
37 changes: 37 additions & 0 deletions docs/_sidebar.md
@@ -0,0 +1,37 @@
- Introduction
- [1](../1-getting-started/lessons/1-introduction-to-iot/README.md)
- [2](../1-getting-started/lessons/2-deeper-dive/README.md)
- [3](../1-getting-started/lessons/3-sensors-and-actuators/README.md)
- [4](../1-getting-started/lessons/4-connect-internet/README.md)

- Farm
- [5](../2-farm/lessons/1-predict-plant-growth/README.md)
- [6](../2-farm/lessons/2-detect-soil-moisture/README.md)
- [7](../2-farm/lessons/3-automated-plant-watering/README.md)
- [8](../2-farm/lessons/4-migrate-your-plant-to-the-cloud/README.md)
- [9](../2-farm/lessons/5-migrate-application-to-the-cloud/README.md)
- [10](../2-farm/lessons/6-keep-your-plant-secure/README.md)


- Transport
- [11](../3-transport/lessons/1-location-tracking/README.md)
- [12](../3-transport/lessons/2-store-location-data/README.md)
- [13](../3-transport/lessons/3-visualize-location-data/README.md)
- [14](../3-transport/lessons/4-geofences/README.md)

- Manufacturing
- [15](../4-manufacturing/lessons/1-train-fruit-detector/README.md)
- [16](../4-manufacturing/lessons/2-check-fruit-from-device/README.md)
- [17](../4-manufacturing/lessons/3-run-fruit-detector-edge/README.md)
- [18](../4-manufacturing/lessons/4-trigger-fruit-detector/README.md)


- Retail
- [19](../5-retail/lessons/1-train-stock-detector/README.md)
- [20](../5-retail/lessons/2-check-stock-device/README.md)

- Consumer
- [21](../6-consumer/lessons/1-speech-recognition/README.md)
- [22](../6-consumer/lessons/2-language-understanding/README.md)
- [23](../6-consumer/lessons/3-spoken-feedback/README.md)
- [24](../6-consumer/lessons/4-multiple-language-support/README.md)
9 changes: 9 additions & 0 deletions docsifytopdf.js
@@ -0,0 +1,9 @@
module.exports = {
contents: ['docs/_sidebar.md'], // array of "table of contents" files path
pathToPublic: 'pdf/readme.pdf', // path where pdf will stored
pdfOptions: {
margin: { top: '100px', bottom: '100px' }
}, // reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions
removeTemp: true, // remove generated .md and .html or not
emulateMedia: 'print', // mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)
};

0 comments on commit 634ee5d

Please sign in to comment.