mirror of
https://github.com/bcye/structured-wikivoyage-exports.git
synced 2025-09-19 03:14:48 +00:00
add bounding, env var config
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
from .base_handler import BaseHandler
|
||||
from .filesystm_handler import FileSystemHandler
|
||||
from .filesystem import FilesystemHandler
|
@@ -2,8 +2,9 @@
|
||||
from pathlib import Path
|
||||
import aiofiles
|
||||
from .base_handler import BaseHandler
|
||||
import json
|
||||
|
||||
class FileSystemHandler(BaseHandler):
|
||||
class FilesystemHandler(BaseHandler):
|
||||
"""
|
||||
Handler that writes files to the filesystem.
|
||||
"""
|
||||
@@ -36,7 +37,7 @@ class FileSystemHandler(BaseHandler):
|
||||
try:
|
||||
file_path = self.output_dir / f"{uid}.json"
|
||||
async with aiofiles.open(file_path, 'w') as f:
|
||||
await f.write(entry)
|
||||
await f.write(json.dumps(entry))
|
||||
return True
|
||||
except IOError as e:
|
||||
self.logger.error(f"Error writing entry {uid}: {e}")
|
Reference in New Issue
Block a user