<commit_before>[![Go Report Card](https://goreportcard.com/badge/github.com/Comradin/yummy)](https://goreportcard.com/report/github.com/Comradin/yummy) [![Build Status](https://travis-ci.org/Comradin/yummy.svg?branch=master)](https://travis-ci.org/Comradin/yummy)

# yummy
A simple YUM repository server to upload to and serve rpm packages from.

It provides a simple API (/api/upload) to use tools like curl to upload rpm
packages and automatically rebuild the rpm repository metadata.

# API endpoints
## /api/upload
The upload endpoint emulates a filled-in form in which a user has pressed
the submit button. The formular field that contains the file is **fileupload**.

To use this with curl use the -F switch with the following format:
_-F fileupload=@file.rpm_

```example
    curl -F fileupload=@python-elasticsearch-curator-5.1.1-1.noarch.rpm \
         http://yum.example.com/api/upload
```

**Caution**: This is the **only** supported way of uploading files to the
service at the moment. Using a different form value or an http PUT will
result in an error.

The file must be of type "*.rpm" or the upload will fail.

## / BaseURL
Will serve the repository content as a Filebrowser, so it can be used as
the baseurl in a yum repository config file.

```
[yum-repository]
baseurl = https://yum.example.com/
enabled = 1
name = YUM Repository Example
```
**Caution** Will serve a blank page in case no files were uploaded yet.

## /help
Will render the README.md file as HTML.

# configuration
yummy can be configured by editing the .yummy.yml file.

```
yum:
  repopath: /opt/
  workers: 2
  createrepoBinary: /bin/createrepo
  rpmBinary: /bin/rpm
  helpFile: /usr/share/doc/yummy/README.md
```

The options should be mostly self explanatory. Here a brief overview:

1. repopath, where to store the rpms and create the repository
2. workers, the amount of workers for the createrepo call to index the
   packages. If the update process takes too long, more worker processes
   might work
3. createrepoBinary, path to the executable to create the repository metadata
4. rpmBinary, not in use yet, for further verification of uploaded rpm files
5. helpFile, path to load the help file from

# hints for contributors
This project uses the Go dependency management tool `dep`.
If you added a new dependency, please add with `dep ensure -add`<commit_msg>[doc] missing word in README.md<commit_after>[![Go Report Card](https://goreportcard.com/badge/github.com/Comradin/yummy)](https://goreportcard.com/report/github.com/Comradin/yummy) [![Build Status](https://travis-ci.org/Comradin/yummy.svg?branch=master)](https://travis-ci.org/Comradin/yummy)

# yummy
A simple YUM repository server to upload to and serve rpm packages from.

It provides a simple API (/api/upload) to use tools like curl to upload rpm
packages and automatically rebuild the rpm repository metadata.

# API endpoints
## /api/upload
The upload endpoint emulates a filled-in form in which a user has pressed
the submit button. The formular field that contains the file is **fileupload**.

To use this with curl use the -F switch with the following format:
_-F fileupload=@file.rpm_

```example
    curl -F fileupload=@python-elasticsearch-curator-5.1.1-1.noarch.rpm \
         http://yum.example.com/api/upload
```

**Caution**: This is the **only** supported way of uploading files to the
service at the moment. Using a different form value or an http PUT will
result in an error.

The file must be of type "*.rpm" or the upload will fail.

## / BaseURL
Will serve the repository content as a Filebrowser, so it can be used as
the baseurl in a yum repository config file.

```
[yum-repository]
baseurl = https://yum.example.com/
enabled = 1
name = YUM Repository Example
```
**Caution** Will serve a blank page in case no files were uploaded yet.

## /help
Will render the README.md file as HTML.

# configuration
yummy can be configured by editing the .yummy.yml file.

```
yum:
  repopath: /opt/
  workers: 2
  createrepoBinary: /bin/createrepo
  rpmBinary: /bin/rpm
  helpFile: /usr/share/doc/yummy/README.md
```

The options should be mostly self explanatory. Here a brief overview:

1. repopath, where to store the rpms and create the repository
2. workers, the amount of workers for the createrepo call to index the
   packages. If the update process takes too long, more worker processes
   might work
3. createrepoBinary, path to the executable to create the repository metadata
4. rpmBinary, not in use yet, for further verification of uploaded rpm files
5. helpFile, path to load the help file from

# hints for contributors
This project uses the Go dependency management tool `dep`

If you added a new dependency, please add it with `dep ensure -add`
{'fraction_non_alphanumeric': 0.08747094865835622, 'fraction_numerical': 0.004648214663004437, 'mean_word_length': 4.030818278427205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2157701', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1364, 'n_words': 624}