diff --git a/docs/images/.DS_Store b/docs/images/.DS_Store new file mode 100644 index 0000000..767fc48 Binary files /dev/null and b/docs/images/.DS_Store differ diff --git a/docs/images/python/python_gui.png b/docs/images/python/python_gui.png new file mode 100644 index 0000000..a030824 Binary files /dev/null and b/docs/images/python/python_gui.png differ diff --git a/docs/python.md b/docs/python.md index 720a1fd..b6fcc7b 100644 --- a/docs/python.md +++ b/docs/python.md @@ -77,3 +77,49 @@ onSelected: (index) => { } ); ``` + +## Image Selection Demo + +The left pane is index 0. The right pane is index 1. + +![gui demo](images/python/python_gui.png) + +This is an example creating the list of image for selection. +The `contentId` and `thumbnail_url` are parsed in JavaScript from the data sent +from Python. + +In actual use, you may want to parse the data from the RICOH Cloud API +in the Python server-side code in order to improve performance and reduce +the data transmitted over the network. + +```javascript + const leftList = document.getElementById("leftList"); + for (let i = 0; i < data.length; i++) { + if (data[i].status === "uploaded") { + // console.log(data[i]); + const listItem = document.createElement("li"); + listItem.innerHTML = `