You are not logged in.

#1 2007-01-15 22:44:05

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Pallavi 0.3 (My pet project)

Hey all,

Wanted to inform you of the release of Pallavi 0.3, my personal quest for a decent Python-based text editor. Just in case you thought I'd forgot to continue developing it since the long-ago announcement of 0.2... not forgot, was just kind of busy.

I actually use this editor pretty much exclusively, for whatever that's worth. The text-based configuration will probably appeal to a certain group here, as will the simple, but extensible interface. Its still kind of rough in spots, but as a simple syntax-highlighted text editor, its pretty much all you need. The main problems are things that I can't control (wx-widgets related, should be fixed in their next release).

Since the last release, I've implemented:
Find/Replace
Configurable Syntax Highlighting (only a few languages were compiled in before)
A simple plugin installer
A very silly Python class navigator (needs TLC)
Something else. I keep forgetting the whole list. Whatever. Its a text editor.

There's a package in AUR: http://aur.archlinux.org/packages.php?d … =1&ID=6037 currently marked unsafe. AURBUILD rocks, BTW.

Love to know what people think. Hope it doesn't crash!

Dusty

Offline

#2 2007-01-15 23:04:56

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Pallavi 0.3 (My pet project)

AUR pkg flagged safe fwiw wink

Offline

#3 2007-01-18 12:44:29

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

thank you thank you. For this have been waiting. Can we have tabs next please? I just love tabs.


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#4 2007-01-18 16:24:13

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

I wouldn't mind having tabs myself. I used the drop-down because it was easy to implement, but I knew tabs were going to come up eventually. I'll try to get it into 0.4, but its going to take a bit of code rework. I've added a feature request:

http://sourceforge.net/tracker/index.ph … tid=843886

Thanks for your interest. :-)

Dusty

Offline

#5 2007-01-21 10:04:26

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

Is there a way to set custom syntax highlighting? I have a few custom markup languages and I was looking for a text editor that would let me define custom syntax rules without too much of a fuss


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#6 2007-01-21 10:33:12

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Pallavi 0.3 (My pet project)

fwiw, you could use to get information for the class browser. PIDA uses it. bicyclerepair is in the AUR.

http://bicyclerepair.sourceforge.net/

Offline

#7 2007-01-21 15:29:49

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Basu wrote:

Is there a way to set custom syntax highlighting? I have a few custom markup languages and I was looking for a text editor that would let me define custom syntax rules without too much of a fuss

Yes, there is, although I'm not yet certain how much of a fuss it is and it isn't too well tested. You may need to review this page: http://www.yellowbrain.com/stc/lexing.html and the Pallavi source code in addition to what I say here.

First make sure the "Lexing" plugin is enabled in ~/.pallavi/pallavi_config.py in the default_plugins section.

Then create the folder ~/.pallavi/lexing_languages.

Then copy one of the files from /usr/share/pallavi/lexing_languages into the newly created directory and give it a name based on the language you want to create syntax rules for. I'll use css as an example:

cp /usr/share/pallavi/lexing_languages/html.py ~/.pallavi/lexing_languages/css.py

(BTW: If you want to alter the behaviour of lexing rules for existing languages, you can do the same without renaming it or create a new file. Any variables not set in the home directory version will be taken from the /usr/share version)

Open the newly created file. and edit the five variables.
Extensions is a list of filename extensions to be associated with that file so that it can be automatically loaded.
shebangs is a list of keywords to search for in the first line of a file, assuming that line contains a #! line. This can be used for self-executable files like sh, python, perl, etc.
lexer is a wxSTC keyword describing what kind of lexer should be used. It should be taken from this list: http://www.yellowbrain.com/stc/lexing.html#setlang wxSTC has a way of creating your own lexers too, but I don't think the current version of the Pallavi lexing plugin supports it; it would need to be hacked and I'm not sure how. I notice you can use existing lexers even for languages that aren't exact matches in the list, because languages are related (ie: Java uses the cpp lexer).
folding is currently not implemented anyway, but would be to permit code folding.
keywords is a list of keywords associated with the language. This is what separates it from a lexer. Most languages post their keyword list somewhere on the Internet. I've also had good luck 'borrowing' keyword lists from SciTE's sources, as wxSTC and SciTE both use Scintilla as the underlying editor.

For the css example:

extensions = ["css"]
shebangs = []
lexer = "css"
folding = True
keywords = "color background-color background-image background-repeat background-attachment background-position background 
  font-family font-style font-variant font-weight font-size font 
  word-spacing letter-spacing text-decoration vertical-align text-transform text-align text-indent line-height 
  margin-top margin-right margin-bottom margin-left margin 
  padding-top padding-right padding-bottom padding-left padding 
  border-top-width border-right-width border-bottom-width border-left-width border-width 
  border-top border-right border-bottom border-left border 
  border-color border-style width height float clear 
  display white-space list-style-type list-style-image list-style-position list-style"

Restart Pallavi, and you should have your syntax.

Dusty

Offline

#8 2007-01-21 15:32:12

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Good idea, I'd forgotten about that. I'll implement it 'someday'. Although Pallavi is written in Python, I'd like to make it as powerful as possible for editing other languages as well. So if I have a python class navigator, I should also support a Java class navigator...

Dusty

Offline

#9 2007-01-21 15:41:43

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Basu wrote:

Is there a way to set custom syntax highlighting?

BTW, if you create any useful lexing files, I'd be happy to include them in the next Pallavi release.

Dusty

Offline

#10 2007-01-26 11:58:29

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

Thanks, I'll give it a try. BTW, do you want a new page for Pallavi with some web2.0-ish graphics? I'll put one up in a day or two.


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#11 2007-01-26 13:23:16

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Sure, I never put much effort into site design. smile If you're interested in graphics, I wouldn't mind a new icon either. The word is apparently hindi for a newly budding leaf; that's why the current icon is supposedly one.

Dusty

Offline

#12 2007-01-27 08:48:47

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

Right, I've put together a Pallavi page with some custom graphics, it's currently at my website. I haven't:made an icon, but I put in a Pallavi button at the bottom in the footer. If you like it, I'll make a tarball and send it you. Suggestions welcome.


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#13 2007-01-27 13:47:47

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Wow, that's really nice, I like it. Its clean and readable and so much easier on the eyes. :-) Nice work!!

I have a couple of suggestions, but overall, I think its really nice.

I think the buttons are a little big, for my resolution (1280x1024), so they might be way too big at 800x600?

The page isn't XHTML valid. I'd appreciate it if you could make it conform to the w3c standards, but if you don't feel like it you could also just remove the w3c XHTML strict valid banner at the bottom. ;-) Looks like one of the errors is caused by your web host, but I don't think the rest are.

I like the looks of the 'Download Pallavi 0.3' button, but having it as an embedded image makes it more time-consuming for me to update the site (ie: when I want it to say 'Download Pallavi 0.4', even if you gave me the gimp template. I'd rather be able to edit the html directly.

You may want to link to your home page under 'Website designed by Basu'? :-) Also, (this is nitpicky, because I could change it myself easily), change the tagline from "Pallavi made by Dusty" to "Pallavi created by Dusty Phillips".

So you're from Calcutta. I assume you know the meaning of words like 'Pallavi' better than I do. :-D I have several friends from India (and a few from other Desi countries), but they're mostly from Mumbai.

Thanks so much, I really like it!

Dusty

Offline

#14 2007-01-27 17:19:59

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

Thanks, it's still a bit first draft-ish, I know, the buttons look a bit too big. I haven't had a chance to test in other resolutions, I'll do that tomorrow. I didn't really check for validity (I just copied whatever was there in the actual page), but I'll make sure it's valid once I'm finished tinkering. I was thinking about the download button too, I think I'll remove the version number and just have it say "Download Pallavi". I'll change the tagline too.
As for Pallavi, you're pretty correct about what it means, but I'd like to know why you chose to call it so, if you don't mind.


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#15 2007-01-27 17:33:19

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Basu wrote:

Thanks, it's still a bit first draft-ish, I know, the buttons look a bit too big. I haven't had a chance to test in other resolutions, I'll do that tomorrow. I didn't really check for validity (I just copied whatever was there in the actual page), but I'll make sure it's valid once I'm finished tinkering. I was thinking about the download button too, I think I'll remove the version number and just have it say "Download Pallavi". I'll change the tagline too.

It sounds like you're on the same track as me then, I'll definitely use it when its done, so go ahead with future drafts. I really appreciate it! I thought the original was XHTML strict valid, but I may have made edits that broke that since the last time I checked.

As for Pallavi, you're pretty correct about what it means, but I'd like to know why you chose to call it so, if you don't mind.

As I understand, its also a common first name. If not common, it is at least my best friend's name. I had a hell of a time coming up with a name and figured it would make an interesting tribute to her given the circumstances at the time. Sometimes I think of it using the recursive backronym 'Pallavi: A Linux Lover's Alternative to VI'.

Dusty

Offline

#16 2007-01-28 12:24:16

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

Right, everything should be fixed now. The buttons are sleeker and I've changed the download button. It's XHTML strict too, except for the JS put in by my host. Apparently most of the errors were caused by leaving out the alt="" for images, didn't know they were necessary, (coz this my first "real" web-page). Tell me if you want anything else, or I'll put everything into a nice tarball.
BTW, how do you host your personal website?
Basu
(As for the name, Pallavi would be approximately equivalent to English flower names like Rose, Violet or Heather in terms of being common female names)


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#17 2007-01-28 14:12:37

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Really nice work! Especially for your first 'real' site. I'd be happy to put it up now, thanks so much. You can send the files to dusty@buchuki.com.

I have my site hosted at www.tera-byte.com/  They have a nice cheap package (something like $25 a year for 40MB) and give good deals on domains. And they're western Canadian, which makes me feel warm and fuzzy.

Dusty

Offline

#18 2007-01-28 16:10:34

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: Pallavi 0.3 (My pet project)

Oh my gosh. That site is so beautiful. I mean.......wow. You're good. You could make money doing websites. Did you use a template?

This is a bit inspirational for me. I've always been bad at site design and I've gone through every type of design that I can think of and not found something I like better than this. It's just so......simple. The colors are really nice.

I'm going to try Pallavi when I reinstall Arch. smile

edit: I'm shocked that you didn't mention Arch Linux in the obtaining and installing section. Even if it is just a common sense type of thing, it's free advertising for Arch Linux smile. I've read so many sites that have *buntu instructions that read kinda like this: "Open up Adept, find xxx and install it" or the like. smile

Last edited by deficite (2007-01-28 16:15:05)

Offline

#19 2007-01-28 16:19:21

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

deficite wrote:

edit: I'm shocked that you didn't mention Arch Linux in the obtaining and installing section.

Good point, I'll have to remember to change it later... "download aurbuild; aurbuild -s pallavi"

*grins*

Dusty

Offline

#20 2007-01-28 17:01:29

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Site updated. Thanks so much, Basu!

Dusty

Offline

#21 2007-01-28 19:07:24

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Pallavi 0.3 (My pet project)

What is the link for the final pallavi site Dusty?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#22 2007-01-28 19:21:20

majikstreet
Member
Registered: 2006-07-31
Posts: 96

Re: Pallavi 0.3 (My pet project)

http://pallavi.sf.net

Last edited by majikstreet (2007-01-28 19:21:35)


arooaroo wrote:
syd wrote:

Here in NZ we cant spell words with more than 5 letters. So color will have to do.

You must be very special then because "letters" has 7 tongue

Offline

#23 2007-01-31 07:44:42

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Pallavi 0.3 (My pet project)

2. I'm running Pallavi directly from the untarred file using run-pallavi. But if I go the directory and do run-pallavi <file> I just get Untitled. Same if I set Thunar to open text files. Am I doing something wrong, or has this not been implemented yet?

As a FYI, I implemented this in a plugin tonight. You can pull the changes from SVN if you like.

Dusty

Last edited by Basu (2007-01-31 08:51:56)


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#24 2007-01-31 12:58:51

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

Basu wrote:

hey Dusty, could you tell me where you get documentation /API reference for wxPython? I've got a few plugins in mind which I'd like to implement once school gets over.

I mostly use these resources, in order of preference:
The wxPython demo (this thing is awesome and has almost all you need, including an interactive editor to test things) Its available from the wxpython download page (https://sourceforge.net/project/showfil … p_id=10718)
http://www.yellowbrain.com/stc/index.html (bit out of date, and only for the styled text control, but comprehensive)
http://www.wxpython.org/docs/api/ (slow as hell, API listed, but documentation somewhat sketchy)


1. How do I execute the current buffer?

1. Enable the Macros plugin in pallavi_config.py under the default_plugins list
2. Add a line like this to the simple-keybindings list:

  "CTRL+E" : "ExecuteActiveBuffer",

3. Restart Pallavi
4. Test by entering the following code in an empty window and pressing 'control E'

view.focusedTextView.SetText("Hello World")

You could also set something up to execute the ExecuteActiveBuffer action from a toolbar or menu. I originally intended to write more advanced toolbar and menu plugins that automatically parsed the available actions for user-visible activities. The Macros plugin also has an "InteractiveExecuteAction" action that could be bound to a keybinding and would bring up a small dialog in which you could type "ExecuteActiveBuffer" to execute the buffer.

2. I'm running Pallavi directly from the untarred file using run-pallavi. But if I go the directory and do run-pallavi <file> I just get Untitled. Same if I set Thunar to open text files. Am I doing something wrong, or has this not been implemented yet?

Not implemented yet. I meant to write a plugin for it for 0.3, but I ended up not getting around to it. It drives me nuts too, so It'll probably be next on the list when I have time to implement the next feature.

Good questions, both. I'll have to add a FAQ to the site sometime and probably some documentation on how to write a plugin. Oh, and also the stuff I mentioned earlier on how to write a lexer.  <------ #@TODO :-)

Dusty

Offline

#25 2007-02-01 04:07:39

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Pallavi 0.3 (My pet project)

FTR, I've implemented the open names in the svn version if you want to try it. Its kind of sketchy, it tries to open all command line arguments, unless you have a '--' argument, in which case it only opens all arguments after the '--'. Just a hack for now, but its a plugin, so easily adapted. :-)

Also, I'm told the site looks funny on IE. I sincerely don't care about IE users; I really think they deserve to be using notepad if they want a text editor at all. So you don't have to fix it for my sake, but if you want to play games with browser compatibility, it would be good practice. It will also be hell. This is why I don't do web design. :-D

Also, you may want to sign up for the Pallavi mailing list because I don't feel comfortable abusing the Arch forums for content-specific discussions beyond simple feature requests and release announcements. Its super low traffic right now, but that could theoretically change if people read it. ;-)

Dusty

Offline

Board footer

Powered by FluxBB