You can share your jq command used after exporting here. I think pasting all the jq command to one issue is better for searching, for some newbies like me.
I run the jq command below in Unix shell (macOS, etc) and it works, inspired by @ocean #4461 (comment).
But I cannot make this jq works in Windows. If you've done it, come on and share it here for others.
How to export: https://docs.omnivore.app/using/exporting.html
Below is the original post.
This is a jq command with a little fine-tune for converting to.xlsx format and .md format, and I add links to local files by =HYPERLINK() command.
Tips: The jq command can directly run in Unix shell such like macOS terminal, but it cannot directly work in windows cause the “quote problem”. You can fine-tune it and give it a try, check: https://jqlang.github.io/jq/manual/
Follow these steps to .xlsx (in macOS):
- Follow these official steps. Download your Omnivore ZIP. Unzip it.
- Enter the folder, right click the folder name on the bottom bar, choose “open in terminal”.
- Paste these code in the terminal and press enter.
jq -r '
(["Tags","Title","Description","Created","File","URL"]),
(.[] | [
([.labels[]?]|join(",")),
(.title | gsub("\\n";" ") | gsub("\\r";" ") | gsub("\"";"''") | gsub("[^[:print:]]";" ") | gsub("\\s+";" ")),
(.description | gsub("\\n";" ") | gsub("\\r";" ") | gsub("\"";"''") | gsub("[^[:print:]]";" ") | gsub("\\s+";" ")),
.savedAt,
("=HYPERLINK(G1&\"\\content\\" + .slug + ".html\" ,\"Open\")"),
.url
]) | @csv
' metadata_*.json > omnivore-export.csv
- You should see the
omnivore-export.csv file appears in the same folder. Open it with Numbers App.
- In
Numbers’s menu, click "Files > Export As > Excel…" , next step, export.
- You should see the
omnivore-export.xlsx file appears in the same folder.
- Transport the folder to a windows PC. Open the
.xlsx with Excel.
- Copy the folder path in windows, and paste it to the
G2 cell in Excel.
- Now click a random "Open" button in column
E, you should open a local html file.
PS. I cannot make the links in .xlsx work in macOS, but they work in windows, you can give it a try.
Eventually, it looks like this, I covered the text, notice G2 and column E:
And here’s a version for Markdown .md. Get the .csv file and drop it to an online converter like this. Markdown softwares are slow at so much data though.
jq -r '
(["Tags","Title","Description","Created","File","URL"]),
(.[] | [
([.labels[]?]|join(",")),
(.title | gsub("\\n";" ") | gsub("\\r";" ") | gsub("\"";"''") | gsub("[^[:print:]]";" ") | gsub("\\s+";" ")),
(.description | gsub("\\n";" ") | gsub("\\r";" ") | gsub("\"";"''") | gsub("[^[:print:]]";" ") | gsub("\\s+";" ")),
.savedAt,
("[Open](.\\content\\" + .slug + ".html)"),
.url
]) | @csv
' metadata_*.json > omnivore-export.csv
You can share your jq command used after exporting here. I think pasting all the jq command to one issue is better for searching, for some newbies like me.
I run the jq command below in Unix shell (macOS, etc) and it works, inspired by @ocean #4461 (comment).
But I cannot make this jq works in Windows. If you've done it, come on and share it here for others.
How to export: https://docs.omnivore.app/using/exporting.html
Below is the original post.
This is a
jqcommand with a little fine-tune for converting to.xlsxformat and.mdformat, and I add links to local files by=HYPERLINK()command.Follow these steps to
.xlsx(in macOS):omnivore-export.csvfile appears in the same folder. Open it withNumbersApp.Numbers’s menu, click "Files > Export As > Excel…" , next step, export.omnivore-export.xlsxfile appears in the same folder..xlsxwithExcel.G2cell in Excel.E, you should open a local html file.PS. I cannot make the links in
.xlsxwork in macOS, but they work in windows, you can give it a try.Eventually, it looks like this, I covered the text, notice
G2and columnE:And here’s a version for Markdown
.md. Get the.csvfile and drop it to an online converter like this. Markdown softwares are slow at so much data though.