Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Attempting to make a katepart for HamsterSpeak

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
chronoboy
Into the past with a splash




Joined: 04 Jun 2010
Posts: 162
Location: Canada

PostPosted: Wed Oct 20, 2010 11:10 am    Post subject: Attempting to make a katepart for HamsterSpeak Reply with quote

If anybody here uses Linux or even KDE on Windows or Mac, you may have seen a powerful editor called Kate which supports syntax highlighting.

I am attempting to build a syntax file for HamsterSpeak, it is a basic XML file, and I do believe there is a much easier way to auto-generate it. Looking at how the documentation is generated. For the OHR devs reading this with SVN write access. Would you be-able to make the next release of OHR contain a auto-built script in the docs folder for syntax highlighting? I so believe Gedit, GNOME's default editor also supports highlighting which may also be a good addition to this for those Ubuntu users out there.

This is what I got so far for the katepart syntax plugin, but it seems to have a glitch here and there and does not yet support every command(hope to automate this process soon)

http://c0018321.cdn1.cloudfiles.rackspacecloud.com/hamsterspeak.xml

Katepart is used in both Kate and Kwrite, other editors may exist out there with support for this type of syntax file as well.

I'll take a look at how the documentation is auto-generated and see if I can work with that code and slightly modify it to auto-magically make a syntax highlight file for kpart. I may also consider making one for Gedit as well.

In the end, why re-invent the wheel and create a separate editor ourselves to edit HamsterSpeak when other extend-able editors exist which can easily add support for HamsterSpeak? Kate even supports running Command line options and capturing and parsing it's output. Kate should also be-able to run on Windows and Mac, as KDE4 is now available on those platforms.

http://windows.kde.org/

Through the KDE-Installer for windows, one should be-able to choose specific components. Ubuntu users can simply 'apt-get install kate'.

On a Linux install, place the above XML inside: $HOME/.kde/share/apps/katepart/syntax

I have to try and run KDE on Windows to verify it's file path and ease of use. However, I will look into this.

EDIT: Kate can be easily installed via the Windows.KDE.org Installer. It will need to download 40 packages of which are about 100MB in size. After it is installed, it works flawlessly in Windows and I even tested my HamsterSpeak.xml file, which I will update soon. I will keep the URL in this post the same for future updates of the syntax file.

Under windows, Kate's syntax can be placed here: C:\Doc and Settings\Your username\Application Data\.kde\share\apps\katepart\syntax

Basically, on both Linux and Windows the KDE setting folder is identical.
_________________
Current project: Chronoboy Adventures

Website: http://www.chronoboy.com/
Back to top
View user's profile Send private message Visit poster's website
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Oct 20, 2010 1:24 pm    Post subject: Reply with quote

That is cool. I have very little with KDE or Kate, as I always use Gnome on my system.

As for Gedit, that uses GtkSourceView for its syntax highlighting. I have a syntax highlighter xml file for that here: hamsterspeak.lang

Unfortunately I haven't had time to figure out how to make gedit actually use custom language files, I was just using it with HamsterWhisper which also happens to use GtkSourceEdit.

I don't understand what file you are asking us to autogenerate. If you are trying to get a list of commands, can't you just parse them out of plotdict.hsd?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sat Oct 23, 2010 3:27 am    Post subject: Reply with quote

Is TextWrangler able to do this too?
_________________
Working on rain and cloud formation
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group