-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
143 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import json | ||
import os | ||
|
||
""" | ||
This script is used to automatically generate a table of contents from the guide markdown files. | ||
The table of contents is used in index.md. | ||
It is only necessary to run this script if a new guide .md file has been added to the guides directory. | ||
""" | ||
|
||
|
||
def extract_title_and_slug(filename): | ||
with open(filename, "r") as f: | ||
lines = f.readlines() | ||
|
||
title, slug = None, None | ||
for line in lines: | ||
if line.startswith("title:"): | ||
title = line.strip().split(": ")[1] | ||
elif line.startswith("slug:"): | ||
slug = line.strip().split(": ")[1] | ||
if title and slug: | ||
return {"title": title, "slug": slug} | ||
|
||
return None | ||
|
||
|
||
def main(): | ||
json_array = [] | ||
current_directory = os.getcwd() | ||
for filename in os.listdir(current_directory): | ||
if filename.endswith(".md") and filename != "index.md": | ||
result = extract_title_and_slug(filename) | ||
if result: | ||
json_array.append(result) | ||
|
||
json_array = sorted(json_array, key=lambda x: x["title"]) | ||
|
||
with open("table_of_contents.json", "w") as f: | ||
json.dump(json_array, f, indent=4) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: chDB Guides | ||
slug: /en/chdb/guides | ||
description: Index page for chDB guides | ||
keywords: [chdb, guides] | ||
--- | ||
|
||
import TableOfContentsJSON from './table_of_contents.json' | ||
import { TableOfContents } from '/src/components/TableOfContents' | ||
|
||
Take a look at our chDB developer guides below: | ||
|
||
<TableOfContents items={TableOfContentsJSON} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[ | ||
{ | ||
"title": "How to query Apache Arrow with chDB", | ||
"slug": "/en/chdb/guides/apache-arrow" | ||
}, | ||
{ | ||
"title": "How to query Pandas DataFrames with chDB", | ||
"slug": "/en/chdb/guides/pandas" | ||
}, | ||
{ | ||
"title": "How to query Parquet files", | ||
"slug": "/en/chdb/guides/querying-parquet" | ||
}, | ||
{ | ||
"title": "How to query a remote ClickHouse server", | ||
"slug": "/en/chdb/guides/query-remote-clickhouse" | ||
}, | ||
{ | ||
"title": "How to query data in an S3 bucket", | ||
"slug": "/en/chdb/guides/querying-s3" | ||
}, | ||
{ | ||
"title": "JupySQL and chDB", | ||
"slug": "/en/chdb/guides/jupysql" | ||
}, | ||
{ | ||
"title": "Using a clickhouse-local database", | ||
"slug": "/en/chdb/guides/clickhouse-local" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Language Integrations Index | ||
slug: /en/chdb/install | ||
description: Index page for chDB language integrations | ||
keywords: [python, NodeJS, Go, Rust, Bun, C, C++] | ||
--- | ||
|
||
Instructions for how to get setup with chDB are available below for the following languages and runtimes: | ||
|
||
| Language | | ||
|----------------------------------------| | ||
| [Python](/docs/en/chdb/install/python) | | ||
| [NodeJS](/docs/en/chdb/install/nodejs) | | ||
| [Go](/docs/en/chdb/install/go) | | ||
| [Rust](/docs/en/chdb/install/rust) | | ||
| [Bun](/docs/en/chdb/install/bun) | | ||
| [C and C++](/docs/en/chdb/install/c) | |
2 changes: 1 addition & 1 deletion
2
docs/en/chdb/data-formats.md → docs/en/chdb/reference/data-formats.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: chDB Technical Reference | ||
slug: /en/chdb/reference | ||
description: Data Formats for chDB | ||
keywords: [chdb, data formats] | ||
--- | ||
|
||
| Reference page | | ||
|---------------------------------------------------| | ||
| [Data Formats](/en/chdb/reference/data-formats) | | ||
| [SQL Reference](/en/chdb/reference/sql-reference) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: SQL Reference | ||
sidebar_label: SQL Reference | ||
slug: /en/chdb/reference/sql-reference | ||
description: SQL Reference for chDB | ||
keywords: [chdb, sql reference] | ||
--- | ||
|
||
chdb supports the same SQL syntax, statements, engines and functions as ClickHouse: | ||
|
||
| Topic | | ||
|-------------------------------------------------------------------| | ||
| [SQL Syntax](/docs/en/sql-reference/syntax) | | ||
| [Statements](/docs/en/sql-reference/statements) | | ||
| [Table Engines](/docs/en/engines/table-engines) | | ||
| [Database Engines](/docs/en/engines/database-engines) | | ||
| [Regular Functions](/docs/en/sql-reference/functions) | | ||
| [Aggregate Functions](/docs/en/sql-reference/aggregate-functions) | | ||
| [Table Functions](/docs/en/sql-reference/table-functions) | | ||
| [Window Functions](/docs/en/sql-reference/window-functions) | | ||
|
||
For further information and examples, see the [ClickHouse SQL Reference](/docs/en/sql-reference). |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters