https://github.com/amscotti/hnjobsearcher
Python application for looking at job postings from the Hacker News monthly job posting
https://github.com/amscotti/hnjobsearcher
hackernews jobsearch python sqlite
Last synced: 3 months ago
JSON representation
Python application for looking at job postings from the Hacker News monthly job posting
- Host: GitHub
- URL: https://github.com/amscotti/hnjobsearcher
- Owner: amscotti
- License: mit
- Created: 2023-04-06T23:50:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-14T02:29:26.000Z (7 months ago)
- Last Synced: 2026-01-14T05:49:16.977Z (7 months ago)
- Topics: hackernews, jobsearch, python, sqlite
- Language: Python
- Homepage:
- Size: 1.22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hacker News Job Posting Search
This Python CLI application allows you to search for job postings on Hacker News based on a given query text. It retrieves job postings using the [Hacker News API](https://github.com/HackerNews/API), indexes them using an SQLite full-text search (FTS) engine, and displays the search results with the help of the [Rich library](https://github.com/willmcgugan/rich).

## Installation
1. Clone the repository.
```
git clone https://github.com/amscotti/HNJobSearcher.git
cd HNJobSearcher
```
2. (Optional) Set up a virtual environment.
```bash
python -m venv .venv
source .venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install the required dependencies.
```bash
pip install -r requirements.txt
```
## Usage
Run the following command to search for job postings:
```bash
python main.py -j -q -c
```
- `job_posting_id` is the ID of the job posting from Hacker News (default is `35424807`).
- `query_text` is the text you want to search for in the job postings (default is `"python AND remote"`).
- `search_count` is the number of job postings to return (default is `100`).
For example, to search for remote Python job postings, you can run:
```bash
python main.py -j 35424807 -q "python AND remote" -c 100
```
## Development
### Running Tests
Run all unit tests:
```bash
pytest
```
Run a specific test:
```bash
pytest tests/test_file.py::test_function_name
```
### Code Quality
Lint the code:
```bash
ruff check .
```
Check types:
```bash
pyright
```
Format code:
```bash
ruff format .
```
## Docker
Build the Docker image:
```bash
docker build -t your-image-name .
```
Run the Docker container:
```bash
docker run -it your-image-name -j your-job-posting-id -q your-query-text -c your-search-count
```