Coder Social home page Coder Social logo

emaww's Introduction

XML to Redis Exporter

This simple Java application allows you to export data from an XML file to a Redis database. It reads a specific XML file (config.xml), extracts data, and saves it to Redis keys according to predefined rules.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Docker and Docker Compose installed on your machine.
  • A valid config.xml file containing the data you want to export.

Getting Started

To get started with this application, follow these steps:

Build the Docker Image

  1. Clone this repository to your local machine:

  2. Navigate to the project directory:

  3. Build the Docker image:

Run the Application

After building the Docker image, you can run the application with the following command:

Replace /path/to/config.xml with the actual path to your XML file.

Usage

  • The application reads the XML file specified and exports data to Redis based on the following rules:

    • The "subdomains" key contains a JSON array of all subdomains found in the XML.
    • Keys of the format cookie:%NAME%:%HOST% contain the values of cookie elements in the XML.
  • If you include the -v flag when running the application, it will print all keys saved to Redis.

Unit Tests

We have included unit tests to ensure the correctness of the XML parsing and data export logic. You can run the tests with the following command:

Contributing

Contributions are welcome! If you have any improvements or bug fixes, feel free to submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

emaww's People

Contributors

devrishijain 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.