Wiki

Clone wiki

BibSonomy GoogleDocs Add-on / Google_Apps_Script

GoogleScript-Package

The GoogleScript package contains all classes and functions that are used by the Google Apps Script service. These scripts run on a Google server and serve as an interface to the BibSonomyAPI and can manipulate the Google Document.

GAS-package.png

ConnectToBibSonomy

The ConnectToBibSonomy script serves as an interface between the UI and the BibSonomyFetch class and is used to connect to the BibSonomy API. The method fetchDataFromBibsonomy is called by the UI to retrieve the publications bookmarked in BibSonomy. See the BibSonomyFetch class for further information about conecting to the API.

BibSonomyFetch

The BibSonomyFetch class contains functionality to retrieve publications from the BibSonomy API. It can create or retrieve the login credentials from the Google Document to login to the API and download all saved publications. The BibSonomy API can return only 1000 publications with one query. The algorithm of BibSonomyFetch will queue as many queries as needed to get all publications. It merges the query results into a new list and returns a string representation of the object list. The UI can then parse it back to an object using JSON.

NameFormatter

The NameFormatter class is used to modify the format of the authors names given by the BibSonomy API. It is used by the BibSonomyFetch class. The format from BibSonomy is last_name1, first_name1 and last_name2, first_name2 and last_name3, first_name3 and will be transformed to first_name1 last_name1, first_name2 last_name2 and first_name3 last_name3.

DocumentProperties

The DocumentProperties script contains methods to retrieve values from and save values into the Google Document. You can save / retrieve the username and api key for the BibSonomy API and the lock status of the document.

Install

The Install script is used to install the add-on into the Google Document . It is called by the document automatically.

Locking

The Locking class can lock the document to disallow concurrent editing or unlock to allow editing again.

RangeBuilder

This "RangeBuilder" sets up the NamedRanges in which the citation is inserted and displayed in the document. The methods insertAtCursor and renameRanges are responsible for interacting with the Sidebar and the document. Implementation and functionality of "RangeBuilder" is found in the previous documentation.

HTML

The HTML script creates and manages everything that has to do with the UI. It creates the sidebar and the settings dialog and manages template creation for the loading of files and scripts.

Updated