[tw5] Re: Ignore "the" and "a" in dynamic list?

2022-11-14 Thread Eric Shulman
Take a look at the actual documentation tiddler (not the static version) 
here:
   https://tiddlywiki.com/#How%20to%20remove%20stop%20words

Edit that tiddler to see the implementation.  It contains this macro 
definition:
```
\define compare-without-stopwords()
[search-replace:i:regexp[^The |A ],[]]
\end
```
To show a title with the "stop words" moved to the end of the title, add 
this macro:
\define move-stopwords()
<$text text={{{[search-replace:i:regexp[(^The |A 
)(.*)],[$2, $1]]}}}/>
\end
```
To get your book list as a variable, you can write:
```
<$set name="book-list" filter="[has:field[book]get[book]unique[]sort[]]">
```
You can then use something like this to show the list:
```
<$list filter="[enlistsortsub]">
   <$link><>

```

enjoy,
-e
On Monday, November 14, 2022 at 9:48:47 AM UTC-8 adamvi...@gmail.com wrote:

> Hey amazing people!
>
> I'd like to create a dynamic list of books that ignores "the" and "a", to 
> keep it alphabetically tidy, 
> But right now I can only get it to render an alphabetical list using:
>
> <$list filter="[has:field[book]get[book]]+[unique[]sort[]]">
> <$link><>
> 
>
> I've tried incorporating a snippet from how to remove stop words 
> 
> :
>
> [enlistsortsub]
>
> But I can't seem to implement it correctly..
>
> Apologies if this seems a basic fix,
> (I'm not a programmer by any means, so I'm just scraping by and trying not 
> to bug you guys with trivial stuff if I can help it.)
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9f4cbed3-6d25-4abd-bafd-1a8f73be8f86n%40googlegroups.com.


[tw5] Re: Ignore "the" and "a" in dynamic list?

2022-11-14 Thread Charlie Veniot
Hello,

First, you should first take a look at the example at the bottom of this 
tiddler . 

It sounds like that's what you need.

On Monday, November 14, 2022 at 1:48:47 PM UTC-4 adamvi...@gmail.com wrote:

> Hey amazing people!
>
> I'd like to create a dynamic list of books that ignores "the" and "a", to 
> keep it alphabetically tidy, 
> But right now I can only get it to render an alphabetical list using:
>
> <$list filter="[has:field[book]get[book]]+[unique[]sort[]]">
> <$link><>
> 
>
> I've tried incorporating a snippet from how to remove stop words 
> 
> :
>
> [enlistsortsub]
>
> But I can't seem to implement it correctly..
>
> Apologies if this seems a basic fix,
> (I'm not a programmer by any means, so I'm just scraping by and trying not 
> to bug you guys with trivial stuff if I can help it.)
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/02031966-f355-4a47-8bb3-95e5de0659c0n%40googlegroups.com.