{"id":19330535,"url":"https://github.com/aventhis/go-bootcamp-recipedb-analyzer","last_synced_at":"2026-06-22T09:32:03.180Z","repository":{"id":257744792,"uuid":"859193250","full_name":"aventhis/go-bootcamp-recipeDB-Analyzer","owner":"aventhis","description":"Инструмент для чтения, сравнения и анализа изменений в базах данных рецептов в форматах JSON и XML","archived":false,"fork":false,"pushed_at":"2024-09-30T11:13:20.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T06:47:42.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aventhis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-18T08:46:36.000Z","updated_at":"2024-09-30T11:13:23.000Z","dependencies_parsed_at":"2024-09-18T11:59:58.679Z","dependency_job_id":"f757d64c-5a34-42da-839e-c7f94d7903fb","html_url":"https://github.com/aventhis/go-bootcamp-recipeDB-Analyzer","commit_stats":null,"previous_names":["aventhis/go-bootcamp-recipedb-analyzer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aventhis/go-bootcamp-recipeDB-Analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2Fgo-bootcamp-recipeDB-Analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2Fgo-bootcamp-recipeDB-Analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2Fgo-bootcamp-recipeDB-Analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2Fgo-bootcamp-recipeDB-Analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aventhis","download_url":"https://codeload.github.com/aventhis/go-bootcamp-recipeDB-Analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2Fgo-bootcamp-recipeDB-Analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34643595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T02:37:00.500Z","updated_at":"2026-06-22T09:32:03.163Z","avatar_url":"https://github.com/aventhis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Bootcamp RecipeDB Analyzer\n\n## Overview\n\nGo Bootcamp RecipeDB Analyzer is a command-line application for analyzing recipe databases stored in XML and JSON formats. This tool reads, compares, and assesses changes in different recipe databases, highlighting modifications such as added, removed, or altered recipes and ingredients.\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Features](#features)\n3. [Getting Started](#getting-started)\n4. [Usage](#usage)\n    1. [Exercise 00: Reading](#exercise-00-reading)\n    2. [Exercise 01: Assessing Damage](#exercise-01-assessing-damage)\n    3. [Exercise 02: Afterparty](#exercise-02-afterparty)\n5. [Project Structure](#project-structure)\n\n## Introduction\n\nThere are many popular data formats in the world of programming, and Go makes it easy to work with them, particularly XML and JSON. This project simulates a bakery's recipe database stored in XML and compares it with a \"stolen\" database stored in JSON format. The application can detect various differences between the databases and highlight them.\n\n## Features\n\n- Read recipe databases in both XML and JSON formats.\n- Compare two databases and detect changes, such as:\n    - Added or removed cakes.\n    - Changes in cooking time.\n    - Added or removed ingredients.\n    - Changes in ingredient quantities or units.\n- Command-line interface for ease of use.\n\n## Getting Started\n\n### Prerequisites\n\n- Go programming language installed (version 1.16 or higher recommended)\n- Git for version control\n\n### Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/aventhis/go-bootcamp-recipeDB-analyzer.git\n    ```\n2. Navigate to the project directory:\n    ```bash\n    cd go-bootcamp-recipeDB-analyzer\n    ```\n3. Build the application:\n    ```bash\n    go build -o compareDB ./src/cmd/compareDB/main.go\n    go build -o readDB ./src/cmd/readDB/main.go\n    go build -o compareFS ./src/cmd/compareFS/main.go\n    ```\n\n## Usage\n\n### Exercise 00: Reading\n\nTo read a database file and convert its format (from JSON to XML or vice versa), use the `readDB` command:\n\n```bash\n./readDB -f original_database.xml\n./readDB -f stolen_database.json\n```\n\nThis will output the contents of the specified file in the opposite format (JSON will be converted to XML, and vice versa).\n\n### Exercise 01: Assessing Damage\n\nTo compare the original database with the stolen one and identify changes, use the compareDB command:\n\n```bash\n./compareDB --old original_database.xml --new stolen_database.json\n```\n\nExpected output format:\n```rust\nДОБАВЛЕН торт \"Маффин Лунный свет\"\nУДАЛЕН торт \"Черничный кекс\"\nИЗМЕНИЛОСЬ время готовки для торта \"Торт Красный Бархат с клубникой\" - \"45 мин\" вместо \"40 мин\"\nДОБАВЛЕН ингредиент \"Кофейные зерна\" для торта \"Торт Красный Бархат с клубникой\"\nУДАЛЕН ингредиент \"Экстракт ванили\" для торта \"Торт Красный Бархат с клубникой\"\nИЗМЕНИЛАСЬ единица измерения для ингредиента \"Мука\" для торта \"Торт Красный Бархат с клубникой\" - \"кружки\" вместо \"чашки\"\nИЗМЕНИЛОСЬ количество для ингредиента \"Клубника\" для торта \"Торт Красный Бархат с клубникой\" - \"8\" вместо \"7\"\nУДАЛЕНА единица измерения \"шт\" для ингредиента \"Корица\" для торта \"Торт Красный Бархат с клубником\"\n```\n\n### Exercise 02: Afterparty\n\nTo compare two filesystem dumps, use the compareFS command:\n\n```bash\n./compareFS --old snapshot1.txt --new snapshot2.txt\n```\n\nThis will output any added or removed files between the two snapshots.\n\n## Project Structure\n\n```graphql\ngo-bootcamp-recipeDB-analyzer/\ngo-bootcamp-recipeDB-analyzer/\n│\n├── src/\n│   ├── cmd/\n│   │   ├── compareDB/       # Main command for comparing recipe databases\n│   │   │   └── main.go\n│   │   ├── compareFS/       # Main command for comparing file system snapshots\n│   │   │   └── main.go\n│   │   └── readDB/          # Main command for reading databases\n│   │       └── main.go\n│   ├── data/                # Sample XML, JSON data files, and snapshots for testing\n│   │   ├── original_database.xml\n│   │   ├── stolen_database.json\n│   │   ├── snapshot1.txt\n│   │   └── snapshot2.txt\n│   └── internal/\n│       ├── app/             # Contains application logic\n│       │   └── app.go\n│       ├── dbcompare/       # Logic for comparing recipe databases\n│       │   └── dbcompare.go\n│       ├── dbreader/        # Logic for reading and converting databases\n│       │   ├── converter.go\n│       │   ├── dbreader.go\n│       │   ├── json_reader.go\n│       │   ├── types.go\n│       │   └── xml_reader.go\n│       ├── fscompare/       # Logic for comparing file system snapshots\n│       │   └── fscompare.go\n│       └── utils/           # Utility functions\n│           ├── error_handling.go\n│           ├── fileutils.go\n│           └── parse.go\n│\n├── .gitignore               # Specifies files and directories to be ignored by Git\n├── go.mod                   # Go module definition\n├── Makefile                 # Commands for building and running the project\n└── README.md                # Project documentation\n```\n\n\n### Explanation of the Directories\n\n- **`cmd/`**: Contains the main application entry points. Subdirectories for each command (`compareDB`, `readDB`, `compareFS`) contain the respective `main.go` files.\n- **`data/`**: Stores sample databases and file snapshots in XML, JSON, and text formats for testing and development.\n- **`internal/`**: Core application logic divided into:\n    - **`app/`**: Contains application logic for running the core functions.\n    - **`dbcompare/`**: Implements logic for comparing recipe databases.\n    - **`dbreader/`**: Reads and parses databases (XML and JSON).\n    - **`fscompare/`**: Logic for comparing file snapshots.\n    - **`utils/`**: Helper functions for error handling and file operations.\n- **`.gitignore`**: Specifies files and directories to be ignored by Git (e.g., `.idea/`).\n- **`go.mod`**: Go module file, which defines dependencies and module information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faventhis%2Fgo-bootcamp-recipedb-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faventhis%2Fgo-bootcamp-recipedb-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faventhis%2Fgo-bootcamp-recipedb-analyzer/lists"}