Citations Ahead

Let’s get this out of the system. I’ve spent the last day doing this:

  1. learning to script dia with python
  2. finding a script for searching with googlescholar from python
  3. adapting it to get the citations for the first found document, assuming a search for the full title will always lead to the document with that title being first (seems reasonable).
  4. fixing the bugs and getting the picture below.

To get it running I did the following (there is probably a much simpler way):

  1. got the python-startup.py from dia sources (apt-get source dia-libs)
  2. copied it to ~/src/dia_python
  3. put there the files attached (alonutil.py, BeautifulSoup211.py, googlescholar.py, bibliography.py)
  4. export DIA_PYTHON_PATH=~/src/dia_python
  5. dia

The result is that dia has an extra menu entry in the Objects menu. It expects you to have selected a “Flowchart – doc” type (see the attached dia file), and then goes and expands it through google scholar, putting new nodes. Due to a bug/lack of understanding on my part, you have to refresh the display somehow, by dragging around, to actually see the new nodes.

Missing: identifying same objects instead of creating them again, citations by, clickable links so you can easily go to the web, export to bib file / aigaion, go wild.

Since I can’t actually upload any of the non image files (dia, py) I’ll put them here

citation generation

Leave a Reply