Renamed to kalker
40
.github/workflows/release.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
run: cargo publish --manifest-path kalk/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
||||
- name: Publish CLI
|
||||
run: sleep 20 && cargo publish --manifest-path kalk_cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
||||
run: sleep 20 && cargo publish --manifest-path kalker/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
|
||||
|
||||
publish_npm:
|
||||
name: publish to npm
|
||||
@ -64,13 +64,13 @@ jobs:
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: build
|
||||
run: |
|
||||
cd kalk_web
|
||||
cd web
|
||||
npm install
|
||||
- name: publish
|
||||
run: echo success
|
||||
- name: publish
|
||||
run: |
|
||||
cd kalk_web
|
||||
cd web
|
||||
sudo apt install expect
|
||||
/usr/bin/expect <<EOD
|
||||
spawn npm adduser
|
||||
@ -92,11 +92,11 @@ jobs:
|
||||
- name: Compile
|
||||
run: |
|
||||
cargo build --release --verbose
|
||||
cp target/release/kalk target/release/kalk-linux
|
||||
cp target/release/kalker target/release/kalker-linux
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binaries
|
||||
path: target/release/kalk-linux
|
||||
path: target/release/kalker-linux
|
||||
|
||||
release_mac:
|
||||
name: release mac
|
||||
@ -113,11 +113,11 @@ jobs:
|
||||
- name: Compile
|
||||
run: |
|
||||
cargo build --release --verbose
|
||||
zip -r kalk-macOS.zip target/release/kalk
|
||||
zip -r kalker-macOS.zip target/release/kalker
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binaries
|
||||
path: kalk-macOS.zip
|
||||
path: kalker-macOS.zip
|
||||
|
||||
release_windows:
|
||||
name: release windows
|
||||
@ -133,8 +133,8 @@ jobs:
|
||||
C:\Users\runneradmin\.cargo\registry\index
|
||||
C:\Users\runneradmin\.cargo\registry\cache
|
||||
C:\Users\runneradmin\.cargo\registry\cache
|
||||
D:\a\kalk\kalk\target
|
||||
C:\msys64\home\paddi\kalk\target
|
||||
D:\a\kalker\kalker\target
|
||||
C:\msys64\home\paddi\kalker\target
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
@ -157,13 +157,13 @@ jobs:
|
||||
- shell: msys2 {0}
|
||||
run: |
|
||||
[ ! -f /c/Users/runneradmin/.cargo/bin/cargo-wix.exe ] && cargo install cargo-wix
|
||||
cd kalk_cli
|
||||
cd cli
|
||||
cargo wix --no-build --nocapture
|
||||
mv target/wix/*.msi target/wix/kalk-windows.msi
|
||||
mv target/wix/*.msi target/wix/kalker-windows.msi
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binaries
|
||||
path: kalk_cli/target/wix/kalk-windows.msi
|
||||
path: cli/target/wix/kalker-windows.msi
|
||||
|
||||
release_android:
|
||||
name: release android
|
||||
@ -171,16 +171,16 @@ jobs:
|
||||
needs: [publish_kalk_web]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./kalk_mobile
|
||||
working-directory: ./mobile
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
kalk_mobile/android/.gradle
|
||||
kalk_mobile/android/build
|
||||
kalk_mobile/android/app/build
|
||||
mobile/android/.gradle
|
||||
mobile/android/build
|
||||
mobile/android/app/build
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: npm
|
||||
run: |
|
||||
@ -190,21 +190,21 @@ jobs:
|
||||
run: |
|
||||
npx cap sync
|
||||
cd android
|
||||
version=$(cat ../../kalk_web/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
|
||||
version=$(cat ../../web/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
|
||||
APP_VERSION_NAME=$version ./gradlew assembleRelease
|
||||
- uses: r0adkll/sign-android-release@v1
|
||||
name: sign apk
|
||||
with:
|
||||
releaseDirectory: kalk_mobile/android/app/build/outputs/apk/release
|
||||
releaseDirectory: mobile/android/app/build/outputs/apk/release
|
||||
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
|
||||
alias: ${{ secrets.ALIAS }}
|
||||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||
- run: mv $(ls -Art android/app/build/outputs/apk/release/*.apk | tail -n 1) ../kalk-android.apk
|
||||
- run: mv $(ls -Art android/app/build/outputs/apk/release/*.apk | tail -n 1) ../kalker-android.apk
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binaries
|
||||
path: kalk-android.apk
|
||||
path: kalker-android.apk
|
||||
|
||||
create_release:
|
||||
name: Create Release
|
||||
|
4
.gitignore
vendored
@ -2,6 +2,6 @@ target
|
||||
*/target
|
||||
Cargo.lock
|
||||
kalk/Cargo.lock
|
||||
kalk_cli/Cargo.lock
|
||||
kalk_cli/test
|
||||
cli/Cargo.lock
|
||||
cli/test
|
||||
.vscode/
|
||||
|
2
Cargo.lock
generated
@ -158,7 +158,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kalk_cli"
|
||||
name = "kalker"
|
||||
version = "0.5.4"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
|
@ -1,5 +1,5 @@
|
||||
[workspace]
|
||||
members = ["kalk", "kalk_cli"]
|
||||
members = ["kalk", "cli"]
|
||||
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
|
31
README.md
@ -1,10 +1,10 @@
|
||||
![](logo.png)
|
||||
|
||||
Kalk is a calculator (both program and library) that supports user-defined variables, functions, derivation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly).
|
||||
Kalker (or "kalk") is a calculator program/website that supports user-defined variables, functions, derivation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly).
|
||||
|
||||
[![Crates.io](https://img.shields.io/crates/v/kalk_cli)](https://crates.io/crates/kalk_cli)![npm](https://img.shields.io/npm/v/@paddim8/kalk) [![GitHub](https://img.shields.io/github/license/PaddiM8/kalk)](https://github.com/PaddiM8/kalk/blob/master/LICENSE) [![Docs.rs](https://docs.rs/kalk/badge.svg)](https://docs.rs/kalk/latest/kalk/) ![Build status](https://img.shields.io/github/workflow/status/PaddiM8/kalk/Rust?event=push&label=build%20%26%20test)
|
||||
[![Crates.io](https://img.shields.io/crates/v/kalker)](https://crates.io/crates/kalker)![npm](https://img.shields.io/npm/v/@paddim8/kalk) [![GitHub](https://img.shields.io/github/license/PaddiM8/kalk)](https://github.com/PaddiM8/kalker/blob/master/LICENSE) [![Docs.rs](https://docs.rs/kalk/badge.svg)](https://docs.rs/kalk/latest/kalk/) ![Build status](https://img.shields.io/github/workflow/status/PaddiM8/kalker/Rust?event=push&label=build%20%26%20test)
|
||||
|
||||
[Kanban](https://kolan.strct.net/Board/4RAdMjLDz) | [Website - Try it out here!](https://kalk.strct.net)
|
||||
[Kanban](https://kolan.strct.net/Board/4RAdMjLDz) | [Website - Try it out here!](https://kalker.strct.net)
|
||||
|
||||
![](preview.png)
|
||||
|
||||
@ -12,21 +12,20 @@ Kalk is a calculator (both program and library) that supports user-defined varia
|
||||
|
||||
* Operators: +, -, \*, /, !
|
||||
* Groups: (), ⌈⌉, ⌋⌊
|
||||
* [Pre-defined functions and constants](https://github.com/PaddiM8/kalk/blob/master/kalk/src/prelude.rs)
|
||||
* [Pre-defined functions and constants](https://github.com/PaddiM8/kalker/blob/master/kalk/src/prelude.rs)
|
||||
* User-defined functions and variables. `f(x, y) = xy`, `x = 5`
|
||||
* User-defined units (experimental). `unit m = cm/100`, `2m/50cm`, `50cm to m`
|
||||
* Derivative of functions (derivatives of higher order can be a bit inaccurate). `f'(2)`, `sin'(-pi)`
|
||||
* Derivative of functions (derivatives of noisy functions or of higher order can be a bit inaccurate). `f'(2)`, `sin'(-pi)`
|
||||
* Integration. `∫(0, pi, sin(x) dx)` or `∫(0, π, sin(x) dx)`
|
||||
* Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy`
|
||||
* Syntax highlighting
|
||||
* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`.
|
||||
* Sum function: `sum(start, to, expression)` Eg. `sum(1, 3, 2n+1)` is the same as `2*1+1 + 2*2+1 + 2*3+1` = `15`
|
||||
* Load a file including predefined functions and constants. For example, if you're going to use Kalk for physics, you load up your file with physics functions/constants when starting Kalk. `-i file`
|
||||
* Load a file including predefined functions and constants. For example, if you're going to use kalker for physics, you load up your file with physics functions/constants when starting kalker. `-i file`
|
||||
* Misc: separate expressions by a semicolon to write them on the same line, use the `ans` variable to get the value of the previously calculated expression.
|
||||
|
||||
## Libraries
|
||||
|
||||
There are currently three different libraries related to kalk.
|
||||
There are currently three different libraries related to kalker.
|
||||
|
||||
* [kalk](https://crates.io/crates/kalk): The Rust crate that powers it all.
|
||||
* [@paddim8/kalk](https://www.npmjs.com/package/@paddim8/kalk): JavaScript bindings for `kalk`. This lets you use it in the browser thanks to WebAssembly.
|
||||
@ -36,7 +35,7 @@ There are currently three different libraries related to kalk.
|
||||
|
||||
### Binaries
|
||||
|
||||
Pre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in the [releases page](https://github.com/PaddiM8/kalk/releases).
|
||||
Pre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in the [releases page](https://github.com/PaddiM8/kalker/releases).
|
||||
|
||||
### Compiling
|
||||
|
||||
@ -44,17 +43,17 @@ Pre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in th
|
||||
|
||||
#### Cargo
|
||||
|
||||
Run `cargo install kalk_cli`
|
||||
Run `cargo install kalker`
|
||||
|
||||
#### Manually
|
||||
|
||||
1. Go into the `kalk_cli` directory.
|
||||
1. Go into the `cli` directory.
|
||||
2. Run `cargo build --release`
|
||||
3. Grab the binary from `targets/release`
|
||||
|
||||
## Syntax
|
||||
|
||||
A more complete reference can be found on [the website](https://kalk.strct.net)
|
||||
A more complete reference can be found on [the website](https://kalker.strct.net)
|
||||
|
||||
### Functions
|
||||
|
||||
@ -74,17 +73,17 @@ A more complete reference can be found on [the website](https://kalk.strct.net)
|
||||
|
||||
## Contributing
|
||||
|
||||
## kalk and kalk_cli (Rust)
|
||||
## kalk and cli (Rust)
|
||||
|
||||
After making changes to the kalk library (in `kalk/`), you can easily try them out by going to the root of the project directory, and doing `cargo run`. This will start kalk_cli, with the new changes. If you're using Windows, you will need to [follow the instructions here](https://docs.rs/gmp-mpfr-sys/1.2.3/gmp_mpfr_sys/index.html#building-on-windows), but also make sure to install `mingw-w64-x86_64-rust` in MSYS2.
|
||||
After making changes to the kalk library (in `kalk/`), you can easily try them out by going to the root of the project directory, and doing `cargo run`. This will start kalker (cli), with the new changes. If you're using Windows, you will need to [follow the instructions here](https://docs.rs/gmp-mpfr-sys/1.2.3/gmp_mpfr_sys/index.html#building-on-windows), but also make sure to install `mingw-w64-x86_64-rust` in MSYS2.
|
||||
|
||||
## kalk_web (Svelte, TypeScript, Sass)
|
||||
## web (Svelte, TypeScript, Sass)
|
||||
|
||||
Run:
|
||||
1. `npm install`
|
||||
2. `npm run dev` - this will automatically re-compile the project when changes are made
|
||||
|
||||
## kalk_mobile (Android)
|
||||
## mobile (Android)
|
||||
|
||||
Run:
|
||||
1. `npm install`
|
||||
|
@ -6,15 +6,11 @@ description = "A calculator that supports user-defined functions, variables and
|
||||
edition = "2018"
|
||||
keywords = ["math", "calculator", "cli", "command-line"]
|
||||
license = "MIT"
|
||||
name = "kalk_cli"
|
||||
name = "kalker"
|
||||
readme = "../README.md"
|
||||
repository = "https://github.com/PaddiM8/kalk"
|
||||
repository = "https://github.com/PaddiM8/kalker"
|
||||
version = "0.5.4"
|
||||
|
||||
[[bin]]
|
||||
name = "kalk"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
ansi_term = "0.12.1"
|
||||
kalk = { path = "../kalk", version = "^2.0.4" }
|
||||
@ -29,9 +25,9 @@ winres = "0.1"
|
||||
|
||||
[package.metadata.bundle]
|
||||
icon = ["../res/icon*"]
|
||||
identifier = "net.strct.kalk"
|
||||
name = "kalk"
|
||||
identifier = "net.strct.kalker"
|
||||
name = "kalker"
|
||||
short_description = "A calculator that supports user-defined functions, variables and units, and can handle fairly ambiguous syntax."
|
||||
|
||||
[package.metadata.bundle.bin.kalk]
|
||||
name = "kalk"
|
||||
[package.metadata.bundle.bin.kalker]
|
||||
name = "kalker"
|
@ -4,7 +4,7 @@ use winres;
|
||||
#[cfg(windows)]
|
||||
fn main() {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_icon("kalk.ico");
|
||||
res.set_icon("kalker.ico");
|
||||
res.compile().unwrap();
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ Sum function
|
||||
The value of "n" increments.
|
||||
Example: sum(1, 4, 2n) will be the same as 2*1 + 2*2 + 2*3 + 2*4 = 20
|
||||
This can for example be used to calculate e: Σ(0, 10000, 1/n!) = 2.7182818284590455
|
||||
More precision can be gotten by changing the "--precision" flag. Run `kalk --help` for more info.
|
||||
More precision can be gotten by changing the "--precision" flag. Run `kalker --help` for more info.
|
||||
|
||||
Constants
|
||||
pi or π = 3.14159265
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -27,7 +27,7 @@ pub fn start(mut parser: &mut parser::Context, precision: u32) {
|
||||
|
||||
// If in tty, print the welcome message
|
||||
if atty::is(atty::Stream::Stdin) && atty::is(atty::Stream::Stdout) {
|
||||
println!("kalk");
|
||||
println!("kalker");
|
||||
println!(
|
||||
"{}",
|
||||
ansi_term::Color::Fixed(246).paint("Type 'help' for instructions.")
|
@ -13,51 +13,51 @@
|
||||
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
|
||||
<?endif ?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||
<Product Name="Kalk" Id="*" UpgradeCode="F9D116C9-E90A-4956-803E-D8A7D324D434" Language="1033" Codepage="1252" Version="$(var.Version)" Manufacturer="Kalk">
|
||||
<Product Name="Kalker" Id="*" UpgradeCode="F9D116C9-E90A-4956-803E-D8A7D324D434" Language="1033" Codepage="1252" Version="$(var.Version)" Manufacturer="Kalker">
|
||||
<Package InstallerVersion="450" Compressed="yes" InstallScope="perMachine" Platform='$(var.Platform)'/>
|
||||
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
|
||||
<Icon Id="KalkIco" SourceFile=".\kalk.ico"/>
|
||||
<Icon Id="KalkerIco" SourceFile=".\kalker.ico"/>
|
||||
<WixVariable Id="WixUILicenseRtf" Value=".\wix/License.rtf"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="KalkIco"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="KalkerIco"/>
|
||||
<MediaTemplate EmbedCab="yes"/>
|
||||
<UIRef Id="WixUI_Minimal"/>
|
||||
|
||||
<Feature Id="ProductFeature" Title="ConsoleApp" Level="1">
|
||||
<ComponentRef Id="KalkExe"/>
|
||||
<ComponentRef Id="KalkShortcut"/>
|
||||
<ComponentRef Id="KalkerExe"/>
|
||||
<ComponentRef Id="KalkerShortcut"/>
|
||||
<ComponentRef Id="ModifyPathEnv"/>
|
||||
</Feature>
|
||||
|
||||
<!-- Create directories -->
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.PlatformProgramFilesFolder)">
|
||||
<Directory Id="KalkProgramFiles" Name="Kalk"/>
|
||||
<Directory Id="KalkerProgramFiles" Name="Kalker"/>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="KalkProgramMenu" Name="Kalk"/>
|
||||
<Directory Id="KalkerProgramMenu" Name="Kalker"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<!-- Application binaries -->
|
||||
<DirectoryRef Id="KalkProgramFiles">
|
||||
<Component Id="KalkExe" Guid="*" Win64='$(var.Win64)'>
|
||||
<File Id="KalkExeFile" Source="..\target\release\kalk.exe" Name="kalk.exe" KeyPath="yes"/>
|
||||
<DirectoryRef Id="KalkerProgramFiles">
|
||||
<Component Id="KalkerExe" Guid="*" Win64='$(var.Win64)'>
|
||||
<File Id="KalkerExeFile" Source="..\target\release\kalker.exe" Name="kalker.exe" KeyPath="yes"/>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="KalkProgramMenu">
|
||||
<DirectoryRef Id="KalkerProgramMenu">
|
||||
<!-- Application shortcut -->
|
||||
<Component Id="KalkShortcut" Guid="b1a06364-9af2-4864-94c4-e3985906c39f" Win64='$(var.Win64)'>
|
||||
<Shortcut Id="KalkShortcutFile" Name="Kalk" Description="A calculator" Target="[KalkProgramFiles]kalk.exe"/>
|
||||
<RemoveFolder Id="KalkProgramMenu" On="uninstall"/>
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\kalk" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
|
||||
<Component Id="KalkerShortcut" Guid="b1a06364-9af2-4864-94c4-e3985906c39f" Win64='$(var.Win64)'>
|
||||
<Shortcut Id="KalkerShortcutFile" Name="Kalker" Description="A calculator" Target="[KalkerProgramFiles]kalker.exe"/>
|
||||
<RemoveFolder Id="KalkerProgramMenu" On="uninstall"/>
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\kalker" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<DirectoryRef Id="KalkProgramFiles">
|
||||
<DirectoryRef Id="KalkerProgramFiles">
|
||||
<!-- Add to PATH -->
|
||||
<Component Id="ModifyPathEnv" Guid="732b94ae-608a-45fd-a0b3-d2896b6ef3b8" KeyPath="yes" Win64='$(var.Win64)'>
|
||||
<Environment Id="PathEnv" Value="[KalkProgramFiles]" Name="PATH" Permanent="no" Part="first" Action="set" System="yes"/>
|
||||
<Environment Id="PathEnv" Value="[KalkerProgramFiles]" Name="PATH" Permanent="no" Part="first" Action="set" System="yes"/>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
</Product>
|
@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<string name="app_name">Kalk</string>
|
||||
<string name="title_activity_main">Kalk</string>
|
||||
<string name="package_name">net.strct.kalk</string>
|
||||
<string name="custom_url_scheme">net.strct.kalk</string>
|
||||
</resources>
|
20813
kalk_web/package-lock.json
generated
BIN
logo.png
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 7.9 KiB |
@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/kalk_mobile.iml" filepath="$PROJECT_DIR$/.idea/kalk_mobile.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/mobile.iml" filepath="$PROJECT_DIR$/.idea/mobile.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f715975d-940d-4ed4-9dbe-0bcb3d72e51d" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/../kalk_web/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../kalk_web/package.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../web/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../web/package.json" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="net.strct.kalk">
|
||||
package="net.strct.kalker">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||
android:name="net.strct.kalk.MainActivity"
|
||||
android:name="net.strct.kalker.MainActivity"
|
||||
android:label="@string/title_activity_main"
|
||||
android:theme="@style/AppTheme.NoActionBarLaunch"
|
||||
android:launchMode="singleTask">
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"appId": "net.strct.kalk",
|
||||
"appName": "Kalk",
|
||||
"appId": "net.strct.kalker",
|
||||
"appName": "Kalker",
|
||||
"bundledWebRuntime": true,
|
||||
"npmClient": "npm",
|
||||
"webDir": "www",
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
7
mobile/android/app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<string name="app_name">Kalker</string>
|
||||
<string name="title_activity_main">Kalker</string>
|
||||
<string name="package_name">net.strct.kalker</string>
|
||||
<string name="custom_url_scheme">net.strct.kalker</string>
|
||||
</resources>
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"appId": "net.strct.kalk",
|
||||
"appName": "Kalk",
|
||||
"appId": "net.strct.kalker",
|
||||
"appName": "Kalker",
|
||||
"bundledWebRuntime": true,
|
||||
"npmClient": "npm",
|
||||
"webDir": "www",
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Kalk</title>
|
||||
<title>Kalker</title>
|
||||
<meta name="viewport"
|
||||
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
@ -24,7 +24,7 @@
|
||||
<body>
|
||||
<div class="calculator">
|
||||
<kalk-calculator autofocus="true" buttonpanel="true" numberrow="true">
|
||||
<console-line>kalk</console-line>
|
||||
<console-line>kalker</console-line>
|
||||
<console-line>
|
||||
<span class="hint">Type 'help' for instructions.</span>
|
||||
</console-line>
|
0
kalk_web/.gitignore → web/.gitignore
vendored
@ -1,8 +1,8 @@
|
||||
# Kalk Web Component
|
||||
# Kalker Web Component
|
||||
![npm](https://img.shields.io/npm/v/@paddim8/kalk-component)
|
||||
![license](https://img.shields.io/npm/l/@paddim8/kalk-component)
|
||||
|
||||
A web component built with Svelte that uses kalk (WebAssembly).
|
||||
A web component built with Svelte that uses the kalk library (WebAssembly).
|
||||
|
||||
![preview](preview.png)
|
||||
|
||||
@ -26,7 +26,7 @@ I am not aware of a better way.
|
||||
```html
|
||||
<div class="kalk"> <!-- Apply css rules for position/size/font/etc. to this -->
|
||||
<kalk-calculator>
|
||||
<console-line>kalk</console-line>
|
||||
<console-line>kalker</console-line>
|
||||
<console-line>
|
||||
<span class="hint">Type 'help' for instructions.</span>
|
||||
</console-line>
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@ -107,7 +107,7 @@
|
||||
|
||||
if (input.trim() == "help") {
|
||||
output = `<a style="color: ${linkcolor}"
|
||||
href="https://kalk.strct.net/#usage"
|
||||
href="https://kalker.strct.net/#usage"
|
||||
target="blank">Link to usage guide</a>`;
|
||||
} else if (input.trim() == "clear") {
|
||||
outputLines = [];
|