Code Monkey home page Code Monkey logo

retext's Introduction

Welcome to ReText!

GitHub Actions status

ReText is a simple but powerful editor for Markdown and reStructuredText markup languages. One can also add support for custom markups using Python modules.

ReText on Plasma 5 desktop

To install ReText, make sure that you have Python (3.6 or later) installed, and run pip3 install ReText. By default it installs system wide, pass --user for installing into the user’s home directory. You can also manually download the tarball from PyPI.

ReText requires the following Python modules to run (pip will install them automatically):

We also recommend having these packages installed:

  • pyenchant — for spell checking support
  • chardet — for encoding detection support
  • PyQt6-WebEngine — a more powerful preview engine with JavaScript support

Translation files are already compiled for release tarballs and will be automatically loaded. For development snapshots, compile translations using lrelease ReText/locale/*.ts command (on Debian-based systems, use /usr/lib/qt6/bin/lrelease from qt6-l10n-tools package). Translation files can also be loaded from /usr/share/retext/ directory.

You can translate ReText into your language on Transifex.

ReText is Copyright 2011–2024 Dmitry Shachnev, 2011–2023 Maurice van der Pot, and is licensed under GNU GPL (v2+) license, the current version is available in LICENSE_GPL file.

ReText icon is based on accessories-text-editor icon from the Faenza theme.

You can read more about ReText in the wiki.

retext's People

Contributors

abbgrade avatar benburrill avatar brlin-tw avatar danielventurini avatar farseerfc avatar griffon26 avatar guoyunhe avatar hluk avatar jeremy886 avatar jgoutin avatar joebonrichie avatar korli avatar krunose avatar masbicudo avatar mitya57 avatar mjjzf avatar mray271 avatar mukkim avatar oguzhanogreden avatar okkomakkonen avatar plusky avatar r1do avatar red-kite avatar rhn avatar ricardo-simoes avatar scx avatar serkan-maker avatar starofrainnight avatar timgates42 avatar xgouchet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retext's Issues

Syntax highlighting of URLs "overflows"

ReText 3.0 Beta 1
Kubuntu 11.10

Syntax highlighting is broken in case of Markdown links. Underlining sometimes does not stop by the end of an URL. One of the reasons is link in parenthesis, but it is not the only one. See the attachment.

Reported by: w4rr10r

Original Ticket: retext/tickets/27

pandoc support

please add support for [http://johnmacfarlane.net/pandoc/](pandoc's extension) to markdown, since it is a very convenient lot of additions.
Maybe some other extensions could be added, but I am not familiar with the other so that I can only recomment Pandoc's one.
Note: There is already a pandoc wrapper for python by Kenneth Reitz: https://github.com/kennethreitz/pyandoc

Reported by: codronm

Original Ticket: retext/tickets/7

styleSheet declaration causing crash in ReText 3.0

In my ReText.conf file I had the following line:
styleSheet=/home/xxxxxx/css/retext.css

However, this causes the following error upon startup in ReText 3.0:

Traceback (most recent call last):
  File "/usr/bin/retext", line 1447, in <module>
    main("")
  File "/usr/bin/retext", line 1431, in main
    window = ReTextWindow()
  File "/usr/bin/retext", line 388, in __init__
    ssname = settings.value('styleSheet', type='QString')
TypeError: QSettings.value(QString, QVariant defaultValue=QVariant()): 'type' is not a valid keyword argument

ReText 2.4 still starts up fine with the same ReText.conf file. If I comment out that line, ReText 3.0 will start up.

Reported by: marksadecki

Original Ticket: retext/tickets/28

[feature request] additional recognized markdown file extensions

I'll try and submit a patch as soon as possible but this request is such low hanging fruit I thought I would ask first.

Would you consider adding .markdown, .mdown, .mkd & .mkdn to the supported file list? Without the change, I frequently have have change the filetype filter dropdown to "All files".

Here's a list of general standards accepted for markdown extensions:

  • Vim (7.3): markdown, mdown, mkd, mkdn
  • Github: markdown, mdown, mkd, mkdn, md
  • Elements Markdown Editor: markdown, mdown, mdwn, md
  • BBEdit: markdown, mark

Thanks for the helpful tool. Cheers, Mark S.

Reported by: markstinson

Original Ticket: retext/tickets/12

Use desktop default browser to open link when using WebKit to preview

Hi:

I find that when using WebKit to preview the document, when I click a link, the link is opened by the preview tab, and it seems that there is no way to get back other than close the tab and open it again.

I think it is better to use the desktop default browser to open link when using WebKit. And here is the patch

Reported by: khotyn

Original Ticket: retext/tickets/45

Move to github?

Do you have the intention to move ReText to github?
I don't want to troll, but I would like to contribute to the project and I hugely prefer github...

Reported by: bbordage

Original Ticket: retext/tickets/50

No value set for `/desktop/gnome/interface/icon_theme'

Hi, I've installed retext and I cannot see any icons in the toolbar.
I use Lubuntu 12.04.

Running from command line it says:

$ retext 
QGtkStyle was unable to detect the current GTK+ theme.
No value set for `/desktop/gnome/interface/icon_theme'

This command fixes it:

gconftool-2 --set --type string /desktop/gnome/interface/icon_theme lubuntu

Is there a way to get that automatically? Or is this a lubuntu problem?
I found the icon name "lubuntu" in /usr/share/icons/.

Reported by: medigeek

Original Ticket: retext/tickets/44

Text in cp1251 is not displayed

Steps to reproduce:
Create a new file in any text editor. Write text in cyrillic and save the file in cp1251.
Open the file in Retext. It will be displayed as empty.

Reported by: eugenekriv

Original Ticket: retext/tickets/39

Experimental port to Mac OS X

Just a post to let you know that ReText 3.1.0 can work ALSO on Mac OS X!!! :-)

My main OS is Kubuntu, but this evening I tried to run ReText on OS X 10.6 Snow Leopard, just for fun.

You can get it work installing most of the needed libraries from macports (warning: compiling PyQt takes a lot of time!).
Only markdown needs a special treatment: you need to run

easy_install Markdown

After doing that, you should be able to run ReText from the command line.

Almost. In fact, there are lots of probabilities that it won't run.

Since using macports we are installing another version of python on our Macs, the default shebang won't work, since the version of python bundled with OS X doesn't know anything about PyQt.

We need to change the first line in retext.py, as suggested by the official Python documentation (you know, they're always right when they tell you what to do):

:::python
#!/usr/bin/env python

After changing that, it would run fine. You can load markdown files, edit them, syntax highlighting works, preview modes work.

You won't see any icon. It's expected: the app is looking for them in gnu/linux standard paths, and obviously they aren't there on your Mac.

Didn't try it extensively, but most of the things seem working.

I even tried to build an app bundle, something like those standalone apps you launch on your Mac double clicking on a nice icon, and was successul at it, using py2app:
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html

The result is quite huge (100 MB, stripping most obvious modules), but, again, it works, and should be self contained enough for distribution (it takes ~30MB, if stuffed in a compressed DMG package). I'm sure we can do better.

Maybe with a little work we could do a serius port of ReText to Mac OS X.

In the meantime, you can get my experimental app bundle from this link:
https://dl.dropbox.com/u/3786530/ReText.dmg

regards
gerlos

Reported by: gerlos

Original Ticket: retext/tickets/42

Preview windows position is reset on every text change

ReText 2.0.0

Any editing resets position in preview window to the very beginning which makes ReText unusable for editing long texts.

Preview window should either automatically track cursor position in edit box or scroll to view last edit position in the center of preview.

Reported by: kriomant

Original Ticket: retext/tickets/14

No icons displayed in ReText

I downloaded ReText 0.5.1.
I have unpacked it on Slackware 13.1. I installed Markdown 2.0.3 from http://pypi.python.org/pypi/Markdown in order to run the applications, and the remaining requirements are fulfilled, from what I can tell.
However, the application fails to display any icons! I am running it on Xfce.

Slackware includes

  • Qt 4.6.2
  • PyQt 4.7.3

Could it be an issue with default icon sets?

Reported by: mjjzf

Original Ticket: retext/tickets/4

[Feature Request] Full-screen mode

Hi, I was just wondering if you'd consider adding a minimal, full-screen mode for ReText, similar to what iA Writer for Mac (http://www.iawriter.com) has? That'd be a killer feature for writers looking to completely focus on the work itself.

(Apologies for the double-post in the FAQ comments. I thought it would be more appropriate to post it here, but I could no longer delete the comment.)

Reported by: shinkaide

Original Ticket: retext/tickets/13

a draft of styling...

Wouldn't it be great to add support for styles in the app ?

As a big fan of black theme I added this lines to have black edit boxes, and tought it would be for some interest...!

retext.py -- in the main(fileNames) function

if QFile.exists("app.css"):
    sheetfile = QFile("app.css")
    sheetfile.open(QIODevice.ReadOnly)
    style = QTextStream(sheetfile).readAll()
    app.setStyleSheet(style)
    sheetfile.close()

new css file named app.css with this content :

QTextEdit { 
     background-color: #1d1d1d; 
     color: #dfc47d 
}

Reported by: blackhorus

Original Ticket: retext/tickets/18

Sphinx support

It would be fantastic to be able to use this to edit Sphinx documentation - currently unknown directives etc produce breakage in the preview.

Reported by: davidfraser

Original Ticket: retext/tickets/36

direction and text-align styles

I pasted this line of code on top of my markdown file:

<style>* {direction: rtl; text-align: right; color: red;}</style>

This style works on exported html file but in pdf or odt files only the third part color: red works.

Reported by: nournia

Original Ticket: retext/tickets/15

Proper location for .qm translation files

I wrote a new improved PKGBUILD for Arch Linux (not posted yet). I've stumbled upon this.

.qm files are searched in /usr/lib/retext (retext.py, line 792).

/usr/lib is a libraries directory, and it doesn't seem appropriate to place translation files here.

Other packages in my system use directories like this:

/usr/share/program/translations/*.qm

or

/usr/share/program/locale/*.qm

I suggest this is changed.

Thanks for the software.

Reported by: aalfplayer

Original Ticket: retext/tickets/9

Markdown code syntax issue

The syntax of markdown for code is not correctly supported. This syntax is heavily used on Github for example.

But this not working :

```ruby
class Post
  include Mongoid::Document

  field :title

  def slug
    title.try(:parameterize)
  end

  has_many :comments
end


Explanation, in details :

```~~

class Post
include Mongoid::Document
field :title
end

```~~

This should be rendered as &lt;pre&gt;&lt;code&gt; and for now, it is as &lt;p&gt;&lt;code&gt;.


```~~
```ruby
class Post
  include Mongoid::Document
  field :title
end


The ruby word is to specify syntax highlighting, and should not be rendered. For now, it is. (I don't mean that I want syntax hightlighting by this way).

```~~

class Post
include Mongoid::Document

field :title
end

```~~


Blank lines should be present inside the code block. For now, it breaks it.

I just discovered ReText, and beyond this particular code block point, it seems nice. Great job :)

Reported by: maximegarcia

Original Ticket: [retext/tickets/49](https://sourceforge.net/p/retext/tickets/49)

Incorrect list items handling

Try this piece of markdown in ReText:
* aaa
* bbb
* ccc
* ddd
* eee
The items starting with backquote are displayed incorrectly (see attachment) in internal preview. The same problem in pdf export, html and odt work fine.

Reported by: karlicoss

Original Ticket: retext/tickets/48

Export can not handle Umlauts from markdown

Since the markdown module can handle umlauts(ä,ö,ü,etc.) if they are decoded correctly, it's sad that it does not work in reText too.

It can be done as shown in the following example:

input = open("input.md", "r").read()
utf_input = input.decode("utf-8")
utf_output = markdown.markdown(utf_input)
output = utf_output.encode("uft-8")
open("output.md", "w").write(output)

I think many german users will appreciate this fix.

Reported by: knaeckebrot

Original Ticket: retext/tickets/40

Markdown Code blocks

Hello,

I cant find the code block syntax and if Ill look it up on daring fireball the 4 space or tab doesn`t work in the previeuw.

Is it possible to previeuw the code block?

Reported by: hayertjez

Original Ticket: retext/tickets/32

Keyboard shortcut: Preview

I would like to suggest adding a keyboard shortcut for the preview. One of the advantages of Markdown is not having to leave the keyboard, so if some key, say F5, could be bound as a shortcut to preview, it would be very useful.

Reported by: mjjzf

Original Ticket: retext/tickets/6

Indentation enhancement for ReText

Hi, I use ReText everyday to write articles, but the default tab indentation width too long, so I make a patch to ReText to support space indentation, and can use Tab and Backtab to indent more or less of a selected text.

I add two options to settings:

  • spaceIndentation: true/false Whether or not use space for indentation
  • spaceIndentationWidth: 4/8 Use 4 spaces or 8 spaces for space indentation , default 4.

I make the patch from the master branch, hope it will be helpful.

Reported by: khotyn

Original Ticket: retext/tickets/43

.rst Live Preview

ReText 2.1.4

Trying to view the live preview of an .rst-file gives me the output:
"Could not parse file contents, check if you have the necessary module installed!"
...however it seems to work decently when saving the file as *.re instead and reloading it.

Thank you for making ReText!

Reported by: xlys

Original Ticket: retext/tickets/26

Bug to install

I try to install Retext by Repo ppa. But when I do "sudo apt-get install",
I have this :
"Le paquet retext n'est pas disponible bien qu'il soit listé dans la base de données.
Les explications possibles sont que le paquet est listé dans les dépendances sans jamais avoir été publié, qu'il est devenu obsolète ou qu'il n'est pas disponible sur les dépôts définis dans le fichier sources.list" (sorry for the french message)

I don't understand...

Thx for you help :D

Reported by: maximerdy

Original Ticket: retext/tickets/30

Show (web)images in preview-mode

Hey,
I'm new to retext (thanks for this great piece of software btw. ;) ) so maybe I just didn't see a option for my issue, yet. I hope it's okay if I ask this here anyhow..
When I use the preview-mode in retext, uploaded images are not displayed in the preview. (Screenshot: see attachment)
If I export my text as html, the images are displayed properly, but they only local images are displayed in the preview mode or in exported pdfs. Is there a way to display these (external) pictures in the preview?
Thanks.

Reported by: pylight

Original Ticket: retext/tickets/16

Menu icons missing in Linux Mint, and several other distros

I installed ReText 3.03 (both by downloading it from sourceforge.net and by adding the ppa archive and adding it through synaptic) on Linux Mint 12 LXDE and all of the icons such as "new," "open," and "save" are all missing. Only the text of "Preview is visible" and the outline of the buttons and their text cursor hints appear when you hover the cursor over them. I have installed all of the dependencies listed in the README. I also tried installing ReText on Lubuntu 11.10, Bodhi Linux 1.3.0, and ubuntu-12.04 on a virtualbox. Only in ubuntu-12.04 did these icons appear.

Reported by: dayton-b

Original Ticket: retext/tickets/34

Heading at start of ReST document does not render

When I enter a very simple ReST text with a heading and a paragraph like this:

:::rest
Foo
===

Bar

Then in the preview I see only the "Bar" paragraph, but not the "Foo" heading.

When I enter some paragraph in front of the heading, like this:

:::rest
Buz

Foo
===

Bar

Then everything is displayed as expected.

I was using Python 2.7 and Docutils 0.8.1 and ReText 2.1.4, but the same happened with Trunk.

Reported by: cito

Original Ticket: retext/tickets/23

Chinese Simplified and Traditional Language file (*.ts *.qm) Submit

Hi,I‘m an openSUSE packager, I register an account to inform you that I have packaged your ReText for openSUSE, and I'm working on merging it to next version's openSUSE.

I think these spec file, desktop file, and Chinese Simplified and Traditional Translation files may help you move on.

Marguerite.

Reported by: margueritesu

Original Ticket: retext/tickets/21

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.