source: main/trunk/greenstone2/perllib/cpan/Mojolicious/Guides/Contributing.pod@ 32205

Last change on this file since 32205 was 32205, checked in by ak19, 6 years ago

First set of commits to do with implementing the new 'paged_html' output option of PDFPlugin that uses using xpdftools' new pdftohtml. So far tested only on Linux (64 bit), but things work there so I'm optimistically committing the changes since they work. 2. Committing the pre-built Linux binaries of XPDFtools for both 32 and 64 bit built by the XPDF group. 2. To use the correct bitness variant of xpdftools, setup.bash now exports the BITNESS env var, consulted by gsConvert.pl. 3. All the perl code changes to do with using xpdf tools' pdftohtml to generate paged_html and feed it in the desired form into GS(3): gsConvert.pl, PDFPlugin.pm and its parent ConvertBinaryPFile.pm have been modified to make it all work. xpdftools' pdftohtml generates a folder containing an html file and a screenshot for each page in a PDF (as well as an index.html linking to each page's html). However, we want a single html file that contains each individual 'page' html's content in a div, and need to do some further HTML style, attribute and structure modifications to massage the xpdftool output to what we want for GS. In order to parse and manipulate the HTML 'DOM' to do this, we're using the Mojo::DOM package that Dr Bainbridge found and which he's compiled up. Mojo::DOM is therefore also committed in this revision. Some further changes and some display fixes are required, but need to check with the others about that.

File size: 13.1 KB
Line 
1
2=encoding utf8
3
4=head1 NAME
5
6Mojolicious::Guides::Contributing - Contributing to Mojolicious
7
8=head1 OVERVIEW
9
10There are many ways to contribute to L<Mojolicious>, this guide will show you a
11few of them.
12
13=head1 REPORTING BUGS
14
15We use the L<GitHub issue tracker|https://github.com/kraih/mojo/issues>, so
16you'll need to create a (free) GitHub account to be able to submit issues,
17comments and pull requests.
18
19First of all, make sure you are using the latest version of L<Mojolicious>, it
20is quite likely that your bug has already been fixed. If that doesn't help,
21take a look at the list of currently open issues, perhaps it has already been
22reported by someone else and you can just add a comment confirming it.
23
24If it hasn't been reported yet, try to prepare a test case demonstrating the
25bug, you are not expected to fix it yourself, but you'll have to make sure the
26developers can replicate your problem. Sending in your whole application
27generally does more harm than good, the C<t> directory of this distribution has
28many good examples for how to do it right. Writing a test is usually the
29hardest part of fixing a bug, so the better your test case the faster it can be
30fixed. ;)
31
32And don't forget to add a descriptive title and text, when you create a new
33issue. If your issue does not contain enough information or is unintelligible,
34it might get closed pretty quickly. But don't be disheartened, if there's new
35activity it will get reopened just as quickly.
36
37=head2 Reporting security issues
38
39Please report security issues directly to the pumpkin-holder via email, which is
40currently Sebastian Riedel (C<[email protected]>), and give us a few days to
41develop and release a proper fix.
42
43=head1 RESOLVING ISSUES
44
45There are many ways in which you can help us resolve existing issues on the
46L<GitHub issue tracker|https://github.com/kraih/mojo/issues>.
47
48Can you replicate the problem on your computer? Add a comment saying that
49you're seeing the same. Perhaps you can provide additional information that
50will make it easier for others to replicate the problem, maybe even contribute
51a better test case.
52
53And for all code contributions we very much appreciate additional testing and
54code review, just add a comment to show your approval or to point out flaws
55that need to be addressed.
56
57=head1 CONTRIBUTING DOCUMENTATION
58
59One of the easiest ways to contribute to L<Mojolicious> is through
60documentation improvements. While the L<Mojolicious::Guides> are carefully
61curated by the core team, everybody with a (free) GitHub account can make
62changes and add new information to the
63L<Mojolicious wiki|http://github.com/kraih/mojo/wiki>.
64
65Pull requests with additions or changes to the documentation included in the
66L<Mojolicious> distribution follow the same rules as code contributions. Please
67don't send pull requests for overly simplistic changes, such as the addition of
68a comma or semicolon.
69
70=head1 CONTRIBUTING CODE
71
72All code contributions should be sent as
73L<GitHub pull requests|https://help.github.com/articles/using-pull-requests>.
74
75An expressive title and detailed description are invaluable during the review
76process, which usually ends when members of the community have voiced their
77opinions and the core team voted for or against a change. All code changes
78should emulate the style of the surrounding code, include tests that fail
79without them, and update relevant documentation.
80
81While the L<Mojolicious> distribution covers a wide range of features, we are
82rather conservative when it comes to adding new ones. So if your contribution
83is not a simple bug fix, it is B<strongly recommended> that you discuss it in
84advance on the L<mailing list|http://groups.google.com/group/mojolicious> or the
85official IRC channel C<#mojo> on C<irc.perl.org>
86(L<chat now!|https://chat.mibbit.com/?channel=%23mojo&server=irc.perl.org>), to
87avoid unnecessary work and to increase its chances of getting accepted.
88
89The following mission statement and rules are the foundation of all L<Mojo> and
90L<Mojolicious> development. Please make sure that your contribution aligns well
91with them before sending a pull request.
92
93=head2 Mission statement
94
95L<Mojo> is a web development toolkit, with all the basic tools and helpers
96needed to write simple web applications and higher level web frameworks, such as
97L<Mojolicious>.
98
99All components should be reusable in other projects, and in a UNIXish way only
100loosely coupled.
101
102Especially for people new to Perl it should be as easy as possible to install
103L<Mojolicious> and get started. Writing web applications can be one of the most
104fun ways to learn a language!
105
106For developers of other web frameworks, it should be possible to reuse all the
107infrastructure and just consider the higher levels of the L<Mojolicious>
108distribution an example application.
109
110=head2 Rules
111
112=over 2
113
114Web development should be easy and fun, this is what we optimize for.
115
116The web is a moving target, to stay relevant we have to stay in motion too.
117
118Keep it simple, no magic unless absolutely necessary.
119
120The installation process should be as fast and painless as possible. (Less than
121a minute on most common hardware is a good rule of thumb)
122
123The addition and modification of features is decided by majority vote or the
124pumpkin-holder.
125
126Any core developer may nominate a new one, who must then be accepted by a 2/3
127majority vote.
128
129The pumpkin-holder has veto rights and may select their successor.
130
131It's not a feature without a test and documentation.
132
133A feature is only needed when the majority of the user base benefits from it.
134
135Features may only be changed in a major release, to fix a serious security
136issue, or after being deprecated for at least 3 months.
137
138Refactoring and deprecations should be avoided if there are no substantial
139benefits.
140
141New features can be marked as experimental to be excluded from deprecation
142policies.
143
144A major release is signaled by a new major version number and a unique code
145name based on a Unicode character.
146
147Only add dependencies if absolutely necessary and make them optional if
148possible.
149
150Domain specific languages should be avoided in favor of Perl-ish solutions.
151
152No inline POD.
153
154Documentation belongs to the guides, module POD is just an API reference.
155
156The main focus of the included documentation should be on examples, no walls of
157text. (An example for every one or two sentences is a good rule of thumb)
158
159Everything should be ordered alphabetically if possible, or at least be
160consistent if not.
161
162The master source code repository should always be kept in a stable state, use
163feature branches for actual development.
164
165Code has to be run through L<Perl::Tidy> with the included
166L<.perltidyrc|https://github.com/kraih/mojo/blob/master/.perltidyrc>, and
167everything should look like it was written by a single person.
168
169Functions and methods should be as short as possible, no spaghetti code.
170
171Comments should be correctly capitalized, and funny if possible, punctuation is
172optional if it doesn't increase readability.
173
174No names outside of C<Mojolicious.pm>.
175
176=back
177
178=head1 DONATIONS
179
180L<Mojolicious> is open source and free to use. However, the amount of effort
181needed to maintain the project and develop new features for it is not
182sustainable without proper financial backing. You can support the ongoing
183development of L<Mojolicious> through L<PayPal|https://www.paypal.me/kraih>.
184
185If you run a business and use L<Mojolicious> in a revenue generating product, it
186makes business sense to support L<Mojolicious> development. Because it ensures
187that the project your product relies on stays healthy and actively maintained.
188It can also help your exposure within the community and will make it easier to
189attract L<Mojolicious> developers.
190
191Please email Sebastian Riedel (C<[email protected]>) if you have any
192questions about becoming a sponsor.
193
194=head1 CODE OF CONDUCT
195
196Like the technical community as a whole, the L<Mojolicious> team and community
197is made up of a mixture of professionals and volunteers from all over the world,
198working on every aspect of the mission - including mentorship, teaching, and
199connecting people.
200
201Diversity is one of our huge strengths, but it can also lead to communication
202issues and unhappiness. To that end, we have a few ground rules that we ask
203people to adhere to. This code applies equally to founders, mentors and those
204seeking help and guidance.
205
206This isn’t an exhaustive list of things that you can’t do. Rather, take it in
207the spirit in which it’s intended - a guide to make it easier to enrich all of
208us and the technical communities in which we participate.
209
210This code of conduct applies to all spaces managed by the L<Mojolicious>
211project. This includes IRC, the mailing lists, the issue tracker, and any other
212forums created by the project team which the community uses for communication.
213In addition, violations of this code outside these spaces may affect a person's
214ability to participate within them.
215
216If you believe someone is violating the code of conduct, we ask that you report
217it by emailing Joel Berger (C<[email protected]>) or other members of
218L<the team|Mojolicious/"CORE DEVELOPERS">.
219
220=over 2
221
222=item * B<Be friendly and patient.>
223
224=item * B<Be welcoming.> We strive to be a community that welcomes and supports
225people of all backgrounds and identities. This includes, but is not limited to
226members of any race, ethnicity, culture, national origin, colour, immigration
227status, social and economic class, educational level, sex, sexual orientation,
228gender identity and expression, age, size, family status, political belief,
229religion, and mental and physical ability.
230
231=item * B<Be considerate.> Your work will be used by other people, and you in
232turn will depend on the work of others. Any decision you take will affect users
233and colleagues, and you should take those consequences into account when making
234decisions. Remember that we're a world-wide community, so you might not be
235communicating in someone else's primary language.
236
237=item * B<Be respectful.> Not all of us will agree all the time, but
238disagreement is no excuse for poor behavior and poor manners. We might all
239experience some frustration now and then, but we cannot allow that frustration
240to turn into a personal attack. It’s important to remember that a community
241where people feel uncomfortable or threatened is not a productive one. Members
242of the L<Mojolicious> community should be respectful when dealing with other
243members as well as with people outside the L<Mojolicious> community.
244
245=item * B<Be careful in the words that you choose.> We are a community of
246professionals, and we conduct ourselves professionally. Be kind to others. Do
247not insult or put down other participants. Harassment and other exclusionary
248behavior aren't acceptable. This includes, but is not limited to:
249
250=over 2
251
252=item * Violent threats or language directed against another person.
253
254=item * Discriminatory jokes and language.
255
256=item * Posting sexually explicit or violent material.
257
258=item * Posting (or threatening to post) other people's personally identifying
259information ("doxing").
260
261=item * Personal insults, especially those using racist or sexist terms.
262
263=item * Unwelcome sexual attention.
264
265=item * Advocating for, or encouraging, any of the above behavior.
266
267=item * Repeated harassment of others. In general, if someone asks you to stop,
268then stop.
269
270=back
271
272=item * B<When we disagree, try to understand why.> Disagreements, both social
273and technical, happen all the time and L<Mojolicious> is no exception. It is
274important that we resolve disagreements and differing views constructively.
275Remember that we’re different. The strength of L<Mojolicious> comes from its
276varied community, people from a wide range of backgrounds. Different people have
277different perspectives on issues. Being unable to understand why someone holds a
278viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err
279and blaming each other doesn’t get us anywhere. Instead, focus on helping to
280resolve issues and learning from mistakes.
281
282=back
283
284=head1 FORK POLICY
285
286The L<Mojolicious> core team believes that there is a lot of value in the entire
287toolkit being a unified project. Forks drain resources from a project, not just
288mindshare but also very valuable bug reports and patches, which can have very
289serious security implications. Therefore we ask that you please not publically
290fork pieces of the L<Mojolicious> distribution without our consent. As doing so
291is against our express wishes, individuals who engage in unauthorized forking
292may be denied from participating in community sponsored spaces.
293
294For developers considering the use of a forked module, we strongly recommend
295that you make yourself familiar with its history and track record. While many
296parts of L<Mojolicious> have been forked in the past, very few forks have been
297able to keep up with L<Mojolicious> development, and most are missing critical
298bug fixes.
299
300=head1 MORE
301
302You can continue with L<Mojolicious::Guides> now or take a look at the
303L<Mojolicious wiki|http://github.com/kraih/mojo/wiki>, which contains a lot more
304documentation and examples by many different authors.
305
306=head1 SUPPORT
307
308If you have any questions the documentation might not yet answer, don't
309hesitate to ask on the
310L<mailing list|http://groups.google.com/group/mojolicious> or the official IRC
311channel C<#mojo> on C<irc.perl.org>
312(L<chat now!|https://chat.mibbit.com/?channel=%23mojo&server=irc.perl.org>).
313
314=cut
Note: See TracBrowser for help on using the repository browser.