Skip to content

Commit ee6d6a3

Browse files
committed
Fix the ci readme generator
1 parent f72310b commit ee6d6a3

File tree

3 files changed

+27
-82
lines changed

3 files changed

+27
-82
lines changed

.github/workflows/update_readme.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Install Cargo readme
1313
run: cargo install cargo-readme
1414
- name: Run Cargo readme
15-
run: cargo readme --no-title --no-license > README.md
15+
run: cd formula && cargo readme --no-title --no-license > ../README.md
1616
- name: Commit the changes
1717
uses: stefanzweifel/git-auto-commit-action@v4
1818
with:

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Crates.io](https://img.shields.io/crates/v/formula.svg)](https://crates.io/crates/formula)
1+
[![Crates.io](https://img.shields.io/crates/v/formula.svg?style=flat)](https://crates.io/crates/formula)
2+
[![npm](https://img.shields.io/npm/v/formula-wasm.svg?style=flat)](https://npmjs.com/package/formula-wasm)
23
[![Workflow Status](https://github.com/omid/formula/workflows/ci/badge.svg)](https://github.com/omid/formula/actions?query=workflow%3A%22ci%22)
34

45
<h1 align="center"><em>Formula</em></h1>
@@ -7,7 +8,7 @@
78
A parser and evaluator of spreadsheet-like formulas
89
</h3>
910

10-
Formula is in its early stages, so it's better to be used cautiously.
11+
Formula is in its early stages and is not ready for production use.
1112

1213
So far we have the following features:
1314

@@ -18,7 +19,9 @@ So far we have the following features:
1819
- 2 web functions
1920
- plus all arithmetic and comparison operators
2021

21-
### Installation and usage
22+
#### Installation and usage
23+
24+
##### Rust
2225

2326
Add this library to your project with `cargo add formula` or add `formula = "*"` to your `Cargo.toml` file.
2427

@@ -35,22 +38,35 @@ fn main() -> Result<()> {
3538
}
3639
```
3740

38-
### What we do not support, yet:
41+
##### JavaScript
42+
43+
Add this library to your project with `npm install formula-wasm` or add `formula-wasm` to your `package.json` file.
44+
45+
Use it similar to the following code:
46+
47+
```js
48+
import { parse } from 'formula-wasm';
49+
50+
const value = parse('=UPPER(TRIM(" Hello "))');
51+
console.assert(value, "HELLO");
52+
```
53+
54+
#### What we do not support, yet:
3955

40-
- Support of functions are so limited at the moment, but we would like to add more of them, like Excel functions, Google Sheets functions, and so on
41-
- At the moment, we don't support table data, so you need to pass values to the formula as arguments by yourself
56+
- We don't support all existing functions in the world, but we would like to add more of them, like Excel functions, Google Sheets functions, and so on
57+
- At the moment, we don't support table data. It means you need to extract table data and pass theirs values to this library
4258
- We do not support simple formulas like `1+1` or as argument like `AND(1>3, 1<3)` or `SUM(2-1, 2)`. Instead, you can use our `F.` functions like `AND(F.GT(1, 3), F.LT(1, 3))` or `SUM(F.SUB(2, 1), 2)`
4359
- We still do not support parentheses to change the order of operations, but you can use our `F.` functions. So for example instead of `2*(1+1)`, you should use `F.MUL(2, F.ADD(1, 1))`
4460

45-
### Contributing
61+
#### Contributing
4662

4763
We would love to have your contribution! Please read our [contributing guidelines](CONTRIBUTING.md) to get started.
4864

49-
### Inspired by
65+
#### Inspired by
5066

5167
- [formulajs](https://github.com/formulajs/formulajs)
5268
- [hyperformula](https://github.com/handsontable/hyperformula)
5369

54-
### License
70+
#### License
5571

5672
This project is licensed under the MIT license. See the [LICENSE](LICENSE.md) file for more info.

formula/README.md

Lines changed: 0 additions & 72 deletions
This file was deleted.

formula/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

0 commit comments

Comments
 (0)