@@ -155,16 +155,16 @@ def check_fls_ids_correct(app, env, fls_ids):
155155
156156def gather_fls_paragraph_ids (app , json_url ):
157157 """
158- Gather all Ferrocene Language Specification paragraph IDs from the paragraph-ids.json file,
159- including both container section IDs and individual paragraph IDs.
158+ Gather all Ferrocene Language Specification paragraph IDs from the paragraph-ids.json file
159+ or from the lock file in offline mode, including both container section IDs and individual paragraph IDs.
160160
161161 Args:
162+ app: The Sphinx application
162163 json_url: The URL or path to the paragraph-ids.json file
163164
164165 Returns:
165166 Dictionary mapping paragraph IDs to metadata AND the complete raw JSON data
166167 """
167- logger .info ("Gathering FLS paragraph IDs from %s" , json_url )
168168 offline = app .config .offline
169169 lock_path = app .confdir / 'fls.lock'
170170
@@ -175,6 +175,7 @@ def gather_fls_paragraph_ids(app, json_url):
175175 try :
176176 # Load the JSON file
177177 if not offline :
178+ logger .info ("Gathering FLS paragraph IDs from %s" , json_url )
178179 response = requests .get (json_url )
179180 response .raise_for_status () # Raise exception for HTTP errors
180181 # Parse the JSON data
@@ -188,9 +189,11 @@ def gather_fls_paragraph_ids(app, json_url):
188189 raise
189190
190191 else : # if online mode is on read from the lock file
192+
191193 if not lock_path .exists ():
192194 logger .warning (f"No FLS lock file found at { lock_path } " ) # TODO: returns an error
193195 return False , []
196+ logger .info ("Gathering FLS paragraph IDs from lock file: %s" , lock_path )
194197 with open (lock_path , 'r' , encoding = 'utf-8' ) as f :
195198 raw_json_data = f .read ()
196199 data = json .loads (raw_json_data )
0 commit comments