Skip to content

Commit c1a8a53

Browse files
committed
add some documentation
1 parent a278b0c commit c1a8a53

File tree

2 files changed

+138
-0
lines changed

2 files changed

+138
-0
lines changed

CONTRIBUTING.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contribution guidelines
2+
3+
First off, thanks for taking the time to contribute!
4+
5+
The following is a set of guidelines for contributing to this project.
6+
These are not set in stone, but following these guidelines closely is usually
7+
considered good practice. Use your best judgment, and feel free to propose
8+
changes to this document in a pull request.
9+
10+
## Using GitHub to implement features and fix bugs
11+
12+
If you want to help out with one of our bugs or implement a new feature, here
13+
are some suggestions for success. The basic process looks like this:
14+
15+
1. Fork the repository.
16+
2. Clone your fork to your development machine.
17+
3. Create your issue branch.
18+
4. Implement your feature or fix the bug and push the results to your fork.
19+
5. Send us a pull request.
20+
21+
You can find more info about [creating a fork](https://help.github.com/articles/fork-a-repo/)
22+
and [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
23+
in the GitHub help articles. Our maintainers will review your pull request as
24+
soon as we can.
25+
26+
## What makes a good pull request?
27+
28+
To summarize:
29+
30+
* Address only one issue with a single pull request.
31+
* For new functionality, have a conversation with the maintainers before putting
32+
in too much work. Opening an issue is a good way to start the conversation.
33+
* Finally, small pull requests are preferred. That way we can find time to
34+
review them between work, and family, and watching videos of cute cats jumping
35+
into cardboard boxes on the internet.
36+
37+
## Styleguides
38+
39+
### Git Commit Messages
40+
41+
* Use the present tense ("Add feature" not "Added feature").
42+
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
43+
* Limit all lines of the commit message to 65 characters or less.
44+
* Exception: When a line contains a URLs that is too long to fit into the
45+
character limit, do not add a line break after 65 characters.
46+
* URLs (e. g. for linking to information about a vulnerability in a dependency)
47+
should be enclose in angle brackets, e. g. `<https://example.com/>`.
48+
* For multi-line commit messages:
49+
* Write the summary on the first line.
50+
* Leave the second line empty.
51+
* Then follow up with a more detailed explanation of the changes.
52+
* When only changing documentation, include `[ci skip]` on a separate line in
53+
the commit message.
54+
55+
### Code Styleguide
56+
57+
* Try to limit lines to 80 characters.
58+
* Use spaces (not tabs) for indentation, two spaces per indentation level.
59+
* Try to follow best practices and guidelines for modern C++ (i. e. C++11 and
60+
later). If in doubt, consult the C++ Core Guidelines at
61+
<https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines>.

readme.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# webp-viewer - a very simple WebP image viewer
2+
3+
`webp-viewer` is a program that loads and displays a WebP image.
4+
5+
Animations are currently not supported, and probably never will be.
6+
7+
## Building from source
8+
9+
### Prerequisites
10+
11+
To build webp-viewer from source you need a C++ compiler with support for C++17,
12+
CMake 3.8 or later, OpenGL, the GLFW library and the libwebp library.
13+
pkg-config is required to make it easier to find compiler options for the
14+
installed libraries.
15+
16+
It also helps to have Git, a distributed version control system, on your build
17+
system to get the latest source code directly from the Git repository.
18+
19+
All of that can usually be installed be typing
20+
21+
apt-get install cmake g++ git libgl-dev libglfw3-dev libwebp-dev pkg-config
22+
23+
or
24+
25+
yum install cmake gcc-c++ git glfw-devel libwebp-devel pkgconfig
26+
27+
into a root terminal.
28+
29+
### Getting the source code
30+
31+
Get the source directly from Git by cloning the Git repository and change to
32+
the directory after the repository is completely cloned:
33+
34+
git clone https://gitlab.com/striezel/webp-viewer.git
35+
cd webp-viewer
36+
37+
That's it, you should now have the current source code on your machine.
38+
39+
### Build process
40+
41+
The build process is relatively easy, because CMake does all the preparations.
42+
Starting in the root directory of the source, you can do the following steps:
43+
44+
mkdir build
45+
cd build
46+
cmake ../
47+
make -j4
48+
49+
## Usage
50+
51+
```
52+
webp-viewer [OPTIONS] [FILE]
53+
54+
Loads and shows a WebP image.
55+
56+
options:
57+
-? | --help - Shows this help message.
58+
-v | --version - Shows version information.
59+
FILE - Sets the file name of image to show.
60+
```
61+
62+
## Copyright and Licensing
63+
64+
Copyright 2022 Dirk Stolle
65+
66+
This program is free software: you can redistribute it and/or modify
67+
it under the terms of the GNU General Public License as published by
68+
the Free Software Foundation, either version 3 of the License, or
69+
(at your option) any later version.
70+
71+
This program is distributed in the hope that it will be useful,
72+
but WITHOUT ANY WARRANTY; without even the implied warranty of
73+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74+
GNU General Public License for more details.
75+
76+
You should have received a copy of the GNU General Public License
77+
along with this program. If not, see <http://www.gnu.org/licenses/>.

0 commit comments

Comments
 (0)