From 6d895633eea71e2e380588106bc9937edc44c7f6 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 15 Apr 2022 17:22:04 +0100 Subject: [PATCH] move References to dir --- update_wiki.py | 8 ++++---- update_film_references.py => wiki_pages/References.py | 2 +- wiki_pages/__init__.py | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename update_film_references.py => wiki_pages/References.py (96%) create mode 100644 wiki_pages/__init__.py diff --git a/update_wiki.py b/update_wiki.py index aa59713..d8172fb 100644 --- a/update_wiki.py +++ b/update_wiki.py @@ -1,6 +1,6 @@ from bookstack import Bookstack from update_films_by_country import get_films_by_country, build_page as build_films_by_country_page, FILMS_BY_COUNTRY_PAGE_ID -from update_film_references import get_films_by_reference, build_page as build_film_references_page, FILM_BY_REFERENCES_PAGE_ID +from wiki_pages import References from update_films_by_year import get_films_by_year, build_page as build_films_by_year_page, FILMS_BY_YEAR_PAGE_ID from update_hidden_themes import get_hidden_themes, build_page as build_hidden_themes_page, HIDDEN_THEMES_PAGE_ID from update_keywords_scores import get_keyword_scores, build_page as build_keyword_scores_page, KEYWORD_SCORES_PAGE_ID @@ -45,7 +45,7 @@ def update_wiki(token_id, token_secret, update_csv, update_films_by_year, update films_by_country = get_films_by_country(viewings) bar.next() if update_film_references: - films_by_reference = get_films_by_reference(viewings) + films_by_reference = References.get_films_by_reference(viewings) bar.next() if update_hidden_themes: hidden_themes = get_hidden_themes(viewings, token_id, token_secret) @@ -64,7 +64,7 @@ def update_wiki(token_id, token_secret, update_csv, update_films_by_year, update films_by_country_page = build_films_by_country_page(films_by_country) bar.next() if update_film_references: - films_by_reference_page = build_film_references_page(films_by_reference) + films_by_reference_page = References.build_page(films_by_reference) bar.next() if update_hidden_themes: hidden_themes_page = build_hidden_themes_page(hidden_themes) @@ -83,7 +83,7 @@ def update_wiki(token_id, token_secret, update_csv, update_films_by_year, update Bookstack.update_page(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, FILMS_BY_COUNTRY_PAGE_ID, markdown=films_by_country_page) bar.next() if update_film_references: - Bookstack.update_page(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, FILM_BY_REFERENCES_PAGE_ID, markdown=films_by_reference_page) + Bookstack.update_page(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, References.PAGE_ID, markdown=films_by_reference_page) bar.next() if update_hidden_themes: Bookstack.update_page(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, HIDDEN_THEMES_PAGE_ID, markdown=hidden_themes_page) diff --git a/update_film_references.py b/wiki_pages/References.py similarity index 96% rename from update_film_references.py rename to wiki_pages/References.py index aef331b..7818c75 100644 --- a/update_film_references.py +++ b/wiki_pages/References.py @@ -4,7 +4,7 @@ import string from vcinema_utils import VCinemaUtils # Page ID of https://wiki.jacknet.io/books/vcinema/page/references -FILM_BY_REFERENCES_PAGE_ID = 62 +PAGE_ID = 62 def get_films_by_reference(viewings): diff --git a/wiki_pages/__init__.py b/wiki_pages/__init__.py new file mode 100644 index 0000000..e69de29