2

I have a list of people and place-names and relationship-descriptions. I want to generate a few places with other info, but in addition, each place will have a list of people there (I can do that), but I also want each place to list relationships for the people there to people in other places. And, I need those other places to refer back through the relationships.

So, as far as I can figure out, I need to generate all that info ahead of time, before beginning to output the places with their people, descriptions, ... But I can't figure out how to make and store that info.

2

I've tried adding a <style>...</style> block to the html but it seems to have no effect.

The CSS usage says to add style='whatever' on each place you want to apply some CSS. But I want to apply the same style in multiple places without having to re-type it and find/change each place when I change my mind.

TL;DR: I want to use CSS the way it's supposed to work

[-] thargas@lemmy.world 2 points 3 weeks ago* (last edited 3 weeks ago)

Yes. That works great! Thanks again!

Since I'm wanting to be able to use this multiple times, for various lists, I end up with:

AdjectiveNoun(Adj, Noun)=>
  let combo=[];
  for(const a of Adj.selectAll) {
    for(const n of Noun.selectAll) {
      combo.push([a,n].join(' '));
    };
  };
  return [joinlists(combo).consumableList];
[-] thargas@lemmy.world 1 points 3 weeks ago

That's looking very promising! I can't try it right now, but I think it'll do, once I parameterize the function to allow passing in the two lists to be combined.

Thanks muchly!

[-] thargas@lemmy.world 1 points 3 weeks ago* (last edited 3 weeks ago)

Thanks @Almaumbria.

Unfortunately, it's not quite what I wanted. I'm wanting the effect of a consumable list where the elements are all the combinations of Adjective+Noun. I think I'll have to figure out how to iterate through each of Adjective and Noun and construct a new list with all the combinations and stash that. I've not written an function like Thing() before, so I'll have to think about that.

2

What's wrong here?

https://perchance.org/tee--temp#edit

Why does it say "no more items in the consumable 'Thing' list)"?

[-] thargas@lemmy.world 0 points 7 months ago

People (myself included) are lazy and usually won't bother to make a change unless they have a specific reason. If the default were private then we wouldn't have the huge compendium of interesting pages to look through that we do.

Please keep the default public.

1
submitted 7 months ago by thargas@lemmy.world to c/perchance@lemmy.world

E.G. I want to create a list of siblings and create relationships between them. I can generate as many names as required, and if I had a list of them it'd be easy [mylist.consumableList.selectMany(1,3)] to pick some of them.

thargas

0 post score
0 comment score
joined 2 years ago