From 5961bcbed2e8df517c94d0026bcc4e81aafec690 Mon Sep 17 00:00:00 2001 From: KarmaKamikaze Date: Mon, 23 Sep 2024 19:52:59 +0200 Subject: [PATCH] Fix Dockerfile linter errors --- MoxfieldPriceScraper/Dockerfile | 4 ++-- README.md | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/MoxfieldPriceScraper/Dockerfile b/MoxfieldPriceScraper/Dockerfile index ea5f7f2..422b01f 100644 --- a/MoxfieldPriceScraper/Dockerfile +++ b/MoxfieldPriceScraper/Dockerfile @@ -18,8 +18,8 @@ WORKDIR /app COPY --from=build-env /app/out . # Install Google Chrome -RUN apt-get update && apt-get install -y wget unzip && \ - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ +RUN apt-get update && apt-get install -y wget=1.21-1+deb11u1 unzip=6.0-26+deb11u1 && \ + wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ apt-get install ./google-chrome-stable_current_amd64.deb -y && \ rm google-chrome-stable_current_amd64.deb && \ apt-get clean \ diff --git a/README.md b/README.md index b93a2ee..f5d14cb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # Moxfield Price Scraper + The **Moxfield Price Scraper** is an application designed to continuously monitor the price of specified Moxfield decks until a defined threshold is reached. It automatically adjusts the prices of all cards within the deck list to reflect the lowest market values, ensuring users can acquire their desired decks at the best possible prices. Once the threshold is met, the application captures a screenshot of the deck and saves it. If email notifications are enabled, a notification email will also be sent to the user with the attached screenshot. This tool is particularly useful for playgroups that host events requiring decks to remain within a specific price range. My playgroup utilizes it for a custom format known as _Shitlander_, a €25 budget Commander (EDH) format, where all participants must provide a screenshot of their deck within this price limit. ## Prerequisites + To run the application, ensure you have the following installed: + - [.Net 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) - [Selenium](https://www.selenium.dev/documentation/) (installed via NuGet package) - [Google Chrome](https://www.google.com/chrome/index.html) @@ -11,6 +14,7 @@ To run the application, ensure you have the following installed: **Note:** The ChromeDriver executable must be manually placed in the root directory of the project. ## Setting up + Before running the application in development mode, user-specific settings must be configured. This can be done by creating and editing a `.env` file in the root directory. The file should contain the following options: ```dockerfile @@ -24,7 +28,9 @@ SENDER_EMAIL_PASSWORD='senderemailpassword' RECEIVER_EMAIL_ADDRESS='receiveremail@example.com' DECK_LIST='{"Deck1":"https://moxfield.com/deck1", "Deck2":"https://moxfield.com/deck2"}' ``` + ### Configuration options + - **TargetPrice**: The price threshold that the deck must reach before the scraping stops. - **UpdateFrequency**: The frequency at which the price is checked (in seconds). - **MoxfieldUsername**: Your Moxfield account username. @@ -33,17 +39,22 @@ DECK_LIST='{"Deck1":"https://moxfield.com/deck1", "Deck2":"https://moxfield.com/ - **SenderEmailAddress**: Email address used to send notifications. - **SenderEmailPassword**: Password for the sender email account. - **ReceiverEmailAddress**: Email address to receive notifications. -- **DeckList**: A dictionary of deck names and their corresponding Moxfield URLs. There should be at least one deck in the list, however, multiple decks can be added. +- **DeckList**: A dictionary of deck names and their corresponding Moxfield URLs. There should be at least one deck in the list, however, multiple decks can be added. ## Running the Application + The application can be executed using the following command: + ```shell dotnet run ``` + Alternatively, you can publish the application and run the resulting executable. ## Contributing + Contributions are welcome! If you would like to contribute to this project, please fork the repository and submit a pull request. ## License + This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.