There is essentially three ways to contribute to Pimp My Log :
Basically, you just have to modify the configuration file config.user.json
at root and it will work. To understand how the configuration file works, just read the documentation about configuration, it is easy.
The only difficulty should be the regular expression. There is a tool to help you to find the right expression. This tool is explained in the debug page.
First of all, you have to make it work for you! This is the most difficult part.
To share your configuration file with other users, create a new discussion on the support website and provide these informations :
LogFormat
directive for example)Here is a discussion template ready to modify and post:
Subject : Submission: Config for ___SOFTWARE___
Hi!
Here is a configuration excerpt for software *---SOFTWARE---*:
- **name** : ---SOFTWARE_NAME---
- **url** : ---SOFTWARE_URL IF AVAILABLE---
- **os** : ---ON WHICH OPERATING SYSTEM IS THIS SOFTWARE AVAILABLE---
- **format** : ---SOME ADVICE TO CONFIGURE THE SOFTWARE ON THE SERVER TO HAVE SAME LOG FORMAT AS YOU---
- **config** :
```
"---SOFTWARE_ID---": {
"display" : "---SOFTWARE_NAME---",
"path" : "---SOFTWARE__PATH---",
"refresh" : 20,
"max" : 20,
"notify" : false,
"format" : {
---YOUR_CONFIGURATION---
}
}
```
- **sample** :
```
Jan 12 09:25:12 VNLAdapterStatus - ioctl: SIOCGIFFLAGS failed, error: Device not configured
Jan 12 09:25:12 VNL_EnableNetworkAdapter - Successfully enabled hostonly adapter on vnet: vmnet1
Jan 12 09:25:12 VNL_StartService - Started "DHCP" service for vnet: vmnet1
Jan 12 09:25:12 VNL_StartService - Started "NAT" service for vnet: vmnet8
```
You can share it with the community by adding some stuffs so that users will enable this new software during the auto-configuration process at first launch.
You must read the softwares page to understand how you can build your software own configurator.
If you want to add new features, fix some bugs or something else, it is easy :
dev
or jekyll
branch (see below)Got it!
You have to understand how the repository is organized at first. Pimp My Log has 5 branches:
master
: the production codebeta
: the code in preproduction to test on live before going to proddev
: the development branch, you code heregh-pages
: hey this is the static website you are reading now!jekyll
: the development branch for the gh-pages
, you write documentation hereTo code in Pimp My Log, checkout the dev
branch:
$ git clone https://github.com/potsky/PimpMyLog.git -b dev PimpMyLog-dev
$ cd PimpMyLog-dev
You will need these tools on your computer:
gem install sass
)curl -sS https://getcomposer.org/installer | php; mv composer.phar /usr/local/bin/composer
)npm install -g grunt-cli
)npm install -g bower
)Install some tools:
$ npm install
$ bower install
$ composer install
And launch grunt
to watch your modifications and rebuild what is necessary:
$ grunt
Your Pimp My Log development instance is now available at http://localhost/PimpMyLog-dev/_site/
You need of course PHP on your local server!
When you are ready, test your code in production. Stop grunt
and launch the production server now:
$ grunt build
Your Pimp My Log development instance ready for production is now available at http://localhost/PimpMyLog-dev/_build/.
This code will be the same as in the master
branch :
To work on the documentation is really funny in my private opinion. The website that you are reading now is a static website without any database or script language. It is based on jekyll. It is served by Github servers but statically because plugins are great and Github does not allow them.
So the website in the gh-pages is already generated by grunt
in the jekyll
branch.
You will need these tools on your computer:
npm install -g grunt-cli
)npm install -g bower
)gem install jekyll
)port install GraphicsMagick
)To write documentation or fix my poor english words on pimpmylog.com, checkout the jekyll
branch:
$ git clone https://github.com/potsky/PimpMyLog.git -b jekyll PimpMyLog-jekyll
$ cd PimpMyLog-jekyll
Install some tools:
$ bundle install
$ npm install
$ bower install
In 2 terminals, run at the same time :
grunt
to watch for file modification and live rebuildgrunt server
to launch Jekyll in dev mode with watch for file modification and live rebuildNow you can watch the documentation website at http://localhost:4000.
Here is the file structure :
_js
: our javascripts_css
: our css and less filesassets
: the static assets directoryupload
: assets for posts (thumbnails are computed on grunt processes)Install new css and js tools with bower install ... -S
and do not modify original files in bower-components
!
When you have finished and are ready, test your modification in production. Stop both grunt processes and launch:
$ grunt build server-prod
Now you can watch the production documentation website ready to deploy at http://localhost:4000.
As in the dev
branch, this will minify css, js, html, build thumbnails, etc...
To contribute to an existing language in Pimp My Log (not the documentation website):
We will update Pimp My Log to embed your definitions.
There are 2 ways to add a new language in Pimp My Log (not the documentation website):
en_CA
for english in Canada) on the support website.