simonmichael / hledger_site

The repo for hledger.org, the hledger project's website.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docs: missing csv.html

agander opened this issue · comments

I was doing some homework on CSV imports and found that the file referenced in the csv link of this site, doesnt seem to exist.
"This is described in detail in the csv format manual, but here are some quick examples."
and also the next para, by the rules link:
"Create a rules file named checking.csv.rules in the same directory."

So, to build the site:
"To render the latest site content (in out/):
and call make"

I dont have the 'out/ directory. Should I?

If someone could nudge me in the correct direction, I'll see if I can change the above.

Maybe I could a small note about where to get mdbook from.

Much appreciated, @agander. You need rust (cargo), then cargo install mdbook mdbook-toc (and for me, source ~/.bashrc to make sure they're in PATH). Then make should work, auto-creating out/ I expect.

np @simonmichael.
Ok, the out/ directory gets created - saw that in the book.toml.
Ah, I forgot the mdbook-toc.

Ok, so now I get:

2021-05-26 20:49:26 [ERROR] (mdbook::utils): Error: Rendering failed 2021-05-26 20:49:26 [ERROR] (mdbook::utils): Caused By: Failed to read "/home/gander/hledger/hledger_site/src/dev/hledger.md" 2021-05-26 20:49:26 [ERROR] (mdbook::utils): Caused By: No such file or directory (os error 2) make: *** [Makefile:2: build] Error 101

But I can see loads of hledger.md files under src/
Should I have built hledger prior?
(I havent)

gander@toast ~/hledger/hledger_site (master) $ l ./src/dev/hledger.md lrwxrwxrwx. 1 gander gander 27 May 23 12:48 ./src/dev/hledger.md -> ../../../hledger/hledger.md

That's right, there are symlinks; it's expected that you have the hledger_site repo checked out under the main hledger repo, as "site".

Ok, so I have manually moved (renamed) hledger_site/ to site/

However, I'm still getting:

2021-05-27 18:34:50 [ERROR] (mdbook::utils): Caused By: Failed to read "/home/gander/hledger/site/src/dev/hledger.md"

Perhaps my hledger/ src tree is stale?
Its old but up to date.

Will this work @simonmichael if I havent built hledger?

Looking at where csv format is mentioned:

gander@toast ~/hledger/site (master)
$ egi -n '\[csv format\]'  ./src/import-csv.md
5:almost any CSV file. This is described in detail in the [csv format] manual,
15:Create a [rules file][csv format] named `checking.csv.rules` in the same directory.
137:found in the [csv format] manual and in [examples/csv/] in the hledger
145:[csv format]: csv.html

it refers to csv.html.
@simonmichael can you recall the history that file?

Could it be this:
csv-format

I am poking around a bit using git blame but it works better with a known starting point.

Yes that's it, now merged into the hledger manual. git log --follow may be helpful.

Ok but whats the 'hledger manual'? hledger.m4.md

Should csv.md now be merged into 'the hledger manual'?
(And timedot, timeclock?)

hledger.m4.md says:

m4_dnl  .m4.md are hledger docs source, processed with m4 to generate markdown.

But then the webmanuals need in Shake.hs says that all the generated files hinge off the manpages.

When I start from hledger.org, at line 6 I click on CSV import
This is displayed as convert-csv-files.html but takes me to Import CSV. This equates to import-csv-md.
I then am back to the subject header when I click on csv format

I am well and truly confused and didnt get far with git log --follow because its not clear what to follow.

I can understand your confusion. Sorry for my last reply, I was replying by email and had forgotten all the context.

I have just now fixed the broken links in the https://hledger.org/import-csv.html cookbook page - thanks for that report. They lead to the CSV FORMAT section of the hledger user manual, https://hledger.org/hledger.html#csv-format. This content used to be a separate csv.html page, but now is part of hledger.html. You'll see it in hledger.m4.md which is the main source file for the hledger manual.

What else have I missed ?

Seems resolved.