Right now, the connector lets you save the result of CSS selectors into fields on your database. I would like to extend that to allow saving into relations.
These might be single-item relations or multiple-item relations, but in both cases, there are two broad parts:
A selector to find the item. This selector might return the first item (for a has_one) or a collection of items (for a has_many or many_many)
One or more sub-selectors to execute within that parent selector.
In principle, you could have further relations hanging off the back of those sub-selectors.
From a UI/data-model perspective, a simple change would be to introduce a dot-syntax - so one selector rule was called "Comments" and then the sub-selector was called "Comments.Name". However, it might be better to have a more rigorous data model, with a has_one ParentImportRule on the ImportRule object.
With this feature added, the DOM tree for a single page could be mapped to a tree of objects in the ORM in a number of quite flexible ways. First off the rank, it would allow the importing of comments.
Right now, the connector lets you save the result of CSS selectors into fields on your database. I would like to extend that to allow saving into relations.
These might be single-item relations or multiple-item relations, but in both cases, there are two broad parts:
In principle, you could have further relations hanging off the back of those sub-selectors.
From a UI/data-model perspective, a simple change would be to introduce a dot-syntax - so one selector rule was called "Comments" and then the sub-selector was called "Comments.Name". However, it might be better to have a more rigorous data model, with a has_one ParentImportRule on the ImportRule object.
With this feature added, the DOM tree for a single page could be mapped to a tree of objects in the ORM in a number of quite flexible ways. First off the rank, it would allow the importing of comments.