Hi,

as far as I understand the configuration interface at /admin/settings/createfromweb, it is only possible to configure exactly one target node type at one site for one service. Maybe I have missed something: How do I add web service A to taget node type A, and web service B to taget node type B?

If this is not possible yet and this support requests becomes a feature request: Would it be possible to create different profiles for different web services, so we would be able to preload different data according to the type of article we're writing (meaning: different profiles for the same target content type)?

Let's dream on ;)

Thanks & greetings, -asb

Comments

pkej’s picture

I second that, the module does a terrific job. I tried creating a node and I added a few fields with the same name as the properties returned from Wikipedia.

WOW, nothing needed to be done, except selecting the right content type. I didn't have to use the configuration at all.

Just works.

So second different options.

brevity’s picture

Version: 5.x-1.2 » 6.x-1.3
Status: Active » Fixed

Many thanks!

BTW, module tries to match field names to returned properties automatically (updated module now has a more detailed setting for that).

asb’s picture

Category: support » feature
Status: Fixed » Active

Hi,

I don't see how pkej's comment would have "fixed" my questions (how do I add web service A to taget node type A, and web service B to taget node type B? How to create different profiles for the same target content type?)

There's no problem if you don't intend to develop such a feature; but I still would like to know if this might be possible already and I simply haven't figured out how to configure it. Also we might be interested to sponsor such a (or other) features - but that depends, of course, on your available time, willingness to do sponsored work, and actual involvement in this module.

A notice like "Create from Web will not get profiles" would be fine with me, also ;)

Greetings from Berlin, -asb

brevity’s picture

Hi, I guess it would not require too much coding, but have to say I'm not sure whether I come around for it in March.

Have you tried to enter all the possible correspondences in settings? Say service A returns a property 'lang', and service B a property 'sprache' and you want both properties go into a cck field 'language' set sprache=language;lang=language ... I think that should work -- but realize I should document (and rework) the manual mapping process better %-)

asb’s picture

> Have you tried to enter all the possible correspondences in settings?

Sorry, but I can't find those settings. /admin/settings/createfromweb offers me (a) target node type and (b) Mapping fields, where "Mapping fields" have the "Format: fieldLabel1=AttributeNameA". I have no idea what this means. I can't even force it to not use en.wikipedia.org...

Example: How do I match this (from de.wikipedia.org)?

{{Personendaten
|NAME=Mann, Thomas
|ALTERNATIVNAMEN=Paul Thomas Mann
|KURZBESCHREIBUNG=deutscher Schriftsteller und Literatur-Nobelpreisträger
|GEBURTSDATUM=6. Juni 1875
|GEBURTSORT=[[Lübeck]]
|STERBEDATUM=12. August 1955
|STERBEORT=[[Zürich]]
}}

...or this (also from de.wikipedia.org):

{{Taxobox
| Taxon_Name       = Hunde
| Taxon_WissName   = Canidae
| Taxon_Rang       = Familie
| Taxon_Autor      = [[Johann Fischer von Waldheim|G. Fischer de Waldheim]], 1817
| Taxon2_Name      = Hundeartige
| Taxon2_WissName  = Canoidea
| Taxon2_Rang      = Überfamilie
| Taxon3_Name      = Raubtiere
| Taxon3_WissName  = Carnivora
| Taxon3_Rang      = Ordnung
| Taxon4_WissName  = Laurasiatheria
| Taxon4_Rang      = Überordnung
| Taxon5_Name      = Höhere Säugetiere
| Taxon5_WissName  = Eutheria
| Taxon5_Rang      = Unterklasse
| Taxon6_Name      = Säugetiere
| Taxon6_WissName  = Mammalia
| Taxon6_Rang      = Klasse
| Bild             = Canis lupus laying in grass.jpg
| Bildbeschreibung = [[Wolf]] (''Canis lupus'')
| Subtaxa_Rang     = Tribus
| Subtaxa          = *[[Echte Füchse]] (Vulpini)
*[[Echte Hunde]] (Canini)
}}

(However, what "Multiple profiles for different target node types?" meant was something completely different)

Greetings, -asb

asb’s picture

Anyone?

brevity’s picture

what's your cck field name?

for the recent screenshots (a little documentation pls thread) i created a little 'movie' cck content type with a field 'director'.

when i put into settings > createfromweb:
director=birthname

and then do createfromweb wikipedia 'Paul Thomas Mann' lookup, it puts his birthname as director ....

asb’s picture

With 6.x-1.3 I'm not even getting so far.

executing wikipedia with: johannes brahms
getting: http://en.wikipedia.org/wiki/Johannes_Brahms
got simple result
...
Result
title: Johannes Brahms
...
warning: file_get_contents(http://en.wikipedia.org/w/index.php?title=Johannes_Brahms&action=raw&section=0) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /var/www/drupal/sites/all/modules/createfromweb/operator_wikipedia.inc on line 72.
...
could not retrieve wikidata
asb’s picture