Compare commits

..

4 Commits

Author SHA1 Message Date
BaoXuebin 02d644fe96 version v1.1.17 2024-08-19 23:00:27 +08:00
BaoXuebin 1dd289404c update webview 2024-08-19 23:00:27 +08:00
BaoXuebin 3a38a1a146 fix: exec.Command cannot output 2024-08-19 23:00:25 +08:00
JmPotato 0a5f6f69c6 Deprecate the use of bean-report
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2024-08-19 20:26:20 +08:00
23 changed files with 67 additions and 64 deletions

View File

@ -6,39 +6,39 @@
"static/js/3.dbc9ff13.chunk.js": "/web/static/js/3.dbc9ff13.chunk.js",
"static/js/4.e31ce94a.chunk.js": "/web/static/js/4.e31ce94a.chunk.js",
"main.css": "/web/static/css/main.c42e041b.chunk.css",
"main.js": "/web/static/js/main.f50e7271.chunk.js",
"runtime-main.js": "/web/static/js/runtime-main.642bec3c.js",
"main.js": "/web/static/js/main.64c69f15.chunk.js",
"runtime-main.js": "/web/static/js/runtime-main.3875665a.js",
"static/css/7.b9d59b33.chunk.css": "/web/static/css/7.b9d59b33.chunk.css",
"static/js/7.062bc73c.chunk.js": "/web/static/js/7.062bc73c.chunk.js",
"static/js/8.0c73dfa2.chunk.js": "/web/static/js/8.0c73dfa2.chunk.js",
"static/css/9.3964a2f9.chunk.css": "/web/static/css/9.3964a2f9.chunk.css",
"static/js/9.e60f5287.chunk.js": "/web/static/js/9.e60f5287.chunk.js",
"static/js/9.48aab184.chunk.js": "/web/static/js/9.48aab184.chunk.js",
"static/js/10.e7a7ba9e.chunk.js": "/web/static/js/10.e7a7ba9e.chunk.js",
"static/css/11.f0a90ddf.chunk.css": "/web/static/css/11.f0a90ddf.chunk.css",
"static/js/11.0d6f207c.chunk.js": "/web/static/js/11.0d6f207c.chunk.js",
"static/js/11.662b16c3.chunk.js": "/web/static/js/11.662b16c3.chunk.js",
"static/js/12.46e48fa4.chunk.js": "/web/static/js/12.46e48fa4.chunk.js",
"static/js/13.9179a6ab.chunk.js": "/web/static/js/13.9179a6ab.chunk.js",
"static/js/13.ce360fe7.chunk.js": "/web/static/js/13.ce360fe7.chunk.js",
"static/css/14.d211b268.chunk.css": "/web/static/css/14.d211b268.chunk.css",
"static/js/14.9153ca51.chunk.js": "/web/static/js/14.9153ca51.chunk.js",
"static/js/14.df70c7b9.chunk.js": "/web/static/js/14.df70c7b9.chunk.js",
"static/css/15.dca2368b.chunk.css": "/web/static/css/15.dca2368b.chunk.css",
"static/js/15.ec6515ee.chunk.js": "/web/static/js/15.ec6515ee.chunk.js",
"static/js/15.a5c0b7e2.chunk.js": "/web/static/js/15.a5c0b7e2.chunk.js",
"static/css/16.bed844be.chunk.css": "/web/static/css/16.bed844be.chunk.css",
"static/js/16.b3d47f7e.chunk.js": "/web/static/js/16.b3d47f7e.chunk.js",
"static/js/17.e7b1a82e.chunk.js": "/web/static/js/17.e7b1a82e.chunk.js",
"static/js/16.abba3c5d.chunk.js": "/web/static/js/16.abba3c5d.chunk.js",
"static/js/17.4351876c.chunk.js": "/web/static/js/17.4351876c.chunk.js",
"static/css/18.0e433876.chunk.css": "/web/static/css/18.0e433876.chunk.css",
"static/js/18.1248bb5d.chunk.js": "/web/static/js/18.1248bb5d.chunk.js",
"static/js/19.494f900a.chunk.js": "/web/static/js/19.494f900a.chunk.js",
"static/js/20.a258893a.chunk.js": "/web/static/js/20.a258893a.chunk.js",
"static/js/19.ead40a00.chunk.js": "/web/static/js/19.ead40a00.chunk.js",
"static/js/20.21bbb459.chunk.js": "/web/static/js/20.21bbb459.chunk.js",
"index.html": "/web/index.html",
"static/js/10.e7a7ba9e.chunk.js.LICENSE.txt": "/web/static/js/10.e7a7ba9e.chunk.js.LICENSE.txt",
"static/js/11.0d6f207c.chunk.js.LICENSE.txt": "/web/static/js/11.0d6f207c.chunk.js.LICENSE.txt",
"static/js/11.662b16c3.chunk.js.LICENSE.txt": "/web/static/js/11.662b16c3.chunk.js.LICENSE.txt",
"static/js/8.0c73dfa2.chunk.js.LICENSE.txt": "/web/static/js/8.0c73dfa2.chunk.js.LICENSE.txt",
"static/js/9.e60f5287.chunk.js.LICENSE.txt": "/web/static/js/9.e60f5287.chunk.js.LICENSE.txt"
"static/js/9.48aab184.chunk.js.LICENSE.txt": "/web/static/js/9.48aab184.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.642bec3c.js",
"static/js/runtime-main.3875665a.js",
"static/js/8.0c73dfa2.chunk.js",
"static/css/main.c42e041b.chunk.css",
"static/js/main.f50e7271.chunk.js"
"static/js/main.64c69f15.chunk.js"
]
}

View File

@ -1 +1 @@
<!doctype html><html lang="zh"><head><meta charset="utf-8"/><link rel="icon" href="/web/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/web/logo192.png"/><link rel="manifest" href="/web/manifest.json"/><title>我的账本</title><link href="/web/static/css/main.c42e041b.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,u=t[0],f=t[1],i=t[2],d=0,s=[];d<u.length;d++)o=u[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&s.push(a[o][0]),a[o]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(t);s.length;)s.shift()();return c.push.apply(c,i||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=u(u.s=r[0]))}return e}var n={},o={6:0},a={6:0},c=[];function u(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{7:1,9:1,11:1,14:1,15:1,16:1,18:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"31d6cfe0",3:"31d6cfe0",4:"31d6cfe0",7:"b9d59b33",9:"3964a2f9",10:"31d6cfe0",11:"f0a90ddf",12:"31d6cfe0",13:"31d6cfe0",14:"d211b268",15:"dca2368b",16:"bed844be",17:"31d6cfe0",18:"0e433876",19:"31d6cfe0",20:"31d6cfe0"}[e]+".chunk.css",a=u.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var i=(l=c[f]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(i===n||i===a))return t()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var l;if((i=(l=d[f]).getAttribute("data-href"))===n||i===a)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var n=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],s.parentNode.removeChild(s),r(c)},s.href=a,document.getElementsByTagName("head")[0].appendChild(s)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.src=function(e){return u.p+"static/js/"+({}[e]||e)+"."+{0:"435e7a2e",1:"9dae1a02",2:"3dca96b0",3:"dbc9ff13",4:"e31ce94a",7:"062bc73c",9:"e60f5287",10:"e7a7ba9e",11:"0d6f207c",12:"46e48fa4",13:"9179a6ab",14:"9153ca51",15:"ec6515ee",16:"b3d47f7e",17:"e7b1a82e",18:"1248bb5d",19:"494f900a",20:"a258893a"}[e]+".chunk.js"}(e);var i=new Error;c=function(t){f.onerror=f.onload=null,clearTimeout(d);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}a[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:f})}),12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(t)},u.m=e,u.c=n,u.d=function(e,t,r){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)u.d(r,n,function(t){return e[t]}.bind(null,n));return r},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/web/",u.oe=function(e){throw console.error(e),e};var f=this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var l=i;r()}([])</script><script src="/web/static/js/8.0c73dfa2.chunk.js"></script><script src="/web/static/js/main.f50e7271.chunk.js"></script></body></html>
<!doctype html><html lang="zh"><head><meta charset="utf-8"/><link rel="icon" href="/web/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><meta name="theme-color" content="#000000"/><meta name="description" content="beancount-gs website"/><link rel="apple-touch-icon" href="/web/logo192.png"/><link rel="manifest" href="/web/manifest.json"/><title>beancount-gs</title><link href="/web/static/css/main.c42e041b.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,u=t[0],f=t[1],i=t[2],d=0,s=[];d<u.length;d++)o=u[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&s.push(a[o][0]),a[o]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(t);s.length;)s.shift()();return c.push.apply(c,i||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=u(u.s=r[0]))}return e}var n={},o={6:0},a={6:0},c=[];function u(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{7:1,9:1,11:1,14:1,15:1,16:1,18:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"31d6cfe0",3:"31d6cfe0",4:"31d6cfe0",7:"b9d59b33",9:"3964a2f9",10:"31d6cfe0",11:"f0a90ddf",12:"31d6cfe0",13:"31d6cfe0",14:"d211b268",15:"dca2368b",16:"bed844be",17:"31d6cfe0",18:"0e433876",19:"31d6cfe0",20:"31d6cfe0"}[e]+".chunk.css",a=u.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var i=(l=c[f]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(i===n||i===a))return t()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var l;if((i=(l=d[f]).getAttribute("data-href"))===n||i===a)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var n=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],s.parentNode.removeChild(s),r(c)},s.href=a,document.getElementsByTagName("head")[0].appendChild(s)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.src=function(e){return u.p+"static/js/"+({}[e]||e)+"."+{0:"435e7a2e",1:"9dae1a02",2:"3dca96b0",3:"dbc9ff13",4:"e31ce94a",7:"062bc73c",9:"48aab184",10:"e7a7ba9e",11:"662b16c3",12:"46e48fa4",13:"ce360fe7",14:"df70c7b9",15:"a5c0b7e2",16:"abba3c5d",17:"4351876c",18:"1248bb5d",19:"ead40a00",20:"21bbb459"}[e]+".chunk.js"}(e);var i=new Error;c=function(t){f.onerror=f.onload=null,clearTimeout(d);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}a[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:f})}),12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(t)},u.m=e,u.c=n,u.d=function(e,t,r){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)u.d(r,n,function(t){return e[t]}.bind(null,n));return r},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/web/",u.oe=function(e){throw console.error(e),e};var f=this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var l=i;r()}([])</script><script src="/web/static/js/8.0c73dfa2.chunk.js"></script><script src="/web/static/js/main.64c69f15.chunk.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(e){function t(t){for(var n,o,u=t[0],f=t[1],i=t[2],d=0,s=[];d<u.length;d++)o=u[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&s.push(a[o][0]),a[o]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(t);s.length;)s.shift()();return c.push.apply(c,i||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=u(u.s=r[0]))}return e}var n={},o={6:0},a={6:0},c=[];function u(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{7:1,9:1,11:1,14:1,15:1,16:1,18:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"31d6cfe0",3:"31d6cfe0",4:"31d6cfe0",7:"b9d59b33",9:"3964a2f9",10:"31d6cfe0",11:"f0a90ddf",12:"31d6cfe0",13:"31d6cfe0",14:"d211b268",15:"dca2368b",16:"bed844be",17:"31d6cfe0",18:"0e433876",19:"31d6cfe0",20:"31d6cfe0"}[e]+".chunk.css",a=u.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var i=(l=c[f]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(i===n||i===a))return t()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var l;if((i=(l=d[f]).getAttribute("data-href"))===n||i===a)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var n=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],s.parentNode.removeChild(s),r(c)},s.href=a,document.getElementsByTagName("head")[0].appendChild(s)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.src=function(e){return u.p+"static/js/"+({}[e]||e)+"."+{0:"435e7a2e",1:"9dae1a02",2:"3dca96b0",3:"dbc9ff13",4:"e31ce94a",7:"062bc73c",9:"e60f5287",10:"e7a7ba9e",11:"0d6f207c",12:"46e48fa4",13:"9179a6ab",14:"9153ca51",15:"ec6515ee",16:"b3d47f7e",17:"e7b1a82e",18:"1248bb5d",19:"494f900a",20:"a258893a"}[e]+".chunk.js"}(e);var i=new Error;c=function(t){f.onerror=f.onload=null,clearTimeout(d);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}a[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:f})}),12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(t)},u.m=e,u.c=n,u.d=function(e,t,r){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},u.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)u.d(r,n,function(t){return e[t]}.bind(null,n));return r},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/web/",u.oe=function(e){throw console.error(e),e};var f=this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var l=i;r()}([]);
!function(e){function t(t){for(var n,o,u=t[0],f=t[1],i=t[2],d=0,s=[];d<u.length;d++)o=u[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&s.push(a[o][0]),a[o]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(t);s.length;)s.shift()();return c.push.apply(c,i||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,o=1;o<r.length;o++){var f=r[o];0!==a[f]&&(n=!1)}n&&(c.splice(t--,1),e=u(u.s=r[0]))}return e}var n={},o={6:0},a={6:0},c=[];function u(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{7:1,9:1,11:1,14:1,15:1,16:1,18:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{0:"31d6cfe0",1:"31d6cfe0",2:"31d6cfe0",3:"31d6cfe0",4:"31d6cfe0",7:"b9d59b33",9:"3964a2f9",10:"31d6cfe0",11:"f0a90ddf",12:"31d6cfe0",13:"31d6cfe0",14:"d211b268",15:"dca2368b",16:"bed844be",17:"31d6cfe0",18:"0e433876",19:"31d6cfe0",20:"31d6cfe0"}[e]+".chunk.css",a=u.p+n,c=document.getElementsByTagName("link"),f=0;f<c.length;f++){var i=(l=c[f]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(i===n||i===a))return t()}var d=document.getElementsByTagName("style");for(f=0;f<d.length;f++){var l;if((i=(l=d[f]).getAttribute("data-href"))===n||i===a)return t()}var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onload=t,s.onerror=function(t){var n=t&&t.target&&t.target.src||a,c=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=n,delete o[e],s.parentNode.removeChild(s),r(c)},s.href=a,document.getElementsByTagName("head")[0].appendChild(s)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var c,f=document.createElement("script");f.charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.src=function(e){return u.p+"static/js/"+({}[e]||e)+"."+{0:"435e7a2e",1:"9dae1a02",2:"3dca96b0",3:"dbc9ff13",4:"e31ce94a",7:"062bc73c",9:"48aab184",10:"e7a7ba9e",11:"662b16c3",12:"46e48fa4",13:"ce360fe7",14:"df70c7b9",15:"a5c0b7e2",16:"abba3c5d",17:"4351876c",18:"1248bb5d",19:"ead40a00",20:"21bbb459"}[e]+".chunk.js"}(e);var i=new Error;c=function(t){f.onerror=f.onload=null,clearTimeout(d);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}a[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:f})}),12e4);f.onerror=f.onload=c,document.head.appendChild(f)}return Promise.all(t)},u.m=e,u.c=n,u.d=function(e,t,r){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},u.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)u.d(r,n,function(t){return e[t]}.bind(null,n));return r},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/web/",u.oe=function(e){throw console.error(e),e};var f=this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[],i=f.push.bind(f);f.push=t,f=f.slice();for(var d=0;d<f.length;d++)t(f[d]);var l=i;r()}([]);

View File

@ -5,6 +5,7 @@ import (
"fmt"
"os/exec"
"reflect"
"regexp"
"strconv"
"strings"
@ -104,13 +105,33 @@ func BQLQueryListByCustomSelect(ledgerConfig *Config, selectBql string, queryPar
return nil
}
func BeanReportAllPrices(ledgerConfig *Config) string {
func BeanReportAllPrices(ledgerConfig *Config) []CommodityPrice {
beanFilePath := GetLedgerPriceFilePath(ledgerConfig.DataPath)
LogInfo(ledgerConfig.Mail, "bean-report "+beanFilePath+" all_prices")
cmd := exec.Command("bean-report", beanFilePath, "all_prices")
var (
command string
useBeanReport = checkCommandExists("bean-report")
)
// `bean-report` had been deprecated since https://github.com/beancount/beancount/commit/a7c4f14f083de63e8d4e5a8d3664209daf95e1ec,
// we use `bean-query` instead. Here we add a check to use `bean-report` if `bean-query` is not installed for better compatibility.
if useBeanReport {
command = fmt.Sprintf("bean-report %s all_prices", beanFilePath)
} else {
// 'price' column works as a column placeholder to be consistent with the output of `bean-report`.
command = fmt.Sprintf(`bean-query %s "SELECT date, 'price', currency, price FROM account ~ 'Assets' WHERE price is not NULL"`, beanFilePath)
}
LogInfo(ledgerConfig.Mail, command)
re := regexp.MustCompile(`"([^"]*)"|(\S+)`)
cmds := re.FindAllString(command, -1)
cmd := exec.Command(cmds[0], cmds[1:]...)
output, _ := cmd.Output()
return string(output)
outputStr := string(output)
lines := strings.Split(outputStr, "\n")
LogInfo(ledgerConfig.Mail, outputStr)
// Remove the first two lines of the output since they are the header and separator with BQL output.
if !useBeanReport && len(lines) > 2 {
lines = lines[2:]
}
return newCommodityPriceListFromString(lines)
}
func bqlRawQuery(ledgerConfig *Config, selectBql string, queryParamsPtr *QueryParams, queryResultPtr interface{}) (string, error) {

View File

@ -484,11 +484,8 @@ type CommodityPrice struct {
Value string `json:"value"`
}
func RefreshLedgerCurrency(ledgerConfig *Config) []LedgerCurrency {
// 查询货币获取当前汇率
output := BeanReportAllPrices(ledgerConfig)
statsPricesResultList := make([]CommodityPrice, 0)
lines := strings.Split(output, "\n")
func newCommodityPriceListFromString(lines []string) []CommodityPrice {
commodityPriceList := make([]CommodityPrice, 0, len(lines))
// foreach lines
for _, line := range lines {
if strings.Trim(line, " ") == "" {
@ -496,14 +493,19 @@ func RefreshLedgerCurrency(ledgerConfig *Config) []LedgerCurrency {
}
// split line by " "
words := strings.Fields(line)
statsPricesResultList = append(statsPricesResultList, CommodityPrice{
commodityPriceList = append(commodityPriceList, CommodityPrice{
Date: words[0],
Commodity: words[2],
Value: words[3],
Currency: words[4],
})
}
return commodityPriceList
}
func RefreshLedgerCurrency(ledgerConfig *Config) []LedgerCurrency {
// 查询货币获取当前汇率
statsPricesResultList := BeanReportAllPrices(ledgerConfig)
// statsPricesResultList 转为 map
existCurrencyMap := make(map[string]CommodityPrice)
for _, statsPricesResult := range statsPricesResultList {

View File

@ -4,9 +4,16 @@ import (
"bytes"
"math/rand"
"net"
"os/exec"
"time"
)
func checkCommandExists(command string) bool {
cmd := exec.Command(command, "--version")
_, err := cmd.Output()
return err == nil
}
func GetIpAddress() string {
addrs, _ := net.InterfaceAddrs()
for _, value := range addrs {

View File

@ -480,33 +480,6 @@ func StatsPayee(c *gin.Context) {
OK(c, result)
}
type StatsPricesResult struct {
Date string `json:"date"`
Commodity string `json:"commodity"`
Currency string `json:"operatingCurrency"`
Value string `json:"value"`
}
func StatsCommodityPrice(c *gin.Context) {
ledgerConfig := script.GetLedgerConfigFromContext(c)
output := script.BeanReportAllPrices(ledgerConfig)
script.LogInfo(ledgerConfig.Mail, output)
statsPricesResultList := make([]StatsPricesResult, 0)
lines := strings.Split(output, "\n")
// foreach lines
for _, line := range lines {
if strings.Trim(line, " ") == "" {
continue
}
// split line by " "
words := strings.Fields(line)
statsPricesResultList = append(statsPricesResultList, StatsPricesResult{
Date: words[0],
Commodity: words[2],
Value: words[3],
Currency: words[4],
})
}
OK(c, statsPricesResultList)
OK(c, script.BeanReportAllPrices(script.GetLedgerConfigFromContext(c)))
}

View File

@ -3,5 +3,5 @@ package service
import "github.com/gin-gonic/gin"
func QueryVersion(c *gin.Context) {
OK(c, "v1.1.16")
OK(c, "v1.1.17")
}