Sunday, October 20, 2013

Visio illustrations to latex pictures

  • Context

One of my colleagues prepare, for our company, some pictures to illustrate some concepts. He used Visio for its work. I've been asked to provide a presentation using, at least, the same materials he already prepared.

As a Latex guru, I started coding my presentation using Beamer.  needed to include some of Microsoft Visio pictures. I have both .vsd files and .jpg files.
But I would like to make my presentation evolve by showing components of the picture step by step. Components appear on the slide only when I would like to discuss them. For this purpose I need to have my picture coded using any kind of latex picture packages.

I'm used to export my illustrations from Xfig. This time I didn't have much time to reproduce all pictures with Xfig from scratch. How to manage this ?

Dia is an open source drawing tool aimed at providing a free alternative to Visio which is proprietary and a paid solution. Dia can export pictures to Xfig formats. What is required now is to convert Visio files to Dia.

  • Visio files

Visio uses vsd files. vsd files can be converted to svg which is supported by Dia. And there is a tool, vsd2svg, which can be used to achieve this goal. But in my case it was useless. Pictures components was stacked, one over another after exporting vsd files to svg :-(

Fortunately, Visio pictures can be saved as vdx files. vdx is an old Visio extension to save a Visio picture as an XML file.  And Dia can handle this well. So here is the process:
  1. Export Visio files as vdx
  2. Open it in Dia and make some corrections
  3. Export it to Xfig
  4. From Xfig, export as Combined PS/PDF/LATEX (3parts)
  5. Edit the .pspdftex file got form last export to include beamer commands such as \only to make parts of the pictures appear only when needed.
  6. Include that file into your beamer code
  7. You're done
    Enjoy it well!!

    Thursday, August 15, 2013

    Facebook Python sdk

    Facebook Python SDK allows you to access +Facebook  Graph API leveraging your +Python  skills. It can be downloaded from git hub following this link: pythonforfacebook/facebook-sdk . However the current implementation lacks some features I needed to write a framework which I'll present soon.

    Then I extended it by:
    • Providing custom Error classes to be able to customize error handling
    • Providing a method to get long lived access token
    • Providing a method to debug access token 
    • Providing a method to get access token validity