Add more useful info to the README file.
[working/Evergreen.git] / style_guide / contributing_DIG.xml
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <chapter xml:id="style-contributing" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="EN"\r
3     xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">\r
4     <info>\r
5         <title>Contributing Documentation in DocBook Format</title>\r
6     </info>\r
7 \r
8         <section xml:id="docbook_file_structure">\r
9                 <title>Evergreen Documentation File Structure</title>\r
10         \r
11                 <para>At the root of the Evergreen  documentation is the <filename>root.xml</filename> file. The file contains the &lt;book&gt; element and manages the organization of the \r
12                 Evergreen Documentation Manual. This file contains included files which are the chapters and the appendices of the documentation. If you are contributing documentation, you should not \r
13                 have to edit this file except to add an include statement to place a new chapter in the Evergreen documentation in appropriate order:</para>\r
14 <programlisting><![CDATA[\r
15 ...\r
16 <xi:include href="appendices/glossary.xml"/>\r
17 ...\r
18 ]]></programlisting>\r
19                 <para>The above example includes the <filename>glossary.xml</filename> file in the Evergreen documentation. This file should be located in the \r
20                 <filename class="directory">appendixes</filename> subdirectory relative to the <filename>root.xml</filename> file.</para>  \r
21                 <para>When creating new files, the first line should always be:</para>\r
22 <programlisting> <![CDATA[\r
23 <?xml version="1.0" encoding="utf-8"?>  \r
24 ]]></programlisting>\r
25                 <para>This is the standard to indicate that this is an XML file</para>\r
26                 <para>The next line should include the &lt;chapter&gt; element. Here is an example for the glossary chapter of this style guide document.</para>\r
27 <programlisting> <![CDATA[\r
28 <chapter xml:id="style-glossary" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="EN"\r
29     xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">\r
30 ]]></programlisting>\r
31                 <para>An important attribute is <code language="xml">xml:id</code>. This must be a unique id to the entire documentation and is important for cross referencing chapters, sections, tables \r
32                 and other parts of the documentation.</para>    \r
33                 <para>Also remember to add the closing &lt;/chapter&gt; tag at the very end of the document.</para> \r
34                 <para>The chapter is the container for files contributed to DIG. Do not create a new file to add a <code language="xml">&lt;section&gt;</code> to an existing \r
35                 <code language="xml">&lt;chapter&gt;</code> and do not use the <code language="xml">&lt;book&gt;</code> container in yor file since the \r
36                 <code language="xml">&lt;book&gt;</code> element is already in the <filename>root.xml</filename> file.</para> \r
37         </section>\r
38 <section xml:id="how_to_contribte">\r
39                 <title>How to Contribute Documentation</title>\r
40                 <procedure>\r
41                         <title>Using Git to Upload Files from Linux</title>\r
42                         <step>\r
43                                 <para><link xlink:href="http://help.github.com/linux-git-installation/"  xlink:title="Install git">Install git</link>.</para>   \r
44                         </step>\r
45                         <step>\r
46                                 <para><link xlink:href="https://github.com/" xlink:title="get an account">Sign up for a free github account.</link>.</para>     \r
47                         </step>\r
48                         <step>\r
49                                 <para>Send an email to the github repository maintainer (<email>robert.soulliere@mohawkcollege.ca</email>) to request being added as a contributor.</para>      \r
50                         </step>\r
51                         <step>\r
52                                 <para><link xlink:href="http://help.github.com/linux-key-setup/" xlink:title="linux key setup">Generate and add SSH keys to github repository.</link>.</para>\r
53                         </step> \r
54                         <step>\r
55                                 <para>Clone the Evergreen-DocBook repository on your local machine:</para>\r
56 <screen><userinput>git clone git://github.com/rsoulliere/Evergreen-DocBook.git</userinput></screen>\r
57                         </step> \r
58                         <step>\r
59                                 <para>Edit or add files in the clonesd repository location.</para>\r
60                         </step> \r
61                 </procedure>\r
62                 <para>For editing and committing changes to the repository there are only a handful of commands you need to know (run these inside the directory structure of your cloned \r
63                 repository):</para> \r
64                 <itemizedlist>\r
65                         <listitem><command>git pull <option>filename</option></command> -  It will pull the most recent changes into your cloned version to avoid merging \r
66                         issues and errors when <quote>pushing</quote> your changes tp the remote repository.</listitem>\r
67                         <listitem><command>git add <option>filename</option></command> - Adds new files to repository. This is needed to tell git that you have added or edited files and want to add \r
68                         them into the repo.</listitem>\r
69                         <listitem><command>git commit <option>filename</option></command> - Commits changes to the repository. A text file will open describing what will be committed. Add a \r
70                         meainingful note here to indicate \r
71                         what you have chanaged.</listitem>\r
72                         <listitem><command>git push <option>filename</option></command> - Push changes to remote repository. After pushing your changes you should see them show up at: \r
73                         <link xlink:href="https://github.com/rsoulliere/Evergreen-DocBook/commits/master" xlink:title="see committed changes">\r
74                         https://github.com/rsoulliere/Evergreen-DocBook/commits/master</link>. </listitem>\r
75                 </itemizedlist>\r
76                         <tip><para>If possible, please test files locally or verify DocBook syntax is correct. The docBook files are generated every night to update the HTML and PDF files. \r
77                         Incorrect DocBook syntax could cause the chapter to be skipped during processing and not be included in the documentation.</para></tip>\r
78                 <procedure>\r
79                         <title>Contributing by editing existing files on github</title>\r
80                         <step>\r
81                                 <note><para>Editing files directly in github using the following procedures is not recommended for larger changes, but is useful for quick typo corrections and other \r
82                                 minor edits. If you need to makke major changes please use the previous git method or send changes to the \r
83                                 <link xlink:href="http://libmail.georgialibraries.org/mailman/listinfo/open-ils-documentation" xlink:title="DIG List">DIG list</link>.</para></note>\r
84                                 <para><link xlink:href="https://github.com/" xlink:title="get an account">Sign up for a free github account.</link>.</para>     \r
85                         </step>\r
86                         <step>\r
87                                 <para>Send an email to the  repository maintainer (<email>robert.soulliere@mohawkcollege.ca</email>) to request being added as a contributor.</para>    \r
88                         </step>\r
89                         <step>\r
90                                 <para>Go to the github repository at <link xlink:href="https://github.com/rsoulliere/Evergreen-DocBook" \r
91                                 xlink:title="github repo">https://github.com/rsoulliere/Evergreen-DocBook</link></para>\r
92                         </step> \r
93                         <step>\r
94                                 <para>Navigate to the file you would like to edit and click <guibutton>Edit this file</guibutton></para>\r
95                         </step> \r
96                         <step>\r
97                                 <para>Make changes, enter your change notes in the <guilabel>Commit message</guilabel> box and click <guibutton>Commit Changes</guibutton>.</para>\r
98                         </step> \r
99                 </procedure>\r
100                 <para>If you are unconfortable committing Documentation in DocBook format, simply submit your text documents or suggested changes to the \r
101                 <link xlink:href="http://libmail.georgialibraries.org/mailman/listinfo/open-ils-documentation" xlink:title="DIG List">DIG list</link> and we will convert them to XML DocBook format \r
102                 or add your changes to the documentation.</para>\r
103         </section>\r
104 </chapter>\r