[recoll-user] Re: Indexing python Files

  • From: Linos <info@xxxxxxxx>
  • To: recoll-user@xxxxxxxxxxxxx
  • Date: Mon, 15 Sep 2008 09:56:18 +0200

I think should be great use the html directly, this way you let the people make colorized output that should be specially util for source code, for example vim can produce colorized html from source code files that it have syntax with only this command: "vim -c 'se nu' -c 'so $VIMRUNTIME/syntax/2html.vim' -c w -c 'qa!'", other suggestion i have it is that in the listwidget where you select one of the results to do a preview or edit it to get selected on mouse click because i am not sure what item in the list i have selected to do the action on it because i cant get any visual change when i select it.


Jean-Francois Dockes escribió:
Thank you for this and the Pidgin patch, these will be in the next
release.
About the python-to-html translater, I should have remembered (!) that the
pretty-printing is lost in the preview, which does a rough html-to-text
translation before displaying. So it's not much better currently than just
escaping / wrapping the python text.

I wonder if it might be a good idea for the preview to use the html
output from the filters when possible, instead of going to text. I need to
check how it would look in Qt's TextEdit.

jf


Linos writes:
> Hi Jean-Francois, > to convert it to a pretty html colored output i am using the script i
 > have found here "http://chrisarndt.de/en/software/python/colorize.html";
 > it is pure python, i have found any other tricks to make the same with
 > vim or enscript but i suppose the unique program you can be nearly sure
 > to be in a machine that want to index python files it is python itself,
 > i have renamed the file to rclpython in ~/.recoll directory and now the
 > settings works well in mimemap and mimeconf, i can preview and edit the
 > .py files and the contents are correctly indexed. I am using the icon
 > found in the oxygen kde package, i have copied it to
 > /usr/share/recoll/images and i am using this configs in ~/.recoll
 >  ...



Other related posts: