Request - modularize the renderer

Asked by HansBKK on 2011-11-24

Splitting this out to a separate question

As a heavy user of txt2tags in many different contexts, I have been using Rednotebook as a general editor because of its brilliant (and apparently unique) "View mode" display renderer. (I just copy a file's text into an empty date, then cut and paste it back out when done).

I think it would be of great service to the opensource community if that part of RN's code could be made available for more general use, by splitting it out as a Python "module", primarily to be used by RN, but with API/hooks whatever (I'm not a programmer) so that it could be put to more general use.

As a user, from the POV of an end result I'm thinking of two approaches that would work well.

A. Create a standalone txt2tags browser/viewer "applet", working code name "t2View" - on the left side is a file browser, on the right is a View pane, as you arrow up-down a folder it displays the rendered files. Ideally you could double-click or hit enter to open the text file in whatever editor you choose, perhaps via a configuration option, or simply relying on the underlying OS's file launching. It might be a bit premature to add another feature request, but this would be handy even for RedNotebook itself - allow for "outline folding" of section hierarchies based on txt2tags headings syntax
  - see http://www.vim.org/scripts/script.php?script_id=2657
for a Vim example that does this for many markup syntaxes

B. Create an add-on for one or more full-featured text editor/IDE environments. My first choice would be Vim, able to be integrated into the same platform as the above tool, and ideally able to be integrated with a full-blown Cream environment:
 - http://cream.sourceforge.net/
which is actually just a set of Vim plug-ins and scripts, uses Vim's own extensibility
  - http://vim.sourceforge.net/scripts/script_search_results.php?keywords=cream&script_type=&order_by=rating&direction=descending&search=search
however not dependent on Cream, as it doesn't have any Mac support, just Linux and windoze

I'm also a heavy jEdit user, so a plugin for that would be great, along the lines of
  - plugin http://jpydbg.sourceforge.net/
would be lovely. However, since you're a Python guy, the remaining pointers are to editors/IDEs that are actually written in Python, as I assume such would be easier for you to implement such an idea.

This would be so cool for me that I'd switch to basically ANY editor you chose 8-)

So here's a list, in my order of perceived general usefulness/popularity (Vim being first choice)

gEdit http://projects.gnome.org/gedit/

Leo
  http://wiki.python.org/moin/LeoEditor

Spyder http://code.google.com/p/spyderlib/

PyPE http://pype.sourceforge.net/index.shtml
DrPython http://wiki.python.org/moin/DrPython
Eric http://eric-ide.python-projects.org/index.html
Crisp http://www.crisp.demon.co.uk/
Editra http://www.editra.org/
UliPad http://code.google.com/p/ulipad/
gEcrit (beta) http://sourceforge.net/projects/gecrit/

Sorry to blather on at such length, but you can tell I'm a fan 8-)

Even if you don't pick up on it, perhaps a programmer googling across this might be inspired, that's the beauty of open-source!

-- Edit - not sure if this is a third option C or a subset of A, but if nothing else, it would be great to simply allow for viewing a single file, so I could associate say ".t2t" files with t2View, both from my OS file browser and as to "preview" my files from within any text editor.

Question information

Language:
English Edit question
Status:
Solved
For:
RedNotebook Edit question
Assignee:
No assignee Edit question
Solved by:
HansBKK
Solved:
2011-11-29
Last query:
2011-11-29
Last reply:
Jendrik Seipp (jendrikseipp) said : #1

I added Eric and Florent (from the txt2tags community) to this question (hope that's ok). I think they already tried out integrating txt2tags syntax highlighting into e.g. geany. Guys, do you have some insight on why that's so hard to achieve? What do you think would be the best way to go about this?

HansBKK (hansbkk) said : #2

The more the merrier, whatever it takes to move things along I'm happy! 8-)

Note however I'm not so concerned about syntax highlighting - although that's important functionality it's RedNotebook's "almost live preview", the WYSIWYG rendering of txt2tags syntax into graphic formatting that seems nearly unique.

I say nearly because I've just also found this:

  http://markitup.jaysalvat.com/home/

but have no idea how to put it to use, not being a developer.

HansBKK (hansbkk) said : #3

I've successfully installed Vim + Voom (script in A) above, and so far looks way kewl.

However in exploring how it's used, I came across Python people raving about a life-changing "outliner IDE" that is supposed to enable Don Knuth's "literary programming" idea, and turns out to be one of the platforms I've suggested above and looks very very interesting, although of course it doesn't have the coverage Vim does, the fact that it's pure Python should make it easier to implement a "View" rendering button for txt2tags there. http://webpages.charter.net/edreamleo/scripting.html

If I had more money, I'd put up a bounty; if I were really rich I'd become a programmer 8-)

HansBKK (hansbkk) said : #4

After some thorough reading up on the python-based Leo-editor - it's unusually well-documented, and has a stable and vibrant development community for it seems decades - I've come to the conclusion it's one of those truly mind-bending, life-changing applications, very rare.

It's primarily designed to be a python-based programmer's IDE to help code become self-documenting through structure. However it's such a flexible outlining/mind-mapping tool that it could be made to organize just about anything; in my case it'll be both my primary organizing tool for text-file based knowledgeBases, as well as scripting and otherwise facilitating conversion and output from txt2tags to asciidoc, dokuwiki, ebooks, html etc etc. It will also allow me to finally get my various filesystems coordinated and browsable from one "meta" interface.

I highly recommend anyone interested in programming, structured text, knowledge management and related topics to spend some time to check it out.

More specifically, if it's at all possible to "break out" the txt2tags rendering code from this project so that it could be used by other Python-based projects, this is the one I'd recommend starting with.

Vim+voom would of course be of wider interest to the world, but even better perhaps a generic "click on a t2t file" launcher, even if just read-only would be of wider interest and easy to integrate with just about anything.

Anyway I'll stop pestering on this topic (at least for now 8-), but Leo's got me excited, as perhaps no other software since I saw Ray Ozzie demo Notes back in 1990, before that was Ecco and Agenda. Since then AskSam and Evernote (v2) came close. . .

HansBKK (hansbkk) said : #5

Still very impressed with Leo, posting a cross-fertilizer link for anyone googling this later on:

http://groups.google.com/d/msg/leo-editor/nNEnxoohFBM/XkMPQhqhDRsJ