<commit_before>image-cache
===========

Provides a simple caching mechanism for image files (png,jpg,etc.), the exposed service receives an URL as parameter and
caches its content for subsequent requests for that resource. Additionally, it creates several sizes of the image that 
can be requested in different contexts in the GBIF portal, the image versions stored in the cache are:
  * ORIGINAL
  * LARGE: 1024x768 px
  * MIDSIZE: 627x442 px
  * SMALL: 230x172 px
  * THUMBNAIL: 100x100 px

To build the project
====================
This project requires only one setting `imgcache.repository` which should contain the path where the cached files 
are stored. The profile below can be used to run the service locally:
```
    <profile>
      <id>tmp</id>
      <properties>
        <imgcache.repository>/tmp/image-cache</imgcache.repository>
      </properties>
    </profile>
```
To build the project use the Maven command:    
```
mvn clean package install
```
The files application.properties and logback.xml are excluded from the target jar file using the Maven Shade plugin.

How to run this service
=======================
This service is based on the [gbif-microservice](https://github.com/gbif/gbif-microservice) project which means that the
jar file can be executed using the parameters described in the [gbif-microservice](https://github.com/gbif/gbif-microservice)
project; additionally, this service requires a logback.xml file in the `conf` directory located at same level where the
jar file (such directory is added to the application classpath).<commit_msg>changing markdown to use headers instead on underlying<commit_after>#image-cache


Provides a simple caching mechanism for image files (png,jpg,etc.), the exposed service receives an URL as parameter and
caches its content for subsequent requests for that resource. Additionally, it creates several sizes of the image that 
can be requested in different contexts in the GBIF portal, the image versions stored in the cache are:
  * ORIGINAL
  * LARGE: 1024x768 px
  * MIDSIZE: 627x442 px
  * SMALL: 230x172 px
  * THUMBNAIL: 100x100 px

##To build the project

This project requires only one setting `imgcache.repository` which should contain the path where the cached files 
are stored. The profile below can be used to run the service locally:
```
    <profile>
      <id>tmp</id>
      <properties>
        <imgcache.repository>/tmp/image-cache</imgcache.repository>
      </properties>
    </profile>
```
To build the project use the Maven command:    
```
mvn clean package install
```
The files application.properties and logback.xml are excluded from the target jar file using the Maven Shade plugin.

##How to run this service

This service is based on the [gbif-microservice](https://github.com/gbif/gbif-microservice) project which means that the
jar file can be executed using the parameters described in the [gbif-microservice](https://github.com/gbif/gbif-microservice)
project; additionally, this service requires a logback.xml file in the `conf` directory located at same level where the
jar file (such directory is added to the application classpath).
{'fraction_non_alphanumeric': 0.08312101910828025, 'fraction_numerical': 0.01592356687898089, 'mean_word_length': 4.341836734693878, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1708030', 'n_tokens_mistral': 877, 'n_tokens_neox': 815, 'n_words': 392}