Update Docs
Shoud added them on docs and added images
This commit is contained in:
parent
cc32eff1da
commit
7e5abcedea
@ -12,7 +12,7 @@
|
|||||||
- [X] File engine
|
- [X] File engine
|
||||||
|
|
||||||
#### v0.2 - Usable
|
#### v0.2 - Usable
|
||||||
- [ ] Relationships
|
- [~] Relationships
|
||||||
- [ ] Arrays
|
- [ ] Arrays
|
||||||
- [X] Custom data file
|
- [X] Custom data file
|
||||||
- [X] Date
|
- [X] Date
|
||||||
@ -25,7 +25,7 @@
|
|||||||
- [ ] Dump/Bump data
|
- [ ] Dump/Bump data
|
||||||
- [ ] Recovery
|
- [ ] Recovery
|
||||||
- [ ] Better CLI
|
- [ ] Better CLI
|
||||||
- [ ] Linked query
|
- [ ] Linked query
|
||||||
|
|
||||||
### Beta
|
### Beta
|
||||||
#### v0.4 - Usability
|
#### v0.4 - Usability
|
||||||
|
BIN
docs/images/logo.jpeg
Normal file
BIN
docs/images/logo.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
15
mkdocs.yml
15
mkdocs.yml
@ -2,6 +2,21 @@ site_name: ZipponDB Documentation
|
|||||||
site_url: https://MrBounty.github.io/ZipponDB/
|
site_url: https://MrBounty.github.io/ZipponDB/
|
||||||
theme:
|
theme:
|
||||||
name: readthedocs
|
name: readthedocs
|
||||||
|
logo: images/logo.jpeg
|
||||||
|
collapse_navigation: true
|
||||||
|
palette:
|
||||||
|
- media: "(prefers-color-scheme: light)"
|
||||||
|
scheme: default
|
||||||
|
toggle:
|
||||||
|
icon: material/brightness-7
|
||||||
|
name: Switch to dark mode
|
||||||
|
|
||||||
|
# Palette toggle for dark mode
|
||||||
|
- media: "(prefers-color-scheme: dark)"
|
||||||
|
scheme: slate
|
||||||
|
toggle:
|
||||||
|
icon: material/brightness-4
|
||||||
|
name: Switch to light mode
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- attr_list
|
- attr_list
|
||||||
- md_in_html
|
- md_in_html
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,58 +0,0 @@
|
|||||||
import subprocess
|
|
||||||
from faker import Faker
|
|
||||||
import random
|
|
||||||
from tqdm import tqdm
|
|
||||||
|
|
||||||
fake = Faker()
|
|
||||||
|
|
||||||
def random_array():
|
|
||||||
length = random.randint(-1, 10)
|
|
||||||
scores = [random.randint(-1, 100) for _ in range(length)]
|
|
||||||
return f"[{' '.join(map(str, scores))}]"
|
|
||||||
|
|
||||||
def run(process, command):
|
|
||||||
"""Sends a command to the Zig process and returns the output."""
|
|
||||||
process.stdin.write('run "' + command + '"\n')
|
|
||||||
process.stdin.flush()
|
|
||||||
|
|
||||||
output = ""
|
|
||||||
char = process.stdout.read(1) # Read one character
|
|
||||||
while char:
|
|
||||||
if char == "\x03": # Check for ETX
|
|
||||||
break
|
|
||||||
output += char
|
|
||||||
char = process.stdout.read(1)
|
|
||||||
|
|
||||||
return output.strip()
|
|
||||||
|
|
||||||
# Start the Zig binary process once
|
|
||||||
|
|
||||||
|
|
||||||
for _ in tqdm(range(1000)):
|
|
||||||
process = subprocess.Popen(
|
|
||||||
["zig-out/bin/ZipponDB"],
|
|
||||||
stdin=subprocess.PIPE,
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.PIPE,
|
|
||||||
text=True # For easier string handling
|
|
||||||
)
|
|
||||||
for _ in range(1000):
|
|
||||||
query = "ADD User ("
|
|
||||||
query += f"name = '{fake.name()}',"
|
|
||||||
query += f"age = {random.randint(0, 100)},"
|
|
||||||
query += f"email = '{fake.email()}',"
|
|
||||||
query += f"scores={random_array()},"
|
|
||||||
query += f"friends = [],"
|
|
||||||
query += f"bday={fake.date(pattern='%Y/%m/%d')},"
|
|
||||||
query += f"last_order={fake.date_time().strftime('%Y/%m/%d-%H:%M:%S.%f')},"
|
|
||||||
query += f"a_time={fake.date_time().strftime('%H:%M:%S.%f')}"
|
|
||||||
query += f")"
|
|
||||||
|
|
||||||
run(process, query)
|
|
||||||
# Ensure we always close the process, even if an error occurs
|
|
||||||
process.stdin.write("quit\n")
|
|
||||||
process.stdin.flush()
|
|
||||||
process.terminate()
|
|
||||||
process.wait()
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user