tags:

views:

603

answers:

2

I'm working on a pipe and am having trouble with combining two lists of items.

List 1:
[0] letter - a
[1] letter - b
[2] letter - c

List 2:
[1] word - apple
[2] word - banana
[3] word - cake

I'd like something which emits the following:

List 3:
[1] letter - a
    word - apple
[2] letter - b
    word - banana
[3] letter - c
    word - cake

I can't figure out for the life of me how to do this simple operation.

A: 

What you ask is verbose and complicated to do in Yahoo Pipes. If you still want to go through the trouble, here's my solution:

In this example, List 1 is a Yahoo search for "apples" and List 2 a Yahoo search for "oranges".

  1. The main pipe starts with a list of numbers. This list is cut to the length of List 1.
  2. Then for each number n, the n-th item of List 1 is attached to the numbered item.
  3. Then for each number n, the n-th item of List 2 is attached to the numbered item.

Finished.

You probably want to clean things up a bit. Add a proper title, remove the number value, etc.

Notes:

  1. I used alto maltés' list of numbers. It's not a part of Yahoo Pipes, so it might stop working.
  2. I used two n-th item pipes. Maybe this can be simplified.
  3. If List 2 is shorter than List 1, the last element of List 2 is used. This should be easy to change if necessary.
A: 

geocities is dead... Do you have another source of a xml file like alto maltes list of numbers?

Sylvio