-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hyperlinks to accounts and dates in HTML and FODS export #2226
base: master
Are you sure you want to change the base?
Conversation
The feature could also be used in |
Interesting feature!
I don't know the url escaping function offhand but it sounds resolvable. Maybe there's ideas in hledger-web. The reverse feature (linking to static HTML reports) could be a separate PR. I'd like to have multi-period tabular reports as a normal view in hledger-web, but linking to static html reports saved in temporary files, or better, serving the static html generated in memory, might be easier. |
On Thu, 12 Sep 2024, Simon Michael wrote:
Interesting feature!
--base-url sounds good. I assume its value will be the same as what hledger-web prints at startup ? Eg
...
with base url http://127.0.0.1:5000
...
I expect the trailing slash to be part of the base URL.
I don't know the url escaping function offhand but it sounds resolvable.
Maybe there's ideas in hledger-web.
hledger-web generates HTML via `blaze` instead of `lucid`.
The reverse feature (linking to static HTML reports) could be a separate PR.
of course
I'd like to have multi-period tabular reports as a normal view in
hledger-web, but linking to static html reports saved in temporary
files, or better, serving the static html generated in memory, might be
easier.
Hledger.Write.Html.printHTML returns a Lucid.Html () which can be served
from memory or written to a file.
|
be469c8
to
3b01812
Compare
We could also add the query from the command-line to the hyperlinks. That is, if someone restricts transactions in a certain way for the |
cli: Commands.Balance: new option --base-url It adds hledger-web-compatible hyperlinks to account names.
… anchors to period headers
c2f4575
to
2cc730a
Compare
This adds the option
--anchor
tohledger-cli
. If the user passes this option, then in HTML and FODS output the account and date header cells become hyperlinks tohledger-web
.If you like this feature, I add some documentation.
I could also rename the option to
--base-url
for consistency withhledger-web
.There is a problem though. Some special characters like
+
or umlauts in account names are not correctly escaped in percent URL syntax by Lucid. I do not know how to solve this correctly with Lucid and whether it is solvable with Lucid, at all.