CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • GSoC 2016: Overhaul Import to any API & Import from Google Sheets
Pages: [1]

Author Topic: GSoC 2016: Overhaul Import to any API & Import from Google Sheets  (Read 225 times)

saurabh

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.7.beta1
  • CMS version: Drupal
  • MySQL version: 5.6.26
  • PHP version: 5.6.12
GSoC 2016: Overhaul Import to any API & Import from Google Sheets
March 10, 2016, 12:39:12 am
Hi!

I'm Saurabh Batra, a sophomore student at IIT Guwahati, India. I've been actively contributing to Civi since October 2015 and my main point of contact and mentor has been Eileen McNaughton.

The project I'm interested in developing for GSoC 2016 is the one Eileen proposed, i.e. https://wiki.civicrm.org/confluence/display/CRM/Google+Summer+of+Code+-+2016#GoogleSummerofCode-2016-ImportfromGoogles/sheet. The main objective here is to provide import facilities to any API (similar to that of the existing extension https://github.com/eileenmcnaughton/nz.co.fuzion.csvimport), however the implementation to be using an interface-based package as the data-source (such as https://packagist.org/packages/ddeboer/data-import) and the API as the data destination. The great thing about this package is the provision to add custom Readers (so any number of sources can be added later on to extend it). Plus, it has a simple and easy-to-use Mapping manager.

Also, of course, the new implementation should have an Angular form to top it off with the end goal being to make an extension which can be shipped with Core and replace the existing import forms.

As far as importing from Google Sheets is concerned, it may not be easy (or possible) to code a Reader to import from sheets but there is a not-so-tough workaround. Google has a REST API for Drive (which is far from well documented). However there are examples demonstrating how to export Sheet as CSV which do work (tested it out on my terminal). So the user is prompted to log in to his Google account (OAuth2); provides the link to the sheet to be imported; sheet gets temporarily exported as CSV (using Drive API); our extension reads this CSV and imports.

To sum it up:
Google Sheets exported as CSV (google/apiclient)   ---------↓
CSV files                                                 -------------->       Angular form  <-------------> ddeboer/data-import ------------> civi-core import
Other format files                                                              ----------↑

Any suggestions for improvements or features that might be added are of course welcome and sought after.  :)


Saurabh Batra
IRC: saurabh
GitHub: saurabhbatra96
Mail: saurabh[dot]batra96[at]gmail[dot]com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Google Summer of Code »
  • GSoC 2016: Overhaul Import to any API & Import from Google Sheets

This forum was archived on 2017-11-26.