@@ -243,7 +243,7 @@ def _get_category_include_regex(category: int):
243
243
book = match .group (1 )
244
244
books .append (book )
245
245
246
- return ( f"^https:\\ /\\ /shamela\\ .ws\\ /(book\\ /({ "|" .join (books )} )($|\\ /.*)|category\\ /{ category } |author\\ /.+)" )
246
+ return f"^https:\\ /\\ /shamela\\ .ws\\ /(book\\ /({ '|' .join (books )} )($|\\ /.*)|category\\ /{ category } |author\\ /.+)"
247
247
248
248
249
249
def get_expected_recipes () -> list [dict [str , Any ]]:
@@ -265,10 +265,12 @@ def get_expected_recipes() -> list[dict[str, Any]]:
265
265
"name" : check_zim_name (f"shamela.ws_ar_{ category_key } " ),
266
266
"output" : "/output" ,
267
267
"publisher" : "openZIM" ,
268
- "scopeIncludeRx" : _get_category_include_regex (category_data ["number" ]),
268
+ "scopeIncludeRx" : _get_category_include_regex (
269
+ category_data ["number" ]
270
+ ),
269
271
"scopeType" : "custom" ,
270
272
"seeds" : f"https://shamela.ws/category/{ category_data ['number' ]} " ,
271
- "title" : category_data [' title' ],
273
+ "title" : category_data [" title" ],
272
274
"workers" : "4" ,
273
275
"zim-lang" : "ara" ,
274
276
"zimit-progress-file" : "/output/task_progress.json" ,
@@ -281,12 +283,14 @@ def get_expected_recipes() -> list[dict[str, Any]]:
281
283
"platform" : "shamela" ,
282
284
"resources" : {
283
285
"cpu" : 3 ,
284
- "disk" : category_data .get ("disk" , 107374182400 ), # 100G by default
286
+ "disk" : category_data .get ("disk" , 107374182400 ), # 100G by default
285
287
"memory" : 4294967296 ,
286
- ' shm' : 1073741824 ,
288
+ " shm" : 1073741824 ,
287
289
},
288
290
"task_name" : "zimit" ,
289
- "warehouse_path" : "/zimit" if category_data .get ("in_prod" , False ) else "/.hidden/dev" ,
291
+ "warehouse_path" : (
292
+ "/zimit" if category_data .get ("in_prod" , False ) else "/.hidden/dev"
293
+ ),
290
294
},
291
295
"enabled" : True ,
292
296
"language" : {
@@ -295,7 +299,9 @@ def get_expected_recipes() -> list[dict[str, Any]]:
295
299
"name_native" : "العربية" ,
296
300
},
297
301
"name" : f"shamela.ws_ar_{ category_key } -{ category_data ['number' ]} " ,
298
- "periodicity" : "quarterly" if category_data .get ("in_prod" , False ) else "manually" ,
302
+ "periodicity" : (
303
+ "quarterly" if category_data .get ("in_prod" , False ) else "manually"
304
+ ),
299
305
"tags" : [
300
306
"shamela" ,
301
307
],
@@ -307,5 +313,5 @@ def get_expected_recipes() -> list[dict[str, Any]]:
307
313
308
314
def _is_needed (category_key : Any , category_data : Any ) -> bool :
309
315
return True
310
- #return category_data["number"] in [1, 2, 3, 4, 5, 6, 34]
311
- #return category_data["number"] == 1
316
+ # return category_data["number"] in [1, 2, 3, 4, 5, 6, 34]
317
+ # return category_data["number"] == 1
0 commit comments