Create feed importer page

Registered by Tim Black on 2011-12-06

Create a page to import congregation data from any new feed of congregation data.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Douglas Huston
Definition:
Approved
Series goal:
Accepted for couchapp-backbone
Implementation:
Implemented
Milestone target:
milestone icon 0.1
Started by
Tim Black on 2012-12-08
Completed by
Tim Black on 2015-09-15

Related branches

Sprints

Whiteboard

Note: This is mostly superseded by using import.io. We just have to import import.io data now.

DONE

Fixed Node.JS couchdb changes listener loop in changesets 21-29 http://bazaar.launchpad.net/~tim-alwaysreformed/reformedchurcheslocator/couchapp/revision/21?remember=29&compare_revid=29
- Work on the TODO comment at ImportDirectoryView.js line 254. Fixed by using _.bindAll() in app.js.
- Fix node_changes_listener.js error saying it can't find the "request" module or "longjohn"
- Get tests working to test up to the point in the code we are developing.

TODO:
- Lead the user through the process of selecting each field's data for one congregation, by presenting each successive step in the process to them as a Bootstrap popover.
- We need to store small regular expressions in a JavaScript array and in the directory's entry in the database, one regex for each piece of congregation data, each associated with that data's field name.
 - We're working on creating the small regular expressions properly. The current problem is that the regex fails when there are literal periods in the regex we are creating, so we need to escape them properly.
 - This might help: http://www.cuneytyilmaz.com/prog/jrx/
  - Note that JavaScript allows named matches
- We need to find a way to use jQuery or pyQuery to narrow down the section of HTML on which we are running each regular expression. One suggestion to try is also to use JavaScript to find the element's Xpath (and store that) rather than use jQuery's CSS selector syntax.
- Get the cong details link the user selects and parse it for the congregation details URL. Could we just (override the link's default action and) let the user click the link?
- We are getting lots of 500 errors when typing a URL. Try to fix these by making the JavaScript wait 2 seconds before firing the AJAX call. We tried this, but found that it still sent every keystroke, which isn't what we want. Maybe what would work is an event handler that waits 2 seconds, then polls the form element that originated the event to see if its value changed. If its value changed, then loop and wait another 2 seconds. Otherwise, get the form element's most recent value and send that via an AJAX request.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.