Permalink
Browse files

- Documented few filters

- TODO: items
  • Loading branch information...
1 parent a124a49 commit d458e3611fe8ebcab4358c182e000731a1f237e5 @docelic docelic committed Dec 22, 2004
Showing with 177 additions and 1 deletion.
  1. +10 −1 TODO
  2. +21 −0 refs/colons_to_null.filter
  3. +20 −0 refs/commify.filter
  4. +24 −0 refs/compress_space.filter
  5. +41 −0 refs/convert_date.filter
  6. +14 −0 refs/convert_date.tag
  7. +33 −0 refs/crypt.filter
  8. +14 −0 refs/currency.filter
View
11 TODO
@@ -1,6 +1,9 @@
+- See that if 'crypt' is put in see also, all symbols of that name appear
+ in see also line and their type is distinguished visually.
+- Finish proper formatting for online examples
+
Outstanding:
-- filters/confs: fill $ag{structure}, automatic for confs, manual for filters
- why email, email-raw, SendMailProgram produce errors about usertags olink ID
- Add docbook element to reference mailing list posts. Something like
<ml list='users'>2004-December/041539</ml>, it expands to:
@@ -9,8 +12,11 @@ Outstanding:
- match style (no starting verb or all starting verbs) in all Example titles
- check if all Default fields are properly formated (<literal> or none)
- s/a HTML/an HTML/
+
+Coding:
- script to [un]comment debug lines!!
- use Interchange.pm to make an Interchange shell
+- finish ML stats
DOCUMENTATION SYSTEM:
- Add support to document tags which are NOT found in separate files
@@ -30,6 +36,9 @@ DOCUMENTATION SYSTEM:
of a 300-lines usertag. Example for this could be taken directly out of
mwforum demo on mwforum.org
- Generate leaf nodes (put bin/mkreport back in action)
+- If filter returns Vend::xxx::something(), include that function in context
+ reports, and try to determine the "Uses" field (which also needs to be
+ added to filter refentry template or something)
Tags:
aliases
View
@@ -0,0 +1,21 @@
+__NAME__ purpose
+replace double colons "::" with \0 (null) character
+__END__
+
+
+__NAME__ see also
+__END__
+
+
+__NAME__ description
+The filter replaces double colons (<literal>::</literal>)
+with a <literal>\0</literal> (null) character.
+__END__
+
+
+__NAME__ notes
+For more information on &PERL; Regular Expressions, pattern matching and
+character classes, see
+<citerefentry><refentrytitle>perlre</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+__END__
+
View
@@ -0,0 +1,20 @@
+__NAME__ purpose
+add thousands separator to a number, and trim to specified number of decimal places
+__END__
+
+
+__NAME__ description
+The filter adds thousands separator (a comma "<literal>,</literal>", usually)
+to a number, and trims decimal places to a specified maximum length.
+__END__
+
+
+__NAME__ online: Filter example
+<programlisting>
+[set online_commify_test]1234567890.123456[/set]
+
+My commified value, trimed to 2 decimal places is:
+[filter commify.2]online_commify_test[/filter]
+</programlisting>
+__END__
+
View
@@ -0,0 +1,24 @@
+__NAME__ purpose
+eliminate leading and trailing whitespace and compress all "in-string" whitespace occurences to exactly 1 space each
+__END__
+
+__NAME__ description
+The filter eliminates leading and trailing whitespace, and
+<emphasis>compresses</emphasis> all occurences of whitespace in a string to
+exactly 1 space on each occurence.
+__END__
+
+
+__NAME__ notes
+For more information on &PERL; Regular Expressions, pattern matching and
+character classes, see
+<citerefentry><refentrytitle>perlre</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+__END__
+
+
+__NAME__ online: Filter example
+<programlisting>
+[filter compress_space] LEADING Hello, World! TRAILING [/filter]
+</programlisting>
+__END__
+
View
@@ -0,0 +1,41 @@
+__NAME__ purpose
+convert date to a specified format
+__END__
+
+__NAME__ description
+The filter calls &tag-convert-date; to output date according to the
+specified format string.
+</para><para>
+For the accepted formats in which the input date needs to be specified,
+see &tag-convert-date;.
+__END__
+
+
+__NAME__ see also
+convert_date
+__END__
+
+
+__NAME__ notes
+Although this filter looks almost exactly like the &tag-convert-date; tag,
+there's one simple difference in the implementation which is interesting
+to mention. If you call the &tag-convert-date; tag with empty
+(or invalid) time string, it will default to the current
+time; if you call this &filter-convert_date; filter with an empty time string,
+then the current time will <emphasis role='bold'>not</emphasis> be assumed
+(because &filter-convert_date; won't call &tag-convert-date; with no data)
+and empty string will stay an empty string.
+__END__
+
+
+__NAME__ missing
+I am being stupid and I can't remember where to see a list of accepted time format strings (%Y, %m, etc...)
+__END__
+
+
+__NAME__ online: Filter example
+<programlisting>
+Year is [filter convert_date.%Y][time][/filter].
+</programlisting>
+__END__
+
View
@@ -0,0 +1,14 @@
+
+
+<itemizedlist>
+ <listitem><para>
+ <literal><replaceable>YYYY</replaceable>-<replaceable>MM</replaceable>-<replaceable>DD</replaceable></literal>
+ </para></listitem>
+ <listitem><para>
+ <literal><replaceable>YYYYMMDD</replaceable></literal>
+ </para></listitem>
+ <listitem><para>
+ <literal><replaceable>YYYYMMDD:hhmm</replaceable></literal>
+ </para></listitem>
+</itemizedlist>
+
View
@@ -0,0 +1,33 @@
+__NAME__ purpose
+run Unix crypt() function on input data
+__END__
+
+__NAME__ description
+The filter calls &PERL; <function>crypt</function> function
+to encrypt input data.
+__END__
+
+__NAME__ see also
+crypt
+__END__
+
+
+__NAME__ online: Filter example with random salt
+The encrypted string should be different each time you run the code
+because the salt is random.
+<programlisting>
+Encrypted string <literal>TEST</literal> with random salt is:
+[filter crypt]TEST[/filter].
+</programlisting>
+__END__
+
+__NAME__ online: Filter example with hand-specified salt
+The encrypted string should be the same each time you run the code
+because the salt does not change.
+<programlisting>
+Encrypted string <literal>TEST</literal> with salt of
+<literal>AB</literal> is:
+[filter crypt.AB]TEST[/filter].
+</programlisting>
+__END__
+
View
@@ -0,0 +1,14 @@
+__NAME__ purpose
+format number as currency, honoring default or specified locale
+__END__
+
+__NAME__ description
+The filter formats input number as a currency. The default locale is honored,
+but a specific locale can also be specified. &IC; currency-related options
+are honored too, of course.
+__END__
+
+__NAME__ see also
+PriceDivide,Locale,PriceCommas
+__END__
+

0 comments on commit d458e36

Please sign in to comment.