DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Creating a virtual clip group in CHS to show you all clips with URLs in them  (Read 16,276 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
The virtual group construction feature of CHS is powerful but complicated to use and not well documented.
Someone asked for this on the irc channel so i thought i would show how to do it here.

Suppose you want a clip group which shows you all clips containing a url..

Create a new group in the group tree, and edit it (F2), and set the values as follows:

mycaps Screenshot - 002 , 08_27_PM , Jun 25 2006.png

The key here is to check the "Virtual Folder" checkbox and fill in this text:
Code
(Lower(ClipText) LIKE '%http:%') OR (Lower(ClipText) LIKE '%www.%') OR (Lower(ClipText) LIKE '%ftp:%')

That tells CHS that this group is constructed dynamically from all other clips that match the specified rule.

Now whenever you select that group you will see all clips from all other groups that contain http or www. or ftp:.
You could customize it as you want of course.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
in the future i will add a special flag to clips that indicate when they contain a url - that will make life a bit easier for sorting and filtering by urls.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
just tried out this potentially useful feature. but there's a problem because it captures normal sentences containing keywords such as 'http' or 'ftp'. is there way to add a rule to say that if source of capture is from browser's location bar then show in this folder.

[attach=#]

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
no but
how many times in a normal sentence are you going to type http:
you could change it to http:// if you wanted to be a bit more precise.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Quote
how many times in a normal sentence are you going to type http:

ok, sounds logical. then how do i modify the rule to say if only starts with 'http', etc?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
it already does say that
but you could change

Code
(Lower(ClipText) LIKE '%http%') OR (Lower(ClipText) LIKE '%www.%')

to

Code
(Lower(ClipText) LIKE '%http://%')

that will probably reduce the false positives.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
it already does say that
oops! :-[ sorry. you must be thinking how did i end up with these nim-wits.. anyway, thanks for the tip. :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
nah i love you guys, you always come up with good ideas i didn't think of before.

Original address: https://www.donationcoder.com/forum/index.php?topic=4135.0