Commit graph

7 commits

Author SHA1 Message Date
05b39054b8
supply-chain: hash-pin dependencies (requirements.lock)
requirements.txt used >= floors and installed with no hashes, so every CI run and
install re-resolved to whatever PyPI served. A poisoned release of any dep
(fastapi, aiohttp, lxml, pillow...) would land unverified.

- requirements.lock: 42 pkgs pinned to exact versions + SHA256 (1258 hashes), uv
  (targeted py3.11 to match CI image)
- Makefile install + CI: pip install --require-hashes -r requirements.lock
- requirements.txt stays the loose source; make pins-lock regenerates

Validated: lock installs under --require-hashes, 460 tests pass under resolved versions.
2026-05-21 10:11:31 -04:00
58c93f217a Reorganize project structure: move modules to neopig/, scripts to scripts/, data to data/ 2026-01-06 14:06:43 -05:00
66d2f4d1d9 Port 31337 default, code file display fixes
- Change default port from 8000 to 31337 across all files
- About page: and → &, beast → pig
- Search results: SVG placeholder for code files (shows extension)
- Download button: remove .bin fallback, use original extension
2026-01-02 15:35:39 -05:00
17efcf9a27 Archive improvements: venv support, package-only mode, resume fixes
- bootstrap.c: Extract requirements.txt, create venv, pip install deps
- archive.py: Add --package-only flag, use neopig vault directly
- archive.py: Resume now loads crawled pages from DB
- database.py: Add close() and get_crawled_page_uris()
- domain_vault.py: Fix None path handling in url_to_filepath
- Makefile: Add test-alpha target for testing archives
2026-01-01 15:57:23 -05:00
21e344f675 Add archive.py with --serve flag for live crawl watching
- archive.py: New site archiver wrapper with embedded serve.py
- --serve flag starts SERP server alongside crawl for live viewing
- --fast mode for sites without robots.txt (no crawl delay)
- Symlink-based storage: domain views link to hash vault
- Tarball resolves symlinks to include only domain content
- Fixed bytes_downloaded/bytes_stored accounting for screenshots
- Data directory (data/) for databases and state files
- Standardized on - separator in filenames
2025-12-29 11:26:02 -05:00
bc11c516b6 Add filevault system with async wrapper and convert sync ops to async
New files:
- filevault.py: Hash-based file storage with use_pairs option (v1.1.0)
- async_filevault.py: Async wrapper using asyncio.to_thread()
- domain_vault.py: Triple vault system for web archival (HTML, Media, Linkpeek)
- screenshot.py: Async screenshot capture using uri2png
- tests/unit/: Comprehensive test suite (85 tests)

Sync-to-async conversions:
- storage.py: Wrap Path operations in asyncio.to_thread()
- domain_vault.py: Wrap exists(), mkdir(), rglob(), os.walk() in asyncio.to_thread()
- screenshot.py: Wrap read_bytes(), write_bytes(), unlink() in asyncio.to_thread()

All sync filesystem operations now run in thread pool to avoid blocking async loop.
2025-12-22 20:18:20 -05:00
6dab26d6fa Initial neopig: async media crawler with MD5 deduplication
- Multi-target concurrent crawling support
- Content-addressable vault storage (MD5 hash)
- SQLite database with page context for searchability
- Live SERP with real-time polling feed (/live)
- URI naming convention (media_uri, page_uri)
- GIF and image object-fit: contain for proper display
2025-12-21 17:26:42 -05:00