summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accounts/gkleen@sif/niri.nix1
-rw-r--r--overlays/FinanceQuote/default.nix11
-rw-r--r--overlays/FinanceQuote/tradegate.patch18
3 files changed, 30 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/niri.nix b/accounts/gkleen@sif/niri.nix
index c7f450aa..098386d0 100644
--- a/accounts/gkleen@sif/niri.nix
+++ b/accounts/gkleen@sif/niri.nix
@@ -656,6 +656,7 @@ in {
656 (sleaf "match" { app-id = "^emacs$"; }) 656 (sleaf "match" { app-id = "^emacs$"; })
657 (sleaf "match" { app-id = "^firefox$"; }) 657 (sleaf "match" { app-id = "^firefox$"; })
658 (sleaf "match" { app-id = "^gnucash$"; }) 658 (sleaf "match" { app-id = "^gnucash$"; })
659 (sleaf "exclude" { app-id = "^gnucash$"; title = "^(Securities|Price Database)$"; })
659 (plain "default-column-width" [(sleaf "proportion" (2. / 3.))]) 660 (plain "default-column-width" [(sleaf "proportion" (2. / 3.))])
660 ]) 661 ])
661 (plain "window-rule" [ 662 (plain "window-rule" [
diff --git a/overlays/FinanceQuote/default.nix b/overlays/FinanceQuote/default.nix
new file mode 100644
index 00000000..45c7d833
--- /dev/null
+++ b/overlays/FinanceQuote/default.nix
@@ -0,0 +1,11 @@
1{ prev, final, ... }: {
2 perlPackages = (final.perl.override {
3 overrides = p: {
4 FinanceQuote = prev.perl.pkgs.FinanceQuote.overrideAttrs (oldAttrs: {
5 patches = (oldAttrs.patches or []) ++ [
6 ./tradegate.patch
7 ];
8 });
9 };
10 }).pkgs;
11}
diff --git a/overlays/FinanceQuote/tradegate.patch b/overlays/FinanceQuote/tradegate.patch
new file mode 100644
index 00000000..f1081fc4
--- /dev/null
+++ b/overlays/FinanceQuote/tradegate.patch
@@ -0,0 +1,18 @@
1--- old/lib/Finance/Quote/Tradegate.pm
2+++ new/lib/Finance/Quote/Tradegate.pm
3@@ -98,12 +98,13 @@
4 @child = $td1->content_list;
5 my $exchange = $child[0];
6
7 $td1 = ($lastvalue->look_down('_tag'=>'td'))[7];
8 @child = $td1->content_list;
9- my $date = substr($child[0], 0, 8);
10- my $time = substr($child[0], 9, 5); # CE(S)T
11+ $child[0] =~ /(?<date>\d{2}\.\d{2}\.\d{2,4})\s*\/\s*(?<time>\d{2}:\d{2})/;
12+ my $date = $+{date};
13+ my $time = $+{time};
14
15 $td1 = ($lastvalue->look_down('_tag'=>'td'))[9];
16 @child = $td1->content_list;
17 my $price = $child[0];
18 $price =~ s/\.//g;