{"action":"created","issue":{"url":"https://api.github.com/repos/SimonBiggs/scriptedforms/issues/182","repository_url":"https://api.github.com/repos/SimonBiggs/scriptedforms","labels_url":"https://api.github.com/repos/SimonBiggs/scriptedforms/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/SimonBiggs/scriptedforms/issues/182/comments","events_url":"https://api.github.com/repos/SimonBiggs/scriptedforms/issues/182/events","html_url":"https://github.com/SimonBiggs/scriptedforms/issues/182","id":307989843,"number":182,"title":"Watchdog file list in a table","user":{"login":"robmarkcole","id":11855322,"avatar_url":"https://avatars2.githubusercontent.com/u/11855322?v=4","gravatar_id":"","url":"https://api.github.com/users/robmarkcole","html_url":"https://github.com/robmarkcole","followers_url":"https://api.github.com/users/robmarkcole/followers","following_url":"https://api.github.com/users/robmarkcole/following{/other_user}","gists_url":"https://api.github.com/users/robmarkcole/gists{/gist_id}","starred_url":"https://api.github.com/users/robmarkcole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmarkcole/subscriptions","organizations_url":"https://api.github.com/users/robmarkcole/orgs","repos_url":"https://api.github.com/users/robmarkcole/repos","events_url":"https://api.github.com/users/robmarkcole/events{/privacy}","received_events_url":"https://api.github.com/users/robmarkcole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-23T11:16:30Z","updated_at":"2018-03-23T12:04:01Z","closed_at":null,"author_association":"COLLABORATOR","body":"I have a use case which may require functionaltiy added. I want to use scriptedforms to capture a list of images saved during an experiment run. I will use a form to enter the experiment parameters (in my case camera exposure time etc) and I want the form to display a list of all the .jpg images saved in a folder. At the and of the experiment run I will post the paths of all saved .jpg to an external database. Thereore my request is: live updating table of all .jpg files in a folder. Is this possible? "},"comment":{"url":"https://api.github.com/repos/SimonBiggs/scriptedforms/issues/comments/375644547","html_url":"https://github.com/SimonBiggs/scriptedforms/issues/182#issuecomment-375644547","issue_url":"https://api.github.com/repos/SimonBiggs/scriptedforms/issues/182","id":375644547,"user":{"login":"SimonBiggs","id":6559099,"avatar_url":"https://avatars1.githubusercontent.com/u/6559099?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonBiggs","html_url":"https://github.com/SimonBiggs","followers_url":"https://api.github.com/users/SimonBiggs/followers","following_url":"https://api.github.com/users/SimonBiggs/following{/other_user}","gists_url":"https://api.github.com/users/SimonBiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonBiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonBiggs/subscriptions","organizations_url":"https://api.github.com/users/SimonBiggs/orgs","repos_url":"https://api.github.com/users/SimonBiggs/repos","events_url":"https://api.github.com/users/SimonBiggs/events{/privacy}","received_events_url":"https://api.github.com/users/SimonBiggs/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T12:04:01Z","updated_at":"2018-03-23T12:04:01Z","author_association":"OWNER","body":"Yup. Can definitely be done with the current set up.\r\n\r\nSomething like the following should work. I haven't tested it, just wrote it in here. But it should be close.\r\n\r\n~~~markdown\r\n\r\n<section-start>\r\n\r\n```python\r\nimport os\r\nfrom glob import glob\r\nfrom IPython.display import display, Markdown\r\n\r\npath_to_watch = '/a/path/here'\r\nglob_string = os.path.join(path_to_watch, '*.jpg')\r\n```\r\n\r\n</section-start>\r\n\r\n<section-filechange paths=\"[path_to_watch]\">\r\n\r\n```python\r\nfile_list = glob(glob_string)\r\nmarkdown_string = '\\n'.join([\r\n    \"* {}\".format(file)\r\n    for file in file_list\r\n])\r\ndisplay(Markdown(markdown_string))\r\n```\r\n\r\n</section-filechange>\r\n\r\n~~~"}}
{"actor":{"display_login":"SimonBiggs"}}