init
This commit is contained in:
87
livejournal/doc/raw/s1/s1ref2db.pl
Executable file
87
livejournal/doc/raw/s1/s1ref2db.pl
Executable file
@@ -0,0 +1,87 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) { die "\$LJHOME not set.\n"; }
|
||||
|
||||
require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl";
|
||||
require "$ENV{'LJHOME'}/cgi-bin/propparse.pl";
|
||||
require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
|
||||
|
||||
my @views;
|
||||
my @vars;
|
||||
|
||||
LJ::load_objects_from_file("views.dat", \@views);
|
||||
LJ::load_objects_from_file("vars.dat", \@vars);
|
||||
|
||||
my $ret;
|
||||
my %done;
|
||||
foreach my $vi (@views)
|
||||
{
|
||||
$ret .= "<appendix id='ljp.styles.s1.$vi->{'name'}'><title>S1 Variable Reference: $vi->{'props'}->{'name'}</title>\n";
|
||||
cleanse->(\$vi->{'props'}->{'des'});
|
||||
$ret .= " <abstract><para>$vi->{'props'}->{'des'}</para>";
|
||||
$ret .= " <simpara><ulink url='" . LJ::ehtml($vi->{'props'}->{'url'}) . "'>Example page</ulink></simpara></abstract>\n";
|
||||
foreach my $v (sort { $a->{'name'} cmp $b->{'name'} } @vars)
|
||||
{
|
||||
next unless ($v->{'props'}->{'scope'} =~ /\b$vi->{'name'}\b/);
|
||||
next if $done{$v};
|
||||
|
||||
cleanse->(\$v->{'props'}->{'des'});
|
||||
|
||||
my $id = lc($v->{'name'});
|
||||
$ret .= "<refentry id='ljp.styles.s1.$id'>\n";
|
||||
$ret .= " <refnamediv>\n<refname>$v->{'name'}</refname>\n<refpurpose>$v->{'props'}->{'des'}</refpurpose>\n</refnamediv>";
|
||||
|
||||
$ret .= " <refsection><title>View Types:</title><simpara>\n";
|
||||
foreach (split (/\s*\,\s*/, $v->{'props'}->{'scope'}))
|
||||
{
|
||||
$ret .= "<link linkend='ljp.styles.s1.$_\'>$_</link>, ";
|
||||
}
|
||||
chop $ret; chop $ret;
|
||||
$ret .= "</simpara></refsection>";
|
||||
|
||||
# overrideable?
|
||||
$ret .= " <refsection><title>Overrideable:</title><simpara>";
|
||||
if ($v->{'props'}->{'override'} eq "yes") {
|
||||
$ret .= "Yes; users of this style may override this";
|
||||
} elsif ($v->{'props'}->{'override'} eq "only") {
|
||||
$ret .= "Only; Only users of this style may override this, it cannot be defined in a style.";
|
||||
} else {
|
||||
$ret .= "No; users of the style cannot override this. It may only be defined in the style.";
|
||||
}
|
||||
$ret .= "</simpara></refsection>\n";
|
||||
|
||||
if (defined $v->{'props'}->{'type'})
|
||||
{
|
||||
$ret .= " <refsection><title>Variable Type</title><simpara>$v->{'props'}->{'type'}</simpara></refsection>\n";
|
||||
}
|
||||
if (defined $v->{'props'}->{'default'})
|
||||
{
|
||||
$ret .= " <refsection><title>Default Value</title><simpara>$v->{'props'}->{'default'}</simpara></refsection>\n";
|
||||
}
|
||||
if (defined $v->{'props'}->{'props'})
|
||||
{
|
||||
$ret .= " <refsection><title>Properties</title>\n";
|
||||
$ret .= " <informaltable><tgroup cols='2'><tbody>\n";
|
||||
foreach my $p (@{$v->{'props'}->{'props'}})
|
||||
{
|
||||
cleanse->(\$p->{'props'}->{'des'});
|
||||
$ret .= "<row><entry>$p->{'name'}</entry>\n";
|
||||
$ret .= "<entry>$p->{'props'}->{'des'} ";
|
||||
if ($p->{'props'}->{'min'} > 0)
|
||||
{
|
||||
$ret .= "[required]";
|
||||
}
|
||||
$ret .= "</entry></row>\n";
|
||||
}
|
||||
$ret .= "</tbody></tgroup></informaltable></refsection>\n";
|
||||
}
|
||||
$ret .= "</refentry>\n";
|
||||
$done{$v} = 1;
|
||||
}
|
||||
$ret .= "</appendix>\n";
|
||||
}
|
||||
|
||||
print $ret;
|
||||
2419
livejournal/doc/raw/s1/vars.dat
Executable file
2419
livejournal/doc/raw/s1/vars.dat
Executable file
File diff suppressed because it is too large
Load Diff
55
livejournal/doc/raw/s1/views.dat
Executable file
55
livejournal/doc/raw/s1/views.dat
Executable file
@@ -0,0 +1,55 @@
|
||||
{ lastn
|
||||
.name
|
||||
Most Recent Entries
|
||||
.des
|
||||
The default view, a reverse-chronological list of the last 'n' items in your journal, where 'n' is an integer value that the user may specify. Usually 'n' defaults to something like 20.
|
||||
.url
|
||||
http://www.livejournal.com/users/exampleusername/
|
||||
}
|
||||
|
||||
{ calendar
|
||||
.name
|
||||
Calendar view
|
||||
.des
|
||||
A page that looks like a calendar, with months shown for any month that you've submitted a journal entry. Each day on the calendar with entries for that day shows a number of how many entries were submitted on that day, and clicking the day brings you to the [view[day]] view.
|
||||
.url
|
||||
http://www.livejournal.com/users/exampleusername/calendar
|
||||
}
|
||||
|
||||
{ day
|
||||
.name
|
||||
Day view
|
||||
.des
|
||||
After clicking a day on the [view[calendar]] view, the user can see all the journal entries recorded on one specific day.
|
||||
.url
|
||||
http://www.livejournal.com/users/bradfitz/day?year=1999&month=11&day=8
|
||||
}
|
||||
|
||||
#{ search
|
||||
#.name
|
||||
#Search page
|
||||
#.des
|
||||
#From the user's search page, people can search their journal for keywords in a certain time frame.
|
||||
#.url
|
||||
#http://www.livejournal.com/users/test/search
|
||||
#}
|
||||
|
||||
#{ searchres
|
||||
#.name
|
||||
#Search Results
|
||||
#.des
|
||||
#After going to the user's [view[search]] page and submitting something to search for, they see
|
||||
#the search results view.
|
||||
#.url
|
||||
#http://www.livejournal.com/users/test/search?BeOS
|
||||
#}
|
||||
|
||||
{ friends
|
||||
.name
|
||||
Friends View
|
||||
.des
|
||||
Shows what all of the user's friends have been doing, all mixed in together in a page
|
||||
that looks almost identical to the [view[lastn]] view.
|
||||
.url
|
||||
http://www.livejournal.com/users/exampleusername/friends
|
||||
}
|
||||
Reference in New Issue
Block a user