mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 05:34:14 +00:00
a0ddd52bdb
Kind of silly that I'm already on the third iteration of the website. But the previous one was a bit over-engineered and hard to maintain. I actually can't even get it to compile anymore, it errors out while trying to build the wasm binary. So it was either migrate from sapper (which is deprecated and broken) to svelte-kit (the successor to sapper), or to simplify. I simplified. The new tech jenga tower is: - Soupault for building the website - AsciiDoctor for the pages - cmark-gfm for processing the markdown in the github releases - Several plugins and scripts copied from my personal website - Vite for compiling the javascript - wasm-pack for building the wasm binary Rink's website will now be completely static, so operating it is easier. The javascript and wasm is quarantined to the index page where a rink repl is active, the other pages are plain html. The currency fetching is now a totally separate piece of code from the website. It makes it simpler and requires less code to be loaded during the regular cron job. The javascript is way simpler now. It only manipulates the part of the page that need to be dynamic. It also uses the token format machinery instead of directly converting rink's output AST to html. Pros: - Way lighter, faster page load times. - Easier to maintain. - Site contains more information now. An about page, the manual, and a releases tab with DL links. - No more URL spam that makes search engines think the site is a content farm. - Actually acts as a REPL now so you can run multiple queries, use `ans`, up/down arrows to re-run previous queries. - Proper sandboxing - queries that timeout cause the worker to be killed and restarted. - Now has a progress indicator on downloading the wasm blob, which is good on slow connections. Cons: - Even more of a custom setup than before. - It doesn't work offline anymore. At least not until I add a new service worker, which will be a real pain to debug. - The interactive parts (the rink REPL) require javascript to work now. - A lot of the old URLs like `/query/abc` and `/units/meter` are broken. I think this is fine though. I can add redirects in nginx that point them to `/?q=abc` and `/?q=meter`. ## Screenshots ### REPL ![image](https://github.com/tiffany352/rink-rs/assets/1254344/7e43fe58-134f-425c-b975-997797fc1af4) ### About page ![image](https://github.com/tiffany352/rink-rs/assets/1254344/d6a34ce5-a357-434c-b7e9-9ddee3884223)
72 lines
1.4 KiB
Text
72 lines
1.4 KiB
Text
= rink(1)
|
|
:manmanual: Rink Manual
|
|
:mansource: Rink Manual
|
|
|
|
Name
|
|
----
|
|
rink - Unit calculator and dimensional analysis tool
|
|
|
|
Synposis
|
|
--------
|
|
[verse]
|
|
**rink**
|
|
**rink** [_EXPR_]...
|
|
**rink -f** <__FILE__>
|
|
**rink** (**-h** | **-V** | **--config-path**)
|
|
|
|
Description
|
|
-----------
|
|
Rink is a unit conversion and calculation tool which can be used for
|
|
both small and simple arithmetic and more complex dimensionality
|
|
analysis and other tasks.
|
|
|
|
Options
|
|
-------
|
|
**--config-path**::
|
|
Prints a path to the config file, then exits.
|
|
|
|
**-f**::
|
|
**--file** <__file__>::
|
|
Reads expressions from a file, one per line, printing them to stdout
|
|
and then exitting.
|
|
|
|
**-h**::
|
|
**--help**::
|
|
Print help information and then exits.
|
|
|
|
**-V**::
|
|
**--version**::
|
|
Prints the current version and then exits.
|
|
|
|
Exit status
|
|
------------
|
|
|
|
Returns 0 unless an error prevented rink from starting up.
|
|
|
|
Environment
|
|
-----------
|
|
|
|
**NO_COLORS**::
|
|
If set to a non-empty string, rink will disable colored text
|
|
rendering.
|
|
|
|
Files
|
|
-----
|
|
Rink looks for a configuration file in
|
|
`$XDG_CONFIG_DIR/rink/config.toml`, see rink(5).
|
|
|
|
Rink relies on some data files, which are found using a search path.
|
|
See rink-defs(5) and rink-dates(5).
|
|
|
|
Bugs
|
|
----
|
|
|
|
<https://github.com/tiffany352/rink-rs/issues>
|
|
|
|
ifndef::website[]
|
|
See also
|
|
--------
|
|
xref:rink.5.adoc[rink(5)], xref:rink.7.adoc[rink(7)],
|
|
xref:rink-defs.5.adoc[rink-defs(5)],
|
|
xref:rink-dates.5.adoc[rink-dates(5)]
|
|
endif::[]
|