{"id":34587388,"url":"https://github.com/fretchen/img-viewer","last_synced_at":"2026-04-17T19:05:27.451Z","repository":{"id":53651580,"uuid":"221848797","full_name":"fretchen/img-viewer","owner":"fretchen","description":"A simple viewer for data images","archived":false,"fork":false,"pushed_at":"2022-12-08T06:53:02.000Z","size":18784,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-19T10:10:37.306Z","etag":null,"topics":["flask","labscriptsuite","ultracold"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fretchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-15T05:12:59.000Z","updated_at":"2024-03-19T10:10:37.307Z","dependencies_parsed_at":"2023-01-24T20:45:10.587Z","dependency_job_id":null,"html_url":"https://github.com/fretchen/img-viewer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fretchen/img-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fretchen%2Fimg-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fretchen%2Fimg-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fretchen%2Fimg-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fretchen%2Fimg-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fretchen","download_url":"https://codeload.github.com/fretchen/img-viewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fretchen%2Fimg-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31941852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","labscriptsuite","ultracold"],"created_at":"2025-12-24T10:35:04.633Z","updated_at":"2026-04-17T19:05:27.446Z","avatar_url":"https://github.com/fretchen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Img-viewer\n\n Look into the shots we took with labscriptsuite. It is a great way to keep the\n larger public like the PI in the loop on what is going on in the lab. The software\n stack is really just [flask](https://palletsprojects.com/p/flask/) with some gimmicks around it.\n\n While this program can be installed on your personal PC\n for dev purposes it is not super useful there as we typically have easily thousands and thousands of images to\n crawl through. So this project is typically really designed to run on a public server.\n This also comes with quite a bit of tools around the core functionality that we\n need to implement to secure it like servers, login, https etc. Right now we are running it under:\n \n https://imgviewer.synqs.de\n\n So for the moment I will give a dev install instruction. However, it is likely to become rather cumbersome at some point.\n\n # Installation for dev\n\n1.) Clone this repo\n\n\u003e git clone https://github.com/fretchen/img-viewer\n\n2.) Create a virtual enviromnment\n\n\u003e python3 -m venv venv\n\n3.) Activate the virtualenv\n\n\u003e source venv/bin/activate\n\n3.) Install the required packages:\n\n\u003e pip install -r requirements.txt\n\n4.) Copy the 'config_example.ini' to 'config.ini' and adapt add experiments with names and folders where they are pointing.\n\n\u003e cp config_example.ini config.ini\n\n5.) Initialize the database\n\n\u003e flask db upgrade\n\n5.) Run the python app\n\n\u003e python app.py\n\n6.) You can open the server on [localhost:8000](http://localhost:8000), but most likely it throwing some errors at the very first time as there are no entries.\n\n7.) Refresh the database through [localhost:8000/refresh_db](http://localhost:8000/refresh_db)\n\n8.) To see the images you have to log in, which means that you need to create a first user.\n\n\u003e python create_user.py USERNAME PASSWORD\n\nYou should see all the necessary images or open an issue here.\n\n\n\n# Deployment\n\nwhile it is ok to use the img-viewer on a localhost it is actually really thought for servers. So here, we will discuss the necessay step to make it work.\n\n## Set up\n\nStart a ubuntu machine, then we have to set up supervisorctl, nginx. We are massively following the tutorial by\n[Miguel Grinberg](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux).\n\n### supervisorctl\nIt allows us to automatically run on the system. We can give it the config file, which lives in\n_/etc/supervisor/conf.d/imgviewer.conf_:\n\n```\n[program:imgviewer]\ncommand=/home/ubuntu/venv/bin/gunicorn -b localhost:8000 -w 4 --log-level=warning app:app\ndirectory=/home/ubuntu/git/img-viewer\nuser=ubuntu\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\n```\n\nThen you can start it through\n\u003e sudo supervisorctl start\n\nFor public usage you also would like to assign a permanent address and certificate.\n\n## Updates\n\nGiven that we are running nginx continously we have to run in the simplest case:\n\n\u003e git pull\n\u003e pip install -r requirements.txt\n\u003e sudo supervisorctl reload\n\nTo stop nginx you have to run:\n\n\u003e sudo service nginx stop\n\n## Debug\n\nStop superviorctl and nginx:\n\ngunicorn -w 4 -b 127.0.0.1:8000 app:app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffretchen%2Fimg-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffretchen%2Fimg-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffretchen%2Fimg-viewer/lists"}