Added more stuff.

Added a PDF preprocessor script.
This commit is contained in:
Raoul Snyman 2012-07-13 22:34:39 +02:00
parent 5270f81e00
commit c57884d674
7 changed files with 42 additions and 9 deletions

View File

@ -7,8 +7,19 @@ import shutil
IMAGE_WIDTH = re.compile(r'^ :width: ([\d]+)px', re.UNICODE) IMAGE_WIDTH = re.compile(r'^ :width: ([\d]+)px', re.UNICODE)
def copy_files(source_dir, temp_dir):
for root, dirs, files in os.walk(source_dir):
curr_dir = root[len(source_dir):]
full_dir = os.path.join(temp_dir, curr_dir)
for name in files:
if name.endswith(u'.rst'):
if not os.path.exists(full_dir):
os.makedirs(full_dir)
shutil.copy2(os.path.join(root, name),
os.path.join(full_dir, name))
def restore_files(temp_dir, restore_dir): def restore_files(temp_dir, restore_dir):
shutil.copytree( copy_files(temp_dir, restore_dir)
shutil.rmtree(temp_dir) shutil.rmtree(temp_dir)
def adjust_image(match): def adjust_image(match):
@ -26,8 +37,8 @@ def process_images(filename):
fd.write(contents) fd.write(contents)
fd.close() fd.close()
def find_files(base_dir): def process_files(base_dir):
for root, dirs, files in os.walk(top, topdown=False): for root, dirs, files in os.walk(base_dir):
for name in files: for name in files:
if name.endswith(u'.rst'): if name.endswith(u'.rst'):
process_images(os.path.join(root, name)) process_images(os.path.join(root, name))
@ -35,12 +46,15 @@ def find_files(base_dir):
def main(): def main():
here = os.path.abspath(os.path.split(__file__)[0]) here = os.path.abspath(os.path.split(__file__)[0])
if len(sys.argv) > 1 and sys.argv[1] == 'restore': if len(sys.argv) > 1 and sys.argv[1] == 'restore':
print 'Restoring...',
temp_dir = os.path.abspath(sys.argv[2]) temp_dir = os.path.abspath(sys.argv[2])
restore_files(temp_dir, here) restore_files(temp_dir, here)
return print 'done.'
else:
temp_dir = mkdtemp() temp_dir = mkdtemp()
shutile.copytree(here, temp_dir) print temp_dir
find_files(here) copy_files(here, temp_dir)
process_files(here)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -10,7 +10,7 @@ From the KickOff open *Software Management*. Type OpenLP into the search
box. Then click :guilabel:`Find by name` or press :kbd:`Enter`. box. Then click :guilabel:`Find by name` or press :kbd:`Enter`.
.. image:: ../screenshots/install/fedora/1-software-management.png .. image:: ../screenshots/install/fedora/1-software-management.png
:width: 1995px :width: 831px
Select OpenLP from the search results. Next, click :guilabel:`Apply` Select OpenLP from the search results. Next, click :guilabel:`Apply`

View File

@ -17,6 +17,9 @@ system.
fedora fedora
:maxdepth: 2 :maxdepth: 2
For more information on installing OpenLP on other platforms, please see the
`Reference Manual <http://manual.openlp.org/>`_
Running for the First Time Running for the First Time
-------------------------- --------------------------
When OpenLP starts up for the first time, it may take a little while to get started due to the fact that it needs to perform some initial setup. When OpenLP starts up for the first time, it may take a little while to get started due to the fact that it needs to perform some initial setup.

View File

@ -14,3 +14,4 @@ the language you will be using OpenLP in, it is simply the language you will
be using to install OpenLP. be using to install OpenLP.
.. image:: ../screenshots/install/macosx/1-copy-to-applications.png .. image:: ../screenshots/install/macosx/1-copy-to-applications.png
:width: 547px

View File

@ -17,15 +17,18 @@ When you have the Software Center running simply search for OpenLP and click
:guilabel:`Install`. :guilabel:`Install`.
.. image:: ../screenshots/install/ubuntu/1-search-openlp.png .. image:: ../screenshots/install/ubuntu/1-search-openlp.png
:width: 892px
You will see the install progress as OpenLP and the dependencies required for You will see the install progress as OpenLP and the dependencies required for
it to run are downloaded. it to run are downloaded.
.. image:: ../screenshots/install/ubuntu/2-install-progress.png .. image:: ../screenshots/install/ubuntu/2-install-progress.png
:width: 892px
After installation you should see that OpenLP is installed. After installation you should see that OpenLP is installed.
.. image:: ../screenshots/install/ubuntu/3-install-complete.png .. image:: ../screenshots/install/ubuntu/3-install-complete.png
:width: 892px
You can now run OpenLP by either searching for it in the *Dash*, or clicking on You can now run OpenLP by either searching for it in the *Dash*, or clicking on
the category *Media Apps* in Unity. If you are running the Classic Desktop you the category *Media Apps* in Unity. If you are running the Classic Desktop you
@ -41,12 +44,14 @@ of newer versions of software already available in Ubuntu.
With *Software Center* openlp, go to :menuselection:`Edit --> Software Sources` With *Software Center* openlp, go to :menuselection:`Edit --> Software Sources`
.. image:: ../screenshots/install/ubuntu/4-software-sources.png .. image:: ../screenshots/install/ubuntu/4-software-sources.png
:width: 892px
Then click on the :guilabel:`Updates` tab and make sure the checkbox next to Then click on the :guilabel:`Updates` tab and make sure the checkbox next to
:guilabel:`Backports` is checked. Click OK and then close and open *Software :guilabel:`Backports` is checked. Click OK and then close and open *Software
Center* to refresh the software list. Center* to refresh the software list.
.. image:: ../screenshots/install/ubuntu/5-updates-backports.png .. image:: ../screenshots/install/ubuntu/5-updates-backports.png
:width: 588px
Other Ubuntu Releases Other Ubuntu Releases
--------------------- ---------------------

View File

@ -13,16 +13,19 @@ independent vendors who have certified our installer to be free of viruses and
malware. malware.
.. image:: ../screenshots/install/windows/1-download.png .. image:: ../screenshots/install/windows/1-download.png
:width: 434px
Before the setup wizard starts, you are asked to select a langage. This is not Before the setup wizard starts, you are asked to select a langage. This is not
the language you will be using OpenLP in, it is simply the language you will the language you will be using OpenLP in, it is simply the language you will
be using to install OpenLP. be using to install OpenLP.
.. image:: ../screenshots/install/windows/2-select-language.png .. image:: ../screenshots/install/windows/2-select-language.png
:width: 333px
After selecting your language, the welcome screen appears. After selecting your language, the welcome screen appears.
.. image:: ../screenshots/install/windows/3-welcome.png .. image:: ../screenshots/install/windows/3-welcome.png
:width: 533px
Next you be asked to accept the license. This license is the reason why OpenLP Next you be asked to accept the license. This license is the reason why OpenLP
is free. To find out more about the license, please see the is free. To find out more about the license, please see the
@ -30,34 +33,41 @@ is free. To find out more about the license, please see the
on the `Free Software Foundation <http://www.fsf.org/>`_'s site. on the `Free Software Foundation <http://www.fsf.org/>`_'s site.
.. image:: ../screenshots/install/windows/4-license.png .. image:: ../screenshots/install/windows/4-license.png
:width: 533px
Once you've agreed to the license, you can choose where to install OpenLP to. Once you've agreed to the license, you can choose where to install OpenLP to.
This usually defaults to the best place, and it is recommended you leave it This usually defaults to the best place, and it is recommended you leave it
as it is. as it is.
.. image:: ../screenshots/install/windows/5-install-location.png .. image:: ../screenshots/install/windows/5-install-location.png
:width: 533px
In the next step you can select the name of the folder in your start menu In the next step you can select the name of the folder in your start menu
where OpenLP will put its links. where OpenLP will put its links.
.. image:: ../screenshots/install/windows/6-start-menu.png .. image:: ../screenshots/install/windows/6-start-menu.png
:width: 533px
If you want the installer to put an icon on your desktop, you can do that by If you want the installer to put an icon on your desktop, you can do that by
checking the checkbox on the "Additional tasks" screen of the installer. checking the checkbox on the "Additional tasks" screen of the installer.
.. image:: ../screenshots/install/windows/7-additional-tasks.png .. image:: ../screenshots/install/windows/7-additional-tasks.png
:width: 533px
When the installer is ready to install OpenLP, it will show you a summary of When the installer is ready to install OpenLP, it will show you a summary of
all the options you have selected. Click the Next button to install OpenLP. all the options you have selected. Click the Next button to install OpenLP.
.. image:: ../screenshots/install/windows/8-summary.png .. image:: ../screenshots/install/windows/8-summary.png
:width: 533px
The installer usually takes about a minute to install OpenLP. While it does so The installer usually takes about a minute to install OpenLP. While it does so
it will show you the progress. it will show you the progress.
.. image:: ../screenshots/install/windows/9-progress.png .. image:: ../screenshots/install/windows/9-progress.png
:width: 533px
Lastly, once the installation is complete, you can check the "Launch OpenLP" Lastly, once the installation is complete, you can check the "Launch OpenLP"
checkbox to run OpenLP once the installer has exited. checkbox to run OpenLP once the installer has exited.
.. image:: ../screenshots/install/windows/10-complete.png .. image:: ../screenshots/install/windows/10-complete.png
:width: 533px

View File

@ -9,7 +9,7 @@ Welcome to the OpenLP 2.0 User Guide
Contents: Contents:
.. toctree:: .. toctree::
getting-started/index getting-started/getting-started
adding-content adding-content
getting-more getting-more
:maxdepth: 2 :maxdepth: 2