Let’s get this out of the system. I’ve spent the last day doing this:
- learning to script dia with python
- finding a script for searching with googlescholar from python
- 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).
- fixing the bugs and getting the picture below.
To get it running I did the following (there is probably a much simpler way):
- got the python-startup.py from dia sources (apt-get source dia-libs)
- copied it to ~/src/dia_python
- put there the files attached (alonutil.py, BeautifulSoup211.py, googlescholar.py, bibliography.py)
- export DIA_PYTHON_PATH=~/src/dia_python
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