speedyGonzales / bots

Automatically exported from code.google.com/p/bots
0 stars 0 forks source link

Show in GUI: routescripts, communicationscripts, mappingscripts, grammars #224

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Only for routes now: indicate there is a user script for this route.
Just an indication if script is there or not.
?make a link of it, and display the script in browser?

Original issue reported on code.google.com by hjebb...@gmail.com on 30 Apr 2013 at 5:04

GoogleCodeExporter commented 8 years ago
?make a link of it, and display the script in browser?  That'll work for me.

Original comment by Harold.D...@gmail.com on 30 Apr 2013 at 11:41

GoogleCodeExporter commented 8 years ago
I agree. Found this code which would be nice to use for the display.
http://code.activestate.com/recipes/578178-colorize-python-sourcecode-syntax-hig
hlighting/

Original comment by mjg1964 on 2 May 2013 at 11:17

GoogleCodeExporter commented 8 years ago
playing on this now :-) will post code if I get it working.

Original comment by mjg1964 on 2 May 2013 at 12:26

GoogleCodeExporter commented 8 years ago
combine this with java-script editor.
(if lots of extra code is needed for display might as well use javascript?)

Original comment by hjebb...@gmail.com on 2 May 2013 at 12:32

GoogleCodeExporter commented 8 years ago
I got a source viewer working but not figured out how to do the links yet. but 
time for sleep! 

new module py2html based on the code I posted above.
new template srcfiler.html (css is in here, I changed it to my preferred 
colours)
add srcfiler in views.py using py2html
add srcfiler to urls.py

use like this: 
http://localhost:8080/srcfiler/?src=D:\Python27\Lib\site-packages\bots\usersys\r
outescripts\A_TEST.py

Original comment by mjg1964 on 2 May 2013 at 1:23

Attachments:

GoogleCodeExporter commented 8 years ago
Update:
views.py srcfiler allows viewing of .py files in usersys only (Note: based on 
v3.0)
py2html tidy up and add comments

Original comment by mjg1964 on 3 May 2013 at 12:52

Attachments:

GoogleCodeExporter commented 8 years ago
hi Mike,

this looks great.
I have not tried yet, is the issue with the link in the GUI solved?

Original comment by hjebb...@gmail.com on 3 May 2013 at 11:07

GoogleCodeExporter commented 8 years ago
No I did not figure out how to do the links yet, been unwell with a cold and 
off work today.

Original comment by mjg1964 on 3 May 2013 at 12:06

GoogleCodeExporter commented 8 years ago
hi Mike,

I wish you a quick recovery!

Original comment by hjebb...@gmail.com on 3 May 2013 at 12:26

GoogleCodeExporter commented 8 years ago
Feeling a bit better now :)

I have figured out how to do links, working ok for routescripts. I will see if 
I can do similar for comm. scripts, grammars, mappings... then post the changes.

I also improved py2html, removed the <pre> etc. and added to the template, 
added line numbers to the source, added header with source filename. 

Original comment by mjg1964 on 10 May 2013 at 6:49

Attachments:

GoogleCodeExporter commented 8 years ago
hi Mike,

good to hear you are feeling better.

Original comment by hjebb...@gmail.com on 10 May 2013 at 10:22

GoogleCodeExporter commented 8 years ago
Here is the complete mod applied to latest bots source.

Routes and channels have a new "script" column. Shows yes/no icon, "view" link 
for the script if yes. Icon and link is also shown in change views.

Translations now have links instead of plain text in Frommessagetype, Mapping 
Script and Tomessagetype columns. Each link allows you to view the grammar or 
mapping.
All 3 scripts should always exist, else is an error, shows the "no" icon and 
name instead of a link.
Script links not shown in change view.

Unrelated to this change, I also added "Default Run" column next to "Active" in 
routes. This is opposite of "notindefaultrun" and allows you to see at a glance 
which routes will run. The "notindefaultrun" is still used in the change view, 
but moved together with active. (actually I would prefer this one to be 
opposite also, not sure how to do it)

Kind Regards,
Mike

Original comment by mjg1964 on 13 May 2013 at 11:45

Attachments:

GoogleCodeExporter commented 8 years ago
hi Mike,

great.

there is a problem here if I understand it right: this forces one to first make 
the grammars, mapping etc.
I myself work just the other way around: first I do the setup of bots, than 
start filling in the details.

About the 'default run'/'not in default run': what you want is:
- presentation: more or less positive instead of negative
- position in screen

Original comment by hjebb...@gmail.com on 15 May 2013 at 9:53

GoogleCodeExporter commented 8 years ago
You are not forced to make grammars/mappings first. Simply it is assumed that 
grammars and mappings "should" always exist for every translation. If they 
don't exist then the name is shown as text (not a link) and the red "no" icon 
is shown next to it as a warning. (see 4th screenshot above)

Yes your understanding is correct re default run. I think the double negative 
of "not notindefaultrun" is less intuitive than "indefaultrun". Also I think it 
belongs together with active.

Original comment by mjg1964 on 15 May 2013 at 10:37

GoogleCodeExporter commented 8 years ago
OK

would be clearer indeed.
reason why it is now far to right is that I think this not used very often.
(it is the header that takes a lot of space....maybe there is a beter solution 
for this?

Original comment by hjebb...@gmail.com on 16 May 2013 at 10:30

GoogleCodeExporter commented 8 years ago
Fixed bug when viewing source with special characters in filename, eg. 
ampersand. Now using urllib.quote().

Original comment by mjg1964 on 23 May 2013 at 5:32

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by hjebb...@gmail.com on 6 Sep 2013 at 4:54

GoogleCodeExporter commented 8 years ago

Original comment by hjebb...@gmail.com on 10 Sep 2013 at 12:46