Spring Boot scheduled service to check for free packt daily offers.
- Execute
git clone
to download the repository. - Once you have downloaded it, import it in your favourite IDE.
- OPTIONAL Compile the code and obtain the executable jar.
Notifier Packt is fully configurable. You can do it in three different ways:
- Editing the external
application.yaml
file. - Overriding properties via environment variables.
- Overriding properties via program arguments.
Property | Values | Default | Description |
---|---|---|---|
app.lang |
en /es |
en |
Sets the language of the application |
app.cron |
(cron expression) | 0 0 4 * * ? |
Sets the time on which the app will look for new free offers |
app.notifications.twitter.enabled |
true /false |
true |
Enables or disables the twitter notifications |
app.notifications.email.enabled |
true /false |
true |
Enables or disables email notifications |
If twitter notifications are enabled, you will also have to configure the following properties:
Property | Values | Description |
---|---|---|
app.notifications.twitter.accessSecret |
<access_secret> |
Enables or disables the twitter notifications |
app.notifications.twitter.accessKey |
<access_key> |
Enables or disables email notifications |
app.notifications.twitter.consumerKey |
<consumer_key> |
Sets the master password for encryption |
app.notifications.twitter.consumerSecret |
<consumer_secret> |
Sets the master password for encryption |
If email notifications are enabled, you will need to configure the following SimpleJavaMail
properties as well:
http://www.simplejavamail.org/#section-available-properties
You can use Jasypt
to encrypt any password you want to secure. Then, you can set the encryption master password using the following property:
Property | Values | Description |
---|---|---|
jasypt.encryptor.password |
<master_password> |
Sets the master password for encryption |
Any encrypted property password must follow the format:
ENC(encrypted_password)
Example:
app.notifications.twitter.accessSecret = ENC(my-encrypted-password)
After you have configured any properties and environment variables, just launch it as:
java -jar notifier-packt.jar
To override a property via program argument, just do it as it follows:
java -jar notifier-packt.jar --app.lang=en
A Dockerfile is provided to run Notifier Packt as a Docker container.
In order to build and execute the container, just modify and execute the following commands:
Build:
docker image build -t flashk/notifier-packt:<version> .
Run:
docker container run -d flashk/notifier-packt:<version>
Notifier Packt is Open Source software released under the Apache 2.0 license.
- Icons by Icons8 (https://icons8.com | License)
- SimpleJavaMail (http://www.simplejavamail.org | License | Notice)
- Emoji-Java (https://github.com/vdurmont/emoji-java | License)