Git Product home page Git Product logo

gedit-rest-plugin's People

Contributors

bittner avatar fpoirotte avatar jankanis avatar mcepl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gedit-rest-plugin's Issues

Table generation : problem with "get_text()"

Hello,
I start gedit with the command :
| user@computer ~ $ gedit

When I want to generate a table, I have those lines in the terminal :
| Traceback (most recent call last):
| File "/usr/local/lib/gedit/plugins/reST/init.py", line 256, in on_create_table
| text = doc.get_text(start, end)
| TypeError: get_text() takes exactly 4 arguments (3 given)

Thank you for your work.

Purpose of selection preview?

One bug that's still remaining is that the preview doesn't update when the text selection changes. It shouldn't be extremely difficult to fix, just finding the right signals to listen to, but I don't really see the point of this feature. When I select something it is usually to copy it. And 90% of the time a selection of a reST document won't be valid reST itself or is just a few words of plain text. Do you know the purpose/use case of this feature? If not, what about taking it out?

Plugin should only render reStructuredText documents (not any type)

When I enable the plugin, it tries to work on ALL my files. Which is kind of unfortunate, because it tries to run reST processing even on my Python code etc., which obviously doesn't work well. I have suddenly tons of warning messages like:

<string>:75: (ERROR/3) Unexpected indentation.
<string>:79: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:34: (ERROR/3) Unexpected indentation.
<string>:36: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
<string>:37: (WARNING/2) Block quote ends without a blank line; unexpected unindent.

I know that gedit plugins are not the same as for example Emacs’ modes, so they natively are not limited just to some particular MIME type, but I guess with the heavy processes run by the plugin (e.g., whole WebKit and OpenJDK running) we should try to emulate this somehow with the infrastrcture we have.

If we moved most of the effective work to the Gedit.ViewActivatable child and cover whole processing with something like if filetype == 'reST': and ignore every other document. Of course, we would have to add also some event handler for case the user switches the file type of the edited document to reST (I guess we are talking about the file type used for the highlighting in gedit, MIME type is always just text/plain, right?).

Clean up legacy code

There are a few files just lying around, which are effectively unused by the current implementation:

  1. default.odt
  2. default.sty
  3. makeTable.py
  4. to_html.py
  5. to_odt.py
  6. to_tex.py

Their original function is described in an older version of the README (and the french README in the doc folder).

@JanKanis Should we simply remove them to clean up the repository, or rather try to restore the features?

What do you think?

Please add to standard gedit package

This is not really an issue, but: why the plugin is not part of standard gedit plugins? It would be far easier to use it in normal environments.
Thanks.

Show bottom panel (reST preview) when Preview command is triggered

Problem Description

At the moment, when the reStructuredText Preview (Ctrl+Shift+R) is triggered and gedit's bottom panel is closed the reST document is generated, but the document is not displayed to the user. This is very irritating.

Proposed Solution

When the reStructuredText Preview (Ctrl+Shift+R) is triggered gedit should show the bottom panel (Ctrl+F9) if it is not visible yet.

Cannot get plugin to work in gedit - Version 3.14.3 (Fedora21 Testing)

I tried to setup reST plugin on Fedora21.
python version available: Python 3.4.1

Steps followed :

clone source and switch to gedit-3.14 branch

https://github.com/bittner/gedit-reST-plugin.git

Install dependencies :

pygments:
pip install pygments

docutils: (http://docutils.sourceforge.net/README.html#installation)
git clone git://repo.or.cz/docutils.git
cd docutils/docutils ; python3 setup.py install

odtwriter : could not find the source for this.

copy reST.plugin and reST/ into the path for edit plugins in fedora21:

/usr/lib64/gedit/plugins

start gedit from terminal and load the plugin. I get the following error on terminal :

[saikrishna@localhost plugins]$ gedit
Traceback (most recent call last):
File "/usr/lib64/gedit/plugins/reST/init.py", line 22, in
from .restructuredtext import RestructuredtextHtmlPanel
File "/usr/lib64/gedit/plugins/reST/restructuredtext.py", line 20, in
from docutils.core import publish_parts
File "/usr/lib/python3.4/site-packages/docutils/init.py", line 68, in
class ApplicationError(StandardError):
NameError: name 'StandardError' is not defined

(gedit:12392): libpeas-WARNING **: Error loading plugin 'reST'

Please suggest.

plugin don't active when i ticks it

hi

your plugin might have be usefull fo me if it works .
i can't active the plugin. when i tick it i get a red cercle. wherever i put the pyfile and its folder (user or global) the probleme is the same.

what's wrong?

distro: debian testing/gnome shell
gedit -v > 3.20

"Blacklist" directives which are not in docutils?

Hi, thanks for the plugin!

I'm trying it out to check if I can make it easier for people to write some documentation (written for Sphinx in rst)..
Looks promissing!

Opening one of the rst files I get an error about the 'toctree' Sphinx directive... :

Screenshot-20191101130328-801x665

If I'm right the issue here is that this is a sphinx directive and not a docutils directive?
Which is reasonable.
So I'm coining the idea here to have some list of directives to be ignored during parsing. So the plugin should "preflight" the text and remove the directives that are on that 'blacklist'.
Not sure if this is easy to do, or there are other ways to do this? Is there something like that in docutils maybe?

In the Preview-window one could either ignore it and show nothing, OR add some small message "ignored directive" or so?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.