Extraction#
Convert the mirror into sharded JSONL corpora.
Corpus extraction#
- class litsync.extract.ShardWriter[source]#
Bases:
object
Resume state#
- class litsync.extract_state.ExtractState[source]#
Bases:
objectSQLite-backed resume state for litsync-extract.
Tracks which source files have already been extracted so re-runs can skip them. For yearly corpora it also tracks the last shard index written per year, so re-runs can continue without overwriting completed shards.
If the output directory, source list, or shard size changes, the stored state is reset automatically.
- max_end_shard(year='')[source]#
Highest completed shard index for a given year (empty = non-yearly).