Skip to content

Commit

Permalink
(Reverse) updated with content of http://kib2.alwaysdata.net/GEdit/re…
Browse files Browse the repository at this point in the history
  • Loading branch information
bittner committed Feb 2, 2014
1 parent fed39d0 commit 197bd8b
Show file tree
Hide file tree
Showing 15 changed files with 1,233 additions and 121 deletions.
86 changes: 86 additions & 0 deletions ReadMe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Documentation de reStructuredText plugin
========================================

Cette documentation est très restreinte, merci de patienter qu'elle s'étoffe
un peu.

Dépendances
------------

- Python >= 2.5
- Pygments [http://pygments.org/]
- Docutils [http://docutils.sourceforge.net/]
- OdtWriter [http://www.rexx.com/~dkuhlman/odtwriter.html]

Installation
------------

Placez le fichier ``reSt.gedit-plugin`` dans votre dossier plugins de Gedit.
Le mien se situe ici par exemple :
/home/kib/.gnome2/gedit/plugins

Ensuite, copier /coller le dossier nommé ``reStPlugin`` dans ce même
répertoire.

Les fichiers Readme.rst et Readme.odt ne sont là que pour vous aider, vous
pourrez ensuite les placer à la poubelle si le coeur vous en dit !

L'arborescence devrait donc être la suivante : ::

.../plugins/
reSt.gedit-plugin
reStPlugin/
__init__.py
makeTable.py
etc.

Utilisation
-----------

Activez le plugin via Editions/Préférences onglet Plugins et cochez
``reStructuredText plugin``.

Le plugin est actif, vous devriez obtenir un nouvel onglet dans votre panneau
inférieur nommé ``reSt Preview``.

Raccourcis
##########

Ctrl+Maj+R permet d'afficher le contenu de votre fichier reSt (extension .rst)
dans le nouveau panneau. Si une selection est active, la conversion ne se fera
que sur celle-ci, sinon c'est tout le document qui est pris en charge.

Menu
####

Le menu ``Outils`` dispose maintenant de plusieurs options :

- ``reSt Preview`` a déjà été détaillé précédemment;
- ``Create table`` permet de réaliser des tableaux simples.

Exemple : Entrer ces deux lignes, sélectionnez-les et activez ``Create table``

un,deux,trois

premiere,seconde,troisieme

Cela donne :

============ =========== =============
un deux trois
============ =========== =============
premiere seconde troisieme
============ =========== =============

- ``Paste Code`` permet de copier/coller des codes sources façon Pygments.
Selectionnez juste du code à copier, et utilisez cette macro. Vous devrez
ensuite ajuster le langage vous même.

- ``--> HTML``, ``--> LaTeX``, ``--> OpenOffice``: permettent respectivement
un export de votre document dans ces formats respectifs. L'export à lieu
dans le même dossier que votre document initial. Des feuilles de style sont
fournies, ce sera à vous de les adapter à vos besoins.

En espérant que ce petit plugin vous aidera, n'hésitez-pas à me contacter :

Kib.
98 changes: 98 additions & 0 deletions ReadMe_en.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
reStructuredText plugin
=======================

This is a little how-to for using the reStructuredText plugin inside
`GEdit <http://www.gnome.org/projects/gedit/>`_ .

.. image:: http://farm3.static.flickr.com/2256/2259897373_d47ecf0983_o_d.png
:scale: 100
:alt: reSt Plugin Image
:align: center
:target: http://farm3.static.flickr.com/2247/2259897529_aa85f5f540_b.jpg


Dépendancies
------------

- `Python <http://www.python.org/>`_ : version >= 2.5;
- `Pygments <http://pygments.org/>`_ : take the latest version;
- `reStructuredText <http://docutils.sourceforge.net/>`_ ;
- `odtwriter <http://www.rexx.com/~dkuhlman/odtwriter.html>`_ : a reStructuredText addon to export in OpenOffice format.

Installation
------------
Unpack the zip file where you wanted to then :

- Put ``reSt.gedit-plugin`` file in Gedit's plugins directory.
Mine is (under Ubuntu Gutsy): ``/home/kib/.gnome2/gedit/plugins``

- Copy/Paste the ``reStPlugin`` folder inside ``/home/kib/.gnome2/gedit/plugins``.

Readme.rst and Readme.odt are just help files, you can do whatever you want with them.

You should then obtain something like this : ::

.../plugins/
reSt.gedit-plugin
reStPlugin/
__init__.py
makeTable.py
etc.

Using
-----

Activate the plugin via Edit/Préférences/Plugins and turn the
``reStructuredText plugin`` box on.

The plugin is now activated, and you should have a new panel inside the
bottom pane named ``reSt Preview``.

Shortcuts
#########

There's only one shortcut for the moment, maybe I'll create some others in the
future.

``Ctrl+Maj+R`` : is used to refresh the generated HTML view inside
``reSt Preview`` pane. If there's some selected text, the conversion process
will only apply on it. If there's no selection, the entire document is
processed. It may be usefull for testing.

Menu
####

The ``Tools`` menu is populated with several options :

- ``reSt Preview`` is the same as the above;
- ``Create table`` is usefull for creating simple reStructuredText tables.

Example : Enter the two folling lines in gedit, select them and activate
``Create table`` : ::

one,two,tree
First,Second,Third

The output will be :

========= ========== =========
one two tree
========= ========== =========
First Second Third
========= ========== =========

- ``Paste Code`` maybe usefull to paste some parts of code using
`Pygments <http://pygments.org/>`_'s ``sourcecode`` directive.
Just invoque ``Paste Code`` with something in your clipboard and
you're done. You'll have to adjust the language afterwards.

- ``--> HTML``, ``--> LaTeX``, ``--> OpenOffice``: are convenient ways to
export your reStructuredText docs to the given formats with custom *
stylesheets. You're free to modify them, even to propose your own because
I'm not a CSS ace :)

Hoping it helps you, to contact me, drop me a message here : kib2 at free.fr

See you,

Kib.
Loading

0 comments on commit 197bd8b

Please sign in to comment.