{"id":14449413,"url":"https://github.com/frappe/biometric-attendance-sync-tool","last_synced_at":"2025-04-12T00:13:11.213Z","repository":{"id":39586807,"uuid":"183603434","full_name":"frappe/biometric-attendance-sync-tool","owner":"frappe","description":"A simple tool for syncing Biometric Attendance data with your ERPNext server","archived":false,"fork":false,"pushed_at":"2025-02-14T06:32:05.000Z","size":60,"stargazers_count":206,"open_issues_count":28,"forks_count":231,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-12T00:13:07.642Z","etag":null,"topics":["bas","biometric-attendance","cli","erpnext","erpnext-client","essl","gui","python-script","sync","zkteco"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frappe.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":"2019-04-26T09:49:37.000Z","updated_at":"2025-04-08T14:50:37.000Z","dependencies_parsed_at":"2023-01-21T23:05:11.955Z","dependency_job_id":"533226da-9c38-4ef4-b85e-89a443662880","html_url":"https://github.com/frappe/biometric-attendance-sync-tool","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fbiometric-attendance-sync-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fbiometric-attendance-sync-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fbiometric-attendance-sync-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Fbiometric-attendance-sync-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frappe","download_url":"https://codeload.github.com/frappe/biometric-attendance-sync-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497820,"owners_count":21113984,"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":["bas","biometric-attendance","cli","erpnext","erpnext-client","essl","gui","python-script","sync","zkteco"],"created_at":"2024-09-01T08:01:16.346Z","updated_at":"2025-04-12T00:13:11.191Z","avatar_url":"https://github.com/frappe.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Biometric Attendance Sync Tool \u003cspan style=\"font-size: 0.6em; font-style: italic\"\u003e(For ERPNext)\u003c/span\u003e\n\nPython Scripts to poll your biometric attendance system _(BAS)_ for logs and sync with your ERPNext instance\n\n\n## Table of Contents\n - [Pre-requisites](#pre-requisites)\n - [Usage](#usage)\n    - [GUI](#gui)\n    - [CLI](#cli)\n - [Setup Specifications](#setup-specifications-(for-cli))\n    - [UNIX](#unix)\n    - [Windows](#windows)\n  - [Setting Up Config](#setting-up-config)\n  - [Resources](#resources)\n  - [License](#license)\n\n\n## Pre-requisites\n* Python 3.6+\n\n\n## Usage\nThere's two ways you can use this tool. If accessing the CLI is a bit of a pain for you, the GUI has a simple form to guide you through the process.\n\nUnder [/releases](https://github.com/frappe/biometric-attendance-sync-tool/releases), for a particular release download the `biometric-attendance-sync-tool-[version]-[distribution].zip` and unzip it's contents. Now from the location of the unzipped files, you can go ahead with the CLI or GUI method.\n\n### GUI\nRun the `attendance-sync` file from the folder; This should setup all it's dependencies automatically and start the GUI.\n\n### CLI\nThe `erpnext_sync.py` file is the \"backbone\" of this project. Apart from Windows _(which has its own wrapper `erpnext_sync_win.py`)_, this file can be directly used to set up the sync tool. Further information provided in the [/Wiki](https://github.com/frappe/biometric-attendance-sync-tool/wiki).\n\n\n## Setup Specifications (For CLI)\n\n1. Setup dependencies\n    ```\n    cd biometric-attendance-sync-tool\n      \u0026\u0026 python3 -m venv venv\n      \u0026\u0026 source venv/bin/activate\n      \u0026\u0026 pip install -r requirements.txt\n    ```\n2. Setup `local_config.py`\n\n   Make a copy of and rename `local_config.py.template` file. [Learn More](#setting-up-config)\n\n3. Run this script using `python3 erpnext_sync.py`\n\n### UNIX\n\nThere's a [Wiki](https://github.com/frappe/biometric-attendance-sync-tool/wiki/Running-this-script-in-production) for this.\n\n### Windows\n\nInstalling as a Windows service\n\n1. Install pywin32 using `pip install pywin32`\n2. Got to this repository's Directory\n3. Install the windows service using `python erpnext_sync_win.py install`\n4. Done\n\n#### Update the installed windows service\n    python erpnext_sync_win.py update\n\n#### Stop the windows service\n    net stop ERPNextBiometricPushService\n\n#### To see the status of the service\n    mmc Services.msc\n\n\n## Setting up config\n- You need to make a copy of `local_config.py.template` file and rename it to `local_config.py`\n- Please fill in the relevant sections in this file as per the comments in it.\n- Below are the delineation of the keys contained in `local_config.py`:\n  - ERPNext connection configs:\n    - `ERPNEXT_API_KEY`: The API Key of the ERPNext User\n    - `ERPNEXT_API_SECRET`: The API Secret of the ERPNext User\n\n      \u003e Please refer to [this link](https://frappe.io/docs/user/en/guides/integration/how_to_set_up_token_based_auth#generate-a-token) to learn how to generate API key and secret for a user in ERPNext.\n      \u003e The ERPNext User who's API key and secret is used, needs to have at least the following permissions:\n      \u003e 1. Create Permissions for 'Employee Checkin' DocType.\n      \u003e 2. Write Permissions for 'Shift Type' DocType.\n\n    - `ERPNEXT_URL`: The web address at which you would access your ERPNext. eg:`'https://yourcompany.erpnext.com'`, `'https://erp.yourcompany.com'`\n    - `ERPNEXT_VERSION`: The base version of your ERPNext app. eg: 12, 13, 14\n  - This script's operational configs:\n    - `PULL_FREQUENCY`: The time in minutes after which a pull for punches from the biometric device and push to ERPNext is attempted again.\n    - `LOGS_DIRECTORY`: The Directory in which the logs related to this script's whereabouts are stored.\n      \u003e Hint: For most cases you can leave the above two keys unchanged.\n    - `IMPORT_START_DATE`: The date after which the punches are pushed to ERPNext. Expected Format: `YYYYMMDD`.\n      \u003e For some cases you would have a lot of old punches in the biometric device. But, you would want to only import punches after certain date. You could set this key appropriately. Also, you can leave this as `None` if this case does not apply to you.\n\n\u003e TODO: fill this section with more info to help Non-Technical Individuals.\n\n## To build executable file for GUI\n### Linux and Windows:\n1. Activate virtual environment.\n1. Navigate to the repository folder (where `gui.py` located) by\n    ```\n    cd biometric-attendance-sync-tool\n    ```\n1. Run the following commands:\n    ```\n    pip install pyinstaller\n    ```\n\n    ```\n    python -m PyInstaller --name=\"attendance-sync\" --windowed --onefile gui.py\n    ```\n1. The executable file `attendance-sync` created inside `dist/` folder.\n\n### Resources\n\n* Article on [ERPNext Documentation](https://docs.erpnext.com/docs/user/manual/en/setting-up/articles/integrating-erpnext-with-biometric-attendance-devices).\n* This Repo's [/Wiki](https://github.com/frappe/biometric-attendance-sync-tool/wiki).\n\n### License\n\nThis project is licensed under [GNU General Public License v3.0](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrappe%2Fbiometric-attendance-sync-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrappe%2Fbiometric-attendance-sync-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrappe%2Fbiometric-attendance-sync-tool/lists"}