Skip to content

Refactor main.py config hardcoding #1

Description

@dannylty

Find a way not to hardcode the indexers and writers?

    stream_indexers = (HolodexIndexer(), NijisanjiIndexer())
    writers = []
    if config_handler.write_to_db:
        writers.append(DatabaseWriter(config_handler, None))
    if config_handler.write_to_local:
        for folder in ['simple', 'metadata']:
            os.mkdir(os.path.join(config_handler.local_path, folder))
        writers.append(FilesystemWriter(config_handler, None))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions