Skip to content

Commit 5925707

Browse files
committed
User Guide: Formatting, link updates
- Add `sphinx.ext.extlinks` extension, and use for repetetive links - Conditionally enable `sphinx_copybutton` if found - Wrap inline literals with double \` pairs, to format monospaced - Turn developer page OS note into a Warning box, and replace the outdated PDF install instructions link with links to the Windows and Mac build instructions in the libopenshot project wiki - Wrap paragraphs at periods or commas (sentence-per-line) instead of arbitrarily fitting to a certain width - Use shorter sentences where possible
1 parent 4c0a42b commit 5925707

File tree

5 files changed

+125
-68
lines changed

5 files changed

+125
-68
lines changed

doc/conf.py

+37-15
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
#
2020
import os
2121
import sys
22-
sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
23-
from src.classes import info
22+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath('.')), "src"))
23+
24+
from classes import info
2425

2526
# -- General configuration ------------------------------------------------
2627

@@ -31,7 +32,28 @@
3132
# Add any Sphinx extension module names here, as strings. They can be
3233
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3334
# ones.
34-
extensions = []
35+
extensions = [
36+
'sphinx.ext.extlinks'
37+
]
38+
39+
try:
40+
# Add Copy button to code cells, if extension is available
41+
import sphinx_copybutton
42+
extensions.append('sphinx_copybutton')
43+
except ImportError:
44+
pass
45+
46+
# External links mappings for extlinks
47+
# see: http://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
48+
extlinks = {
49+
# alias: (url_template, prefix)
50+
'openshot-github':
51+
('https://github.com/OpenShot/%s', ''),
52+
'libopenshot-wiki':
53+
('https://github.com/OpenShot/libopenshot/wiki/%s', ''),
54+
'openshot-issue':
55+
('https://github.com/OpenShot/openshot-qt/issues/%s', 'issue ')
56+
}
3557

3658
# Add any paths that contain templates here, relative to this directory.
3759
templates_path = ['_templates']
@@ -240,21 +262,21 @@
240262
# -- Options for LaTeX output ---------------------------------------------
241263

242264
latex_elements = {
243-
# The paper size ('letterpaper' or 'a4paper').
244-
#
245-
# 'papersize': 'letterpaper',
265+
# The paper size ('letterpaper' or 'a4paper').
266+
#
267+
# 'papersize': 'letterpaper',
246268

247-
# The font size ('10pt', '11pt' or '12pt').
248-
#
249-
# 'pointsize': '10pt',
269+
# The font size ('10pt', '11pt' or '12pt').
270+
#
271+
# 'pointsize': '10pt',
250272

251-
# Additional stuff for the LaTeX preamble.
252-
#
253-
# 'preamble': '',
273+
# Additional stuff for the LaTeX preamble.
274+
#
275+
# 'preamble': '',
254276

255-
# Latex figure (float) alignment
256-
#
257-
# 'figure_align': 'htbp',
277+
# Latex figure (float) alignment
278+
#
279+
# 'figure_align': 'htbp',
258280
}
259281

260282
# Grouping the document tree into LaTeX files. List of tuples

doc/contributing.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ Did you find a bug?
2525
-------------------
2626

2727
- **Please check if this bug was already reported** by searching on
28-
GitHub under
29-
`Issues <https://github.com/OpenShot/openshot-qt/issues>`__.
28+
GitHub under `Issues`_.
3029

31-
- If you're unable to find an open issue addressing the problem, `open
32-
a new one <https://github.com/OpenShot/openshot-qt/issues/new>`__. Be
33-
sure to include a **title and clear description**, as much relevant
30+
- If you're unable to find an open issue addressing the problem,
31+
:openshot-issue:`open a new one <new/choose>`.
32+
Be sure to include a **title and clear description**, as much relevant
3433
information as possible, and the steps to reproduce the crash or
3534
issue.
3635

@@ -39,7 +38,7 @@ Did you find a bug?
3938

4039
Please download our latest daily installer:
4140
"""""""""""""""""""""""""""""""""""""""""""
42-
1. `www.openshot.org/download <https://www.openshot.org/download>`__ - click the '**DAILY BUILDS**' button, then grab the latest build from the list.
41+
1. `openshot.org/download <https://www.openshot.org/download>`_ - click the '**DAILY BUILDS**' button, then grab the latest build from the list.
4342
(Use the buttons below to download installers for a different Operating System.)
4443
2. Then enable 'Debug Mode (Verbose)' in the Preferences
4544
3. Quit OpenShot and delete both log files:
@@ -78,3 +77,5 @@ help us fix them!
7877
Thanks!
7978

8079
OpenShot Team
80+
81+
.. _Issues: https://github.com/OpenShot/openshot-qt/issues/

doc/developers.rst

+75-43
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,34 @@ the following sections will explain how to get started and get involved!
2727
The Big Picture
2828
---------------
2929
OpenShot Video Editor has 3 main components, a Python & PyQt user interface
30-
(`openshot-qt <https://github.com/OpenShot/openshot-qt>`_), a C++ audio library
31-
(`libopenshot-audio <https://github.com/OpenShot/libopenshot-audio>`_) and a C++ video library
32-
(`libopenshot <https://github.com/OpenShot/libopenshot>`_). If you are not familiar with Python,
30+
(:openshot-github:`openshot-qt`), a C++ audio library
31+
(:openshot-github:`libopenshot-audio`) and a C++ video library
32+
(:openshot-github:`libopenshot`). If you are not familiar with Python,
3333
PyQt, or C++, those would be great topics to research and learn more about at this point.
3434

3535
However, many bugs and new features can be added with only Python knowledge, since the C++
3636
components are not involved in the user interface at all. Python is an amazing language, and
3737
is super fun to learn, and is the only prerequisite skill needed to become an OpenShot
3838
developer!
3939

40+
.. warning::
41+
42+
The instructions that follow are for Ubuntu Linux,
43+
which is the easiest environment to configure for OpenShot development.
44+
If you are using another OS,
45+
I suggest running a virtual machine with Ubuntu LTS before continuing any further.
46+
47+
If you must use a Windows or Mac system for development,
48+
start by referring to the build notes in the ``libopenshot`` wiki.
49+
Building the library with all of its dependencies is the most challenging part of the process.
50+
51+
* :libopenshot-wiki:`Windows Build Instructions <Windows-Build-Instructions>`
52+
* :libopenshot-wiki:`Mac Build Instructions <Mac-Build-Instructions>`
53+
4054
Getting the Latest Source Code
4155
------------------------------
4256
Before we can fix any bugs or add any features, we need to get the source code onto your
43-
computer. These instructions are for Ubuntu Linux, which is the easiest environment to configure
44-
for OpenShot development. If you are using another OS, I suggest running a virtual machine with
45-
Ubuntu LTS before continuing any further. If you must use Windows or Mac for development, take a look
46-
at `these instructions <http://openshot.org/files/libopenshot/InstallationGuide.pdf>`_.
57+
computer.
4758

4859
Use git to clone our 3 repositories:
4960

@@ -96,69 +107,90 @@ great start, and we are now ready to start compiling some code!
96107

97108
libopenshot-audio (Build Instructions)
98109
--------------------------------------
99-
This library is required for audio playback and audio effects. It is based on the JUCE audio framework.
100-
Here are the commands to build and install it:
110+
This library is required for audio playback and audio effects.
111+
It is based on the JUCE audio framework.
112+
Here are the commands to build it:
101113

102114
.. code-block:: bash
103115
104116
cd libopenshot-audio
105117
mkdir build
106118
cd build
107-
cmake ../
119+
cmake -DCMAKE_INSTALL_PREFIX=dist ..
120+
make
108121
make install
109122
110-
Essentially, we are switching to the libopenshot-audio/build folder, and running `cmake ../` on the parent
111-
folder, which finds dependencies and creates all the needed Makefiles used to compile this library. Then
112-
`make install` uses those Makefiles to compile, and install this library. This should result in files being
113-
installed to your /usr/local/ folder.
123+
Essentially, we are switching to the ``libopenshot-audio/build`` folder,
124+
then running ``cmake ..`` on the parent folder.
125+
This finds dependencies and creates all the needed Makefiles used to compile this library.
126+
Then ``make`` uses those Makefiles to compile this library,
127+
and ``make install`` installs them in the location we specified.
128+
If ``CMAKE_INSTALL_PREFIX`` isn't set, the files will install to ``/usr/local/`` (by default) and ``make install`` will require administrative privileges to run.
114129

115130
libopenshot (Build Instructions)
116131
--------------------------------
117-
This library is required for video decoding, encoding, animation, and just about everything else. It does all
118-
the heavy lifting of video editing and video playback. Here are the commands to build and install it.
132+
This library is required for video decoding, encoding, animation, and just about everything else.
133+
It does all the heavy lifting of video editing and video playback.
134+
Here are the commands to build it:
119135

120136
.. code-block:: bash
121137
122138
cd libopenshot
123139
mkdir build
124140
cd build
125-
cmake ../
126-
make install
127-
128-
Essentially, we are switching to the libopenshot/build folder, and running `cmake ../` on the parent
129-
folder, which finds dependencies and creates all the needed Makefiles used to compile this library. Then
130-
`make install` uses those Makefiles to compile, and install this library. This should result in files being
131-
installed to your /usr/local/ folder and in your Python site-packages folder.
132-
133-
openshot-qt (Build Instructions)
134-
--------------------------------
135-
This is our main PyQt Python application. Because it is written in Python, it does not require any compiling
136-
to run. To launch openshot-qt from the source code, use the following commands:
141+
cmake -DLIBOPENSHOT_AUDIO_DIR=../../libopenshot-audio/build/dist ..
142+
make
143+
144+
Essentially, we are switching to the ``libopenshot/build`` folder,
145+
then running ``cmake ..`` on the parent folder.
146+
This finds dependencies and creates all the needed Makefiles used to compile this library.
147+
Then ``make`` uses those Makefiles to compile this library.
148+
Because we provided the location of our compiled ``libopenshot-audio`` installation,
149+
that version of the library will be used instead of the system version (if any).
150+
151+
We don't install our ``libopenshot`` after building, because we don't need to.
152+
For testing purposes, we can tell OpenShot to use ``libopenshot`` right from our ``build`` directory.
153+
154+
openshot-qt (Launch Instructions)
155+
---------------------------------
156+
This is our main PyQt Python application.
157+
Because it is written in Python, it does not require any compiling to run.
158+
To launch OpenShot from the source code with our newly-built
159+
``libopenshot-audio`` and ``libopenshot`` libraries, use the following commands:
137160

138161
.. code-block:: bash
139162
140163
cd openshot-qt
164+
PYTHONPATH=../libopenshot/build/src/bindings/python
141165
python3 src/launch.py
142166
143-
This should launch the OpenShot user interface, and include any changes you have made to the source code
144-
files (`*.py` Python files, `*.ui` PyQt UI files, etc...). This requires the `libopenshot-audio` and
145-
`libopenshot` libraries, and if anything went wrong with the steps above, OpenShot will likely not launch.
167+
This should launch the OpenShot user interface.
168+
Any changes you have made to the source code files
169+
(``*.py`` Python files, ``*.ui`` PyQt UI files, etc...) will be included.
170+
This requires the ``libopenshot-audio`` and ``libopenshot`` libraries,
171+
and if anything went wrong with the steps above, OpenShot will likely not launch.
146172

147-
If OpenShot launches at this point, congratulations, you now have a working local version of OpenShot,
148-
which is running off your local source code! Try making some changes to the source code and re-launch
149-
OpenShot... you should now see your changes!
173+
If OpenShot launches at this point, congratulations!
174+
You now have a working local version of OpenShot, which is running off your local source code.
175+
Try making some changes to the source code and re-launch OpenShot...
176+
you should now see your changes!
150177

151178
GitHub Issues
152179
-------------
153-
Now that you have successfully compiled and launched OpenShot Video Editor, be sure to check out our list
154-
of bug reports on GitHub: https://github.com/OpenShot/openshot-qt/issues. Also, feel free to send me an
155-
email: [email protected] and introduce yourself! I'm always here to help if you have any questions.
180+
Now that you have successfully compiled and launched OpenShot Video Editor,
181+
be sure to check out our list of bug reports on GitHub: `OpenShot Issues`_.
182+
Also, feel free to send me an email:
183+
`[email protected] <mailto:[email protected]>`_ and introduce yourself!
184+
I'm always here to help if you have any questions.
156185

157186
Share your Changes
158187
------------------
159-
Once you have fixed a bug or added an amazing new feature, be sure to share it with the OpenShot team,
160-
and ideally, we can merge this into our main source code branch. The easiest way to share your changes
161-
is by creating a fork of our repo, pushing your changes back to GitHub, and creating a
162-
`Pull Request <https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/>`_.
163-
A Pull Request lets the OpenShot team know you have changes ready to be merged, and we can review things,
164-
give feedback, and hopefully merge your changes into the main branch.
188+
Once you have fixed a bug or added an amazing new feature, be sure to share it with the OpenShot team.
189+
Ideally, we can merge this into our main source code branch.
190+
The easiest way to share your changes is by creating a fork of our repo,
191+
pushing your changes back to GitHub, and creating a `Pull Request`_.
192+
A Pull Request lets the OpenShot team know you have changes ready to be merged.
193+
Then we can review things, give feedback, and hopefully merge your changes into the main branch.
194+
195+
.. _Pull Request: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests
196+
.. _OpenShot Issues: https://github.com/OpenShot/openshot-qt/issues/

doc/getting_started.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Getting Started
2222

2323
OpenShot Video Editor is available on most operating systems (including Linux, Mac, and Windows).
2424
Visit the official download page and grab the latest and greatest version:
25-
http://www.openshot.org/download/.
25+
https://www.openshot.org/download/.
2626

2727
Linux
2828
-----
@@ -42,4 +42,4 @@ Windows
4242
-------
4343
Download the Windows installer executable from the project website (listed above), double click it,
4444
and follow the directions on screen. Once completed, OpenShot will be installed and available
45-
in your Start menu.
45+
in your Start menu.

doc/learn_more.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@
1919
2020
Learn More
2121
==========
22-
We are working hard to expand this user guide, but if you are stuck and don't know where to turn, please
23-
submit a question or bug report here: https://github.com/OpenShot/openshot-qt/issues
22+
We are working hard to expand this user guide, but if you are stuck and don't know where to turn,
23+
please submit a question or bug report here: Issues_.
24+
25+
.. _Issues: https://github.com/OpenShot/openshot-qt/issues/

0 commit comments

Comments
 (0)