{"id":17190327,"url":"https://github.com/lode/access-sync-lendengine","last_synced_at":"2025-03-25T05:43:04.681Z","repository":{"id":241946518,"uuid":"808275524","full_name":"lode/access-sync-lendengine","owner":"lode","description":"Sync data from SpeelotheekSoftware Access to Lend Engine","archived":false,"fork":false,"pushed_at":"2024-10-23T20:05:47.000Z","size":134,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T17:44:35.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/lode.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":"2024-05-30T18:23:45.000Z","updated_at":"2024-10-05T19:10:08.000Z","dependencies_parsed_at":"2024-05-30T21:42:00.937Z","dependency_job_id":"54c9c955-d738-4ca7-aa3f-3d69ed5e88c0","html_url":"https://github.com/lode/access-sync-lendengine","commit_stats":null,"previous_names":["lode/access-sync-lendengine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lode%2Faccess-sync-lendengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lode%2Faccess-sync-lendengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lode%2Faccess-sync-lendengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lode%2Faccess-sync-lendengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lode","download_url":"https://codeload.github.com/lode/access-sync-lendengine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407755,"owners_count":20610232,"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":"2024-10-15T01:14:00.707Z","updated_at":"2025-03-25T05:43:04.675Z","avatar_url":"https://github.com/lode.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Access \u003c\u003e Lend Engine\n\nSync data from [SpeelotheekSoftware's Access](https://speelotheeksoftware.nl/) to [Lend Engine](https://www.lend-engine.com/).\n\nThere is also a [document on how to setup Lend Engine for toy libraries](https://docs.google.com/document/d/1hRl2P_GZhFMwi5PnTcKprZJZ9NPpgkrJyAQ-OSP50BY/edit?usp=sharing).\nThis discusses migrating data and making the correct settings.\n\n\n## Install\n\n- Install: [Docker Desktop on Mac](https://docs.docker.com/desktop/install/mac-install/), [Docker Engine is enough for Linux](https://docs.docker.com/engine/install/ubuntu/)\n    - Mac: no need to sign in with a Docker account when the installer asks you to.\n    - Mac: under 'Settings' -\u003e 'General' disable 'SBOM indexing'.\n    - Mac: use `./script/*` for managing docker instead of the control panel of Docker Desktop for Mac.\n    - Linux: follow [Docker post-installation](https://docs.docker.com/engine/install/linux-postinstall/) to manage docker without root.\n\n- Run `./script/setup`\n- Run `./script/server`\n- Run `./script/console composer install`\n\n\n## Usage\n\n### 1. Export data from SpeelotheekSoftware's Access\n\n- [Export Access tables](/docs/Export%20Access%20tables.md)\n\t- Artikel\n\t- ArtikelStatus\n\t- ArtikelStatusLogging\n\t- ArtikelType\n\t- ArtikelUitleenDuur\n\t- Kasboek\n\t- KasboekType\n\t- Lid\n\t- LidStatus\n\t- LidType\n\t- Medewerker\n\t- Melding\n\t- MeldingSoort\n\t- Merk\n\t- Onderdeel\n\t- OnderdeelMutatie\n\t- Opening\n\t- Openingstijd\n\t- Plaats\n\t- Straat\n\t- Tarief\n\t- TariefEenheid\n\t- TariefPeriode\n\t- Verantwoordelijke\n- [Export website CSVs](/docs/Export%20website%20CSVs.md) (alternative if previous export doesn't work)\n\t- Artikelen_\\\u003ccsvTimestamp\u003e\n\t- ArtikelTypes_\\\u003ccsvTimestamp\u003e\n\t- Merken_\\\u003ccsvTimestamp\u003e\n- Place all exported files in `data/`.\n- Copy article photos in `data/photos/`, using their code as file name, e.g. `B42.jpg`.\n\n### 2. Run scripts\n\nRun each command with `./script/console ./script/command \u003ccommandName\u003e \u003coptionalExtraArguments\u003e`.\n\nYou can run `./script/console ./script/command \u003ccommandName\u003e --help` to get more information about any extra arguments.\n\nEach script migrates a part of the data, you can choose which to run and do a manual migration for the rest.\n\n| Data | Command | Contents |\n| --- | --- | --- |\n| Get insight in contacts | `insight-contacts` | Contacts without email address and contacts which share an email address.\u003cbr\u003eAlter email addresses in the following export to prevent duplicates when importing. |\n| Contacts | `convert-contacts` | Contact basics: name, email, phone, address, membership number, etc. |\n| Items | `convert-items` | Item basics: name, code, category, brand, price, etc. |\n| Items alternative | `convert-website-csvs [csvTimestamp]` | Item basics, alternative method with webcatalogus CSVs. |\n| Parts | `gather-extra-data-item-parts` | Count, description. |\n| Parts mutations | `gather-extra-data-item-part-mutations` | Count missing/broken, explanation. |\n| Images | `gather-extra-data-item-images photos` | Item images (SQL and converted image files). |\n| Memberships | `gather-extra-data-memberships` | Contact \u003c\u003e Subscription, period. |\n| Item status | `gather-extra-data-item-location` | Locations (\"status\") for items. |\n| Loans | `gather-extra-data-loans` | Loans which are still active/overdue. |\n| Fees | `gather-extra-data-fees` | Open fees for late return or part mutations. |\n| Notes | `gather-extra-data-notes` | Messages (\"meldingen\") for contacts and items. |\n| Contact notes | `gather-extra-data-contact-notes` | Specifics (\"bijzonderheden\") for contacts. |\n| Items extras | `gather-extra-data-items` | Item created, show on catalogus. |\n| Contacts extras | `gather-extra-data-contacts` | Contact created. |\n| Contacts obfuscation | `obfuscate-contacts [timestamp]` | Obfuscate contact migration so it can be used to test with. |\n| Item warnings | `insight-warnings` | Items with warnings, insight for manual import. |\n\nHere's all the commands after each other.\nRun them one-by-one as some are not needed for your use case, and some have interactive output.\n\n```bash\n./script/console ./script/command insight-contacts\n./script/console ./script/command insight-warnings\n./script/console ./script/command convert-contacts\n./script/console ./script/command convert-items\n./script/console ./script/command convert-website-csvs [csvTimestamp]\n./script/console ./script/command gather-extra-data-item-parts\n./script/console ./script/command gather-extra-data-item-part-mutations\n./script/console ./script/command gather-extra-data-item-images photos\n./script/console ./script/command gather-extra-data-memberships\n./script/console ./script/command gather-extra-data-item-location\n./script/console ./script/command gather-extra-data-loans\n./script/console ./script/command gather-extra-data-fees\n./script/console ./script/command gather-extra-data-notes\n./script/console ./script/command gather-extra-data-contact-notes\n./script/console ./script/command gather-extra-data-items\n./script/console ./script/command gather-extra-data-contacts\n./script/console ./script/command obfuscate-contacts [timestamp]\n```\n\nOutput files `LendEngine*.csv` \u0026 `LendEngine*.sql` will be added in `data/`.\n\nDon't forget to update duplicate email addresses in `LendEngine_01_Contacts_[timestamp].csv` before importing.\n\n### 3. Import CSVs in Lend Engine admin\n\nThe CSVs from the above scripts (`LendEngine*.csv` for items \u0026 contacts) can be imported via Lend Engine's CSV import admin.\n\n- Import contacts (Admin » Settings » Import contacts)\n\t- Copy the contents of `LendEngine_01_Contacts_[timestamp].csv` **OR** `LendEngine_01_Contacts_[timestamp]_obfuscated_[timestamp].csv`.\n- Import items (Admin » Items » Bulk update)\n\t- Copy the contents of `LendEngine_02_Items_[timestamp].csv` **OR** `LendEngine_02_ItemsAlternative_[timestamp].csv`.\n\t- Copy quotes along (copy raw content using text editor, not the selection when opening in a spreadsheet program) to support newlines.\n\t- Enable \"Create new items where code is not found\".\n\n### 4. Import SQLs via Lend Engine support\n\nThe SQLs from the above scripts (`LendEngine*.sql`) can't be imported via Lend Engine admin.\n\nCreate a zip archive of all `LendEngine*.sql` files and the `export_\u003ctimestamp\u003e/` directory with migrated photos.\nYou can upload to WeTransfer and contact Lend Engine support (support@lend-engine.com) and ask to import this for you.\n\nWait until this is done before changing things in Lend Engine yourself to prevent conflicts.\n\n### 5. Cleanup\n\nDon't forget to delete the exported files locally as they contain sensitive user data.\n\n### 6. Configure Lend Engine\n\n- Rename migrated membership types (Admin » Settings » Membership types) to something that makes more sense. Delete the ones not used.\n\n\n## Manual migration\n\n### Employee status\n\nGo through all staff in the contacts (Admin » Contacts / Members) and mark them as staff or administrator.\n\n### Item warnings\n\nIn Access item warnings are unique for each item.\nIn Lend Engine item warnings are created as predefined generic types, and used at specific items.\nThus when migrating you need to decide which warnings you want to use, create those, and then use those in items.\n\nHere's how the concepts are mapped between Access and Lend Engine:\n\n| Access | Lend Engine |\n| --- | --- |\n| \"Uitlenen\" | Check out prompt |\n| \"Inname\" | Check in prompt |\n| \"Controle\" | Check in prompt |\n| \"Uitleen-info\" | Item field or Custom field |\n\n- Run the `insight-warnings` command and open the resulting CSVs.\n- Use the `WarningsWithItems` CSV to find items beloging to a generic type of warning.\n- Use the `ItemsWithWarnings` CSV to go through items which have warnings.\n- Open the item in Lend Engine (Admin » Items » Browse items).\n- If you see a warning that you don't have a generic type for yet: create a generic type (Admin » Settings » Check out prompts / Check in prompts / Item fields).\n- Afterwards (or when you're importing a warning that you already have a generic type for): connect a generic type to a specific item (Check in/out / Custom fields).\n\n\n## Contributing\n\n### Development\n\n- A new script can be added to `src/command/` and `script/command`.\n- If using a new export table from Access add it to `src/specification/`.\n- Mention new scripts (and optionally new tables) to the lists in the readme.\n\n### Usage after first setup\n\n- Start server: `./script/server`\n- See [the script/ directory](/script/README.md) for more commands\n\n### Connect to the database\n\nConnect to the database from outside Docker:\n\n- hostname: `localhost`\n- port: see `SQL_PORT_EXTERNAL` in `docker.env`\n- username/password: see values in `docker.env`\n\nFor managing databases:\n\n- username: `root`\n- password: `root-secret`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flode%2Faccess-sync-lendengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flode%2Faccess-sync-lendengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flode%2Faccess-sync-lendengine/lists"}