Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(doc): update README.md #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prevent leaking secrets
.secrets
90 changes: 61 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# Backup Cobra
# Git Archive S3 Report

Backup Cobra is a powerful tool designed to clone repositories, generate detailed reports in Excel format, zip repositories and upload zip files to Amazon S3. It helps you keep track of your repositories, developers' activities, and various project metrics.
Git Archive S3 Report is a powerful tool designed to clone repositories, generate detailed reports in Excel format, zip repositories and upload zip files to Amazon S3. It helps you keep track of your repositories, developers' activities, and various project metrics.

<!-- TOC -->

- [Git Archive S3 Report](#git-archive-s3-report)
- [1. Description](#1-description)
- [2. Features](#2-features)
- [3. Installation](#3-installation)
- [4. Usage](#4-usage)
- [4.1. Clone Repositories](#41-clone-repositories)
- [4.2. Generate an Excel Report](#42-generate-an-excel-report)
- [4.3. Compress Directories](#43-compress-directories)
- [4.4. Upload to Amazon S3](#44-upload-to-amazon-s3)
- [5. Features](#5-features)
- [6. Project Structure](#6-project-structure)
- [7. Authors](#7-authors)

<!-- /TOC -->

## Description

Backup Cobra automates the process of cloning repositories, generate detailed reports in Excel format, zip repositories and upload zip files to Amazon S3. It supports Bitbucket repositories and provides insights into developer activities, commit histories, and project configurations.
Git Archive S3 Report automates the process of cloning repositories, generate detailed reports in Excel format, zip repositories and upload zip files to Amazon S3. It supports Bitbucket repositories and provides insights into developer activities, commit histories, and project configurations.

## Features

Expand All @@ -15,54 +32,68 @@ Backup Cobra automates the process of cloning repositories, generate detailed re

## Installation

1. Clone the repository :
```bash
git clone https://github.com/yourusername/backup-cobra.git
cd backup-cobra
1. Clone the repository

```bash
git clone [email protected]:s3pweb/gitArchiveS3Report.git
cd gitArchiveS3Report
```

2. Install Go : Make sure Go is installed. You can dowload it from the official Go website
https://go.dev/doc/install
2. Install Go _(You can download it from the official Go website https://go.dev/doc/install or using Brew for Mac users with `brew install go`)_

3. Install dependencies

3. Install dependencies :
- [ghorg](https://github.com/gabrie30/ghorg) (for cloning repositories)
`go install github.com/gabrie30/ghorg@latest`
- [Excelize](https://github.com/xuri/excelize) (for generating Excel reports)
`go get -u github.com/xuri/excelize/v2`
- [cobra](https://github.com/spf13/cobra)
`go get -u github.com/spf13/cobra@latest`

4. Install project dependencies : From the project root, run :
`go mod tidy`
```bash
go install github.com/gabrie30/ghorg@latest
go get -u github.com/xuri/excelize/v2
go get -u github.com/spf13/cobra@latest
```

4. Install project dependencies

From the project root `go mod tidy`

5. Configure AWS and Bitbucket credentials

5. Configure AWS and Bitbucket credentials :
To store sensitive information like API keys or credentials, you can use a `.secrets` file. An example file named `example.secrets` is provided in the project to help you get started.
- Copy the `example.secrets` file and rename it to `.secrets`:
```bash
cp example.secrets .secrets

- Copy the `example.secrets` file and rename it to `.secrets`

```bash
cp example.secrets .secrets
```

- Fill it with the secrets required

- For help to get the keys for aws amazon S3 you can use this documentation : `https://docs.aws.amazon.com/fr_fr/IAM/latest/UserGuide/id_credentials_access-keys.html`
- For help to get the keys for AWS Amazon S3, you can use this documentation : https://docs.aws.amazon.com/fr_fr/IAM/latest/UserGuide/id_credentials_access-keys.html

6. Configure your .config file

The `.config` file allows you to customize certain behaviors of the project. An example file name `example.config` is provided in the project to help you to get started.

- Copy the `example.config` file and rename it to `.config`

6. Configure your .config file :
The `.config` file allows you to customize certain behaviors of the project. An exemple file name `example.config` is provided in the project to help you get started.
- Copy the `example.config` file and rename it to `.config`:
```bash
cp example.config .config
```bash
cp example.config .config
```

In this `.config` file you have some variables you can configurate :
In this `.config` file you have some variables you can configure :

- **CPU** : you can choose the number of processors you want to use (by default 1).

- **DEVELOPERS_MAP** : For developpers it will group some username, exemple : "DEVELOPERS_MAP=Jean D=Jean Dupont;"
- **DEVELOPERS_MAP** : For developers it will group some username, example : "DEVELOPERS_MAP=Jean D=Jean Dupont;"

- **DEFAULT_COLUMN** : The list of the default column that the program do

- **TERMS_TO_SEARCH** : List of terms you want to search for in the files of the repository (handle regex)

- **FILES_TO_SEARCH** : List of file you want to search for in a repository (handle regex)

## Usage
## Usage

### Clone Repositories

Expand Down Expand Up @@ -110,4 +141,5 @@ In this `.config` file you have some variables you can configurate :

## Authors

Main author : Louise Calvez
- Main author : Louise Calvez
- Doc reviewers : [@gigouni](https://github.com/gigouni/)
File renamed without changes.
File renamed without changes.