Jump to content
UBot Underground

Workaround for comparing 2 Lists


Recommended Posts

Hi there,

 

I am pretty new to Ubot and only have the standard license so i have to workaround a bit :) 

here my Setup:

BIG LIST: about 10000 rows
a couple of lists: about 50 - 300 rows
Blacklist: about 10 rows

My goal is that all duplicate / blacklisted entries will be deleted and newly found entries added to the big list.

 

I have to say that the smaller lists are all tables with about 10 columns, but i check them later on as rows. I got a solution for checking duplicates but the blacklist won't work good. 

 

here is a bit code:

create table from file(#bigList, &Links)
add list to list(%Links, $list from file(#bigList), "Don\'t Delete", "Global")
create table from file(#fileOpen, &Profiles)
add list to list(%Profiles, $list from file(#Profiles), "Don\'t Delete", "Global")
add list to list(%LinksCheck, %Links, "Delete", "Global")
add list to list(%LinksCheck, %Profiles, "Delete", "Global")
set(#math, $subtract($list total(%LinksCheck), $list total(%Links)), "Global")
set(#countInnerList, $list total(%Links), "Global")
loop(#math) {
    add item to list(%newLinks, $list item(%LinksCheck, #countInnerList), "Delete", "Global")
    increment(#countInnerList)
}
set(#countInnerList, 0, "Global")
set(#countList, 0, "Global")
loop($list total(%newLinks)) {
    clear list(%tableRow)
    set(#findIndex, $plugin function("TableCommands.dll", "$table search", &Profiles, $list item(%newLinks, #countList), "Row Index"), "Global")
    add list to list(%tableRow, $plugin function("TableCommands.dll", "$list from table", &Profiles, "Row", #findIndex), "Don\'t Delete", "Global")
    add list to table as row(&ProfilesNew, #countList, 0, %tableRow)
    increment(#countList)
}
save to file(#fileOpen, &ProfilesNew)
save to file(#bigList, %LinksCheck)

it is only the key snipped for checking duplicates but idk how i do it with the Blacklist. Do you have an idea? 

 

Thanks!

 

 

PS english is not my native language, sry for mistakes :)

 

Link to post
Share on other sites

Is it correct:

 

1. You want to add entries to a list

2. Then remove all duplicate entries from that list?

3. Then remove everything that is on a blacklist from your list?

 

Is that correct?

 

Dan

Link to post
Share on other sites

2. Then remove all duplicate entries from that list?

 

right but the smaller list. 

 

3. Then remove everything that is on a blacklist from your list?

 

right and again the smaller list.

 

CTSchmidt

Edited by CTSchmidt
Link to post
Share on other sites

I would probably use the  large data plugin to archive that:

http://www.ubotstudio.com/forum/index.php?/topic/16308-free-plugin-large-data/

 

Yeah I know.. I'm a fan of that plugin  :)

 

It's free and it has a remove duplicate from table / list feature.

And you can compare two lists and remove duplicates. So you don't have to do all that loop stuff on your own. 

 

Dan

Link to post
Share on other sites

okay, nice idea. BTW how do i download plugins? I tried it a couple of times ago with no result. I cannot login either. Is there a simple trick? :)

 

CTSchmidt

Edited by CTSchmidt
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...