{"id":18789121,"url":"https://github.com/youwegit/pimcoreexcelculator","last_synced_at":"2025-04-13T13:32:24.805Z","repository":{"id":57088101,"uuid":"80429105","full_name":"YouweGit/PimcoreExcelculator","owner":"YouweGit","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-07T14:03:01.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-27T05:02:05.643Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YouweGit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-30T14:35:20.000Z","updated_at":"2019-02-07T14:02:54.000Z","dependencies_parsed_at":"2022-08-20T15:31:14.205Z","dependency_job_id":null,"html_url":"https://github.com/YouweGit/PimcoreExcelculator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YouweGit%2FPimcoreExcelculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YouweGit%2FPimcoreExcelculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YouweGit%2FPimcoreExcelculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YouweGit%2FPimcoreExcelculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YouweGit","download_url":"https://codeload.github.com/YouweGit/PimcoreExcelculator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248721293,"owners_count":21151076,"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-11-07T21:06:44.359Z","updated_at":"2025-04-13T13:32:24.434Z","avatar_url":"https://github.com/YouweGit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PIMCORE EXCEL EXTENSION\n----------------------------\n\nVersion: Pimcore 4.x\n \nNote: NOT compatible with Pimcore versions under 4\n\nDeveloped by: Youwe (Roelf)\n\n\n\n\nExcerpt\n-------\n\n* Always wanted to perform extensive calculations simply using excel sheets?\n* Would you like a service in the background to make sure the excel sheets are ready to calculate when you need it?\n\n... then this extension is for you!\n\n\n\nDescription\n-----------\n\nThe pimcore deployment extension as the following general functionalities:\n\n* Provide results of excel calculations as long as the service is running\n\n\n\nUsage and examples\n------------------\n\nEnable the plugin in Pimcore!\n\nRun the service / make sure its running when your server boots up:\n\n    php ./plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServer.php\n\nTry the test to make sure the service works:\n\n    php ./plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServerTest.php\n\nConfigure your own excel files (and socket-binding) to perform calculations with:\n\n    cp ./plugins/PimcoreExcelculator/pimcore-excel-config.default.php ./website/var/config/pimcore-excel-config.php\n    vi ./website/var/config/pimcore-excel-config.php\n\n\n\nExample code without error handling\n-----------------------------------\n\n    // simple example\n\n    $calcey = new \\PimcoreExcelculator\\PimcoreExcelculatorCalc('included-demo-file');\n    $calcey-\u003eset([\n        'A3' =\u003e 420,\n        'A4' =\u003e 246\n    ]);\n    \n    $results = $calcey-\u003eget(['A5']);\n    \n    echo 'result: ' . var_export($results, true);\n\n\n\nExample code with error handling\n--------------------------------\n\n    // you want to catch possible errors, because this functionality\n    // depends on a service that should be running in the background,\n    // and there is always the possibility that the service is busy\n    // or has not been started, or has crashed\n\n    $calcey = new \\PimcoreExcelculator\\PimcoreExcelculatorCalc('included-demo-file');\n    $calcey-\u003eset([\n        'A3' =\u003e 420,\n        'A4' =\u003e 246\n    ]);\n    \n    try {\n        $results = $calcey-\u003eget(['A5']);\n    }\n    catch (\\Throwable $t) {\n        if($t-\u003egetCode() == 888) {\n            // could not connect to the service!\n        } \n        else {\n            // something else is wrong  ( check $t-\u003egetMessage() )\n        }\n    }\n    \n    echo 'result: ' . var_export($results, true);\n\n\nExample code with error handling and different sheets in one file\n-----------------------------------------------------------------\n\n    $calcey = new \\PimcoreExcelculator\\PimcoreExcelculatorCalc('some-not-included-file');\n    $calcey-\u003eset([\n        'sheetOne.A3' =\u003e 420,\n        'sheetTwo.A4' =\u003e 246\n    ]);\n    \n    try {\n        $results = $calcey-\u003eget(['sheetThree.A5', 'sheetFour.C6']);\n    }\n    catch (\\Throwable $t) {\n        if($t-\u003egetCode() == 888) {\n            // could not connect to the service!\n        } \n        else {\n            // something else is wrong  ( check $t-\u003egetMessage() )\n        }\n    }\n    \n    echo 'result: ' . var_export($results, true);\n\n\n\nDeployment to server\n--------------------\n\nRun the service / make sure its running when your server boots up:\n\n    php ./plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServer.php\n\nYou can do this, for example, using a cron job:\n\n    */1 * * * * flock -n /tmp/pimcore.excel.lockfile -c \"/usr/bin/php /var/www/html/plugins/PimcoreExcelculator/cli/PimcoreExcelculatorServer.php\"\n\n\nTroubleshooting\n---------------\n\nBefore importing the definitions, you might need to set the correct permissions, in order for this script to be able to\nwrite to the definition files. In case of local development, a low security solution like the following could be used:\n\n    sudo chmod -R 777 .\n    \nMake sure you have your local apache running as root or your user, or it might not be able to connect to the service:\n\nOn macOS/OSX:\n\n    in httpd.conf\n    \n    User my-username\n    Group _www\n    \n    or\n    \n    User root\n    Group _www\n\n\n\nInstallation  \n------------\n\nPlugin can be installed through composer. Add json to your composer.json:\n\n    composer require youwe/pimcore-excelculator\n\nActivate/enable the plugin in pimcore's extras-\u003eextensions list.\n\nAlso, add this to your .gitignore:\n\n    /plugins/PimcoreExcelculator\n    \n    \n \nPlugin development\n------------------\n\nTo create a new version, check out the master branch somewhere and go:\n\n    git tag\n    git tag 0.x.x         (minor update = latest tag + 0.0.1)\n    git push origin --tags\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouwegit%2Fpimcoreexcelculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyouwegit%2Fpimcoreexcelculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouwegit%2Fpimcoreexcelculator/lists"}