Since there's a huge potential with using Google Spreadsheet forms for
creating Exhibit data, I've just added a setting that lets you set the
separator to be comma instead of semicolon:
<link rel="exhibit/data"
type="application/jsonp"
href="... ?alt=json-in-script"
ex:converter="googleSpreadsheets"
ex:separator="," />
Let me know if it doesn't work.
David
David Huynh wrote:
> Jon Camfield wrote:
>
>> First off; Exhibit is an amazing tool; any developers who make it to
>> DC; lemme know -- I'll buy you a beer.
>>
> Can't ever say no to free beer... :)
>
>
>> I'm trying to use Google's new "form input" to their spreadsheet to
>> enable people to add data to an Exhibit data spreadsheet, but Google
>> does comma-separated values for their checkbox input; does anyone know
>> if there's a way to transform those to semicolons automatically, or
>> set Exhibit to treat commas within a field as separators?
>>
> The Google Spreadsheet converter is implemented as
> Exhibit.JSONPImporter.googleSpreadsheetsConverter in
>
>
> http://static.simile.mit.edu/exhibit/api-2.0/scripts/data/importers/jsonp-importer.js
>
> You can see the line where the cell is split
>
> var fieldValues = cell.val.split(";");
>
> What you can do is declare your own converter:
>
> <script>
> var myGoogleSpreadsheetConverter = function(json, url) {
> ... copy the code over from the official converter, replace ;
> with ,
> };
> myGoogleSpreadsheetConverter.preprocessURL = function(url) {
> return url.replace(/\/list\//g, "/cells/");
> };
> </script>
>
> and then for your data link, specify
> ex:converter="myGoogleSpreadsheetConverter".
>
>
>> Thanks!
>> (also, is there an IRC channel somewhere for these questions, or is it
>> preferred to get the answers archived in mailman?)
>>
> This mailing list is preferred.
>
> Cheers,
>
> David
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general