{"id":18315382,"url":"https://github.com/lefticus/nu_plugin_calc","last_synced_at":"2026-01-20T09:01:41.810Z","repository":{"id":137251710,"uuid":"210956535","full_name":"lefticus/nu_plugin_calc","owner":"lefticus","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-26T17:21:06.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T13:11:41.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefticus.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-09-25T23:07:56.000Z","updated_at":"2023-02-16T19:31:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb63ce69-8283-4745-817a-1d206780d18a","html_url":"https://github.com/lefticus/nu_plugin_calc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lefticus/nu_plugin_calc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefticus%2Fnu_plugin_calc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefticus%2Fnu_plugin_calc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefticus%2Fnu_plugin_calc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefticus%2Fnu_plugin_calc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefticus","download_url":"https://codeload.github.com/lefticus/nu_plugin_calc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefticus%2Fnu_plugin_calc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28599830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T08:51:33.170Z","status":"ssl_error","status_checked_at":"2026-01-20T08:51:10.855Z","response_time":117,"last_error":"SSL_read: 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":[],"created_at":"2024-11-05T16:39:29.319Z","updated_at":"2026-01-20T09:01:41.791Z","avatar_url":"https://github.com/lefticus.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nu_shell_calc\n\n## About\n\nA hacked-together C++ plugin for nushell that calculates math expressions, based on the Python example: https://github.com/nushell/contributor-book/blob/master/en/plugins.md#creating-a-plugin-in-python\n\n\nExpressions are in the form of:\n\n```\n[id = ] \u003clhs\u003e \u003cop\u003e \u003crhs\u003e\n```\n\n * ID assignment is optional\n * Valid identifiers are in the form of `[a-z]+`\n * Allowed operations: `-`, `+`, `*`, `/`\n * All arithmetic is done with `double`\n\n\nValid input list might be:\n\n```\na = 26.4 + 2.3\nb = 19.2 - 1.45\nc = a + b\na / b\nc + 102\n```\n\n## Building\n\nAll dependencies are gathered using conan.io\n\n```shell\ngit clone git@github.com:lefticus/nu_plugin_calc\nmkdir nu_plugin_calc-build\ncd nu_plugin_calc-build\ncmake -D CMAKE_BUILD_TYPE=Release ../nu_plugin_calc\nmake\n```\n\n## Usage within nushell\n\n\nMake sure the binary `nu_plugin_calc` is available in your path.\n\n```shell\ncat filewithexpressions | calc\n```\n\n## To Do\n\n * Consider supporting scientific notation\n * Set up tests\n * Set up CI\n * Make logging optional on command line\n * Consider more advanced expressions\n * Stronger typed JSON-RPC API of some sort\n * Actually make the below build status items do things...\n\n\n[![codecov](https://codecov.io/gh/lefticus/nu_shell_calc/branch/master/graph/badge.svg)](https://codecov.io/gh/lefticus/nu_shell_calc)\n\n[![Build Status](https://travis-ci.org/lefticus/nu_shell_calc.svg?branch=master)](https://travis-ci.org/lefticus/nu_shell_calc)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefticus%2Fnu_plugin_calc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefticus%2Fnu_plugin_calc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefticus%2Fnu_plugin_calc/lists"}