Coder Social home page Coder Social logo

ericdwkim / cash-depot-bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 514 KB

A web-crawling automation bot built for TXB Stores to filter, pull, and file away CSVs into a shared network filesystem.

Java 83.88% Shell 16.12%
automation bot selenium-java web-crawling webdriver

cash-depot-bot's Introduction

Cash Depot Bot

Overview

Cash Depot Bot is a Java automation project that leverages Selenium WebDriver for web scraping. The main objective is to automatically fetch CSV files from a designated website and place them in a shared directory for accounting needs. The project uses Gradle and its wrapper (gradlew) for dependency management and build processes.

Pre-requisites

  • Java 19 SDK
  • Git
  • Optional: IntelliJ IDEA or any preferred Java IDE

Setup & Execution

Method 1: Using Gradle Wrapper from Command Line

1. Clone the Repository

git clone [email protected]:ericdwkim/cash-depot-bot.git

2. Navigate to Project Directory

cd cash_depot_bot

3. Run Gradle Clean and Build

./gradlew clean build shadowJar

Note: For verbose warning logs, append --warning-mode all.

4. Execute the Application

java -jar build/libs/cash_depot_bot-0.1.0.jar

Note: When the Uber JAR is created, it auto versions which is an indication that it has updated it from a regular JAR to include depedencies defined in build.gradle

Method 2: Using IntelliJ IDEA

1. Clone and Open Project

Clone the repo and open it using IntelliJ IDEA.

2. Configure Build Settings

  • Set SDK to Java 19
  • Classpath: cash_depot_bot.main
  • Main Class: com.txb.cashdepot.CashDepotReportPull
  • Working Directory: /Users/ekim/workspace/personal/cash_depot_bot

3. Run the Application

Use IntelliJ's run/debug configurations.

Method 3: Shell Script Execution

1. Clone Repository

git clone [email protected]:ericdwkim/cash-depot-bot.git

2. Navigate to Project

cd cash_depot_bot

3. Make Script Executable

chmod +x scripts/app.sh

4. Run Script

./scripts/app.sh

Final Thoughts

Choose your preferred method based on your workflow. The Gradle Wrapper streamlines dependency management and builds, IntelliJ offers robust IDE support, and the shell script simplifies execution.

Platform-Specific Notes

Windows vs Linux/Unix

  • ChromeDriver Pathing

    • Windows: c:\\chromedriver-win64\\ (Note: May require double backslashes)
    • Linux/Unix: /opt/homebrew/bin/chromedriver
  • Java Executable Path

    • Windows: JAVA_EXEC="/c/Program Files/Java/jdk-17/bin/java.exe"
    • Mac: JAVA_EXEC="/usr/bin/java"

Project Structure

  • builds: Gradle build files
  • build/libs/: Contains the Uber JAR
  • build/classes/java/main/com/txb/cashdepot: Compiled source files

Note: If you're confused about why the Main-Class in the MANIFEST.MF (located inbuild/tmp/jar/) doesn't match the .class file paths, it's because the build.classes.java.main directories are abstracted away during the initial build.

For any additional queries, consult the documentation or reach out to the development team.

cash-depot-bot's People

Contributors

ericdwkim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.