"--collect 1 zomb-eh" now restricts the run to a single blog. The name is bound as a SQLite parameter and matched exactly against Posts.BlogName, which leads the primary key, so the predicate uses that index. Trailing arguments are scanned rather than positionally fixed: a token that parses as a date is the cutoff, anything else is the blog name, in either order. --blog=name forces the blog reading for a name that would otherwise parse as a date. The filter is a pure filter -- the zomb-eh 3-day refresh branch reads from the already-scoped PostsWithCount CTE, so a filtered worklist is a strict subset of the unfiltered one. Verified against TL.db: --collect 1 returns 651 posts, of which --collect 1 zomb-eh returns exactly its 164 and --collect 1 cs1d3blog exactly its 18. Blog-scoped runs are excluded from managed-run state, so collecting one blog cannot mark a full re-check complete. Co-Authored-By: Claude Opus 5 <[email protected]>
60 lines
2.4 KiB
Markdown
60 lines
2.4 KiB
Markdown
# AI Development Instructions for URLNotesGrabberCORE
|
|
|
|
This document provides essential context for AI agents working with URLNotesGrabberCORE, a .NET Core application designed to process and analyze blog notes and interactions.
|
|
|
|
## Project Architecture
|
|
|
|
### Core Components
|
|
- **Program.cs**: Entry point and command handler for various operations (parsing, testing, collecting notes)
|
|
- **DataAccess.cs**: SQLite database operations for storing blog and note data
|
|
- **ResponseNotes.cs**: Data models for API responses
|
|
- **appsettings.json**: Configuration for paths and application settings
|
|
|
|
### Data Flow
|
|
1. Input text files are processed from configured input path
|
|
2. Blog data is extracted and stored in SQLite database
|
|
3. API calls collect notes/interactions for each blog post
|
|
4. Results are written to configured output paths
|
|
|
|
## Key Development Workflows
|
|
|
|
### Building and Running
|
|
```powershell
|
|
dotnet build
|
|
dotnet run # Process all files in input directory
|
|
dotnet run -- --parse [blogname] # Process specific blog
|
|
dotnet run -- --test [blogname] [postID] # Test API for specific post
|
|
```
|
|
|
|
### Command-Line Interface
|
|
- `--parse [blogname]`: Parse text files for specific blog
|
|
- `--test [blogname] [postID]`: Test API note collection
|
|
- `--posts`: Export post blogs to file
|
|
- `--blogs`: Export blog list to file
|
|
- `--collect [0|1] [datetime] [blogname]`: Collect notes for posts in DB. Optional `blogname` restricts the run to one blog (exact match), e.g. `--collect 1 zomb-eh`
|
|
- `--blogsR`: Export reply blogs to file
|
|
- `--blogsO [start] [stop]`: Export blogs within range
|
|
|
|
## Project Conventions
|
|
|
|
### Configuration
|
|
- All paths and settings are managed in `appsettings.json`
|
|
- Command-line args override config file settings
|
|
- SQLite database is used for persistent storage
|
|
|
|
### API Integration
|
|
- Uses RestSharp for API calls with OAuth authentication
|
|
- Rate limiting implemented via `System.Threading.RateLimiting`
|
|
- Resilient HTTP handling with `Microsoft.Extensions.Http.Resilience`
|
|
|
|
### Data Models
|
|
- `ReblogRecord`: Core data structure for blog post information
|
|
- `Note`: Represents interaction data from API responses
|
|
- Default field values are "." (period) to handle null cases
|
|
|
|
## Integration Points
|
|
- SQLite Database: Primary data store (`System.Data.SQLite`)
|
|
- REST API: External blog platform API (OAuth authentication)
|
|
- File System: Input/Output for text file processing
|
|
|
|
For questions or clarifications, please refer to the codebase or request updates to these instructions. |