Commit graph

489 commits

Author SHA1 Message Date
ae3cc20c74 Bitlair plugins 2025-03-29 16:11:47 +01:00
71f1600312 Bitlair changes 2025-03-09 16:01:18 +01:00
Juerd Waalboer
996159a2ad Bump version to 8.3.1 2025-03-06 03:58:04 +01:00
Juerd Waalboer
b0bf49bd6f UPGRADING.md: formatting 2025-03-06 03:57:25 +01:00
Juerd Waalboer
bb1e448911 Add 7.1.0 to UPGRADING.md 2025-03-06 03:57:06 +01:00
Juerd Waalboer
bb46f5037e nomoney: fix multi-user
Some transactions with only one contra account, but used multiple times,
or with the actor's own account as the only other contra account, were
erroneously allowed.
2025-03-06 03:44:43 +01:00
Juerd Waalboer
19dd4c820e openepaperlink: erase tag images on unlink 2025-01-17 01:17:43 +01:00
Juerd Waalboer
0ce6eba77a openepaperlink: deduplicate code 2025-01-17 00:54:02 +01:00
Juerd Waalboer
7b2fc96b19 Document hook_products_changed (replaces 2 other hooks) 2025-01-15 21:33:44 +01:00
Juerd Waalboer
69fa5af0d1 Merge branch 'oepl' 2025-01-15 21:32:06 +01:00
Juerd Waalboer
c36254d403 contrib/openepaperlink.pl: feature to re-upload images 2025-01-15 21:30:22 +01:00
Juerd Waalboer
a744f5ec30 Bump to v8.3.0 2025-01-08 02:20:18 +01:00
Juerd Waalboer
65e387d84b openepaperlink: keep deleted products linked
This allows commenting a product in revbank.products to temporarily make
it unavailable, which is useful in the workflow that @PI4DEC wants.
2025-01-07 19:49:56 +01:00
Juerd Waalboer
d703638e68 Openepaperlink: add hardware type 4 (2.6")
Contributed by @PI4DEC
2025-01-07 19:46:14 +01:00
Juerd Waalboer
16afac851a Default tag_price to 0.00 instead of 0 2025-01-06 23:41:07 +01:00
Juerd Waalboer
21f35a812e Let ^C interrupt only current command's argument prompts
Also, move the sub `abort` outside the infinite loop because it's just
too weird to have a named global function in a loop; the scope of the
outer lexicals is non-obvious.
2025-01-05 23:57:07 +01:00
Juerd Waalboer
b396943881 Shorter README.md; moved most to INSTALLING.md 2025-01-05 01:36:28 +01:00
Juerd Waalboer
4d1dee6794 Rename revbank.oepl to .revbank.oepl
Generally, files that revbank writes to are hidden.

(revbank.accounts and revbank.statiegeld were mistakes.)
2025-01-05 01:17:46 +01:00
Juerd Waalboer
0c071f3830 Update README
ctrl+d for restart was disabled a while ago
2025-01-05 01:15:38 +01:00
Juerd Waalboer
e16d76b758 onepaperlink: fix handling of multiple changes
This change removes two recently added hooks. No deprecation cycle
because they have only existed for a week, so it's extremely unlikely
that anyone's using them.
2025-01-05 00:23:34 +01:00
Juerd Waalboer
614c612ec9 openepaperlink: The touch/mtime solution is not right.
The hook gets fired for each product individually, so a single mtime
update is not good enough.

The timestamp needs to be recorded per product or tag. Meh.
2025-01-04 22:04:29 +01:00
Juerd Waalboer
5d910510b8 openepaperlink: handle concurrent revbank instances better
RevBank reads the new products file on every interaction (e.g. pressing
enter), and then fires hooks like `product_changed`. Every running
instance gets those hooks, but the price tage should be generated only
once.
2025-01-04 22:00:43 +01:00
Juerd Waalboer
35fd5f4d85 openepaperlink: timeout for uploads 2025-01-04 21:56:03 +01:00
Juerd Waalboer
bdaa8f807f Bump to v8.1.0 2025-01-04 06:56:34 +01:00
Juerd Waalboer
5e8f905a7d Silence warnings for single-field line in revbank.products 2025-01-04 06:55:29 +01:00
Juerd Waalboer
e644526496 openepaperlink: white foreground for #promo 2025-01-04 03:10:06 +01:00
Juerd Waalboer
3e7dee0da7 openepaperlink plugin: initial commit 2025-01-04 02:43:04 +01:00
Juerd Waalboer
55892c236b Add hook_product_changed, hook_product_deleted 2024-12-29 02:43:28 +01:00
Juerd Waalboer
c3aef1e783 Add ^G for scroll to end
Requested by @Pwuts.

Apparently nano uses ^G for this.
2024-12-27 21:22:06 +01:00
Juerd Waalboer
8e9b3894f9 Update URL 2024-12-26 06:10:51 +01:00
Juerd Waalboer
02c9db1ddf Don't die when addon doesn't exist 2024-12-26 05:26:28 +01:00
Juerd Waalboer
19cf432905 Bump version to v8.0.0 2024-12-26 03:35:21 +01:00
Juerd Waalboer
33f5cc1b21 Products.pm: Document #OPAQUE and read_products 2024-12-26 03:34:34 +01:00
Juerd Waalboer
3c6ee11abd Update example product list 2024-12-26 03:16:55 +01:00
Juerd Waalboer
b22ac11476 read_products: do calculate total_price for alias of addon
There was a bug with the example product defined as:

    +smk,matekrat  1.50@+statiegeld  "..."

Only the id `+smk` was considered, and no total price was calculated. This
broke the accessible id `matekrat`. The fix is to consider the keys of
the products in the hash, instead of the `id` field.
2024-12-26 03:13:19 +01:00
Juerd Waalboer
de5d3bc925 Update UPGRADING.md 2024-12-26 03:08:56 +01:00
Juerd Waalboer
763a8857ad Move documentation for revbank.products from plugins/ to lib/ 2024-12-26 02:24:19 +01:00
Juerd Waalboer
b22cc4c997 Move price calculation from products plugin to RevBank::Products
- Adds price tag calculation. Addons tagged #OPAQUE are excluded from the
price tag.
- BREAKING CHANGE: instead of abusing $product->{price} for a percent,
$product->{percent} is no longer a boolean but the actual percent, so
$product->{price} is the calculated amount.

The total price of a product is now calculated in two places, once when
reading the product list, and once as the result of adding the entry and
its contras when adding the product. Although this involves some
duplication and the sums are calculated in different ways, it hinges on
the existing assertion to make sure that the entry is balanced to ensure
that both sums are the same. Because of that, this code duplication
actually strengthens the integrity.
2024-12-26 01:36:55 +01:00
Juerd Waalboer
a450aa7468 Use read_products in new namespace
(Would also work without this change, but indirectly through the
products plugin which imports this symbol)
2024-12-25 23:50:03 +01:00
Juerd Waalboer
7c5431fba4 Move read_products() from plugin to core
Additional changes:
- Parametrized $filename and $default_contra
- Add ->{config} to product hashes, which is the re-serialized config line
2024-12-25 23:43:03 +01:00
Juerd Waalboer
4abce51769 revspace_lasercutter: fix direction
Oops, lasercutting should cost money, not generate it...
2024-11-29 05:44:30 +01:00
Juerd Waalboer
3b6f11f0dd idle: suspend beeping on text input (cursor move) 2024-11-27 02:49:20 +01:00
Juerd Waalboer
5f95076af8 New plugin: revspace_lasercutter 2024-11-18 23:48:02 +01:00
Juerd Waalboer
f8736cbde7 nomoney: no ansi color in logs 2024-11-18 23:18:02 +01:00
Juerd Waalboer
fab19ba6d0 nomoney: add logging 2024-11-18 23:09:03 +01:00
Juerd Waalboer
bfb2d712e7 nomoney: limit scope for variable 2024-11-17 03:37:37 +01:00
Juerd Waalboer
988a161016 nomoney: remove repeated word 2024-11-17 03:13:33 +01:00
Juerd Waalboer
ee8855bfc7 nomoney: reduce indentation complexity, fix comment 2024-11-17 03:11:01 +01:00
Juerd Waalboer
daffe920ba nomoney: remove unused labels
These loop control labels are leftovers from an earlier, more complicated, attempt
2024-11-17 03:01:40 +01:00
Juerd Waalboer
a9040dcca1 nomoney: fix memory leak 2024-11-17 02:59:19 +01:00