Process on khtmld

You may have noticed some problems with my khtmld project. It took me sometime to re-write the whole buffer processing function. I have also added a new feature, which allows you to communicate with khtmld through a socket.

Allover the code is now much more readable and the old function to read and process the buffer has been split up into 3 new ones:

  • void fill_buffer(int fd)
    Handles the file descriptor and reads and process the input it also stores the buffer into argline, which than gets parsed by parseArgument
  • void processArgument(char *argline)
    The passed argline gets split into two arguments arg1 the URL and arg2 the image filename. These variables getting passed to call_khtml2png2.
  • int call_khtml2png2(char *url, *img)
    This one executes khtml2png with all parameters, the one stored in your ~/.khtmldrc and the two arguments passed to this function. It than hopefully creates your screenshot.

I am not done yet and I need to implement TCP Wrapper to increase the security while using the socket communication feature. But so far local tests without khtml2png and TCP Wrapper worked fine. I don't want to rush with this release, otherwise it could lead to a disaster like the last time, where the whole buffer processing was a real mess!

Comments




If you can't read the letters on the image, download this .wav file to get them read to you.
Posted 2008/04/09 17:25 · Julian Knauer
blog/2008/04/09.process.on.khtmld.txt · Last modified: 2010/02/02 17:04 (external edit)
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0