CLI reader for 4D4Y/HiPDA Discovery forum posts.
Project description
hipda
Local-first CLI for the 4D4Y/HiPDA Discovery channel (fid=2). Threads and posts are mirrored into a local SQLite store with FTS5 + jieba so listing, reading, and searching all work offline once the cache is warm.
Install + log in
The site uses browser/session checks, so direct unauthenticated requests may return a Cloudflare challenge. Log in once through Chrome:
uvx --from . hipda login
From PyPI:
uvx hipda login
That opens 4D4Y in Google Chrome. After you finish logging in, return to the terminal and press Enter.
The cookie is stored at ~/.config/hipda/cookie and the user agent is stored at ~/.config/hipda/user-agent, both with 0600 permissions. You can override them per command with HIPDA_COOKIE / --cookie and HIPDA_USER_AGENT / --user-agent.
Sync the local store
uvx --from . hipda sync # walk recent Discovery pages, stop when a page brings no changes
uvx --from . hipda sync --max-pages 10 # walk up to 10 pages
uvx --from . hipda sync --no-early-stop # always walk the full --max-pages range
Sync writes to the SQLite database at $HIPDA_DB, or $XDG_DATA_HOME/hipda/hipda.sqlite, falling back to ~/.local/share/hipda/hipda.sqlite.
List threads (local-first)
uvx --from . hipda list --limit 20 # reads local DB; auto-syncs when cold
uvx --from . hipda list --refresh # sync first, then print
uvx --from . hipda list --offline # never touch the network
uvx --from . hipda list --show-pinned # include pinned threads
uvx --from . hipda list --json # machine-readable output
Read a thread (local-first)
uvx --from . hipda read 3446553 # reads local; auto-fetches the thread when cold
uvx --from . hipda read 3446553 --refresh # re-sync the thread before printing
uvx --from . hipda read 3446553 --offline # local only
uvx --from . hipda read 3446553 --json # JSON array of posts
Full-text search
Search runs entirely against the local SQLite FTS5 index. Queries are segmented with jieba so CJK input works without spaces.
uvx --from . hipda search "半导体"
uvx --from . hipda search "半导体" --scope threads # only thread titles
uvx --from . hipda search "半导体" --scope posts # only post bodies
uvx --from . hipda search "半导体" --json --limit 50 # machine-readable
Each hit returns the matching tid (and pid for post matches), the thread title, and a snippet with [...] brackets around the matched tokens.
Exit codes
0— success1— generic failure (e.g. parse error, thread not found upstream)2— auth required (runhipda login)4—--offlinerequested but the local store is missing the needed data
TLS
The CLI disables HTTPS certificate verification by default because 4D4Y often fails from Python environments where Chrome still works. To verify certificates, pass a trusted root certificate and --verify-tls:
uvx --from . hipda --verify-tls --ca-file /path/to/root-ca.pem sync
Legacy
hipda list previously fetched directly from the forum on every call. The behaviour is now local-first; the old hipda discovery list and hipda discovery read subcommands still resolve through the same local-first path.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hipda-0.2.1.tar.gz.
File metadata
- Download URL: hipda-0.2.1.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcae476610155ced8a89d8227cad27c8cf1f2875b83fd2219bdefb1d2f82ecc1
|
|
| MD5 |
f32cdb97b2718e8e989c99445d8de1a9
|
|
| BLAKE2b-256 |
6a6f39d9ef271df41bcced3f8c9dee05bc3d07a2c3c25e2d4f4aa643a2591f8a
|
Provenance
The following attestation bundles were made for hipda-0.2.1.tar.gz:
Publisher:
python-publish.yml on cdpath/hipda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hipda-0.2.1.tar.gz -
Subject digest:
fcae476610155ced8a89d8227cad27c8cf1f2875b83fd2219bdefb1d2f82ecc1 - Sigstore transparency entry: 1630398719
- Sigstore integration time:
-
Permalink:
cdpath/hipda@5a6a124e62365cf899ddc951c21eee82dea72ddd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/cdpath
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5a6a124e62365cf899ddc951c21eee82dea72ddd -
Trigger Event:
release
-
Statement type:
File details
Details for the file hipda-0.2.1-py3-none-any.whl.
File metadata
- Download URL: hipda-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
807b70488aee052ad171243e527f0f6ad135a0c0378a6f91cd74f37d93eeebef
|
|
| MD5 |
4abed76d8330e8bbc2fd500e5230b5ab
|
|
| BLAKE2b-256 |
ae3f1ff69f56a71fe0f91ee6714753995e15191f082204d6772ef2904a0048a2
|
Provenance
The following attestation bundles were made for hipda-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on cdpath/hipda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hipda-0.2.1-py3-none-any.whl -
Subject digest:
807b70488aee052ad171243e527f0f6ad135a0c0378a6f91cd74f37d93eeebef - Sigstore transparency entry: 1630398723
- Sigstore integration time:
-
Permalink:
cdpath/hipda@5a6a124e62365cf899ddc951c21eee82dea72ddd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/cdpath
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@5a6a124e62365cf899ddc951c21eee82dea72ddd -
Trigger Event:
release
-
Statement type: