gpt
This commit is contained in:
parent
ed1674f38e
commit
1de9cff762
18
gpt.py
18
gpt.py
|
|
@ -250,7 +250,7 @@ def fetch_useful_info(save_attachments=True, folder_name='useful info ref'):
|
|||
|
||||
|
||||
|
||||
def process_useful_info():
|
||||
def process_useful_info(start=0, num=0):
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
|
|
@ -460,11 +460,23 @@ def process_useful_info():
|
|||
except Exception as e:
|
||||
print('[warn] DB insert failed:', e)
|
||||
|
||||
# Interactive prompts if parameters not provided
|
||||
try:
|
||||
if not start:
|
||||
inp = input('Start group index (1-based, e.g., 1): ').strip()
|
||||
start = int(inp) if inp else 1
|
||||
if not num:
|
||||
inp = input('How many groups to process (e.g., 10, -1 for all): ').strip()
|
||||
num = int(inp) if inp else -1
|
||||
except Exception:
|
||||
start = start or 1
|
||||
num = num or -1
|
||||
|
||||
for_each_group(
|
||||
log_path="cache/email_usefulinfo_sorted.txt",
|
||||
f=demo_f,
|
||||
start=101, # change to resume at Nth group
|
||||
count=150
|
||||
start=start,
|
||||
count=num
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue