{"id":24017492,"url":"https://github.com/surge-tech/qr-code-clock","last_synced_at":"2026-06-11T04:31:36.083Z","repository":{"id":271494741,"uuid":"913643207","full_name":"Surge-Tech/QR-Code-Clock","owner":"Surge-Tech","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-08T04:53:13.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T05:26:40.131Z","etag":null,"topics":[],"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/Surge-Tech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T04:46:39.000Z","updated_at":"2025-01-08T04:53:43.000Z","dependencies_parsed_at":"2025-01-08T05:26:41.667Z","dependency_job_id":"9f1097d4-ade1-458b-8f17-2644077d9da7","html_url":"https://github.com/Surge-Tech/QR-Code-Clock","commit_stats":null,"previous_names":["surge-tech/qr_code_clock"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surge-Tech%2FQR-Code-Clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surge-Tech%2FQR-Code-Clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surge-Tech%2FQR-Code-Clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Surge-Tech%2FQR-Code-Clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Surge-Tech","download_url":"https://codeload.github.com/Surge-Tech/QR-Code-Clock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240740040,"owners_count":19849874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-01-08T09:19:02.497Z","updated_at":"2026-06-11T04:31:36.075Z","avatar_url":"https://github.com/Surge-Tech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Purpose of the Code\nThe program is a digital clock that generates a new QR code every second. The QR code contains the current date and time. It is displayed in a graphical window.\n\n## Components and Steps\nHere is how the program is built and what each part does:\n\n#### Libraries Used:\n**qrcode**: Creates the QR code from given text (in this case, the time).\n\n**PIL (Pillow)**: Handles image processing, allowing the QR code image to be converted and shown in the app.\n\n**tkinter**: Used to create the graphical user interface (a window).\n\n**time**: Retrieves the current time and waits for 1 second before the QR code refreshes.\n\n**threading**: Prevents the app window from freezing by running the QR code updates in a background thread.\n\n#### Generating a QR Code:\nThe function generate_qr_code(data: str) creates a QR code from any given text or data. In this program, that data is the current date and time.\nThe function customizes the QR code with size, error correction (to recover from damage), and color (black and white).\nIt returns the QR code as an image.\n\n#### Updating the QR Code:\nThe function update_qr_code(qr_label) runs continuously to:\nRetrieve the current time.\nGenerate a new QR code with that time.\nUpdate the display in the app with the new QR code.\n\n#### Creating the GUI (Graphical User Interface):\nThe main() function sets up a window using tkinter:\nA window (root) is created and labeled “QR Code Clock”.\nA space (qr_label) is added to hold and display the QR code.\nA separate thread is started to handle QR code updates (update_qr_code) so the program's graphical interface doesn’t become unresponsive.\n\n#### Starting the App:\nWhen you run the program, the main() function is called to:\nStart the GUI window.\nContinuously update the QR code every second with the current time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurge-tech%2Fqr-code-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurge-tech%2Fqr-code-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurge-tech%2Fqr-code-clock/lists"}