Skip to content
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

Use SQLite for parts database #99

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/update_components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ jobs:
jlcparts getlibrary --age 10000 \
--limit 30000 \
parts.csv cache.sqlite3
jlcparts buildtables --ignoreoldstock 120 \
jlcparts buildtables --jobs 0 \
--ignoreoldstock 120 \
cache.sqlite3 web/build/data

rm -f web/build/data/cache.z*
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*.sqlite*
.idea
*.zip
*.z*

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ $ pip install -e .
Then to download the cached parts list and process it, run:

```
$ wget https://yaqwsx.github.io/jlcparts/data/cache.zip
$ wget https://yaqwsx.github.io/jlcparts/data/cache.z01
$ wget https://yaqwsx.github.io/jlcparts/data/cache.z02
$ wget https://yaqwsx.github.io/jlcparts/data/cache.zip https://yaqwsx.github.io/jlcparts/data/cache.z0{1..8}
$ 7z x cache.zip
$ mkdir -p web/public/data/
$ jlcparts buildtables cache.sqlite3 web/public/data
$ jlcparts buildtables --jobs 0 --ignoreoldstock 30 cache.sqlite3 web/public/data
```

To launch the frontend web server, run:
Expand Down
Loading
Loading