Compare commits

..

3 Commits

Author SHA1 Message Date
Markus Lude
4a8bc551e2 (InitVariables): Fixed warning if $LastUpdate is undefined
(ResolveId): Return list with empty values as fallback to avoid warnings
in functions which call ResolveId()
(DoRc): Initialize $ts to 0 to avoid warnings
(GetRc): restored part of comment which got lost
(EncodePage): Initialize $result to avoid warning when adding strings
2005-12-11 20:09:12 +00:00
Markus Lude
07d17a83e1 (ValidId): Return when $id is undefined before doing a
replacement in order to not get a warning.
(InitVariables): Set $LastUpdate on every request and
reinitialize some variables in case the server runs several
mod_perl processes.
2005-12-11 18:41:00 +00:00
Alex Schroeder
c444ee65dd unfinished move to get -wT working 2005-12-04 10:31:47 +00:00
548 changed files with 19511 additions and 89458 deletions

8
.gitignore vendored
View File

@@ -1,8 +0,0 @@
*~
/build/
\#*\#
/test-data
/Mac/pkg/
*.dmg
*.pkg
.DS_Store

View File

@@ -27,7 +27,7 @@ my @path = split(/\//, $ENV{REDIRECT_URL});
my $file = $path[$#path];
# for dynamic pages
our ($NotFoundHandlerExceptionsPage);
use vars qw($NotFoundHandlerExceptionsPage);
$NotFoundHandlerExceptionsPage = 'NoCachePages';
$RunCGI = 0;
do $script;

16
BUGS Normal file
View File

@@ -0,0 +1,16 @@
I've seen a bug that shows as follows: <strong class="changes">think
it belongs anymore.</stron><strong class="changes">g>.
Is DiffHtmlMarkWords called twice for a chunk?
It seems that following the diff link from RC to a page that has
a minor edit at the end will show a minor diff instead of a major
diff, eventhough it *says* that it will show a major diff!
mod_perl:
After a while, the script forgets some pages, so that links to these
pages turn into questionmarks.
From time to time, the script will show for a page X the page content
of the previous page.

4165
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

884
GPL
View File

@@ -1,626 +1,285 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
13. Use with the GNU Affero General Public License.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
14. Revised Versions of this License.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
NO WARRANTY
15. Disclaimer of Warranty.
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -645,30 +304,37 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

675
LICENSE
View File

@@ -1,675 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,48 +1,72 @@
# In order to build a copy of Oddmuse with all the version numbers, use:
# make build. This creates modified copies of the files in the build
# subdirectory.
# The Makefile is only for developpers wanting to prepare the tarball.
# Make sure the CVS keywords for the sed command on the next line are not expanded.
VERSION_NO=$(shell git describe --tags)
TRANSLATIONS=$(wildcard modules/translations/[a-z]*.pl$)
VERSION=oddmuse-$(shell sed -n -e 's/^.*\$$Id: wiki\.pl,v \([0-9.]*\).*$$/\1/p' wiki.pl)
TRANSLATIONS=$(wildcard modules/translations/[a-z]*-utf8.pl$)
MODULES=$(wildcard modules/*.pl)
BUILD=build/wiki.pl $(foreach file, $(notdir $(MODULES)) $(notdir $(TRANSLATIONS)), build/$(file))
# PREPARE/BUILD: this creates copies of wiki.pl and all the modules
# and translations in the build subdirectory. These copies all contain
# a reference to the revision they were created from (git describe
# --tags).
dist: $(VERSION).tar.gz
prepare: build $(BUILD)
upload: $(VERSION).tar.gz $(VERSION).tar.gz.sig
curl -T $(VERSION).tar.gz ftp://savannah.gnu.org/incoming/savannah/oddmuse/
curl -T $(VERSION).tar.gz.sig ftp://savannah.gnu.org/incoming/savannah/oddmuse/
build:
mkdir -p build
upload-text: new-utf8.pl
wikiupload new-utf8.pl http://www.oddmuse.org/cgi-bin/oddmuse-en/New_Translation_File
clean:
rm -rf build
$(VERSION).tar.gz:
rm -rf $(VERSION)
mkdir $(VERSION)
cp README FDL GPL ChangeLog wiki.pl $(TRANSLATIONS) $(MODULES) $(VERSION)
tar czf $(VERSION).tar.gz $(VERSION)
build/wiki.pl: wiki.pl
perl -lne "s/(\\\$$q->a\({-href=>'http:\/\/www.oddmuse.org\/'}, 'Oddmuse'\))/\\\$$q->a({-href=>'http:\/\/git.savannah.gnu.org\/cgit\/oddmuse.git\/tag\/?id=$(VERSION_NO)'}, 'wiki.pl') . ' ($(VERSION_NO)), see ' . \$$1/; print" < $< > $@
%.tar.gz.sig: %.tar.gz
gpg --sign -b $<
build/%-utf8.pl: modules/translations/%-utf8.pl
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, 'translations\/', '$(VERSION_NO)')/; print" < $< > $@
# 1. update-translations (will fetch input from the wiki, and updates files)
# 2. check changes, cvs commit
# 3. upload-translations (will verify cvs status, upload scripts, and upload pages)
build/national-%.pl: modules/translations/national-%.pl
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, 'translations\/', '$(VERSION_NO)')/; print" < $< > $@
build/month-names-%.pl: modules/translations/month-names-%.pl
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, 'translations\/', '$(VERSION_NO)')/; print" < $< > $@
# from: http://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl
# to: http://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl?id=2.1-11-gd4f1e27
build/%.pl: modules/%.pl
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, undef, '$(VERSION_NO)')/; print" < $< > $@
translations: $(TRANSLATIONS)
for f in $^; do \
echo updating $$f...; \
perl oddtrans -l $$f wiki.pl $(MODULES) > $$f-new && mv $$f-new $$f; \
update-translations: always
for f in $(TRANSLATIONS); do \
echo $$f...; \
sleep 5; \
make $$f; \
done
upload-translations: always
for f in $(TRANSLATIONS); do \
cvs status $$f | grep 'Status: Up-to-date'; \
wikiput -u cvs -s update http://www.oddmuse.org/cgi-bin/oddmuse/raw/$$f < $$f; \
emacswiki-upload-cgi $$f; \
done
%-utf8.pl: always
f=`basename $@` && wget -q http://www.oddmuse.org/cgi-bin/oddmuse/raw/$$f -O $@.wiki
grep '^\(#\|\$$\)' $@.wiki > $@-new
perl oddtrans -l $@ -l $@.wiki wiki.pl $(MODULES) >> $@-new && mv $@-new $@
.PHONY: always
deb:
equivs-build control
install:
@echo This only installs the deb file, not the script itself.
dpkg -i oddmuse*.deb
test:
prove t
perl -T test.pl
package-upload: debian-$(VERSION).tar.gz debian-$(VERSION).tar.gz.sig
curl -T "{debian-$(VERSION).tar.gz,debian-$(VERSION).tar.gz.sig}" \
ftp://savannah.gnu.org/incoming/savannah/oddmuse/
package: debian-$(VERSION).tar.gz
gpg --ascii --encrypt $<
debian-$(VERSION).tar.gz:
rm -rf $(VERSION)
mkdir $(VERSION)
cp README FDL GPL wiki.pl $(VERSION)
tar czf $@ $(VERSION)

View File

@@ -16,22 +16,22 @@
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);
AddModuleDescription('search-shortcut.pl', 'Comments on Searching');
package OddMuse;
our ($FullUrl);
$RunCGI = 0;
require 'wiki.pl';
*OldGetHeader = \&GetHeader;
*GetHeader = \&NewGetHeader;
sub NewGetHeader {
my $html = OldGetHeader(@_);
my $label = T('Search:');
my $form = qq{<form class="tiny" action="$FullUrl"><p>$label }
. qq{<input type="text" name="search" size="20" />}
. qq{</p></form>};
$html =~ s{</span>}{</span>$form};
return $html;
sub handler {
my $r = shift;
for my $var (qw{DataDir UseConfig ConfigFile ModuleDir ConfigPage
AdminPass EditPass ScriptName FullUrl}) {
no strict "refs";
$$var = $ENV{"Wiki$var"} if exists $ENV{"Wiki$var"}; # symbolic references
}
DoWikiRequest();
return Apache2::Const::OK;
}

48
README Normal file
View File

@@ -0,0 +1,48 @@
This is the README file distributed together with the Oddmuse script.
To install the script, copy wiki.pl into your cgi-bin directory. This
will store the pages in a temporary directory for you. In order to
make this permanent, change the $DataDir option in the script from
'/tmp/oddmuse' to 'oddmuse'. This will save the pages in a
subdirectory of your cgi-bin directory.
In order to start your wiki, click on the edit link (the first link
below the navigation bar, at the bottom of the page). This will allow
you to enter some text for this page. Click the Save button and you
are done.
To add new pages, edit the homepage and add links to new pages. Links
are traditionally formed by ConcatenatingCapitalizedWords. This kind
of link pattern is called a wiki word.
Alternatively, put links in [[double square brackets]]. This kind of
link pattern is called a free link.
As long as the new pages don't exist, links to these pages are
followed by a clickable question mark. Click on the question mark to
create the new page.
Enjoy your wiki experience.
Visit http://www.oddmuse.org/ to learn more about the translation
files and modules that are part of this package.
----------------------------------------------------------------------
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Both the GNU Free Documentation License, and the GNU General Public
License are distributed together with this script. See the files FDL
and GPL, respectively.

View File

@@ -1,157 +0,0 @@
This is the README file distributed together with the
[[https://oddmuse.org/|Oddmuse]] script.
== Installing Oddmuse on a Debian System running Apache
The following instructions require a number of tools. You can make sure
they're all installed by issuing the following command as {{{root}}}:
{{{
apt-get install coreutils apache2 sudo wget w3m perl \
libwww-perl libxml-rss-perl diffutils
}}}
You probably created an account for yourself. You might have to add this
user to the {{{sudo}}} group. Here's how I created my own user as
{{{root}}}:
{{{
adduser alex
usermod -a -G sudo alex
}}}
Now you can login as {{{alex}}} and do everything else using {{{sudo}}}.
You need to copy wiki.pl into your cgi-bin directory, and you need to
make the script executable.
{{{
sudo wget -O /usr/lib/cgi-bin/wiki.pl \
http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.pl
sudo chmod +x /usr/lib/cgi-bin/wiki.pl
}}}
You should be able to test it right now! Visit
{{{http://localhost/cgi-bin/wiki.pl}}}. If your site is available from
the outside, you will be able to use a normal browser. If don't have a
domain name yet, you'll probably have to use a text browser like
{{{w3m}}}.
{{{
w3m http://localhost/cgi-bin/wiki.pl
}}}
If you create pages in this wiki, these will get stored in a temporary
directory. You need change the data directory from {{{"/tmp/oddmuse"}}}
to like {{{"/var/local/oddmuse"}}}. The best way to do this without
changing {{{wiki.pl}}} is by editing
{{{/etc/apache2/sites-available/default}}}. Add the following line:
{{{
SetEnv WikiDataDir /var/local/oddmuse
}}}
Enable the default site by calling the following command:
{{{
sudo a2ensite default
}}}
Reload the Apache configuration by calling the following command:
{{{
sudo service apache2 reload
}}}
You need to create the new data directory. You webserver runs CGI
scripts as {{{www-data}}}. Thus, you need to change the owner and group
of the directory to {{{www-data}}}.
{{{
sudo mkdir -p /var/local/oddmuse
sudo chown www-data.www-data /var/local/oddmuse
}}}
Done! Visit your wiki and start editing. Click on the edit link (the
first link below the navigation bar, at the bottom of the page). This
will allow you to enter some text for this page. Click the Save button
and you are done.
To add new pages, edit the homepage and add links to new pages by
putting their names in {{{[[double square brackets]]}}}.
Enjoy your wiki experience.
Visit https://www.oddmuse.org/ to learn more about the translation
files and modules that are part of this package.
== Apache
If you think this information doesn't work for you, here are some things
to check.
Apache's config directory is {{{/etc/apache2/apache2.conf}}}. This is
where we get the {{{www-data}}} username from. It says:
{{{
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
}}}
Checking {{{/etc/apache2/envvars}}} we see the following:
{{{
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
}}}
So that's what we're using in the {{{chown}}} command in our
instructions above.
The default site is configured in
{{{/etc/apache2/sites-available/default}}}. In order for it to be
//enabled//, there must be a symlink from a file in
{{{/etc/apache2/sites-enabled}}} to the file in
{{{sites-available}}}. You can enable it using the following command:
{{{
sudo a2ensite default
}}}
This file also lists the directories we've used in out instructions
above.
{{{
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
}}}
This means that {{{http://localhost/cgi-bin/wiki.pl}}} will call
{{{/usr/lib/cgi-bin/wiki.pl}}}
Don't forget to reload the Apache configuration as shown above, or
simply restart it all:
{{{
sudo service apache2 graceful
}}}
----------------------------------------------------------------------
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Both the GNU Free Documentation License, and the GNU General Public
License are distributed together with this script. See the files FDL
and GPL, respectively.

View File

@@ -1,8 +0,0 @@
Code for Special Circumstances
==============================
The files in this directory serve a particular purpose which might be
of interest to others. These are not generic scripts (there is a
separate directory for those). These are CGI scripts that post to a
Campaign Wiki, that allow you to edit wikis using Emacs, that copy
data from a particular site and post them to the Emacs Wiki.

View File

@@ -1,37 +0,0 @@
The files in this directory are used to run http://campaignwiki.org/
add-link.pl
===========
This is used to add links to the Links To Wisdom wiki. This wiki is a
bookmark site: A few pages make up a big unordered list of links in
wiki format. add-link is a tool to help users contribute new links to
the list.
http://campaignwiki.org/wiki/LinksToWisdom/HomePage
copy.pl
=======
This is used to copy the text from a web page to a wiki page. The idea
was to keep archive copies of cool pages somewhere. The Blog Archive
never got used, though.
http://campaignwiki.org/wiki/BlogArchive/HomePage
monster-tag.pl
==============
This is used to quickly tag many pages in the Monsters wiki. The
Monsters wiki hasn't been used in a long time, though.
http://campaignwiki.org/wiki/Monsters/HomePage
submit.pl
=========
This used to be used to add sites to the Old School RPG Planet. The
aggregator was configured via a wiki page on the Planet wiki. It's now
abandoned.
http://campaignwiki.org/wiki/Planet/HomePage

View File

@@ -1,349 +0,0 @@
#! /usr/bin/perl
# Copyright (C) 20112015 Alex Schroeder <alex@gnu.org>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
package OddMuse;
use LWP::UserAgent;
use HTML::TreeBuilder;
use JSON::PP;
use utf8;
# load Oddmuse core
$RunCGI = 0;
do "wiki.pl";
# globals depending on the name of the script
my ($self, $name, $wiki);
if ($0 eq '/home/alex/campaignwiki.org/add-link.pl') {
$self = "https://campaignwiki.org/add-link";
$name = "OSR Links to Wisdom";
$wiki = 'LinksToWisdom';
} elsif ($0 eq '/home/alex/campaignwiki.org/add-adventure.pl') {
$self = "https://campaignwiki.org/add-adventure";
$name = "OSR Links to Adventures";
$wiki = 'Adventures';
} else {
ReportError('Cannot determine wiki!', '500 INTERNAL SERVER ERROR');
}
# derived variables
my $site = "https://campaignwiki.org/wiki/$wiki";
# my $site = "http://localhost/wiki.pl";
my $home = "$site/$HomePage";
# http://www.emacswiki.org/pics/star.png
my $stardata = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAFVBMVEUAAHkAAACzdRTapx3twwD/9qb////1YCa0AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfXAQYCJAu+WhwbAAAAKnRFWHRDb21tZW50AGJ5IFJhZG9taXIgJ1RoZSBTaGVlcCcgRG9waWVybGFza2kVfTXbAAAAYElEQVQI12NgQAKMMIaYAFTAzRDKCHOEMETCnEFyjIJhYS6OggwMoqGhaS7GRgIMjC6uYc5GikA5YRcXIyWwotBgJUWw7lAXsAyDaIihMlhK1FFA0AjEEAESQgJQu4EYAPAPC2XcokgQAAAAAElFTkSuQmCC';
main();
sub canonical {
my $url = shift;
# handle blogspot domain munging
$url =~ s/blogspot(\.[a-z]+)+/blogspot.com/;
return $url;
}
sub toc {
# start with the homepage
my @values;
my %labels;
for my $id (GetPageContent($HomePage) =~ /\* \[\[(.*?)\]\]/g) {
push @values, $id;
for my $item (GetPageContent(FreeToNormal($id)) =~ /(\*+ [^][\n]*)$/mg) {
my $value = $item;
my $label = $item;
$value =~ s/\* *//g;
push @values, $value;
$label =~ s/\* *//g; # EM SPACE
$labels{$value} = $label;
}
}
return \@values, \%labels;
}
sub top {
# start with the homepage
my %blog;
my $n;
for my $id (GetPageContent($HomePage) =~ /\* \[\[(.*?)\]\]/g) {
for my $item (GetPageContent(FreeToNormal($id)) =~ /^\*+\s+\[(https?:\/\/[^\/\n\t ]+)/mg) {
$n++;
$blog{canonical($item)}++;
}
}
print $q->p("Total links counted: $n.");
my @list = sort { $blog{$b} <=> $blog{$a} } keys %blog;
# my $max = scalar @list;
# $max = 20 if $max > 20;
# @list = @list[0 .. $max -1];
@list = map {
my $domain = substr($_, index($_, '://') + 3);
my $term = quotemeta($domain);
# handle blogspot domain munging
$term =~ s/blogspot\\\.com/blogspot(\\.[a-z]+)+/;
$term = QuoteHtml($term);
$q->a({-href => $_}, $domain)
. " (" . $q->a({-href => "$self/match/$term"}, $blog{$_}) . ")";
} @list;
return \@list;
}
sub match {
my $term = shift;
# start with the homepage
my @list;
my $title;
for my $id (GetPageContent($HomePage) =~ /\* \[\[(.*?)\]\]/g) {
for my $line (split /\n/, GetPageContent(FreeToNormal($id))) {
if ($line =~ /^\*+\s+([^][\n]*)$/) {
$title = $1;
} elsif ($line =~ /$term/o) {
if ($line =~ /^\*+\s+\[(https?:\S+)\s+([^]]+)\]/) {
push (@list, $q->a({-href => $1}, $2) . " (" . $title . ")");
}
}
}
}
return \@list;
}
sub html_toc {
my ($values, $labels) = toc();
return $q->radio_group(-name =>'toc',
-values => $values,
-labels => $labels,
-linebreak=>'true');
}
sub default {
print $q->p("Add a link to the " . $q->a({-href=>$home}, $name) . ".");
print $q->start_multipart_form(-method=>'get', -class=>'submit');
print $q->p($q->label({-for=>'url'}, T('URL:')) . ' '
. $q->textfield(-name=>'url', -id=>'url', -size=>80));
print $q->p({-style=>'font-size: 10pt'},
"(Drag this bookmarklet to your bookmarks bar for easy access:",
$q->a({-href=>q{javascript:location='}
. $q->url()
. qq{?url='+encodeURIComponent(window.location.href)}},
"Submit $name") . ".)");
print html_toc();
print $q->submit('go', 'Add!');
print $q->end_form();
}
sub links {
# start with the homepage
my @links; # [["url", "title", "page id"], ...]
for my $id (GetPageContent($HomePage) =~ /\* \[\[(.*?)\]\]/g) {
for my $item (GetPageContent(FreeToNormal($id)) =~ /^\*+\s+\[(https?:\/\/.*?)\]/mg) {
my ($url, $title) = split(/\s+/, $item, 2);
push(@links, [$url, $title, $id]);
}
}
return @links;
}
sub is_duplicate {
my $url = shift;
for my $link (links()) {
if ($link->[0] eq $url) {
print $q->p($q->strong("Oops, we seem to have a problem!"));
print $q->p(GetPageLink(NormalToFree($link->[2])),
" already links to the URL you submitted:",
GetUrl($link->[0], $link->[1]));
return 1;
}
}
return 0;
}
sub confirm {
my ($url, $name, $toc) = @_;
print $q->p("Please confirm that you want to add "
. GetUrl($url, $name)
. " to the section “$toc”.");
print $q->start_form(-method=>'get');
print $q->p($q->label({-for=>'name', -style=>'display: inline-block; width: 15em'},
T('Use a different link name:')) . ' '
. $q->textfield(-style=>'display: inline-block; width:50ex',
-name=>'name', -id=>'name', -size=>50, -default=>$name)
. $q->br()
. $q->label({-for=>'summary', -style=>'display: inline-block; width:15em'},
T('An optional short summary:')) . ' '
. $q->textfield(-style=>'display: inline-block; width:50ex',
-name=>'summary', -id=>'summary', -size=>50)
. $q->br()
. $q->label({-for=>'username', -style=>'display: inline-block; width:15em'},
T('Your name for the log file:')) . ' '
. $q->textfield(-style=>'display: inline-block; width:50ex',
-name=>'username', -id=>'username', -size=>50));
my $star = $q->img({-src=>$stardata, -class=>'smiley', -alt=>'☆'});
print '<p>Optionally: Do you want to rate it?<br />';
my $i = 0;
foreach my $label ($q->span({-style=>'display: inline-block; width:3em'}, $star)
. 'I might use this for my campaign',
$q->span({-style=>'display: inline-block; width:3em'}, $star x 2)
. 'I have used this in a campaign and it worked as intended',
$q->span({-style=>'display: inline-block; width:3em'}, $star x 3)
. 'I have used this in a campaign and it was ' . $q->em('great')) {
$i++;
print qq{<label><input type="radio" name="stars" value="$i" $checked/>$label</label><br />};
}
print '</p>';
print $q->hidden('url', $url);
print $q->hidden('toc', $toc);
print $q->hidden('confirm', 1);
print $q->submit('go', 'Continue');
print $q->end_form();
}
# returns unquoted html
sub get_name {
my $url = shift;
my $tree = HTML::TreeBuilder->new_from_content(GetRaw($url));
my $h = $tree->look_down('_tag', 'title');
$h = $tree->look_down('_tag', 'h1') unless $h;
$h = $h->as_text if $h;
return $h;
}
sub post_addition {
my ($url, $name, $toc, $summary) = @_;
my $id = FreeToNormal($name);
my $display = $name;
utf8::decode($display); # we're dealing with user input
utf8::decode($summary); # we're dealing with user input
print $q->p("Adding ", GetUrl($url, $display), " to “$toc”.");
# start with the homepage
my @pages = GetPageContent($HomePage) =~ /\* \[\[(.*?)\]\]/g;
for my $id (@pages) {
return post($id, undef, $name, $summary, $url, GetParam('stars', '')) if $id eq $toc;
my $data = GetPageContent(FreeToNormal($id));
while ($data =~ /(\*+ ([^][\n]*))$/mg) {
return post($id, $1, $name, $summary, $url, GetParam('stars', '')) if $2 eq $toc;
}
}
print $q->p("Whoops. I was unable to find “$toc” in the wiki. Sorry!");
}
sub post {
my ($id, $toc, $name, $summary, $url, $stars) = @_;
my $data = GetPageContent(FreeToNormal($id));
my $re = quotemeta($url);
if ($data =~ /$re\s+(.*?)\]/) {
my $display = $1;
print $q->p($q->strong("Oops, we seem to have a problem!"));
print $q->p(GetPageLink(NormalToFree($id)),
" already links to the URL you submitted:",
GetUrl($url, $display));
return;
}
$stars = ' ' . (':star:' x $stars) if $stars;
$summary = ': ' . $summary if $summary;
if ($toc) {
$toc =~ /^(\*+)/;
my $depth = "*$1"; # one more!
my $regexp = quotemeta($toc);
$data =~ s/$regexp/$toc\n$depth \[$url $name\]$summary$stars/;
} else {
$data = "* [$url $name]$summary$stars\n" . $data;
}
my $ua = LWP::UserAgent->new;
my %params = (text => $data,
title => $id,
summary => $name,
username => GetParam('username'),
pwd => GetParam('pwd'));
# spam fighting modules
$params{$QuestionaskerSecretKey} = 1 if $QuestionaskerSecretKey;
$params{$HoneyPotOk} = time if $HoneyPotOk;
my $response = $ua->post($site, \%params);
if ($response->is_error) {
print $q->p("The submission failed!");
print $response->content;
} else {
print $q->p("See for yourself: ", GetPageLink($id));
}
}
sub print_end_of_page {
print $q->p('Questions? Send mail to Alex Schroeder <'
. $q->a({-href=>'mailto:kensanata@gmail.com'},
'kensanata@gmail.com') . '>');
print $q->end_div();
PrintFooter();
}
sub main {
$ConfigFile = "$DataDir/config"; # read the global config file
$DataDir = "$DataDir/$wiki"; # but link to the local pages
Init(); # read config file (no modules!)
$ScriptName = $site; # undo setting in the config file
$FullUrl = $site; #
InitPageVariables(); # call again: $ScriptName was wrong
binmode(STDOUT,':utf8');
$q->charset('utf8');
if ($q->path_info eq '/source') {
seek DATA, 0, 0;
print "Content-type: text/plain; charset=UTF-8\r\n\r\n", <DATA>;
} elsif ($q->path_info eq '/structure') {
my ($values, $labels) = toc();
my @indented = map {
($labels->{$_} || $_) =~ /^(*)/;
[$_, length($1)]
} @$values;
print "Content-type: application/json; charset=UTF-8\r\n\r\n";
binmode(STDOUT,':raw'); # because of encode_json
print JSON::PP::encode_json(\@indented);
} elsif ($q->path_info eq '/toc') {
my ($values, $labels) = toc();
print "Content-type: application/json; charset=UTF-8\r\n\r\n";
binmode(STDOUT,':raw'); # because of encode_json
print JSON::PP::encode_json($values);
} elsif ($q->path_info eq '/top') {
print GetHeader('', 'Top Blogs');
print $q->start_div({-class=>'content top'});
print $q->ol($q->li(top()));
print_end_of_page();
} elsif ($q->path_info =~ '^/match/(.*)') {
my $term = $1;
print GetHeader('', "Entries Matching '$term'");
print $q->start_div({-class=>'content match'});
print $q->ol($q->li(match($term)));
print_end_of_page();
} else {
push(@UserGotoBarPages, 'Help');
$UserGotoBar = $q->a({-href=>$q->url . '/source'}, 'Source');
print GetHeader('', 'Submit a new link');
print $q->start_div({-class=>'content index'});
my $url = canonical(GetParam('url'));
my $name = UnquoteHtml(GetParam('name', get_name($url)));
my $toc = GetParam('toc');
my $confirm = GetParam('confirm');
my $summary = GetParam('summary');
if (not $url) {
default();
} elsif (not $toc) {
default() if not is_duplicate($url);
} elsif (not $confirm) {
confirm($url, $name, $toc);
} else {
post_addition($url, $name, $toc, $summary);
}
print_end_of_page();
}
}
__DATA__

View File

@@ -1,201 +0,0 @@
#! /usr/bin/perl
# Copyright (C) 20112014 Alex Schroeder <alex@gnu.org>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
package OddMuse;
use LWP::UserAgent;
use HTML::TreeBuilder;
use utf8;
# load Oddmuse core
$RunCGI = 0;
do "wiki.pl";
$default_namespace = 'NameOfYourWiki';
main();
sub default {
my ($url, $ns) = @_;
print $q->start_multipart_form(-method=>'get', -class=>'copy');
print $q->p("This script helps you copy of a blog post to your Campaign Wiki.");
print $q->p($q->label({-for=>'url', -style=>'display: inline-block; width: 20ex'}, 'Blog post URL:'),
$q->textfield(-name=>'url', -id=>'url', -size=>50),
$q->br(),
$q->label({-for=>'ns', -style=>'display: inline-block; width: 20ex'}, 'Name of your wiki:'),
$q->textfield(-name=>'ns', -id=>'ns', -size=>50, -default=>$default_namespace));
if ($url and not $ns) {
print $q->p($q->em('Please provide the name of your wiki. It is mandatory. Use “NameOfYourWiki” if you just want to test something.'));
}
print $q->submit('go', 'Go!');
print $q->end_form();
print $q->p("Please make sure youre only submitting your own articles",
"or articles with an appropriate license.");
print $q->p("Drag this bookmarklet to your bookmarks bar for easy access:",
$q->a({-href=>q{javascript:location='http://campaignwiki.org/copy?url='+encodeURIComponent(window.location.href)}}, 'Copy Blog Post') . ".");
}
sub confirm_overwrite {
my ($url, $ns, $name) = @_;
print $q->p("We already have a page with that name: ", GetPageLink($name));
print $q->start_multipart_form(-method=>'get', -class=>'submit');
print $q->p($q->label({-for=>'name'}, T('New name:')) . ' '
. $q->textfield(-name=>'name', -id=>'name', -size=>50, -default=>$name));
print $q->hidden('url', $url);
print $q->hidden('ns', $ns);
print $q->hidden('confirm', 1);
print $q->submit('go', 'Continue');
print $q->end_form();
}
sub confirm_save {
my ($url, $ns, $name) = @_;
my $ns = GetParam('ns', $default_namespace);
print $q->p("Please confirm that you want to copy",
$q->a({-href=>$url}, "this article"), "to", GetPageLink($HomePage, $ns) . ".");
print $q->start_multipart_form(-method=>'get', -class=>'submit');
print $q->p($q->label({-for=>'name'}, T('Name:')) . ' '
. $q->textfield(-name=>'name', -id=>'name', -size=>50, -default=>$name));
print $q->hidden('url', $url);
print $q->hidden('ns', $ns);
print $q->hidden('confirm', 1);
print $q->submit('go', 'Continue');
print $q->end_form();
}
sub get_data {
my $url = shift;
my $tree = HTML::TreeBuilder->new_from_content(GetRaw($url));
my $h = $tree->look_down('_tag', 'h1');
$h = $tree->look_down('_tag', 'title') unless $h;
$h = $h->as_text if $h;
my $b;
if ($b = $tree->look_down('_tag', 'div', 'class', qr/post-body/)) {
# Blogspot
$b = html($b);
} elsif ($b = $tree->look_down('_tag', 'div', 'class', qr/content/)) {
# Oddmuse
$b = html($b);
} else {
# default: get it all
$b = html($tree->look_down('_tag', 'body'));
}
# common illegal character for page names
$h =~ s/:/,/g;
return ($h, $b);
}
sub html {
my ($tree, $p) = @_;
# $p indicates whether we need an empty line or not
my $str;
for my $element ($tree->content_list()) {
if (not ref $element) {
$str .= $element;
} elsif ($element->tag() eq 'p') {
$str .= ($p == 1 ? "\n\n" : "") . html($element);
$p = 1;
} elsif ($element->tag() eq 'br') {
$str .= "\n\n";
} elsif ($element->tag() eq 'span'
and $element->attr('style') =~ /font-weight: *bold/) {
$str .= "[b]" . html($element) . "[/b]";
} elsif ($element->tag() =~ m/^(b|i|h[1-6])$/) {
$str .= "[$1]" . html($element) . "[/$1]";
} elsif ($element->tag() eq 'a'
and $element->attr('href')) {
$str .= "[url=" . $element->attr('href') . "]" . html($element) . "[/url]";
} elsif ($element->tag() eq 'img'
and $element->attr('src')) {
$str .= "[img]" . $element->attr('src') . "[/img]";
} elsif ($element->tag() eq 'pre') {
$str .= "\n\n[code]\n" . $element->as_text() . "\n[/code]";
$p = 1;
} elsif ($element->tag() eq 'div'
and ($element->attr('style') =~ /float: *(left|right)/
or $element->attr('style') =~ /text-align: *(center)/)) {
$str .= "\n[$1]" . html($element) . "[/$1]";
$p = 1;
} else {
$str .= html($element);
}
}
return $str;
}
sub name_exists {
my $id = FreeToNormal(shift);
AllPagesList();
my $string = GetPageContent($id);
return ($IndexHash{$id}
and substr($string, 0, length($DeletedPage)) ne $DeletedPage);
}
sub post_addition {
my ($url, $ns, $name, $data) = @_;
my $id = FreeToNormal($name);
print $q->p("Copying ", $q->a({-href=>$url}, "the blog post") . "…");
my $text = "Based on [$url $name].\n----\n" . $data;
my $ua = LWP::UserAgent->new;
my %params = (text => $text,
title => $id,
summary => $name,
username => GetParam('username'),
ns => $ns,
pwd => GetParam('pwd'));
$params{$QuestionaskerSecretKey} = 1 if $QuestionaskerSecretKey;
my $response = $ua->post($FullUrl, \%params);
if ($response->is_error) {
print $q->p("Copying failed!");
print $q->p($q->strong($response->status_line));
print $response->content;
} else {
print $q->p("Your copy: ", GetPageLink($name) . ".");
}
}
sub main {
Init();
if ($q->path_info eq '/source') {
seek DATA, 0, 0;
print "Content-type: text/plain; charset=UTF-8\r\n\r\n", <DATA>;
} else {
$UserGotoBar .= $q->a({-href=>$q->url . '/source'}, 'Source');
print GetHeader('', 'Copy a blog article');
print $q->start_div({-class=>'content index'});
my $url = GetParam('url');
my $ns = GetParam('ns');
if (not $url or not $ns) {
default($url, $ns);
} else {
my ($name, $data) = get_data($url);
$name = GetParam('name', $name);
if (name_exists($name) and not GetParam('confirm', 0)) {
confirm_overwrite($url, $ns, $name);
} elsif (not GetParam('confirm', 0)) {
confirm_save($url, $ns, $name);
} else {
post_addition($url, $ns, $name, $data);
}
}
print $q->p('Questions? Send mail to Alex Schröder <'
. $q->a({-href=>'mailto:kensanata@gmail.com'},
'kensanata@gmail.com') . '>');
print $q->end_div();
PrintFooter();
}
}
__DATA__

View File

@@ -1,127 +0,0 @@
#! /usr/bin/perl
# Copyright (C) 2011 Alex Schroeder <alex@gnu.org>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
package OddMuse;
# load Oddmuse core
$RunCGI = 0;
do "wiki.pl";
sub unique {
my %h = map {$_ => 1} @_;
return sort keys %h;
}
sub tag {
print '<ul>';
for my $id ($q->param) {
if ($IndexHash{$id} and UserCanEdit($id, 1)) {
my $tags = $q->param($id);
$tags =~ s{"(.*?)"}{$_ = $1; s/ +/_/g; $_ }eg;
my @tags = unique(map { s/_/ /g; $_ } split(' ', $tags));
my $tagline = "Tags: " . join (' ', map { "[[tag:$_]]" } @tags);
OpenPage($id);
my $text = $Page{text};
# delete existing taglines
$text =~ s/\n+Tags: .*//g;
if (@tags) {
$text .= "\n\n$tagline\n";
}
if ($text ne $Page{text}) {
RequestLockOrError(); # fatal
print $q->li(GetPageLink($id) . " tagged " . join(', ', @tags));
Save($id, $text, 'Tagged ' . join(', ', @tags), 1);
ReleaseLock();
}
}
}
print '</ul>';
print $q->p(ScriptLink('action=rc;showedit=1', $RCName));
}
sub tags {
my $id = shift;
OpenPage($id);
my @tags = ();
while ($Page{text} =~ m/\[\[tag:$FreeLinkPattern(?:\|([^]|]+))?\]\]/og) {
my $tag = $1;
$tag = qq{"$tag"} if $tag =~ / /;
push(@tags, $tag);
}
return join(" ", @tags);
}
sub item {
my $id = shift;
print $q->Tr($q->td(GetPageLink($id)),
$q->td($q->textfield(-name=>$id, -default=>tags($id), -size=>80)));
}
sub search {
print $q->start_multipart_form(-method=>'get', -class=>'submit');
print $q->p("Search term: "
. $q->strong($q->param('search')));
print '<table>';
SearchTitleAndBody($q->param('search'), \&item);
print '</table>';
print $q->hidden('tag', 'done');
print $q->submit('go', 'Go!');
print $q->end_form();
}
sub default {
print $q->start_multipart_form(-method=>'get', -class=>'submit');
print $q->p("Search term: "
. $q->textfield(-name=>'search'));
print $q->submit('go', 'Go!');
print $q->end_form();
}
sub main {
$ConfigFile = '/home/alex/campaignwiki/config';
$ModuleDir = '/home/alex/campaignwiki/modules';
$DataDir = '/home/alex/campaignwiki/Monsters';
Init();
$ScriptName = '/wiki/Monsters';
DoSurgeProtection();
if (not $BannedCanRead and UserIsBanned() and not UserIsEditor()) {
ReportError(T('Reading not allowed: user, ip, or network is blocked.'), '403 FORBIDDEN',
0, $q->p(ScriptLink('action=password', T('Login'), 'password')));
}
if ($q->path_info eq '/source') {
seek DATA, 0, 0;
print "Content-type: text/plain; charset=UTF-8\r\n\r\n", <DATA>;
} else {
$UserGotoBar .= $q->a({-href=>$q->url . '/source'}, 'Source');
print GetHeader('', 'Tag Monsters');
print $q->start_div({-class=>'content'});
if (GetParam('tag')) {
tag();
} elsif (GetParam('search')) {
search();
} else {
default();
}
print $q->p('Questions? Send mail to Alex Schröder <'
. $q->a({-href=>'mailto:kensanata@gmail.com'},
'kensanata@gmail.com') . '>');
print $q->end_div();
PrintFooter();
}
}
main();
__DATA__

View File

@@ -1,356 +0,0 @@
#!/usr/bin/perl
# Copyright (C) 2010, 2012 Alex Schroeder <alex@gnu.org>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
package OddMuse;
use URI;
use LWP::UserAgent;
use utf8;
# load Oddmuse core
$RunCGI = 0;
do "wiki.pl";
# globals
my $page = "Feeds";
my $site = "http://campaignwiki.org/wiki/Planet";
my $src = "$site/raw/$page";
my $target = "$site/$page";
$FullUrl = "http://campaignwiki.org/submit";
my %valid_content_type = ('application/atom+xml' => 1,
'application/rss+xml' => 1,
'application/xml' => 1,
'text/xml' => 1);
main();
sub default {
print $q->p("Submit a blog to the "
. $q->a({-href=>'http://campaignwiki.org/planet'},
'Old School RPG Planet') . ".");
print GetFormStart();
print $q->p($q->label({-for=>'url', -style=>'display: inline-block; width:30ex'},
T('URL:')) . ' '
. $q->textfield(-style=>'display: inline-block; width:60ex',
-name=>'url', -id=>'url', -size=>50)
. $q->br()
. $q->label({-for=>'username', -style=>'display: inline-block; width:30ex'},
T('Your name for the log file:')) . ' '
. $q->textfield(-style=>'display: inline-block; width:60ex',
-name=>'username', -id=>'username', -size=>50));
print $q->submit('go', 'Go!');
print $q->end_form();
print $q->p("Drag this bookmarklet to your bookmarks bar for easy access:",
$q->a({-href=>q{javascript:location='http://campaignwiki.org/submit?url='+encodeURIComponent(window.location.href)}}, 'Submit OSR Blog') . ".");
}
my %cached_blogs;
sub parse_blogs {
return %cached_blogs if %cached_blogs;
my @data = split(/\n/, GetRaw($src));
my $url;
my $paramref;
foreach $_ (@data) {
if (/^\[(.+)\]/) {
$url = $1;
$paramref = {};
} elsif (/^([a-z_]+) *= *(.+)/) {
$paramref->{$1} = $2;
}
if ($url && $paramref->{name}) {
$cached_blogs{$url} = $paramref;
}
}
return %cached_blogs;
}
sub host_exists {
my ($host, %blogs) = @_;
foreach my $candidate (keys %blogs) {
my $u = URI->new($candidate);
return $candidate if $host eq $u->host;
}
}
sub debug_url {
my $url = $q->url(-path_info=>1) . "?debug=1;";
$url .= join(";", map { $_ . "=" . GetParam($_) }
qw(username confirmed candidate url));
return $url;
}
sub check_url {
my $url = shift;
print $q->p("Debug: url=$url") if GetParam("debug");
my $frown = $q->img({-src=>"http://emacswiki.org/pics/smiles/sad.png",
-alt=>":("});
my $smile = $q->img({-src=>"http://emacswiki.org/pics/smiles/smile.png",
-alt=>":)"});
my $u = URI->new($url);
eval {$u->host };
if ($@) {
$url = 'http://' . $url;
$u = URI->new($url);
eval {$u->host };
}
# - not an url
# - it's campaign wiki site
# - no username
# or read Feeds page and
# - it's a duplicate
# - it's a partial match: continue with confirmed=1
# or read the list of alternatives from the url
# - one of the feeds listed is known: continue with confirmed=2
# - no feeds were listed: url is a feed or report it
# - one feed was listed: try it
# - some feeds were listed: pick one
if ($@) {
# the prefixing of http:// above should make it really hard to reach this code
print $q->p($q->a({-href=>$url}, $url) . qq{
seems to be <strong>invalid</strong>. $frown Make sure you use something
like the following: <tt>http://grognardia.blogspot.com/</tt>});
} elsif ($url =~ /campaignwiki\.org/i) {
print $q->p(qq{
This looks <strong>familiar</strong>!
I do not think that adding any of the wikis on this site is the right
thing to do, though.});
print $q->p(qq{Thanks for testing it. }
. $q->img({-src=>"http://www.emacswiki.org/pics/grin.png"}));
} elsif (not GetParam('username', '')) {
print $q->p(qq{As an anti-spam measure I'd really like you to
<strong>provide a name</strong> for the log file. Sorry about that. $frown});
} else {
my %blogs = parse_blogs();
my $duplicate = host_exists($u->host, %blogs);
if ($blogs{$url}) {
print $q->p("We already list ",
$q->a({-href=>$duplicate}, $duplicate));
} elsif ($duplicate && !GetParam('confirmed')) {
print $q->p("We have a partial match: ",
$q->a({-href=>$duplicate}, $duplicate));
print GetFormStart();
print $q->hidden('confirmed', 1);
print $q->hidden('url', $url);
print $q->submit('go', 'Proceed anyway!');
print $q->end_form();
} else {
my ($status, @alternatives) = get_feeds($url, %blogs);
if ($status eq 'known' && GetParam('confirmed') < 2) {
print $q->p($q->a({-href=>$url},
"The page you submitted")
. " lists "
. $q->a({-href=>$alternatives[0]},
"a known feed") . ".");
print GetFormStart();
print $q->hidden('confirmed', 2);
print $q->hidden('url', $url);
print $q->submit('go', 'Proceed anyway!');
print $q->end_form();
} elsif ($#alternatives < 0) {
if (is_feed($url)) {
post_addition($url);
} else {
print $q->p("Apparently " . $q->a({-href=>$url}, QuoteHtml($url))
. " is not a feed and doesn't link to any feed. "
. "There is nothing for me to add. " . $frown);
print $q->p("If you feel like it, you could try to "
. $q->a({-href=>debug_url()}, "debug")
. " this.");
}
} elsif ($#alternatives == 0) {
print $q->p($q->a({-href=>$url}, "The page you submitted")
. " lists "
. $q->a({-href=>$alternatives[0]},
"one new feed")
. ".");
print GetFormStart();
print $q->hidden('url', $alternatives[0]);
print $q->submit('go', 'Take it!');
print $q->end_form();
print $q->p("If you feel like it, you could try to "
. $q->a({-href=>debug_url()}, "debug")
. " this.");
} else {
print GetFormStart();
print $q->p("You need to pick one of the candidates:");
print $q->p(join($q->br(), map {
$q->input({-type=>"radio", -name=>"url", -value=>$_},
$q->a({-href=>$_}, QuoteHtml($_))) } @alternatives));
print $q->submit('go', 'Submit');
print $q->end_form();
}
}
}
}
sub is_feed {
my $url = shift;
my $ua = LWP::UserAgent->new;
my $response = $ua->get($url);
return unless $response->is_success;
return $valid_content_type{$response->content_type};
}
sub get_feeds {
my $url = shift;
my %others = @_;
my $html = GetRaw($url);
my @links = $html =~ /<link\b *(.*?)>/g;
print $q->p("Debug: " . scalar(@links) . " links found") if GetParam("debug");
print $q->pre($html) unless scalar(@links);
print $q->p("Debug: no content returned") if GetParam("debug") and not $html;
my @feeds;
foreach my $link (@links) {
print $q->p("Debug: $link")
if GetParam("debug");
if ($link !~ /\brel=(['"])alternate\1/i) {
print $q->p("Debug: missing rel='alternate'")
if GetParam("debug");
next;
}
$link =~ /\btype=(['"])(.*?)\1/i;
my $type = $2;
if (not $valid_content_type{$type}) {
print $q->p("Debug: type parameter is invalid ($type)")
if GetParam("debug");
next;
}
$link =~ /\bhref=(['"])(.*?)\1/i;
my $href = $2;
# clean up blogspot urls and prefer atom format
$href =~ s/\?alt=rss$//i if $href =~ /blogspot/i;
if (not $href) {
print $q->p("Debug: href missing")
if GetParam("debug");
next;
}
if ($others{$href}) {
print $q->p("Debug: feed already known ($href)")
if GetParam("debug");
if ($q->param('confirmed') >= 2) {
next;
} else {
# don't look for other alternatives!
return 'known', $href;
}
}
push(@feeds, $href);
}
print $q->p("Debug: returning " . scalar(@feeds) . " links found")
if GetParam("debug");
return 'ok', @feeds;
}
sub config {
my %blogs = @_;
my $result = qq{#! config file for the RPG Planet
# format:
# Feed URL in square brackets, followed by name = and the name of the feed
};
foreach my $url (sort {lc($blogs{$a}->{name}) cmp lc($blogs{$b}->{name})} keys %blogs) {
$result .= "[$url]\n";
$paramref = $blogs{$url};
foreach my $key (sort keys %{$paramref}) {
$result .= $key . " = " . $paramref->{$key} . "\n";
}
}
return $result;
}
sub post_addition {
my $url = shift;
print $q->p("Missing URL?") unless $url;
my ($title, $final_url) = get_title($url);
my %blogs = parse_blogs();
if ($blogs{$final_url}) {
print $q->p("The URL you ",
$q->a({-href=>$url}, 'picked'),
" is redirected to an URL we already list: ",
$q->a({-href=>$final_url}, $blogs{$final_url}),
".");
} else {
$title = $final_url unless $title;
print $q->p("Adding ",
$q->a({-href=>$final_url}, $title));
my %param = (name => $title);
$blogs{$url} = \%param;
my $result = config(%blogs);
my $ua = LWP::UserAgent->new;
my %params = (text => $result,
title => $page,
summary => $title,
username => GetParam('username'),
pwd => GetParam('pwd'));
# spam fighting modules
$params{$QuestionaskerSecretKey} = 1 if $QuestionaskerSecretKey;
$params{$HoneyPotOk} = GetParam($HoneyPotOk, time) if $HoneyPotOk;
my $response = $ua->post($site, \%params);
if ($response->is_error) {
print $q->p("The submission failed!");
print $q->pre($response->status_line . "\n"
. $response->content);
} else {
print $q->p("See for yourself: ",
$q->a({-href=>$target}, $page));
}
}
}
sub get_title {
my $uri = shift;
my $ua = LWP::UserAgent->new;
my $response = $ua->get($uri);
return unless $response->is_success;
my $title;
$title = $1 if $response->content =~ m!<title.*?>(.*?)</title>!;
return $title, $response->request->uri;
}
sub main {
Init();
if ($q->path_info eq '/source') {
seek DATA, 0, 0;
print "Content-type: text/plain; charset=UTF-8\r\n\r\n", <DATA>;
} elsif ($q->path_info eq '/test') {
print "Content-type: text/plain; charset=UTF-8\r\n\r\n";
print config(parse_blogs());
} else {
$UserGotoBar .= $q->a({-href=>$q->url . '/source'}, 'Source');
print GetHeader('', 'Submit a new blog');
print $q->start_div({-class=>'content index'});
if (not GetParam('url')) {
print $q->p("Debug: no url parameter provided.") if GetParam("debug");
default();
} else {
SetParam('title', 'Feeds'); # required to trigger HoneyPotInspection()
check_url(GetParam('url'));
}
print $q->p('Questions? Send mail to Alex Schröder <'
. $q->a({-href=>'mailto:kensanata@gmail.com'},
'kensanata@gmail.com') . '>');
print $q->end_div();
PrintFooter();
}
}
__DATA__

View File

@@ -1,65 +0,0 @@
#!/usr/bin/perl
# -*- coding: utf-8 -*-
# Copyright (C) 2004 Alex Schroeder <alex@gnu.org>
# Copyright (C) 2007 Vinicius José Latorre <viniciusjl at ig.com.br>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
use LWP::UserAgent;
use XML::Parser;
sub GetRaw {
my $uri = shift;
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new('GET', $uri);
my $response = $ua->request($request);
return $response->content;
}
{
package MySubs;
my %index = {};
sub StartTag {
my ($e, $name) = @_;
if ($name eq 'entry') {
my $key = uc(substr($_{filename}, 0, 1));
unless (exists $index{$key}) {
$index{$key} = 1;
print "= $key =\n\n";
}
print "[$_{site} $_{filename}] --- $_{description} (by $_{contact})\n\n";
} elsif ($name eq 'date') {
print "Timestamp: ";
}
}
sub EndTag {
my ($e, $name) = @_;
if ($name eq 'date') {
print "\nThis page is based on the EmacsLispList by StephenEglen and updated automatically.\n\n*Do not edit.*\n\n<toc/dense>\n\n";
}
}
sub Text {
print $_ if $_;
}
}
sub parse {
my $data = GetRaw('http://anc.ed.ac.uk/~stephen/emacs/ell.xml');
my $parser = new XML::Parser(Style => 'Stream', Pkg => 'MySubs');
binmode(STDOUT, ':utf8');
$parser->parse($data);
}
parse();

View File

@@ -1,122 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2006 Free Software Foundation, Inc.
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
# This file is based on code from GNU Radio.
# https://github.com/balister/GNU-Radio/blob/master/dtools/bin/fix-copyright-years
import re
import datetime
import subprocess
import multiprocessing
def command(*args): return subprocess.Popen(args, stdout=subprocess.PIPE).communicate()[0]
def is_free_software(lines):
for line in lines[:50]:
if 'This program is free software' in line: return True
return False
def get_copyright_lines(lines):
start = -1
end = -1
for i, line in enumerate(lines[:20]):
if line.startswith('# Copyright'):
if start == -1: start = i
end = i
if start == -1: raise Exception
return start, end
def copyright_line(author, years):
from_year = years.pop()
to_year = from_year
for year in years:
if year > to_year: to_year = year
elif year < from_year: from_year = year
if from_year == to_year:
return '# Copyright (C) %d %s\n' % (from_year, author)
else:
return '# Copyright (C) %d%d %s\n' % (from_year, to_year, author)
author_re = re.compile('\nAuthor: (.*)\nDate:.* (\d\d\d\d) ')
def fix_co_years(files):
for file in files:
print file
years = {}
changed = False
lines = open(file).readlines()
if not is_free_software(lines):
print ' is not Free Software'
continue
# extract authors and years from git log
log = command('git', 'log', file)
it = re.finditer(author_re, log)
for match in it:
author, year = match.groups()
if author in years:
years[author].add(int(year))
else:
years[author] = set([int(year)])
# extract copyright beginning and end from
try:
start, end = get_copyright_lines(lines)
except:
print ' copyright lines not found'
continue
# only update or add existing authors, don't touch authors not in git log
for author in years.keys():
found = False
for i in range(start, end + 1):
if author in lines[i]:
line = copyright_line(author, years[author])
if line != lines[i]:
lines[i] = line
changed = True
found = True
continue
if not found:
lines.insert(end, copyright_line(author, years[author]))
changed = True
# write file
if changed:
# print ''.join(lines[:30])
# print '------------------------------------------------------------------------'
open(file, 'w').write(''.join(lines))
if __name__ == "__main__":
# get recursive list of files in the repo
files = command('git', 'ls-tree', '--name-only', 'HEAD', '-r').splitlines()
# files = ['contrib/campaignwiki/add-link.pl']
# start n+1 processes to handle the files
num_procs = multiprocessing.cpu_count()
# num_procs = 1
procs = [multiprocessing.Process(
target=lambda *files: fix_co_years(files),
args=files[num::num_procs],
) for num in range(num_procs)]
map(multiprocessing.Process.start, procs)
map(multiprocessing.Process.join, procs)

View File

@@ -1,242 +0,0 @@
#!/usr/bin/perl
# Copyright (C) 2005, 2006, 2007, 2012 Alex Schroeder <alex@gnu.org>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use CGI ;
use CGI::Carp qw(fatalsToBrowser);
use LWP::UserAgent;
use XML::LibXML;
use URI;
my %indexes = (
'http://www.gnu.org/software/emacs/manual/html_node/emacs/Command-Index.html'
=> 'GNU Emacs manual, Command and Function Index',
'http://www.gnu.org/software/emacs/manual/html_node/emacs/Variable-Index.html'
=> 'GNU Emacs manual, Variable Index',
'http://www.gnu.org/software/emacs/manual/html_node/emacs/Concept-Index.html'
=> 'GNU Emacs manual, Concept Index',
'http://www.gnu.org/software/emacs/manual/html_node/emacs/index.html'
=> 'GNU Emacs manual, Top Menu',
'http://www.gnu.org/software/emacs/manual/html_node/elisp/Index.html'
=> 'GNU Emacs Lisp reference manual, Index',
'http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html'
=> 'GNU Emacs Lisp reference manual, Top Menu',
'http://www.gnu.org/software/emacs/manual/html_node/message/Index.html'
=> 'Message Manual, Index',
'http://www.gnu.org/software/emacs/manual/html_node/gnus/Index.html'
=> 'The Gnus Newsreader, Index',
'http://www.gnu.org/software/emacs/manual/html_node/cl/Function-Index.html'
=> 'Common Lisp Extensions, Function Index',
'http://www.gnu.org/software/emacs/manual/html_node/ccmode/Variable-Index.html'
=> 'CC Mode Manual, Variable Index',
'http://www.gnu.org/software/emacs/manual/html_node/ccmode/Concept-and-Key-Index.html'
=> 'CC Mode Manual, Command and Function Index',
'http://www.gnu.org/software/emacs/manual/html_node/org/Index.html'
=> 'Org Mode Manual, Index',
'http://www.gnu.org/software/auctex/manual/auctex/Function-Index.html'
=> 'AUCTeX Manual, Function Index',
'http://www.gnu.org/software/auctex/manual/auctex/Variable-Index.html'
=> 'AUCTeX Manual, Variable Index',
'http://www.gnu.org/software/auctex/manual/auctex/Concept-Index.html'
=> 'AUCTeX Manual, Concept Index',
'http://www.gnu.org/software/texinfo/manual/texinfo/html_node/index.html'
=> 'Texinfo, Command and Variable Index',
'http://www.gnu.org/software/texinfo/manual/texinfo/html_node/General-Index.html'
=> 'Texinfo, General Index',
'http://www.gnu.org/software/texinfo/manual/info/html_node/Index.html'
=> 'Info, Index',
'http://www.gnu.org/software/emacs/manual/html_node/dired-x/Command-Index.html'
=> 'Dired Extra, Function Index',
'http://www.gnu.org/software/emacs/manual/html_node/dired-x/Variable-Index.html'
=> 'Dired Extra, Variable Index',
'http://www.gnu.org/software/coreutils/manual/html_node/Concept-index.html'
=> 'Coreutils, Index',
'http://www.gnu.org/software/diffutils/manual/html_node/Index.html'
=> 'Diffutils, Index',
'http://www.gnu.org/software/findutils/manual/html_node/find_html/Primary-Index.html'
=> 'Findutils, Primary Index',
'http://www.gnu.org/software/emacs/manual/html_node/ediff/Index.html'
=> 'Edfiff, Index',
);
my $db = '/org/org.emacswiki/htdocs/emacs/info-ref.dat';
my $nl = "\n";
my $fs = "\023";
my $gs = "\024";
my $rs = "\025";
my $q = new CGI;
ProcessRequest();
sub ProcessRequest {
if ($q->param('init')) {
Initialize();
} elsif ($q->param('find')) {
Find($q->param('find'));
} else {
ShowForm();
}
}
sub ShowForm {
print $q->header, $q->start_html,
$q->start_form, "Index entry: ", $q->textfield('find'), $q->submit, $q->end_form,
$q->p($q->a({-href=>"http://www.emacswiki.org/scripts/info-ref"}, "Source"), $q->br(),
'Last DB update: ', TimeToText((stat($db))[9]),
' (' . $q->a({-href=>$q->url . '?init=1'}, "update") . ')'),
$q->end_html;
}
sub Find {
my $str = shift;
my %map = ();
my $data = ReadFileOrDie($db);
foreach my $line (split(/$nl/, $data)) {
my ($key, $rest) = split(/$fs/, $line);
$map{$key} = ();
if ($rest) {
foreach my $a (split(/$gs/, $rest)) {
my ($link, $label) = split(/$rs/, $a);
$map{$key}{$link} = $label;
}
}
}
my @links = keys %{$map{$str}};
if ($#links < 0) {
ReportError("No matches found for '$str'", '404 Not Found');
} elsif ($#links == 0) {
print $q->redirect($links[0]);
} else {
my @list = map { $q->a({-href=>$_}, $map{$str}{$_}) } @links;
print $q->header, $q->h1($str), $q->ol($q->li(\@list));
}
}
sub Initialize {
my %map = ();
print $q->header, $q->start_html;
foreach my $url (keys %indexes) {
print $q->p($url);;
# determine base URI
my $base = URI->new($url);
# fetch and parse data
my $data = GetRaw($url);
# some markup fixes for the elisp manual
# $data =~ s/&([<"])/&amp;$1/g;
# $data =~ s/<([<"])/&lt;$1/g;
# $data =~ s/="fn_"">/="fn_&quot;">/;
# $data =~ s/<!DOCTYPE.*?>//;
# $data =~ s'</?font.*?>''gi;
# $data =~ s'</table><br></P>'</table><br>';
my $parser = XML::LibXML->new();
my $doc;
eval { $doc = $parser->parse_html_string($data); };
print $q->p($@) if $@;
next if $@;
my @nodelist = $doc->findnodes('/html/body/ul/li/a');
foreach my $node (@nodelist) {
my $key = $node->textContent;
my $href = $node->getAttribute('href');
my $link = URI->new_abs($href, $base);
# print "$key -> $label $l\n";
$map{$key} = () unless $map{$key};
$map{$key}{$link->canonical} = $indexes{$url};
}
# elisp manual
# @nodelist = $doc->findnodes('descendant::table[position()=3]/descendant::tr');
# foreach my $node (@nodelist) {
# my ($item, $section) = $node->findnodes('td/a');
# next unless $item and $section;
# my $key = $item->textContent;
# my $label = $section->textContent;
# my $link = $item->getAttribute('href');
# my $l = URI->new_abs($link, $base);
# # print "$key -> $label $l\n";
# $map{$key} = () unless $map{$key};
# $map{$key}{$l->canonical} = $label;
# }
}
my $data = join($nl, map {
my $key = $_;
$key . $fs . join($gs, map {
my $link = $_;
join($rs, $link, $map{$key}{$link});
} keys %{$map{$_}})
} keys %map);
WriteStringToFile($db, $data);
print $q->p('Database initialized'), $q->end_html;
}
sub GetRaw {
my $uri = shift;
return unless eval { require LWP::UserAgent; };
my $ua = LWP::UserAgent->new;
my $response = $ua->get($uri);
return $response->decoded_content;
}
sub ReadFile {
my ($filename) = @_;
my ($data);
local $/ = undef; # Read complete files
if (open(IN, "<$filename")) {
$data=<IN>;
close IN;
return (1, $data);
}
return (0, '');
}
sub ReadFileOrDie {
my ($filename) = @_;
my ($status, $data);
($status, $data) = ReadFile($filename);
if (!$status) {
ReportError("Cannot open $filename: $!", '500 Internal Server Error');
}
return $data;
}
sub WriteStringToFile {
my ($file, $string) = @_;
open(OUT, ">$file")
or ReportError("Cannot write $file: $!", '500 Internal Server Error');
print OUT $string;
close(OUT);
}
sub ReportError { # fatal!
my ($errmsg, $status, $log) = @_;
print $q->header(-status => $status);
print $q->start_html, $q->h2($errmsg), $q->end_html;
exit (1);
}
sub CalcDay {
my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(shift);
return sprintf('%4d-%02d-%02d', $year+1900, $mon+1, $mday);
}
sub CalcTime {
my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(shift);
return sprintf('%02d:%02d UTC', $hour, $min);
}
sub TimeToText {
my $t = shift;
return CalcDay($t) . ' ' . CalcTime($t);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,108 +0,0 @@
#!/usr/bin/perl -w
# -*- perl -*-
=head1 NAME
oddmuse-stats - Plugin to monitor Oddmuse edits
=head1 CONFIGURATION
Set env.parent_dirs in the config file. The directories in this list
are searched for data directories containing rc.log files. No
whitespace in the directory names, sorry.
Example:
[oddmuse_stats]
user www-data
env.parent_dirs /home/alex /home/alex/campaignwiki
=head1 AUTHORS
Original Author: Alex Schroeder
=head1 LICENSE
GPLv3
=head1 MAGIC MARKERS
#%# family=auto
#%# capabilities=autoconf
=cut
use Munin::Plugin;
use File::Basename;
# The wiki directories may not contain any spaces.
# Use the config file to set the environment variable!
my @parent_dirs = ();
my %logfiles = ();
my %names = ();
my $debug = $ENV{MUNIN_DEBUG};
if ($ENV{'parent_dirs'}) {
@parent_dirs = split(/ /, $ENV{'parent_dirs'});
} else {
die "The parent_dirs environment variable must be set.\n";
}
for my $parent_dir (@parent_dirs) {
warn "opening $parent_dir\n" if $debug;
if (opendir(my $dh, $parent_dir)) {
while(readdir $dh) {
next if $_ eq '.' or $_ eq '..';
if (-r "$parent_dir/$_/rc.log") {
my $basename = basename($_);
$names{clean_fieldname($basename)}
= $basename;
$logfiles{clean_fieldname($basename)}
= "$parent_dir/$_/rc.log";
} else {
warn "discarding $_\n" if $debug;
}
}
closedir $dh;
}
}
my $yesterday = time() - 86400;
if ($ARGV[0]) {
if ($ARGV[0] eq 'autoconf') {
if (keys %logfiles) {
print "yes\n";
exit 0;
} else {
print "no (no logfiles found in " . join(", ", @parent_dirs) . ")\n";
exit 0;
}
} elsif ($ARGV[0] eq 'config') {
print "graph_title Oddmuse Wikis\n";
print "graph_category wikis\n";
print "graph_info This graph shows how many edits the wiki had in the last 24h.\n";
print "graph_vlabel edits/day\n";
print "graph_order";
for my $wiki (sort keys %logfiles) {
print " $wiki";
};
print "\n";
for my $wiki (sort keys %logfiles) {
my $name = $names{$wiki};
print "$wiki.label $name\n";
}
exit 0;
}
}
for my $wiki (sort keys %logfiles) {
open (my $fh, '<', $logfiles{$wiki})
or die "cannot open " . $logfiles{$wiki} . ": $!";
my $value = 0;
while (<$fh>) {
my ($ts) = split(/\x1e/);
$value++ if $ts and $ts >= $yesterday;
}
print "$wiki.value $value\n";
}

View File

@@ -1,15 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HomePage</title>
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script>
<script type="text/javascript" charset="utf-8" src="oddmuse-cache.js" ></script>
</head>
<body>
<h1>HomePage</h1>
<p>Caching the local wiki!</p>
<p id="cache">Caching <span id="page">0</span>/<span id="total">0</span>.</p>
<p id="status">Enable Javascript and reload this page in order to get started.</p>
</body>
</html>

View File

@@ -1,82 +0,0 @@
var wiki = (function() {
var pages;
var log = function(msg) {
$("#status").text(msg);
}
var log_html = function(msg) {
$("#status").html(msg);
}
var log_node = function(msg) {
$("#status").empty();
$("#status").append(msg);
}
var get_pages = function(data) {
pages = data.split("\n");
var count = 1;
pages.pop(); // after the last newline there is nothing
$("#total").text(pages.length);
var get_page = function(i, id) {
if (id != "") {
var store_page = function(data) {
window.localStorage.setItem(id, data);
$("#page").text(count++);
}
$.get("cgi-bin/wiki.pl",
{action: "browse", id: id},
store_page);
}
}
$.each(pages, get_page);
window.localStorage.setItem(" pages", pages.join(" "));
}
var download = function() {
log("Getting list of pages...");
$.get("cgi-bin/wiki.pl",
{action: "index", raw: "1"},
get_pages);
log_html('<p><a href="javascript:wiki.list()">List</a> the pages in local storage.');
}
var initialize = function() {
pages = window.localStorage.getItem(" pages").split(" ");
if (pages) {
log_html('<p>Found pages in local storage. <a href="javascript:wiki.list()">List</a> the pages in local storage. <a href="javascript:wiki.download()">Download</a> a fresh copy.');
} else {
download();
}
};
var list = function() {
var ul = document.createElement('ul');
$.each(pages, function(i, id) {
var li = document.createElement('li');
var a = document.createElement('a');
$(a).attr({href: "javascript:wiki.browse('" + id + "')"});
$(a).text(id);
$(li).append(a);
$(ul).append(li);
});
log_node(ul);
}
var browse = function(id) {
var re = /http:\/\/localhost\/cgi-bin\/wiki.pl\/([^\/?]+)/;
$('*').html(window.localStorage.getItem(id));
$('a[href^="http://localhost/cgi-bin/wiki.pl"]').each(function(i, a) {
var match = re.exec($(a).attr('href'));
if (match) {
var id = unescape(match[1]);
if (pages.indexOf(id) >= 0) {
$(a).attr('href', "javascript:wiki.browse('" + id + "')");
}
}
});
}
return {
initialize: initialize,
download: download,
list: list,
browse: browse,
};
}());
$(document).ready(function(evt) {
wiki.initialize();
});

View File

@@ -1,114 +0,0 @@
#! /usr/bin/perl -w
# Copyright (C) 2015 Alex Schroeder <alex@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use utf8;
use strict;
use warnings;
undef $/; # slurp
my %index = ();
my $verbose = '';
sub write_file {
my ($file, $data) = @_;
return unless $data;
open(my $fh, '>:utf8', $file) or die "Cannot write $file: $!";
print $fh $data;
close($fh);
}
sub replacement_block {
my ($block, $pos, @no_go) = @_;
while (@no_go) {
my $first = shift @no_go;
print "Is $pos between " . $first->[0] . " and " . $first->[1] . "?\n" if $verbose;
return $block if $pos >= $first->[0] and $pos <= $first->[1];
}
return "";
}
sub translate_file {
my ($data) = @_;
my @no_go = ();
while ($data =~ /( <nowiki>.*?<\/nowiki>
| <code>.*?<\/code>
| ^ <pre> (.*\n)+ <\/pre>
| ^ {{{ (.*\n)+ }}} )/gmx) {
push @no_go, [pos($data) - length $1, pos($data)];
print "no go from " . $no_go[-1]->[0] . ".." . $no_go[-1]->[1] . " for $1\n" if $verbose;
}
# The problem is that these replacements don't adjust @no_go! Perhaps it is good enough?
my $subs = '';
$subs = $subs || $data =~ s/ ( \[\/quote\] \n \n \[quote\] ) /replacement_block($1, pos($data), @no_go)/gex;
return $data if $subs;
}
sub read_file {
my $file = shift;
open(my $fh, '<:utf8', $file) or die "Cannot read $file: $!";
my $data = <$fh>;
close($fh);
return $data;
}
sub main {
my ($dir) = @_;
mkdir($dir . '-new') or die "Cannot create $dir-new: $!";
print "Indexing files\n";
foreach my $file (glob("$dir/.* $dir/*")) {
next unless $file =~ /$dir\/(.+)/;
my $id = $1;
next if $id eq ".";
next if $id eq "..";
$index{$id} = 1;
}
print "Converting files\n";
foreach my $id (sort keys %index) {
# this is where you debug a particular page
# $verbose = $id eq '2014-12-18_Emacs_Wiki_Migration';
write_file("$dir-new/$id", translate_file(read_file("$dir/$id")));
}
}
use Getopt::Long;
my $dir = 'raw';
my $help = '';
GetOptions ("dir=s" => \$dir,
"help" => \$help);
if ($help) {
print qq{
Usage: $0 [--dir=DIR]
You need to use the raw.pl script to create a directory full of raw
wiki text files.
--dir=DIR is where the raw wiki text files are. Default: raw. The
converted files will be stored in DIR-new, ie. in raw-new by
default.
Example: $0 --dir=~/alexschroeder/raw
}
} else {
main ($dir);
}

View File

@@ -1,170 +0,0 @@
#! /usr/bin/perl -w
# Copyright (C) 2015 Alex Schroeder <alex@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use utf8;
use strict;
use warnings;
undef $/; # slurp
my %index = ();
my $verbose = '';
my $LinkPattern = '(\p{Uppercase}+\p{Lowercase}+\p{Uppercase}\p{Alphabetic}*)';
my $FreeLinkPattern = "([-,.()'%&?;<> _1-9A-Za-z\x{0080}-\x{fffd}]|[-,.()'%&?;<> _0-9A-Za-z\x{0080}-\x{fffd}][-,.()'%&?;<> _0-9A-Za-z\x{0080}-\x{fffd}]+)";
my $UrlProtocols = 'http|https|ftp|afs|news|nntp|mid|cid|mailto|wais|prospero|telnet|gopher|irc|feed';
my $UrlChars = '[-a-zA-Z0-9/@=+$_~*.,;:?!\'"()&#%]'; # see RFC 2396
my $FullUrlPattern="((?:$UrlProtocols):$UrlChars+)"; # when used in square brackets
# either a single letter, or a string that begins with a single letter and ends with a non-space
my $words = '([A-Za-z\x{0080}-\x{fffd}](?:[-%.,:;\'"!?0-9 A-Za-z\x{0080}-\x{fffd}]*?[-%.,:;\'"!?0-9A-Za-z\x{0080}-\x{fffd}])?)';
# zero-width assertion to prevent km/h from counting
my $nowordstart = '(?:(?<=[^-0-9A-Za-z\x{0080}-\x{fffd}])|^)';
# zero-width look-ahead assertion to prevent km/h from counting
my $nowordend = '(?=[^-0-9A-Za-z\x{0080}-\x{fffd}]|$)';
my $IrcNickRegexp = qr{[]a-zA-Z^[;\\`_{}|][]^[;\\`_{}|a-zA-Z0-9-]*};
sub FreeToNormal { # trim all spaces and convert them to underlines
my $id = shift;
return '' unless $id;
$id =~ s/ /_/g;
$id =~ s/__+/_/g;
$id =~ s/^_//;
$id =~ s/_$//;
return $id;
}
sub parse_local_names {
my $filename = shift;
print "Reading $filename\n";
open(my $fh, '<:utf8', $filename) or die "Cannot read $filename: $!";
my $data = <$fh>;
close($fh);
print "Parsing $filename\n";
my %names = ();
while ($data =~ m/\[$FullUrlPattern\s+([^\]]+?)\]/g) {
my ($page, $url) = ($2, $1);
my $id = FreeToNormal($page);
$names{$id} = $url;
}
return \%names;
}
sub write_file {
my ($file, $data) = @_;
return unless $data;
open(my $fh, '>:utf8', $file) or die "Cannot write $file: $!";
print $fh $data;
close($fh);
}
sub replacement {
my ($names, $id, $pos, @no_go) = @_;
while (@no_go) {
my $first = shift @no_go;
print "Is $pos between " . $first->[0] . " and " . $first->[1] . "?\n" if $verbose;
return $id if $pos >= $first->[0] and $pos <= $first->[1];
}
return "[[$id]]" if exists $index{$id}; # local page exists
return $id unless $names->{$id};
return '[' . $names->{$id} . ' ' . $id . ']';
}
sub translate_file {
my ($names, $data) = @_;
my @no_go = ();
while ($data =~ /( <nowiki>.*?<\/nowiki>
| <code>.*?<\/code>
| ^ <pre> (.*\n)+ <\/pre>
| ^ {{{ (.*\n)+ }}}
| ${nowordstart} \* ${words} \* ${nowordend}
| ${nowordstart} \/ ${words} \/ ${nowordend}
| ${nowordstart} \_ ${words} \_ ${nowordend}
| ${nowordstart} \! ${words} \! ${nowordend}
| \[\[ $FreeLinkPattern .*? \]\]
| \[ $FullUrlPattern \s+ [^\]]+? \]
| ^( \h+.+\n )+
| ^(?: \[? \d\d?:\d\d (?:am|pm)? \]? )? \s* < $IrcNickRegexp > )/gmx) {
push @no_go, [pos($data) - length $1, pos($data)];
print "no go from " . $no_go[-1]->[0] . ".." . $no_go[-1]->[1] . " for $1\n" if $verbose;
}
my $subs = $data =~ s/(?<![:![])\b$LinkPattern(?![:])/replacement($names, $1, pos($data), @no_go)/ge;
return $data if $subs;
}
sub read_file {
my $file = shift;
open(my $fh, '<:utf8', $file) or die "Cannot read $file: $!";
my $data = <$fh>;
close($fh);
return $data;
}
sub main {
my ($dir, $local_names) = @_;
mkdir($dir . '-new') or die "Cannot create $dir-new: $!";
my $names = parse_local_names("$dir/$local_names");
print "Indexing files\n";
foreach my $file (glob("$dir/.* $dir/*")) {
next unless $file =~ /$dir\/(.+)/;
my $id = $1;
next if $id eq ".";
next if $id eq "..";
next if $id eq "$local_names";
$index{$id} = 1;
}
print "Converting files\n";
foreach my $id (sort keys %index) {
# this is where you debug a particular page
# $verbose = $id eq '2014-12-18_Emacs_Wiki_Migration';
write_file("$dir-new/$id", translate_file($names, read_file("$dir/$id")));
}
}
use Getopt::Long;
my $names = 'LocalNames';
my $dir = 'raw';
my $help = '';
GetOptions ("names=s" => \$names,
"dir=s" => \$dir,
"help" => \$help);
if ($help) {
print qq{
Usage: $0 [--dir=DIR] [--names=LocalNames]
You need to use the raw.pl script to create a directory full of raw
wiki text files.
--dir=DIR is where the raw wiki text files are. Default: raw. The
converted files will be stored in DIR-new, ie. in raw-new by
default.
--names=LocalNames is the page name with all the local names on
it. Default: LocalNames
Example: $0 --dir=~/alexschroeder/raw --names=Names
}
} else {
main ($dir, $names);
}

View File

@@ -1,128 +0,0 @@
#! /usr/bin/perl -w
# Copyright (C) 2015 Alex Schroeder <alex@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use utf8;
use strict;
use warnings;
undef $/; # slurp
my %index = ();
my $verbose = '';
sub write_file {
my ($file, $data) = @_;
return unless $data;
open(my $fh, '>:utf8', $file) or die "Cannot write $file: $!";
print $fh $data;
close($fh);
}
sub replacement_block {
my ($block, $pos, @no_go) = @_;
while (@no_go) {
my $first = shift @no_go;
print "Is $pos between " . $first->[0] . " and " . $first->[1] . "?\n" if $verbose;
return $block if $pos >= $first->[0] and $pos <= $first->[1];
}
return "[quote]\n" . join("\n", split(/ \n :+ \h? /x, $block)) . "[/quote]\n";
}
sub replacement {
my ($block, $tag, $pos, @no_go) = @_;
while (@no_go) {
my $first = shift @no_go;
print "Is $pos between " . $first->[0] . " and " . $first->[1] . "?\n" if $verbose;
return $block if $pos >= $first->[0] and $pos <= $first->[1];
}
return $tag . $block . $tag;
}
sub translate_file {
my ($data) = @_;
my @no_go = ();
while ($data =~ /( <nowiki>.*?<\/nowiki>
| <code>.*?<\/code>
| ^ <pre> (.*\n)+ <\/pre>
| ^ {{{ (.*\n)+ }}} )/gmx) {
push @no_go, [pos($data) - length $1, pos($data)];
print "no go from " . $no_go[-1]->[0] . ".." . $no_go[-1]->[1] . " for $1\n" if $verbose;
}
# The problem is that these replacements don't adjust @no_go! Perhaps it is good enough?
my $subs = '';
$subs = $subs || $data =~ s/ ''' (.*?) ''' /replacement($1, '**', pos($data), @no_go)/gxe;
$subs = $subs || $data =~ s/ '' (.*?) '' /replacement($1, '\/\/', pos($data), @no_go)/gxe;
$subs = $data =~ s/ ^ :+ \h? ( .* \n (?: .+ \n ) * ) /replacement_block($1, pos($data), @no_go)/gmxe;
return $data if $subs;
}
sub read_file {
my $file = shift;
open(my $fh, '<:utf8', $file) or die "Cannot read $file: $!";
my $data = <$fh>;
close($fh);
return $data;
}
sub main {
my ($dir) = @_;
mkdir($dir . '-new') or die "Cannot create $dir-new: $!";
print "Indexing files\n";
foreach my $file (glob("$dir/.* $dir/*")) {
next unless $file =~ /$dir\/(.+)/;
my $id = $1;
next if $id eq ".";
next if $id eq "..";
$index{$id} = 1;
}
print "Converting files\n";
foreach my $id (sort keys %index) {
# this is where you debug a particular page
# $verbose = $id eq '2014-12-18_Emacs_Wiki_Migration';
write_file("$dir-new/$id", translate_file(read_file("$dir/$id")));
}
}
use Getopt::Long;
my $dir = 'raw';
my $help = '';
GetOptions ("dir=s" => \$dir,
"help" => \$help);
if ($help) {
print qq{
Usage: $0 [--dir=DIR]
You need to use the raw.pl script to create a directory full of raw
wiki text files.
--dir=DIR is where the raw wiki text files are. Default: raw. The
converted files will be stored in DIR-new, ie. in raw-new by
default.
Example: $0 --dir=~/alexschroeder/raw
}
} else {
main ($dir);
}

View File

@@ -1,14 +0,0 @@
# http://www.w3.org/International/questions/qa-forms-utf-8
$field =~
m/^(
[\x09\x0A\x0D\x20-\x7E] # ASCII
| [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
| \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
| [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
| \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
| \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
| [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
| \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
)*$/x;

View File

@@ -1,168 +0,0 @@
;;; vc-oddmuse.el -- add VC support to oddmuse-curl
;;
;; Copyright (C) 2014 Alex Schroeder <alex@gnu.org>
;;
;; Latest version:
;; http://git.savannah.gnu.org/cgit/oddmuse.git/plain/contrib/vc-oddmuse.el
;; Discussion, feedback:
;; http://www.emacswiki.org/cgi-bin/wiki/OddmuseCurl
;;
;; This program is free software: you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by the Free
;; Software Foundation, either version 3 of the License, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
;; more details.
;;
;; You should have received a copy of the GNU General Public License along
;; with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Add the following to your init file:
;;
;; (add-to-list 'vc-handled-backends 'oddmuse)
(add-to-list 'vc-handled-backends 'oddmuse)
(require 'oddmuse-curl)
(require 'diff)
(defun vc-oddmuse-revision-granularity () 'file)
(defun vc-oddmuse-registered (file)
"Handle files in `oddmuse-directory'."
(string-match (concat "^" (expand-file-name oddmuse-directory))
(file-name-directory file)))
(defun vc-oddmuse-state (file)
"Return the current version control state of FILE.
For a list of possible values, see `vc-state'."
;; Avoid downloading the current version from the wiki and comparing
;; the text: Too much traffic!
'edited)
(defun vc-oddmuse-working-revision (file)
"The current revision based on `oddmuse-revisions'."
(oddmuse-revision-get oddmuse-wiki oddmuse-page-name))
(defun vc-oddmuse-checkout-model (files)
"No locking."
'implicit)
(defun vc-oddmuse-create-repo (file)
(error "You cannot create Oddmuse wikis using Emacs."))
(defun vc-oddmuse-register (files &optional rev comment)
"This always works.")
(defun vc-oddmuse-revert (file &optional contents-done)
"No idea"
nil)
(defvar vc-oddmuse-log-command
(concat "curl --silent %w"
" --form action=rc"
" --form showedit=1"
" --form all=1"
" --form from=1"
" --form raw=1"
" --form match='%r'")
"Command to use for publishing index pages.
It must print the page to stdout.
See `oddmuse-format-command' for the formatting options.")
(defun vc-oddmuse-print-log (files buffer &optional shortlog start-revision limit)
"Load complete recent changes for the files."
;; Derive `oddmuse-wiki' from the first file
(with-oddmuse-file (car files)
;; The wiki expects a Perl regular expression!
(let ((regexp (concat "^(" (mapconcat 'file-name-nondirectory files "|") ")$")))
(oddmuse-run "Getting recent changes" vc-oddmuse-log-command nil nil buffer)))
(with-current-buffer buffer
(oddmuse-render-rss3))
'limit-unsupported)
(defun vc-oddmuse-log-outgoing ()
(error "This is not supported."))
(defun vc-oddmuse-log-incoming ()
(error "This is not supported."))
(defvar vc-oddmuse-get-revision-command
(concat "curl --silent"
" --form action=browse"
" --form id=%t"
" --form revision=%v"
" --form raw=1"
" '%w'")
"Command to use to get older revisions of a page.
It must print the page to stdout.
%? '?' character
%w URL of the wiki as provided by `oddmuse-wikis'
%t Page title as provided by `oddmuse-page-name'
%v Revision to retrieve as provided by `oddmuse-revision'")
(defun oddmuse-revision-filename (rev)
"Return filename for revision REV.
This uses `oddmuse-directory', `wiki' and `pagename' as bound by
`with-oddmuse-file'."
(concat oddmuse-directory
"/" wiki
"/" pagename
".~" rev "~"))
(defun vc-oddmuse-diff (files &optional rev1 rev2 buffer)
"Report the differences for FILES."
(setq buffer (or buffer (get-buffer-create "*vc-diff*")))
(dolist (file files)
(with-oddmuse-file file
(setq rev1 (or rev1 (oddmuse-get-latest-revision wiki pagename)))
(dolist (rev (list rev1 rev2))
(when (and rev (not (file-readable-p (oddmuse-revision-filename rev))))
(let* ((oddmuse-revision rev)
(command vc-oddmuse-get-revision-command)
(filename (oddmuse-revision-filename rev)))
(with-temp-buffer
(oddmuse-run
(concat "Downloading revision " rev)
command wiki pagename)
(write-file filename)))))
(diff-no-select
(if rev1 (oddmuse-revision-filename rev1) file)
(if rev2 (oddmuse-revision-filename rev2) file)
nil
(vc-switches 'oddmuse 'diff)
buffer))))
(defun vc-oddmuse-revert (file &optional contents-done)
"Revert FILE back to the wiki revision.
If optional arg CONTENTS-DONE is non-nil, then nothing needs to
be done, as the contents of FILE have already been reverted from
a version backup."
(unless contents-done
(with-oddmuse-file file
(let ((command (oddmuse-format-command vc-oddmuse-get-revision-command)))
(with-temp-buffer
(oddmuse-run "Loading" command)
(write-file file))))))
(defun vc-oddmuse-checkin (files rev comment)
"Commit changes in FILES to this backend.
REV is a historical artifact and should be ignored. COMMENT is
used as a check-in comment."
(dolist (file files)
(with-oddmuse-file file
(let* ((summary comment)
(command (oddmuse-format-command oddmuse-post-command))
(buf (get-buffer-create " *oddmuse-response*")))
(with-temp-buffer
(insert-file-contents file)
(oddmuse-run "Posting" command wiki pagename buf t 302))))))
(provide 'vc-oddmuse)

14
control Normal file
View File

@@ -0,0 +1,14 @@
Maintainer: Alex Schroeder <alex@oddmuse.org>
Section: web
Priority: optional
Standards-Version: 3.5.10
Package: oddmuse
Architecture: any
Depends: httpd, perl5, perl-modules
Suggests: libwww-perl, libxml-rss-perl, libmime-base64-perl, diff
Description: wiki engine
A "wiki" is a website that is usally collaboratively edited
by its users, including the ability to alter text written by
other users. It is a simple and efficient content management
system (CMS).

View File

@@ -1,205 +0,0 @@
/* Color Scheme: links: #851; visited links: #542; background #aa8;
Plus black, white, and #333 for headers.
This is the 1pdc.css, based on beige.css
This file is in the public domain.
*/
body {
font-family: "Times New Roman",Georgia,Times;
color: black;
background-color: white;
margin: 0;
}
@media print {
body {
font-size:12pt;
}
}
div.header {
color: white;
background-color: #36a;
padding: 0px 10px 20px 10px;
margin-bottom: 10px;
height: 45px;
border-bottom: 2px solid #bbb;
}
.header h1 { height: inherit; overflow: hidden; }
div.header span.gotobar {
display: block;
position: relative;
top: 75px;
}
body > div {
padding: 1em;
}
div.browse {
min-height: 3em;
}
div.footer {
clear:both;
font-size: 90%;
padding: 1em;
}
form.tiny, form.tiny p {
display:inline;
white-space:nowrap;
}
form.tiny input {
padding:0;
width:10ex;
font-size:10px;
}
/* comment pages with username, homepage, and email subscription */
.comment span { display: block; }
.comment span label { display: inline-block; width: 10em; }
.comment input { width: 10em; }
div.commentshown {
padding-bottom: 1ex;
padding-left: 2em;
border-left: 2px solid black;
font-size: smaller;
}
div.commenthidden { display:none; }
div.commentshown { display:block; }
h1 {
width: 100%;
padding: 0;
margin: 0;
font-size: 1.75em;
letter-spacing: 0.25em;
font-weight: normal;
color: #fff;
background-color: #36a;
}
h1 a:link, h1 a:visited {
color: inherit;
background-color: inherit;
text-decoration: inherit;
}
div.journal h1 {
font-size:large;
background-color: #555;
}
h2 {
font-weight: bold;
background-color: #ddf;
color: #222;
border: 1px solid #ccc;
width: 98%;
font-size: 110%;
padding: 0.3em;
}
h2 a {
text-decoration: none;
}
a:link {
color: #25a;
background-color: inherit;
}
a:visited {
color: #79f;
background-color: inherit;
}
a:active {
color:#a41;
background-color: inherit;
}
/* images with links, captions, etc */
div.image { display: inline; margin: 1em; font-size: 90%; text-align: center; }
.left { float: left; margin-right: 1em; }
.right { float: right; margin-left: 1em; }
div.right .right { float: none; }
div.left .left { float: none; }
a img { border: 1px solid #333; }
.fit img { width: 80%; text-align: center; margin: 2em 8%; }
.half img { width: 50%; height: 50%; text-align: center; margin: 2em 8%; }
.small img { width: 50% }
.noborder img { border: none; }
.corner img { position: absolute; top: 10px; right: 120px; height: 100px; width: 100px; }
img.logo { position: absolute; top: 10px; right: 10px; height: 100px; width: 100px; border-style:none; }
em.underline { font-weight: bold; }
.bar a { padding-right: 1em; }
textarea { width:100%; font-size: inherit; }
div.edit { padding-right: 1em; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
div.message { background-color:#FEE; }
@media print {
div.header span.bar, .edit, .diff, .message { display: none; }
}
table.history { border-style:none; }
td.history { border-style:none; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rc hr { display: none; }
@media print {
a, a:link, a:visited {
color:#000;
text-decoration:none;
font-weight: normal;
}
h1 a, h2 a, h3 a, h4 a { font-style: normal; }
a.edit, div.footer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after {
content:"[" attr(href) "]";
}
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
}
/* Tables */
table.user {
margin: 1em 4em;
padding: 0 1em;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
table.user td, table.user th {
border-style: none;
padding:5px 10px;
vertical-align: top;
}
table.user th { font-weight:bold; }
table.user td.r { text-align:right; }
table.user td.l { text-align:left; }
table.user td.c { text-align:center; }
table.user td.j { text-align:justify; }
.highlight { background-color:yellow; }
@media print {
table {
font-size: 9pt;
margin: 0;
}
table.user td, table.user th {
padding: 0 1ex;
}
}
/* Calendar */
div.month { margin:0; padding:0; font-size:x-small; float:right; }
div.content div.month { float:none; }
div.year div.month { float:left; font-size:medium; padding:1ex; }
div.month pre { margin:0; padding:0 0 0 1ex; }
div.month a { text-decoration:none; font: inherit; }
div.month span.title a { font: inherit; }
/* no difference between a.exact and a.collection */
div.month a.local { font-weight: bold; }
div.month a.local:link { color: #562; }
div.month a.local:visited { color: #542; }
div.month a.today { font-weight: bold; color: #fff; }
div.month span.title a.local { font-weight: normal; color: #842; }
@media print {
div.month { display: none; }
div.year div.month { display: block; }
div.year div.month a { display: inline; }
}

View File

@@ -1,567 +0,0 @@
@font-face {
font-family: 'Garamond';
font-style: normal;
font-weight: 400;
src: local('Garamond'), local('GaramondNo8'), local('EB Garamond'), local('EBGaramond'), url(https://themes.googleusercontent.com/static/fonts/ebgaramond/v4/kYZt1bJ8UsGAPRGnkXPeFdIh4imgI8P11RFo6YPCPC0.woff) format('woff');
}
body, rss {
font-family: Garamond, serif;
font-size: 16pt;
line-height: 20pt;
margin:1em 3em;
padding:0;
}
/* headings: we can use larger sizes if we use a lighter color.
we cannot inherit the font-family because header and footer use a narrow font. */
h1, h2, h3, title {
font-family: Garamond, GaramondNo8, "Bookman Old Style", Cochin, Baskerville, serif;
font-weight:normal;
line-height: 100%;
}
h1, channel title {
font-size: 32pt;
margin: 1em 0 0.5em 0;
padding: 0.4em 0;
}
h2 {
font-size: 18pt;
margin: 2em 0 0 0;
padding: 0;
}
h3 {
font-size: inherit;
font-weight: bold;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
/* headers in the journal are smaller */
div.journal h1, item title {
font-size: inherit;
padding: 0;
clear: both;
border-bottom: 1px solid #000;
}
div.journal h2 {
font-family: inherit;
font-size: inherit;
}
div.journal h3 {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
font-style: italic;
}
div.journal hr {
display:none;
}
p.more {
margin-top: 3em;
}
/* Links in headings appear on journal pages. */
h1 a, h2 a, h3 a {
color:inherit;
text-decoration:none;
font-weight: normal;
}
h1 a:visited, h2 a:visited, h3 a:visited {
color: inherit;
}
/* for download buttons and the like */
.button {
display: inline-block;
font-size: 120%;
cursor: pointer;
padding: 0.4em 0.6em;
text-shadow: 0px -1px 0px #ccc;
background-color: #cfa;
border: 1px solid #9d8;
border-radius: 5px;
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
}
.button .icon {
color: #363;
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
}
.button a {
text-decoration: none;
font-weight: normal;
}
/* links */
a.pencil {
padding-left: 1ex;
text-decoration: none;
color: inherit;
visible: hidden;
transition: visibility 0s 1s, opacity 1s linear;
opacity: 0;
}
*:hover > a.pencil {
visible: visible;
transition: opacity .5s linear;
opacity: 1;
}
@media print {
a.pencil {
display: none;
}
}
a.number {
text-decoration: none;
}
/* stop floating content from flowing over the footer */
hr {
clear: both;
}
/* the distance between links in the navigation bars */
span.bar a {
margin-right: 1ex;
}
a img {
border: none;
}
/* search box in the top bar */
form.tiny, form.tiny p {
display: inline;
white-space: nowrap;
}
form.tiny input {
padding: 0;
width: 10ex;
font-size: 80%;
}
/* code */
pre, code, tt {
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace;
font-size: 80%;
line-height: 110%;
}
pre {
overflow:hidden;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
/* styling for divs that will be invisible when printing
when printing. */
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
font-family: "Abadi MT Condensed Light", "Arial Narrow", Arial, sans-serif;
font-size: 75%;
line-height: 110%;
}
div.footer form.search {
display: none;
}
div.rc li {
line-height: 110%;
}
div.rc li + li {
margin-top: 1em;
}
div.rc li strong, table.history strong, strong.description {
font-weight: inherit;
}
div.diff {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
line-height: 14pt;
color: #000;
}
div.old {
background-color: #ffffaf;
}
div.new {
background-color: #cfffcf;
}
div.refer {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
line-height: 13pt;
}
div.message {
background-color:#fee;
color:#000;
}
img.xml {
border:none;
padding:1px;
}
a.small img {
max-width:300px;
}
a.large img {
max-width:600px;
}
div.sister {
margin-right:1ex;
background-color:inherit;
}
div.sister p {
margin-top:0;
}
div.sister hr {
display:none;
}
div.sister img {
border:none;
}
div.near, div.definition {
background-color:#efe;
}
div.sidebar {
float:right;
border:1px dotted #000;
padding:0 1em;
}
div.sidebar ul {
padding-left:1em;
}
/* replacements, features */
ins {
color: #b33;
text-decoration: none;
}
acronym, abbr {
letter-spacing:0.1em;
font-variant:small-caps;
}
/* Interlink prefix not shown */
a .site, a .separator {
display: none;
}
a cite { font:inherit; }
/* browser borkage */
textarea[name="text"] { width:97%; height:80%; }
textarea[name="summary"] { width:97%; height:3em; }
/* comments */
textarea[name="aftertext"] { width:97%; height:10em; }
div.commentshown {
background-color:#ffc;
padding-bottom:1ex;
}
div.commenthidden {
display:none;
}
div.commentshown {
display:block;
}
p.comment {
margin-bottom: 0;
}
div.comment {
font-size: 14pt;
}
div.comment h2 {
margin-top: 5em;
}
/* comment pages with username, homepage, and email subscription */
.comment form span { display: block; }
.comment form span label { display: inline-block; width: 10em; }
/* IE sucks */
.comment input#username,
.comment input#homepage,
.comment input#mail { width: 20em; }
/* cal */
div.month { padding:0; margin:0 2ex; }
body > div.month {
float:right;
background-color: inherit;
border:solid thin;
padding:0 1ex;
}
div.year > div.month {
float:left;
}
div.footer {
clear:both;
}
div.content div.month a.edit {
color:inherit;
font-weight:inherit;
text-decoration: none;
}
/* history tables and other tables */
table.history {
border: none;
}
td.history {
border: none;
}
table.user {
border: none;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 1em;
margin: 1em 2em;
}
table.user tr td, table.user tr th {
border: none;
padding: 0.2em 0.5em;
vertical-align: top;
}
table.arab tr th {
font-weight:normal;
text-align:left;
vertical-align:top;
}
table.arab, table.arab tr th, table.arab tr td {
border:none;
}
th.nobreak {
white-space:nowrap;
}
table.full { width:99%; margin-left:1px; }
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
table.t td { vertical-align: top; }
td.half { width:50%; }
td.third { width:33%; }
form table td { padding:5px; }
/* lists */
dd { padding-bottom:0.5ex; }
dl.inside dt { float:left; }
/* search */
div.search span.result { font-size:larger; }
div.search span.info { font-size:smaller; font-style:italic; }
div.search p.result { display:none; }
img.logo {
float: right;
margin: 0;
padding: 0;
border: 1px solid #000;
opacity: 0.3;
background-color:#ffe;
}
/* images */
div.content a.feed img, div.journal a.feed img,
div.content a img.smiley, div.journal a img.smiley, img.smiley,
div.content a.inline img, div.journal a.inline img,
div.content li a.image img, div.journal li a.image img {
margin: 0; padding: 0; border: none;
}
div.image a img {
margin-bottom: 0;
}
div.image span.caption {
margin: 0 1em;
}
img {
max-width: 100%;
}
.left { float:left; margin-right: 1em; }
.right { float:right; margin-left: 1em; }
.half a img { height: 50%; width: 50%; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
table.aside {
float:right;
width:40%;
margin-left: 1em;
padding: 1ex;
border: 1px dotted #666;
}
table.aside td {
text-align:left;
}
div.sidebar {
float:right; width: 250px;
text-align: right;
border: none;
margin: 1ex;
}
.bigsidebar {
float:right;
width: 500px;
border: none;
margin-left: 1ex;
font-size: 80%;
}
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
dl.irc dt span.time { float:left; }
dl.irc dd { margin-left:22ex; }
/* portrait */
div.footer, div.comment, hr { clear: both; }
.portrait { float: left; font-size: small; margin-right: 1em; }
.portrait { line-height: 1em; }
.portrait a { color: #999; }
div.left { float:left; margin:1em; padding: 0.5em; }
div.left p { display:table-cell; }
div.left p + p { display:table-caption; caption-side:bottom; }
p.table a { float:left; width:20ex; }
p.table + p { clear:both; }
/* no bleeding
@media screen {
div.content, div.rc {
overflow:hidden;
}
} */
@media print {
body {
font-size: 12pt;
line-height: 13pt;
color: #000;
background-color: #fff;
}
/* hide all the crap */
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone {
display:none;
}
a,
a:visited,
div.content a.near:link,
div.content a.near:visited,
div.content a.near:active {
color:inherit;
font-weight: bold;
}
div.content a.feed {
display: none;
}
div.content a.book,
div.content a.movie {
text-decoration: none;
}
a cite {
font-style: italic;
}
/* no difference */
pre, code, tt {
font-size: inherit;
line-height: inherit;
}
/* no dotted underlines */
acronym, abbr {
border: none;
text-decoration: none;
}
/* headings */
h1 {
color: inherit;
margin-top: 2em;
}
h2 {
color:inherit;
margin: 1em 0;
font-variant: small-caps;
}
h3 {
font-weight:inherit;
font-style:italic;
color:inherit;
margin: 1em 0;
}
h1 a, h2 a, h3 a {
color: inherit;
}
div.journal h1 a:visited,
div.journal h2 a:visited,
div.journal h3 a:visited {
color: inherit;
}
}
/* rss */
channel * { display: block; }
channel title {
margin-top: 30pt;
}
copyright {
font-size: 14pt;
line-height: 16pt;
margin-top: 1em;
}
channel > link:before {
font-size: 18pt;
display: block;
margin: 1em;
padding: 0.5em;
content: "This is an RSS feed, designed to be read in a feed reader.";
color: red;
border: 1px solid red;
}
link, license {
font-size: 11pt;
margin-bottom: 9pt;
}
username:before { content: "Last edited by "; }
username:after { content: "."; }
generator:before { content: "Feed generated by "; }
generator:after { content: "."; }
channel description {
font-weight: bold;
}
item description {
font-style: italic;
font-weight: normal;
margin-bottom: 1em;
}
docs, language,
pubDate, lastBuildDate, ttl, guid, category, comments,
docs, image title, image link,
status, version, diff, history, importance {
display: none;
}

View File

@@ -1,632 +0,0 @@
/* font-face includes TTF for PDF generation */
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff') url('/fonts/NoticiaText-Regular.ttf') format('truetype');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff') url('/fonts/NoticiaText-Regular.ttf') format('truetype');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff') url('/fonts/NoticiaText-Regular.ttf') format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff') url('/fonts/NoticiaText-Bold.ttf') format('truetype');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff') url('/fonts/NoticiaText-Bold.ttf') format('truetype');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff') url('/fonts/NoticiaText-Bold.ttf') format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff') url('/fonts/NoticiaText-Italic.ttf') format('truetype');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff') url('/fonts/NoticiaText-Italic.ttf') format('truetype');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff') url('/fonts/NoticiaText-Italic.ttf') format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff') url('/fonts/NoticiaText-BoldItalic.ttf') format('truetype');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff') url('/fonts/NoticiaText-BoldItalic.ttf') format('truetype');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff') url('/fonts/NoticiaText-BoldItalic.ttf') format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
@font-face {
font-family: 'Symbola';
src: local('Symbola'), url('/fonts/Symbola.woff') format('woff') url('/fonts/Symbola.ttf') format('truetype');
}
body, rss {
font-family: "Noticia Text", Symbola, serif;
font-style: normal;
font-size: 14pt;
margin: 1em 3em;
padding:0;
}
@media print {
body {
font-size: 12pt;
color: #000;
background-color: #fff;
}
/* hide all the crap */
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
display:none;
}
div.content a.book,
div.content a.movie {
text-decoration: none;
}
a cite {
font-style: italic;
}
img[alt="RSS"] { display: none }
a.rss { font-size: 8pt }
}
/* headings: we can use larger sizes if we use a lighter color.
we cannot inherit the font-family because header and footer use a narrow font. */
h1, h2, h3, title {
font-family: inherit;
font-weight: normal;
}
h1, channel title {
font-size: 32pt;
margin: 1em 0 0.5em 0;
padding: 0.4em 0;
}
h2 {
font-size: 18pt;
margin: 2em 0 0 0;
padding: 0;
}
h3 {
font-size: inherit;
font-weight: bold;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
/* headers in the journal are smaller */
div.journal h1, item title {
font-size: inherit;
padding: 0;
clear: both;
border-bottom: 1px solid #000;
}
div.journal h2 {
font-family: inherit;
font-size: inherit;
}
div.journal h3 {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
font-style: italic;
}
div.journal hr {
visibility: hidden;
}
p.more {
margin-top: 3em;
}
/* Links in headings appear on journal pages. */
h1 a, h2 a, h3 a {
color:inherit;
text-decoration:none;
font-weight: normal;
}
h1 a:visited, h2 a:visited, h3 a:visited {
color: inherit;
}
/* for download buttons and the like */
.button {
display: inline-block;
font-size: 120%;
cursor: pointer;
padding: 0.4em 0.6em;
text-shadow: 0px -1px 0px #ccc;
background-color: #cfa;
border: 1px solid #9d8;
border-radius: 5px;
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
}
.button .icon {
color: #363;
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
}
.button a {
text-decoration: none;
font-weight: normal;
}
/* links */
a.pencil {
padding-left: 1ex;
text-decoration: none;
color: inherit;
visibility: hidden;
transition: visibility 0s 1s, opacity 1s linear;
opacity: 0;
}
*:hover > a.pencil {
visibility: visible;
transition: opacity .5s linear;
opacity: 1;
}
@media print {
a.pencil {
display: none;
}
}
a.number {
text-decoration: none;
}
/* stop floating content from flowing over the footer */
hr {
clear: both;
}
/* the distance between links in the navigation bars */
span.bar a {
margin-right: 1ex;
}
a img {
border: none;
}
/* search box in the top bar */
.header form, .header p {
display: inline;
white-space: nowrap;
}
label[for="searchlang"], #searchlang, .header input[type="submit"] {
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
visibility: hidden; position: absolute;
}
/* wrap on the iphone */
@media media only screen and (max-device-width: 480px) {
}
.header input {
width: 10ex;
}
/* other form fields */
input[type="text"] {
padding: 0;
font-size: 80%;
line-height: 125%;
}
/* code */
textarea, pre, code, tt {
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, "Symbola";
font-size: 80%;
}
pre {
overflow:hidden;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
/* styling for divs that will be invisible when printing
when printing. */
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
font-size: 14pt;
}
@media print {
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
font-size: 8pt;
}
}
div.footer form.search {
display: none;
}
div.rc li + li {
margin-top: 1em;
}
div.rc li strong, table.history strong, strong.description {
font-family: inherit;
font-weight: inherit;
}
div.diff {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
color: #000;
}
div.old {
background-color: #ffffaf;
}
div.new {
background-color: #cfffcf;
}
div.refer {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
}
div.message {
background-color:#fee;
color:#000;
}
img.xml {
border:none;
padding:1px;
}
a.small img {
max-width:300px;
}
a.large img {
max-width:600px;
}
div.sister {
margin-right:1ex;
background-color:inherit;
}
div.sister p {
margin-top:0;
}
div.sister hr {
display:none;
}
div.sister img {
border:none;
}
div.near, div.definition {
background-color:#efe;
}
div.sidebar {
float:right;
border:1px dotted #000;
padding:0 1em;
}
div.sidebar ul {
padding-left:1em;
}
/* replacements, features */
ins {
color: #b33;
text-decoration: none;
}
acronym, abbr {
letter-spacing:0.1em;
font-variant:small-caps;
}
/* Interlink prefix not shown */
a .site, a .separator {
display: none;
}
a cite { font:inherit; }
/* browser borkage */
textarea[name="text"] { width:97%; height:80%; }
textarea[name="summary"] { width:97%; height:3em; }
/* comments */
textarea[name="aftertext"] { width:97%; height:10em; }
div.commentshown {
font-size: 12pt;
padding: 2em 0;
}
div.commenthidden {
display:none;
}
div.commentshown {
display:block;
}
p.comment {
margin-bottom: 0;
}
div.comment {
font-size: 14pt;
}
div.comment h2 {
margin-top: 5em;
}
/* comment pages with username, homepage, and email subscription */
.comment form span { display: block; }
.comment form span label { display: inline-block; width: 10em; }
/* IE sucks */
.comment input#username,
.comment input#homepage,
.comment input#mail { width: 20em; }
/* cal */
div.month { padding:0; margin:0 2ex; }
body > div.month {
float:right;
background-color: inherit;
border:solid thin;
padding:0 1ex;
}
div.year > div.month {
float:left;
}
div.footer {
clear:both;
}
div.content div.month a.edit {
color:inherit;
font-weight:inherit;
text-decoration: none;
}
/* history tables and other tables */
table.history {
border: none;
}
td.history {
border: none;
}
table.user {
border: none;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 1em;
margin: 1em 2em;
}
table.user tr td, table.user tr th {
border: none;
padding: 0.2em 0.5em;
vertical-align: top;
}
table.arab tr th {
font-weight:normal;
text-align:left;
vertical-align:top;
}
table.arab, table.arab tr th, table.arab tr td {
border:none;
}
th.nobreak {
white-space:nowrap;
}
table.full { width:99%; margin-left:1px; }
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
table.t td { vertical-align: top; }
td.half { width:50%; }
td.third { width:33%; }
form table td { padding:5px; }
/* lists */
dd { padding-bottom:0.5ex; }
dl.inside dt { float:left; }
/* search */
div.search span.result { font-size:larger; }
div.search span.info { font-size:smaller; font-style:italic; }
div.search p.result { display:none; }
img.logo {
float: right;
margin: 0 0 0 1ex;
padding: 0;
border: 1px solid #000;
opacity: 0.3;
background-color:#ffe;
}
/* images */
div.content a.feed img, div.journal a.feed img,
div.content a img.smiley, div.journal a img.smiley, img.smiley,
div.content a.inline img, div.journal a.inline img,
div.content li a.image img, div.journal li a.image img {
margin: 0; padding: 0; border: none;
}
div.image a img {
margin-bottom: 0;
}
div.image span.caption {
margin: 0 1em;
}
img {
max-width: 100%;
}
.left { float:left; margin-right: 1em; }
.right { float:right; margin-left: 1em; }
.half a img { height: 50%; width: 50%; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
table.aside {
float:right;
width:40%;
margin-left: 1em;
padding: 1ex;
border: 1px dotted #666;
}
table.aside td {
text-align:left;
}
div.sidebar {
float:right; width: 250px;
text-align: right;
border: none;
margin: 1ex;
}
.bigsidebar {
float:right;
width: 500px;
border: none;
margin-left: 1ex;
font-size: 80%;
}
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
dl.irc dt span.time { float:left; }
dl.irc dd { margin-left:22ex; }
/* portrait */
div.footer, div.comment, hr { clear: both; }
.portrait { float: left; font-size: small; margin-right: 1em; }
.portrait a { color: #999; }
div.left { float:left; margin:1em; padding: 0.5em; }
div.left p { display:table-cell; }
div.left p + p { display:table-caption; caption-side:bottom; }
p.table a { float:left; width:20ex; }
p.table + p { clear:both; }
/* no bleeding
@media screen {
div.content, div.rc {
overflow:hidden;
}
} */
/* rss */
channel * { display: block; }
channel title {
margin-top: 30pt;
}
copyright {
font-size: 14pt;
margin-top: 1em;
}
channel > link:before {
font-size: 18pt;
display: block;
margin: 1em;
padding: 0.5em;
content: "This is an RSS feed, designed to be read in a feed reader.";
color: red;
border: 1px solid red;
}
link, license {
font-size: 11pt;
margin-bottom: 9pt;
}
username:before { content: "Last edited by "; }
username:after { content: "."; }
generator:before { content: "Feed generated by "; }
generator:after { content: "."; }
channel description {
font-weight: bold;
}
item description {
font-style: italic;
font-weight: normal;
margin-bottom: 1em;
}
docs, language,
pubDate, lastBuildDate, ttl, guid, category, comments,
docs, image title, image link,
status, version, diff, history, importance {
display: none;
}

View File

@@ -1,642 +0,0 @@
/* This file is in the public domain. */
/* @import url(https://fonts.googleapis.com/css?family=Noticia+Text:400,400italic,700italic,700&subset=latin,latin-ext); */
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
@font-face {
font-family: 'Symbola';
src: local('Symbola'), url('/fonts/Symbola.woff') format('woff'), url('/fonts/Symbola.ttf') format('truetype');
}
body, rss {
font-family: "Noticia Text", Symbola, serif;
font-style: normal;
font-size: 14pt;
margin: 1em 3em;
padding:0;
}
@media print {
body {
font-size: 12pt;
color: #000;
background-color: #fff;
}
/* hide all the crap */
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
display:none;
}
div.content a.book,
div.content a.movie {
text-decoration: none;
}
a cite {
font-style: italic;
}
img[alt="RSS"] { display: none }
a.rss { font-size: 8pt }
}
/* headings: we can use larger sizes if we use a lighter color.
we cannot inherit the font-family because header and footer use a narrow font. */
h1, h2, h3, title {
font-family: inherit;
font-weight: normal;
}
h1, channel title {
font-size: 32pt;
margin: 1em 0 0.5em 0;
padding: 0.4em 0;
}
h2 {
font-size: 18pt;
margin: 2em 0 0 0;
padding: 0;
}
h3 {
font-size: inherit;
font-weight: bold;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
/* headers in the journal are smaller */
div.journal h1, item title {
font-size: inherit;
padding: 0;
clear: both;
border-bottom: 1px solid #000;
}
div.journal h2 {
font-family: inherit;
font-size: inherit;
}
div.journal h3 {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
font-style: italic;
}
div.journal hr {
visibility: hidden;
}
p.more {
margin-top: 3em;
}
/* Links in headings appear on journal pages. */
h1 a, h2 a, h3 a {
color:inherit;
text-decoration:none;
font-weight: normal;
}
h1 a:visited, h2 a:visited, h3 a:visited {
color: inherit;
}
/* for download buttons and the like */
.button {
display: inline-block;
font-size: 120%;
cursor: pointer;
padding: 0.4em 0.6em;
text-shadow: 0px -1px 0px #ccc;
background-color: #cfa;
border: 1px solid #9d8;
border-radius: 5px;
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
}
.button .icon {
color: #363;
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
}
.button a {
text-decoration: none;
font-weight: normal;
}
/* links */
a.pencil {
padding-left: 1ex;
text-decoration: none;
color: inherit;
visibility: hidden;
transition: visibility 0s 1s, opacity 1s linear;
opacity: 0;
}
*:hover > a.pencil {
visibility: visible;
transition: opacity .5s linear;
opacity: 1;
}
@media print {
a.pencil {
display: none;
}
}
a.number {
text-decoration: none;
}
/* stop floating content from flowing over the footer */
hr {
clear: both;
}
/* the distance between links in the navigation bars */
span.bar a {
margin-right: 1ex;
}
a img {
border: none;
}
/* search box in the top bar */
.header form, .header p {
display: inline;
white-space: nowrap;
}
label[for="searchlang"], #searchlang, .header input[type="submit"] {
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
visibility: hidden; position: absolute;
}
/* wrap on the iphone */
@media only screen and (max-device-width: 480px) {
}
.header input {
width: 10ex;
}
/* other form fields */
input[type="text"] {
padding: 0;
font-size: 80%;
line-height: 125%;
}
/* code */
textarea, pre, code, tt {
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, "Symbola";
font-size: 80%;
}
pre {
overflow:hidden;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
/* styling for divs that will be invisible when printing
when printing. */
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
font-size: 14pt;
}
@media print {
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
font-size: 8pt;
}
}
div.footer form.search {
display: none;
}
div.rc li + li {
margin-top: 1em;
}
div.rc li strong, table.history strong, strong.description {
font-family: inherit;
font-weight: inherit;
}
div.diff {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
color: #000;
}
div.old {
background-color: #ffffaf;
}
div.new {
background-color: #cfffcf;
}
div.refer {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
}
div.message {
background-color:#fee;
color:#000;
}
img.xml {
border:none;
padding:1px;
}
a.small img {
max-width:300px;
}
a.large img {
max-width:600px;
}
div.sister {
margin-right:1ex;
background-color:inherit;
}
div.sister p {
margin-top:0;
}
div.sister hr {
display:none;
}
div.sister img {
border:none;
}
div.near, div.definition {
background-color:#efe;
}
div.sidebar {
float:right;
border:1px dotted #000;
padding:0 1em;
}
div.sidebar ul {
padding-left:1em;
}
/* replacements, features */
ins {
color: #b33;
text-decoration: none;
}
acronym, abbr {
letter-spacing:0.1em;
font-variant:small-caps;
}
/* Interlink prefix not shown */
a .site, a .separator {
display: none;
}
a cite { font:inherit; }
/* browser borkage */
textarea[name="text"] { width:97%; height:80%; }
textarea[name="summary"] { width:97%; height:3em; }
/* comments */
textarea[name="aftertext"] { width:97%; height:10em; }
div.commentshown {
font-size: 12pt;
padding: 2em 0;
}
div.commenthidden {
display:none;
}
div.commentshown {
display:block;
}
p.comment {
margin-bottom: 0;
}
div.comment {
font-size: 14pt;
}
div.comment h2 {
margin-top: 5em;
}
/* comment pages with username, homepage, and email subscription */
.comment form span { display: block; }
.comment form span label { display: inline-block; width: 10em; }
/* IE sucks */
.comment input#username,
.comment input#homepage,
.comment input#mail { width: 20em; }
/* cal */
div.month { padding:0; margin:0 2ex; }
body > div.month {
float:right;
background-color: inherit;
border:solid thin;
padding:0 1ex;
}
.year > .month {
float:left;
}
.footer {
clear:both;
}
.month .title a.local {
background-color: inherit;
}
.month a.local {
background-color: #ddf;
}
.month a.today {
background-color: #fdd;
}
.month a {
color:inherit;
font-weight:inherit;
text-decoration: none;
background-color: #eee;
}
/* history tables and other tables */
table.history {
border: none;
}
td.history {
border: none;
}
table.user {
border: none;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 1em;
margin: 1em 2em;
}
table.user tr td, table.user tr th {
border: none;
padding: 0.2em 0.5em;
vertical-align: top;
}
table.arab tr th {
font-weight:normal;
text-align:left;
vertical-align:top;
}
table.arab, table.arab tr th, table.arab tr td {
border:none;
}
th.nobreak {
white-space:nowrap;
}
table.full { width:99%; margin-left:1px; }
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
table.t td { vertical-align: top; }
td.half { width:50%; }
td.third { width:33%; }
form table td { padding:5px; }
/* lists */
dd { padding-bottom:0.5ex; }
dl.inside dt { float:left; }
/* search */
div.search span.result { font-size:larger; }
div.search span.info { font-size:smaller; font-style:italic; }
div.search p.result { display:none; }
img.logo {
float: right;
margin: 0 0 0 1ex;
padding: 0;
border: 1px solid #000;
opacity: 0.3;
background-color:#ffe;
}
/* images */
div.content a.feed img, div.journal a.feed img,
div.content a img.smiley, div.journal a img.smiley, img.smiley,
div.content a.inline img, div.journal a.inline img,
div.content li a.image img, div.journal li a.image img {
margin: 0; padding: 0; border: none;
}
div.image a img {
margin-bottom: 0;
}
div.image span.caption {
margin: 0 1em;
}
img {
max-width: 100%;
}
.left { float:left; margin-right: 1em; }
.right { float:right; margin-left: 1em; }
.half a img { height: 50%; width: 50%; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
table.aside {
float:right;
width:40%;
margin-left: 1em;
padding: 1ex;
border: 1px dotted #666;
}
table.aside td {
text-align:left;
}
div.sidebar {
float:right; width: 250px;
text-align: right;
border: none;
margin: 1ex;
}
.bigsidebar {
float:right;
width: 500px;
border: none;
margin-left: 1ex;
font-size: 80%;
}
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
dl.irc dt span.time { float:left; }
dl.irc dd { margin-left:22ex; }
/* portrait */
div.footer, div.comment, hr { clear: both; }
.portrait { float: left; font-size: small; margin-right: 1em; }
.portrait a { color: #999; }
div.left { float:left; margin:1em; padding: 0.5em; }
div.left p { display:table-cell; }
div.left p + p { display:table-caption; caption-side:bottom; }
p.table a { float:left; width:20ex; }
p.table + p { clear:both; }
/* no bleeding
@media screen {
div.content, div.rc {
overflow:hidden;
}
} */
/* rss */
channel * { display: block; }
channel title {
margin-top: 30pt;
}
copyright {
font-size: 14pt;
margin-top: 1em;
}
channel > link:before {
font-size: 18pt;
display: block;
margin: 1em;
padding: 0.5em;
content: "This is an RSS feed, designed to be read in a feed reader.";
color: red;
border: 1px solid red;
}
link, license {
font-size: 11pt;
margin-bottom: 9pt;
}
username:before { content: "Last edited by "; }
username:after { content: "."; }
generator:before { content: "Feed generated by "; }
generator:after { content: "."; }
channel description {
font-weight: bold;
}
item description {
font-style: italic;
font-weight: normal;
margin-bottom: 1em;
}
docs, language,
pubDate, lastBuildDate, ttl, guid, category, comments,
docs, image title, image link,
status, version, diff, history, importance {
display: none;
}

View File

@@ -1,101 +0,0 @@
/* Default Theme */
h1 { font-weight:bold; font-size:x-large; border-bottom:solid;
margin-top:3ex; margin-bottom:3ex; clear:both; }
h1 a { text-decoration:none; color:#000; }
h1 a:hover { background:#ddd; }
h2 { font-weight:bold; font-size:larger; clear:both;
padding:0.7ex; border-bottom: 2px solid #000; }
h3 { font-weight:bold; font-size:medium; clear:both;
padding:0.7ex; border-bottom: 1px dashed #000; }
div.journal h1 { font-size:large; }
div.journal h2 { font-size:medium; }
div.journal h3 { font-size:medium; }
hr {
border:none;
color:black;
background-color:#000;
height:3px;
margin-top:2ex;
}
div.journal hr { display:none; }
a.definition { text-decoration:none; color:#000;
border-bottom: thin dashed; }
a.definition:hover { background:#ddd; }
span.permanentanchor { border-bottom: thin dashed; }
a.alias { text-decoration:none; border-bottom: thin dashed; }
a.near:link { color:#093; }
a.near:visited { color:#550; }
a.near:active { color:#0F0; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; color:#000; }
div.new { background-color:#CFFFCF; color:#000; }
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div.message { background-color:#FEE; color:#000; }
a.left { display:block; float:left; }
a.right { display:block; float:right; }
/* legacy for right: left: pic: normal: piclink: piclink-left: piclink-right: rules */
div.left { float:left; margin:1em; padding: 0.5em; border:solid; }
div.right { float:right; margin:1em; padding: 0.5em; border:solid; }
div.pic { border:solid; padding: 0.5em; text-align:center; }
div.pic table { display:inline; }
div.footer { clear:both; }
body { background-color:#FFF; color:#000; }
img.logo { border-style:none; float: right; }
table.history { border-style:none; }
td.history { border-style:solid }
table.user { border-style:solid; border-width:thin; }
table.user tr td { border-style:solid; border-width:thin; padding:5px; text-align:center; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { background-color:#EEF; color:#000; }
div.rss a:link { background-color:#EEF; color:#00F; }
div.rss a:visited { background-color:#EEF; color:#A0A; }
div.rss a:active { background-color:#EEF; color:#F00; }
textarea { width:100%; }
img.xml { border:none; padding:1px; }
div.sister { float:left; margin-right:1ex; background-color:#fff; }
div.sister p { margin-top:0; }
div.sister hr { display:none; }
div.sister img { border:none; }
div.near, div.definition { background-color:#efe; }
/* Two Column Theme */
body.two { background-color:#FFF; color:#000; width:70ex }
body.two img.logo { border-style:none; position:absolute; top:1ex; left:75ex; }
body.two span.gotobar { visibility:hidden; position:absolute;
top:80px; left:75ex; width:20ex }
body.two span.gotobar a { visibility:visible; display:block; }
body.two span.gotobar + br { display:none; }
/* Beige Two Column Theme */
body.beige { background-color:#FFE; color:#000; width:70ex }
body.beige img.logo { border:solid black; position:absolute;
top:1ex; left:75ex; }
body.beige span.gotobar { visibility:hidden; position:absolute;
top:80px; left:75ex; width:20ex }
body.beige span.gotobar a { visibility:visible; display:block; }
body.beige span.gotobar + br { display:none; }
/* Left Theme */
body.right { margin-left:25ex }
body.right > div.header > a:first-child { width:20ex;
text-align:right; display:block; position: absolute; top: 1ex; left:1ex; }
body.right span.gotobar { position:absolute;
top:100px; left:1ex; width:20ex; visibility:hidden; }
body.right span.gotobar a { visibility:visible; display:block;
width:20ex; text-align: right; }
/* Black Theme */
body.black { background-color:#000; color:#BBB; width:70ex }
body.black * { background-color:#000; color:#BBB }

View File

@@ -1,161 +0,0 @@
/* Adapted for Oddmuse by Alex Schroeder <alex@emacswiki.org> */
/* Based on the dusty brown theme for wordpress by Noufal Ibrahim <nkv at hcoop dot net> */
body {
border: solid 2px #565;
border-top: solid 3px #565;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
margin: 2ex;
padding: 0;
background-color: #edead7;
color: black;
}
div.content {
padding: 3ex 7%;
}
div.journal hr { display:none; }
a { color: #675; }
a:visited { color: #342; }
a:hover {
color: #9a8;
text-decoration: underline;
}
a img {
border: none;
}
span.gotobar {
color: #444;
width: 70%;
margin: 10px 0 10px 0;
padding: 0px;
text-align: center;
}
span.gotobar a:link {
color: black;
}
div.header {
background: #f7eccf;
border-bottom: 1px solid #d1ccc2;
letter-spacing: 0.2em;
margin: 0;
padding: 1ex;
text-align: left;
font-size: small;
}
.left { float:left; }
.right { float:right; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
div.header a {
color: black;
text-decoration: none;
}
div.footer, span.specialdays {
font-size: x-small;
padding: 1ex;
}
div.sister img {
border:1px solid; margin-top:1ex; margin-left:1ex;
}
div.one, div.two {
padding: 1ex;
}
div.one {
background-color:#dddac7;
}
form { padding: 1ex; }
div.footer form { padding: 0; }
div.rc { padding: 1ex; }
div.rc hr { display: none; }
textarea {
width: 100%;
height: 80%;
border: 1px solid #333;
background-color: #edead7;
}
textarea[name="aftertext"] {
height: 10em;
}
textarea[name="summary"] {
height:3em;
}
pre {
border: 1px solid black;
background-color: #eee;
margin-left: 2%;
padding: 1em;
}
pre span {
display:none;
}
h2 {
border-bottom: 1px dotted #ccc;
letter-spacing: 0.2em;
margin: 15px 0 2px 0;
padding-bottom: 2px;
}
h3 {
border-bottom: dotted 1px #eee;
font-family: "Times New Roman", Times, serif;
margin-top: 0;
}
div.month { float:right; margin:0; padding:0 1ex; }
div.footer { clear:both; }
div.year div.month { float:left; }
div.cal { padding: 1ex; }
div.cal pre { margin:0; padding:1ex; border:1px solid #444; background-color:#ffe; }
div.cal a { text-decoration:none; }
div.cal a.edit { color:#666; }
div.cal a.local { font-weight:bold; }
div.cal a.today { background: #e8d9b4; }
div.cal a:hover { background: #e8d9b4; color: #333; }
img.logo { float: right; clear: right; border:1px solid; margin-left:1em; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
div.message { background-color:#FEE; }
div.journal h1 { font-size:large; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user { border-style:none; border-width:thin; }
table.user tr td { border-style:none; border-width:thin; padding:5px; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
@media print {
span.gotobar, div.footer { display: none; }
a, a:link, a:visited { color:#000; text-decoration:none; font-style:oblique; }
h1 a, h2 a, h3 a, h4 a { font-style:normal; }
a.edit, div.footer, div.refer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after { content:"[" attr(href) "]"; }
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
}

View File

@@ -1,235 +0,0 @@
/* [Default Theme] */
img {
border-style:none;
}
img.upload {
background: inherit;
border: 1px solid #aaa;
padding: 5px;
}
img.logo {
float: right;
clear: right;
}
div.diff {
padding-left:5%;
padding-right:5%;
}
div.old {
background-color:#FFFFAF;
}
div.new {
background-color:#CFFFCF;
}
div.refer {
padding-left: 5%;
padding-right: 5%;
font-size: 80%;
}
div.message {
background-color:#FEE;
}
div.sister {
float:left;
margin-right:1ex;
background-color:#fff;
}
div.sister p {
margin-top:0;
}
div.sister hr {
display:none;
}
div.near, div.definition {
background-color:#efe;
}
div.near p, div.definition {
margin-top: 0;
}
/* get rid of useless "10 results found" when using indexed search. */
div.search p.result { display:none; }
form.tiny, form.tiny p {
display:inline;
white-space:nowrap;
}
form.tiny input {
margin: 0.1em;
width: 10em;
font-size: 80%;
font-family: inherit;
}
/* portrait support */
div.color {
clear:left;
}
div.one {
background-color:#eee;
padding: 0.1ex 0;
}
img.portrait {
float:left;
clear:left;
background-color:#fff;
border:#999 1px solid;
padding:10px;
margin:10px;
}
div.portrait {
float: left;
clear: left;
font-size: xx-small;
padding-left: 10px;
}
div.portrait + p {
min-height:70px;
}
div.portrait img.portrait {
float:none;
margin:10px 10px 0 0;
}
div.portrait a {
text-decoration:none;
color:#999;
}
dl.irc dt {
width:15ex;
float:left;
text-align:right;
clear:left;
}
dl.irc dt span.time { display:none; }
dl.irc dd {
margin-left:17ex;
}
table.history {
border-style:none;
}
td.history {
border-style:none;
}
span.result {
font-size:larger;
}
span.info {
font-size:smaller;
font-style:italic;
}
div.rss {
background-color:#EEF;
}
.left { float:left; margin-right:1em; }
.right { float:right; margin-left:1em; }
a.definition {
color:#000;
text-decoration:none;
border-bottom:dashed 1px;
}
a.alias {
text-decoration:none;
border-bottom:dashed 1px;
}
a.near:link {
color:#093;
}
a.near:visited {
color:#550;
}
a.tag:before {
content:"\2601\ ";
}
/* cal */
pre.cal {
float:left;
margin:3ex;
height:20ex;
}
pre.cal a {
text-decoration:none;
font-weight:bold;
}
pre.cal a:hover {
background-color:#eef;
}
h2, h3, h4, h5, h6, hr, div.footer {
clear:both;
}
div.footer {
margin-top: 2em;
}
/* printable index */
div.letter br {
display: none;
}
div.letter h2 {
clear: both;
padding-top: 2ex;
border-bottom: solid 1px;
}
div.letter > a {
display: block;
width: 40ex;
float: left;
border:none;
}
textarea[name="text"] {
width:100%;
height:80%;
}
textarea[name="summary"] {
width:100%;
height:3em;
}
div.comment textarea {
height:10em;
}
/* calendar */
div.month {
padding:0;
margin:0 2ex;
}
div.year div.month {
float:left;
}
div.month a {
text-decoration:none;;
}
div.month a.edit {
color:inherit;
}
div.month a.local {
font-weight:bold;
}
/* highlighting */
/* Equivalent to Output::HTML */
span.linecomment { color: green; }
span.blockcomment { color: green; }
span.prepro { color: purple; }
span.select { font-weight: bold; }
span.quote { color: blue; }
span.category_1 { color: teal; }
span.category_2 { color: blue; }
span.category_3 { color: blue; }

View File

@@ -1,547 +0,0 @@
body, rss {
font-family: Garamond, GaramondNo8, "Bookman Old Style",
Cochin, Baskerville, serif;
font-size: 16pt;
line-height: 20pt;
background-color:#ffe;
color:#630;
margin:1em 3em;
padding:0;
}
/* headings: we can use larger sizes if we use a lighter color */
h1, h2, h3, title {
font-family: Garamond, GaramondNo8, "Bookman Old Style", Cochin, Baskerville, serif;
font-weight:normal;
line-height: 100%;
}
h1, channel title {
font-size: 32pt;
margin: 1em 0 0.5em 0;
padding: 0.4em 0;
color: #666;
}
h2 {
font-size: 18pt;
margin: 2em 0 0 0;
padding: 0;
color: #555;
}
h3 {
font-size: inherit;
font-weight: bold;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
/* headers in the journal are smaller */
div.journal h1, item title {
font-size: inherit;
padding: 0;
clear: both;
border-bottom: 1px solid #000;
}
div.journal h2 {
font-family: inherit;
font-size: inherit;
}
div.journal h3 {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
font-style: italic;
}
div.journal hr {
display:none;
}
p.more {
margin-top: 3em;
}
/* Links in headings appear on journal pages. */
h1 a, h2 a, h3 a {
color:#666;
font-weight: normal;
}
h1 a:visited, h2 a:visited, h3 a:visited {
color: inherit;
}
/* stop floating content from flowing over the footer */
hr {
clear: both;
}
/* the distance between links in the navigation bars */
span.bar a {
margin-right: 1ex;
}
/* search box in the top bar */
form.tiny, form.tiny p {
display: inline;
white-space: nowrap;
}
form.tiny input {
padding: 0;
width: 10ex;
font-size: 80%;
}
/* code */
pre, code, tt {
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace;
font-size: 80%;
line-height: 110%;
}
/* styling for divs that will be invisible when printing
when printing. */
div.header, div.footer, div.near, div.definition {
font-family: "Abadi MT Condensed Light", "Arial Narrow", Arial, sans-serif;
font-size: 75%;
line-height: 110%;
}
div.rc li {
line-height: 110%;
}
div.rc li + li {
margin-top: 1em;
}
div.rc li strong, table.history strong, strong.description {
font-weight: inherit;
}
div.diff {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
line-height: 14pt;
color: #000;
}
div.old {
background-color: #ffffaf;
}
div.new {
background-color: #cfffcf;
}
div.refer {
padding-left: 5%;
padding-right: 5%;
font-size: 12pt;
line-height: 13pt;
}
div.refer a:first-child:before { content: "" }
div.refer a:before { content: "• " }
div.message {
background-color:#fee;
color:#000;
}
img.xml {
border:none;
padding:1px;
}
a.small img {
max-width:300px;
}
a.large img {
max-width:600px;
}
div.sister {
margin-right:1ex;
background-color:inherit;
}
div.sister p {
margin-top:0;
}
div.sister hr {
display:none;
}
div.sister img {
border:none;
background-color:#ffe;
}
div.near, div.definition {
background-color:#efe;
}
div.sidebar {
float:right;
border:1px dotted #000;
padding:0 1em;
}
div.sidebar ul {
padding-left:1em;
}
/* replacements, features */
del {
color: #666;
}
ins {
color: #b33;
text-decoration: none;
}
acronym, abbr {
letter-spacing:0.1em;
font-variant:small-caps;
}
/* Links */
a {
text-decoration:none;
color:#e33;
}
a:visited {
color:#c66;
}
a[class="url outside"]:before {
content:"\2197";
}
a:hover {
background-color:#dfd;
}
a.image:hover {
background-color: inherit;
}
a.near:link {
color:#093;
}
a.near:visited {
color:#550;
}
a.near:active {
color:#0F0;
}
/* Interlink prefix not shown */
a .site, a .separator {
display: none;
}
a cite { font:inherit; }
a.book, a.movie { font:inherit; text-decoration:underline; }
.twitter a { color: #394; }
.twitter a:visited { color: #386; }
/* browser borkage */
textarea[name="text"] { width:97%; height:80%; }
textarea[name="summary"] { width:97%; height:3em; }
/* comments */
textarea[name="aftertext"] { width:97%; height:10em; }
div.commentshown {
background-color:#ffc;
padding-bottom:1ex;
}
div.commenthidden {
display:none;
}
div.commentshown {
display:block;
}
p.comment {
margin-bottom: 0;
}
/* comment pages with username, homepage, and email subscription */
.comment span { display: block; }
.comment span label { display: inline-block; width: 10em; }
/* IE sucks */
.comment input#username,
.comment input#homepage,
.comment input#mail { width: 20em; }
/* cal */
div.month { padding:0; margin:0 2ex; }
body > div.month {
float:right;
background-color: inherit;
border:solid thin;
padding:0 1ex;
}
div.year > div.month {
float:left;
}
div.footer {
clear:both;
}
div.content div.month a.edit {
color:inherit;
font-weight:inherit;
text-decoration: none;
}
/* history tables and other tables */
table.history {
border: none;
}
td.history {
border: none;
}
table.user {
border: none;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 1em;
margin: 1em 2em;
}
table.user tr td, table.user tr th {
border: none;
padding: 0.2em 0.5em;
vertical-align: top;
}
table.arab tr th {
font-weight:normal;
text-align:left;
vertical-align:top;
}
table.arab, table.arab tr th, table.arab tr td {
border:none;
}
th.nobreak {
white-space:nowrap;
}
table.full { width:99%; margin-left:1px; }
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
table.t td { vertical-align: top; }
td.half { width:50%; }
td.third { width:33%; }
form table td { padding:5px; }
/* lists */
dd { padding-bottom:0.5ex; }
dl.inside dt { float:left; }
/* search */
div.search span.result { font-size:larger; }
div.search span.info { font-size:smaller; font-style:italic; }
div.search p.result { display:none; }
img.logo {
float: right;
margin: 0;
padding: 0;
border: 1px solid #000;
background-color:#ffe;
}
/* hanging indents
div.content p {
padding: 0;
margin: 0;
}
div.content p + p {
text-indent: 1em;
}
div.content p.comment {
margin-top: 1em;
text-indent: 0;
} */
/* images */
div.content a.feed img, div.journal a.feed img,
div.content a img.smiley, div.journal a img.smiley, img.smiley,
div.content a.inline img, div.journal a.inline img,
div.content li a.image img, div.journal li a.image img {
margin: 0; padding: 0; border: none;
}
div.image a img {
margin-bottom: 0;
}
div.image span.caption {
margin: 0 1em;
}
.left { float:left; margin-right: 1em; }
.right { float:right; margin-left: 1em; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
table.aside {
float:right;
width:40%;
margin-left: 1em;
padding: 1ex;
border: 1px dotted #666;
}
table.aside td {
text-align:left;
}
div.sidebar {
float:right; width: 250px;
text-align: right;
border: none;
margin: 1ex;
}
.bigsidebar {
float:right;
width: 500px;
border: none;
margin-left: 1ex;
font-size: 80%;
}
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
dl.irc dt span.time { float:left; }
dl.irc dd { margin-left:22ex; }
/* portrait */
div.footer, div.comment, hr { clear: both; }
.portrait { float: left; font-size: small; margin-right: 1em; }
.portrait { line-height: 1em; }
.portrait a { color: #999; }
div.left { float:left; margin:1em; padding: 0.5em; }
div.left p { display:table-cell; }
div.left p + p { display:table-caption; caption-side:bottom; }
p.table a { float:left; width:20ex; }
p.table + p { clear:both; }
/* legacy for right: left: pic: normal: piclink: piclink-left: piclink-right: rules */
div.right { float:right; margin:1em; padding: 0.5em; }
div.right p { display:table-cell; }
div.right p + p { display:table-caption; caption-side:bottom; }
div.pic { border:1px dotted; padding:0.5em; }
div.pic div { display:inline; margin:1ex; }
div.pic div p { display:table-cell; }
div.pic div p + p { display:table-caption; caption-side:bottom; }
@media screen {
/* no bleeding */
div.content, div.rc {
overflow:hidden;
}
}
@media print {
body {
font-size: 12pt;
line-height: 13pt;
color: #000;
background-color: #fff;
}
/* hide all the crap */
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
div.rc form, form.tiny, p.comment {
display:none;
}
a,
a:visited,
div.content a.near:link,
div.content a.near:visited,
div.content a.near:active {
color:inherit;
font-weight: bold;
}
div.content a.feed {
display: none;
}
div.content a.book,
div.content a.movie {
text-decoration: none;
}
a cite {
font-style: italic;
}
/* no difference */
pre, code, tt {
font-size: inherit;
line-height: inherit;
}
/* no dotted underlines */
acronym, abbr {
border: none;
text-decoration: none;
}
/* headings */
h1 {
color: inherit;
margin-top: 2em;
}
h2 {
color:inherit;
margin: 1em 0;
font-variant: small-caps;
}
h3 {
font-weight:inherit;
font-style:italic;
color:inherit;
margin: 1em 0;
}
h1 a, h2 a, h3 a {
color: inherit;
}
div.journal h1 a:visited,
div.journal h2 a:visited,
div.journal h3 a:visited {
color: inherit;
}
}
/* rss */
channel * { display: block; }
channel title {
margin-top: 30pt;
}
copyright {
font-size: 14pt;
line-height: 16pt;
margin-top: 1em;
}
channel > link:before {
font-size: 18pt;
display: block;
margin: 1em;
padding: 0.5em;
content: "This is an RSS feed, designed to be read in a feed reader.";
color: red;
border: 1px solid red;
}
link, license {
font-size: 11pt;
margin-bottom: 9pt;
}
username:before { content: "Last edited by "; }
username:after { content: "."; }
generator:before { content: "Feed generated by "; }
generator:after { content: "."; }
channel description {
font-weight: bold;
}
item description {
font-style: italic;
font-weight: normal;
margin-bottom: 1em;
}
docs, language,
pubDate, lastBuildDate, ttl, guid, category, comments,
docs, image title, image link,
status, version, diff, history, importance {
display: none;
}

View File

@@ -1,264 +0,0 @@
/* Color Scheme: links: #851; visited links: #542; background #aa8;
Plus black, white, and #333 for headers
This file is in the public domain.
*/
body {
font-family: "Times New Roman",Georgia,Times;
color: #000;
background-color: #aa8;
margin:1em 2em;
}
@media print {
body {
background-color: white;
font-size:12pt;
}
}
/* iPhone */
@media only screen and (max-device-width: 480px) {
body { font-size: 200%; }
}
/* iPad */
@media only screen and (min-device-width: 481px) and (max-device-width: 900px) {
body { font-size: 150%; }
textarea,input { font-size: 100%; }
img { max-width: 550px !important; }
}
div.browse {
min-height: 3em;
}
div.footer {
clear:both;
font-size: 90%;
}
form.tiny, form.tiny p {
display:inline;
white-space:nowrap;
}
form.tiny input {
padding:0;
width:10ex;
font-size:10px;
}
div.commentshown {
padding-bottom: 1ex;
padding-left: 2em;
border-left: 2px solid black;
font-size: smaller;
}
div.commenthidden { display:none; }
div.commentshown { display:block; }
/* comment pages with username, homepage, and email subscription */
.comment span { display: block; }
.comment span label {
display: inline-block; width: 10em;
}
input#mail, input#homepage, input#username {
display: inline-block; width: 20em;
}
h1 {
font-weight: bold;
color: white;
background-color: #333;
width: 100%;
font-size: 130%;
padding: 0.2em;
}
h1 a:link, h1 a:visited {
color: inherit;
background-color: inherit;
text-decoration: inherit;
}
div.journal h1 {
font-size:large;
background-color: #555;
}
h2 {
font-weight: bold;
color: white;
background-color: #000;
/* width: 98%; */
font-size: 110%;
padding: 0.2em;
clear: both;
}
a:link {
font-weight: bold;
color: #851;
background-color: inherit;
}
a:visited {
font-weight: bold;
color: #542;
background-color: inherit;
}
a:active {
font-weight: bold;
color:#a41;
background-color: inherit;
}
.button {
display: inline-block;
font-size: 150%;
cursor: pointer;
padding: 0.3em 0.5em;
text-shadow: 0px -1px 0px #ccc;
background-color: #cfa;
border: 1px solid #9d8;
border-radius: 5px;
box-shadow: 0px 1px 3px white inset,
0px 1px 3px black;
}
.button a {
text-decoration: none;
font-weight: normal;
}
/* table of contents */
.toc {
font-size: smaller;
border-left: 1em solid #886;
}
.toc ol {
list-style-type: none;
padding-left: 1em;
}
.toc a {
font-weight: normal;
}
/* images with links, captions, etc */
div.image { display: inline; margin: 1em; font-size: 90%; text-align: center; }
.left { float: left; margin-right: 1em; }
.right { float: right; margin-left: 1em; }
div.right .right { float: none; }
div.left .left { float: none; }
.caption { padding: 0 1em; }
.license { font-size: small; }
.aside {
font-size: small;
width: 30%;
float: right;
margin-left: 1em;
margin-bottom: 1em;
padding-left: 1em;
}
.aside img.smiley { height: 1em; }
.narrow {
width: 70%;
}
a img { border: 1px solid #333; }
.fit img { width: 80%; text-align: center; margin: 2em 8%; }
.half img { width: 50%; height: 50%; text-align: center; margin: 2em 8%; }
.noborder img { border: none; }
.twenty img { max-width: 20em; }
em.underline { font-weight: bold; }
.bar a { padding-right: 1em; }
textarea { width:100%; }
div.edit { padding-right: 1em; }
img.logo {
float: right;
clear: right;
border-style:none;
margin-left: 1em;
margin-bottom: 1ex;
border: 1px solid black;
}
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
/* div.message { background-color:#FEE; } */
div.message {
background-color: inherit;
font-size: smaller;
}
table.history { border-style:none; }
td.history { border-style:none; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rc hr { display: none; }
@media print {
a, a:link, a:visited {
color:#000;
text-decoration:none;
font-weight: normal;
}
h1 a, h2 a, h3 a, h4 a { font-style: normal; }
a.edit, div.footer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after {
content:"[" attr(href) "]";
}
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
}
/* Tables */
table.user {
margin: 1em 0;
padding: 0 1em;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
div.aside table.user {
margin: 1em 0;
padding: 0;
}
table.user td, table.user th {
border-style: none;
padding:5px 10px;
vertical-align: top;
}
table.user th { font-weight:bold; }
table.user td.r { text-align:right; }
table.user td.l { text-align:left; }
table.user td.c { text-align:center; }
table.user td.j { text-align:justify; }
table.user td.mark { background-color:yellow; }
@media print {
table {
font-size: 9pt;
margin: 0;
}
table.user td, table.user th {
padding: 0 1ex;
}
}
/* Help */
.edit table {
font-size: small;
}
/* Calendar */
div.month { margin:0; padding:0; font-size:x-small; float:right; }
div.content div.month { float:none; }
div.year div.month { float:left; font-size:medium; padding:1ex; }
div.month pre { margin:0; padding:0 0 0 1ex; }
div.month a { text-decoration:none; font: inherit; }
div.month span.title a { font: inherit; }
/* no difference between a.exact and a.collection */
div.month a.local { font-weight: bold; }
div.month a.local:link { color: #562; }
div.month a.local:visited { color: #542; }
div.month a.today { background-color: #faa; }
div.month span.title a.local { font-weight: normal; color: #842; }
@media print {
div.month { display: none; }
div.year div.month { display: block; }
div.year div.month a { display: inline; }
}

View File

@@ -1,66 +0,0 @@
html, body { font:"lucida", sans-serif; color:#000; background:#fefefe }
h1 { font-weight:bold; font-size:x-large; border-bottom:solid;
margin-top:3ex; margin-bottom:3ex; }
h1 a { text-decoration:none; color:#000; }
h1 a:hover { background:#ddd; }
h2 { font-weight:bold; font-size:larger;
color:#fff; background:#27b; padding:0.7ex; }
h2 a { text-decoration:none; color:#fff; }
h2 a:hover { background:#49c; }
h3 { font-weight:bold; font-size:medium;
color:#fff; background:#5af; padding:0.7ex; }
h3 a { text-decoration:none; color:#fff; }
p a.definition {
font-weight:bold; font-size:larger;
color:#fff; background:#27b; padding:0.7ex;
text-decoration:none; display:block; margin-bottom:1ex;
}
p a.definition:hover { background:#49c; }
a.alias { text-decoration:none; border-bottom: thin dashed; }
a.near:link { color:#093; }
a.near:visited { color:#550; }
a.near:active { color:#0F0; }
div.footer { border-top:solid; padding-top:2ex; margin-top:5ex;
margin-bottom:1ex; }
div.footer hr { display:none; }
div.rc hr { display:none; }
div.rc { margin-top:4ex; }
div.old { background-color:#ffd; }
div.new { background-color:#dfd; }
div.diff { padding-left:2ex; padding-right:2ex; border-style:dashed;
margin-left:5%; margin-right:5%; margin-bottom:5ex; }
div.diff + hr { display: none }
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div.rss { background-color:#eef; }
div.message { background-color:#fee; color:#f00; border:solid #f00;
font-weight:bold; padding-left:1em; margin:1em; }
div.sister { float:left; margin-right:1ex; background-color:#fff; }
div.sister p { margin-top:0; border-top:solid; }
div.sister hr { display:none; }
div.near, div.definition { background-color:#efe; border-top:solid; }
table.user { border-style:dotted; border-width:thin; padding:1ex;
margin-bottom:1ex; width:90%; text-align:center; margin-left:5%; }
table.user tr td { padding-left:1em; padding-right:1em; text-align:center; }
dt { font-weight:bold; }
li { margin-bottom:0.5ex; }
img { border:0; }
pre, img.upload {
border: #777 1px solid; padding: 0.5em;
margin-left: 1em; margin-right: 2em;
white-space: pre;
background-color: #e6e6e6; color: black; }
img.logo {
float:right; clear:right; background-color:#fff;
border:#999 1px solid; padding:1ex; margin:1ex; }
@media print {
span.gotobar, span.specialdays, div.refer, div.footer, div.near,
div.definition, div.sister { display:none }
}

347
css/bootstrap.css vendored
View File

@@ -1,347 +0,0 @@
/* Public Domain
Written by Alex Schroeder and Evgkeni Sampelnikof */
textarea { width:100%; }
h1 a { color: inherit }
div.journal h1 { font-size:large; }
table { margin-bottom: 1em; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
img.portrait { float: left; clear: left; margin: 1ex; border:#999 1px solid; }
div.footer, div.comment, hr { clear: both; }
div.portrait { float: left; clear: left; font-size: xx-small; margin-right: 1em; }
div.portrait img.portrait { float: none; margin: 0; }
div.portrait a { text-decoration: none; color: #999; }
div.color {
clear: both;
padding: 1ex 2em;
margin: 0 -1em;
box-shadow: inset 40px 0px 20px -20px #EEEEEE,
inset -40px 0px 20px -20px #EEEEEE;
}
.left { float:left; margin-right:1em; }
.right { float:right; margin-left:1em; }
div.two, div.one {
color: #444;
background-color: #f8f8f8;
margin: 7px -1em;
box-shadow: inset 40px 0px 20px -20px #EEEEEE,
inset -40px 0px 20px -20px #EEEEEE,
0px 8px 4px -8px #ccc,
0px -6px 4px -8px #ccc;
}
.irc .time { display: none; }
dl.irc dt { float: left; text-align: right; width: 13ex; }
dl.irc dd { margin-left: 15ex; display: block; }
div.toc {
background-color: #FAFAFA;
border: 1px solid #dddddd;
font-family: sans-serif;
font-size: 80%;
line-height: 90%;
margin: 3em 0 1em;
padding: 1em 0px 0px 1em;
border-radius: 3px;
}
div.toc li {
font-size: 12px;
line-height: 20px;
}
.ell .toc li {
display: inline;
padding-right: 1em;
}
div.letter { column-count: 3; -webkit-column-count: 3; -moz-column-count: 3 }
.footer .edit.bar {
display: block;
text-align: center;
}
.specialdays {
line-height: 1em; /* has no effect: set for div.header instead? */
font-size: 0.9em;
}
.footer .time {
display: block;
text-align: center;
color: #666;
font-size: 10px;
font-weight: bold;
line-height: 12px;
}
.footer {
color: #888;
line-height: 20px;
}
.footer .legal {
text-align: justify;
-moz-text-align-last: center;
text-align-last: center;
font-size: 0.9em;
line-height: 1.4em;
margin: 0 120px 0;
padding: 1em 0 0;
}
.footer .legal a {
color: #888;
text-decoration: underline;
}
.translation.bar {
display: block;
text-align: center;
font-size: 0.8em;
padding-top: 5px;
}
/* .include.WikiLanguageMenu could share those styles,
(altough it might be better to leave it left-aligned) */
.translation.bar a:nth-child(n+2) {
border-left: 1px solid #999;
}
.translation.bar a {
padding: 6px;
display: inline-block;
}
.navbar .nav > li > a.brand {
color: #C76A0D;
padding: 5px 8px 0;
}
a {
color: #C76A0D;
}
a:hover {
color: #8F3E0F;
}
body {
word-wrap: break-word;
padding-left: 20px;
padding-right: 20px;
background-color: #EEEEEE;
color: #000;
font-size: 0.8em;
}
pre {
font-size: 1em;
line-height: 1.5em;
}
hr {
border-top: #ccc 1px solid;
border-bottom: #fff 1px solid;
}
.footer_wrapper {
background: #EEEEEE;
background: linear-gradient(to bottom, #EEEEEE, #CCCCCC);
padding-bottom: 20px;
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
.footer.container hr:first-child {
display: none;
}
.footer hr {
margin: 10px 100px 0;
}
.footer.container {
padding-top: 10px;
margin-top: 10px;
background: radial-gradient(
50% 8px at top,
rgba(0, 0, 0, 0.3) 0%,
rgba(0, 0, 0, 0) 100%
);
box-shadow: 0 -1px 2px -2px white;
/* border-top: 1px #ccc solid; */
}
body, li {
line-height: 2em;
}
h1, h2, h3 {
text-shadow: 1px 1px white;
}
.navbar-inner {
border-radius: 0 0 4px 4px;
border-width: 0 1px 1px;
}
.navbar .nav > li > a {
padding: 10px;
}
label[for="searchlang"], input#searchlang {
display: none;
}
@media (max-width:480px){
h1 { font-size: 1.8em; }
.navbar .nav > li > a {
padding: 0px 2px;
line-height: 10px;
}
/* hide CC logo */
.footer .licence {
display: none;
}
/* make legal foo*/
.footer .legal {
margin: 5px 5px 5px;
}
.footer .bar a {
margin: 2px 0;
}
}
/* Right-alignment. Will make it harder to achieve responsive behaviour:
twitter.github.com/bootstrap/components.html#navbar
Look for "Responsive navbar" heading.
If this is undesirable, remove the lines with the "RA" comment;
*/
.navbar .nav {
text-align: right; /* RA */
*text-align: left; /* RA */
width: 100%; /* RA */
}
.navbar .nav > li:first-child {
float: left; /* RA */
}
.navbar .nav > li {
display: inline-block; /* RA */
float: none; /* RA */
*float: left;
*display: inline;
line-height: 20px;
}
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
border-color: rgba(236,160,73,.8);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),
0 0 8px rgba(236,160,73,.6);
}
/* IE7/8 Flexibility */
.container,
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
width: auto;
max-width: 940px;
}
/* Don't widen the layout past 940 */
@media (min-width: 1200px) {
.container,
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
width: 940px;
}
}
div.comment {
background: radial-gradient(
50% 8px at top,
rgba(0, 0, 0, 0.3) 0%,
rgba(0, 0, 0, 0) 100%
);
background-repeat: no-repeat;
box-shadow: 0 -1px 2px -2px white;
padding-top: 20px;
}
div.comment p:nth-child(2) {
color: #666;
/* line-height: 15px; */
font-size: 0.9em;
line-height: 1.4em;
}
div.comment p:nth-child(1) {
margin-bottom: 0px;
}
.comment textarea {
width: 100%;
*width: auto;
resize: vertical;
*resize: both;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* highlighting source code */
span.builtin { color: #483d8b; } /* DarkSlateBlue */
span.comment { color: #b22222; } /* Firebrick */
span.constant { color: #008b8b; } /* DarkCyan */
span.function { color: #0000ff; } /* Blue1 */
span.keyword { color: #7f007f; } /* Purple */
span.string { color: #8b475d; } /* VioletRed4 */
span.type { color: #228b22; } /* ForestGreen */
span.warning { color: #ff0000; font-weight: bold; } /* Red1 */
span.comment span,
span.string span { color: inherit; }
span.comment span.important.constant,
span.string span.important.constant { color: #008b8b; }
/* old: Equivalent to Output::HTML */
span.linecomment { color: #b22222; } /* firebrick */
span.blockcomment { color: #b22222; } /* firebrick */
span.prepro { color: purple; }
span.select { font-weight: bold; }
span.quote { color: #8b475d; } /* VioletRed4 */
span.category_1 { color: teal; }
span.category_2 { color: blue; }
span.category_3 { color: blue; }
code {
white-space: pre-wrap;
}
/* Local Variables: */
/* css-indent-offset: 4 */
/* End: */

View File

@@ -1,277 +0,0 @@
body {
margin: 0px 0px 20px 0px;
padding: 30px 40px;
background: #FFF;
font-family: "Lucida Grande", Verdana, Geneva, Arial, sans-serif;
font-size: small;
}
/* grey underlined links that turn black as you are about to click */
a {
color: #707070;
background-color: inherit;
text-decoration: none;
}
div.content a {
text-decoration: underline;
}
a:link {
color: #707070;
background-color: inherit;
}
a:visited {
color: #707070;
background-color: inherit;
}
a:active {
color: #000000;
background-color: inherit;
}
a:hover {
color: #000000;
background-color: inherit;
}
a.near:link { color: #036; background-color: inherit; }
a.near:visited { color: #69c; background-color: inherit; }
a.near:active { color: #390; background-color: inherit; }
a.near:hover { color: #390; background-color: inherit; }
a[class="url outside"]:before { content: "\2197"; }
body.safari a[class="url outside"]:before { content: url(http://www.emacswiki.org/alex/pics/arrow.png); }
/* goto bar, navigation bar, etc. */
span.bar a { margin-right: 1ex; }
/* logo on the right */
img.logo {
float: right;
padding: 0;
border: none;
}
/* headers */
h1, h2, h3 {
margin: 0px;
padding: 0px;
font-weight: normal;
line-height: normal;
clear: both;
}
/* dashed line and whitespace after the title */
div.header h1 {
font-size: 28pt;
font-family: "Century Gothic", "Gill Sans", Helvetica, sans-serif;
font-weight: 100;
letter-spacing: 0.07em;
margin-top: 30px;
padding-bottom: 30px;
margin-bottom: 30px;
border-bottom: 1px dashed #333;
}
div.header h1 a {
color: inherit;
background-color: inherit;
}
/* add a dashed line and whitespace before subheadings */
h2 {
margin-top: 2em;
padding-top: 2em;
border-top: 1px dashed #333;
}
/* after a subheading, no whitespace */
h2 + p, h3 + p {
margin-top: 0;
}
/* when the subheading starts the page, no dashed line and whitespace,
because that is already added by the header. */
h2:first-child {
padding-top: 0;
border: none;
}
/* major subtitles blue and not underlined, both for journals and normal pages.
within journals, do not use a horizontal line to separate entries. */
h2, div.journal h1 {
font-size: inherit;
font-weight: bold;
}
h3, div.journal h1 a {
color: #009;
background-color: inherit;
text-decoration: none;
}
hr {
border: none;
margin: 2em;
}
/* table on the new page */
p.table a { float: left; width: 20ex; }
p.table + p { clear: both; padding-top: 10px; }
/* edit pages */
textarea[name="text"] { width: 100%; height: 80%; }
textarea[name="summary"] { width: 100%; height: 3em; }
/* comments */
textarea[name="aftertext"] {
width: 100%;
height: 10em;
margin: 1em 0;
}
div.commentshown {
font-size: smaller;
padding: 0 2em 1ex 2em;
}
div.commentshown hr {
margin: 1em;
}
div.commenthidden { display: none; }
div.commentshown { display: block; }
p.comment { font-size: x-small; }
/* cal */
div.month {
padding: 0;
margin: 0 2ex;
}
div.month a {
text-decoration: none;
}
/* pre gets different colors below */
div.month pre {
color: inherit;
background-color: inherit;
}
body div.month {
float: right;
padding: 0 1ex;
}
div.year div.month {
float: left;
padding: 0;
}
div.month a.edit {
color: inherit;
background-color: inherit;
font-weight: inherit;
}
/* images, styles to use for the image extension */
a.image img {
border: none;
}
a.left {
float: left;
margin: 20px;
}
a.right {
float: right;
margin: 20px;
}
/* code */
pre {
font-family: "Andale Mono", Monaco, "Courrier New", monospace;
margin: 1em 0;
padding: 1em 2em;
color: #000;
background-color: #ddd;
}
/* diff */
div.diff { padding-left: 5%; padding-right: 5%; }
div.old { background-color: #FFFFAF; color: #000; }
div.new { background-color: #CFFFCF; color: #000; }
/* header stuff */
div.message { background-color: #FEE; color: #000; }
/* footer stuff */
div.footer {
clear: both;
font-size: smaller;
}
div.footer + hr {
border: none;
margin: 10px;
}
div.sister {
font-size: smaller;
margin-right: 1ex;
}
div.sister p {
margin-top: 0;
}
div.sister hr {
display: none;
}
div.sister img {
border: none;
vertical-align: top;
margin-right: 20px;
}
div.near, div.definition {
font-size: smaller;
}
div.refer hr {
display: none;
}
div.refer {
margin-top: 50px;
padding-left: 1ex;
border-left: 0.6ex solid #aaa;
font-size: smaller;
clear: both;
}
/* sidebar */
div.sidebar {
float: right;
border: 1px dotted #000;
padding: 0 1em;
}
div.sidebar ul {
padding-left: 1em;
}
/* printing */
@media print {
div.diff, div.diff+hr, div.refer, div.near, div.sister, div.cal, div.footer,
span.specialdays, span.gotobar, a.edit, a.number span,
div.rc form, div.definition { display: none; }
body { font: 12pt "Neep", "Arial", sans-serif; color: #000; }
a:link, a:visited { color: #000; text-decoration: none; font-style: oblique; }
a[class="url number"]:after, a[class="inter number"]:after { content: "[" attr(href) "]"; }
a[class="local number"]:after { content: "[" attr(title) "]"; }
a.near { font-weight: normal; text-decoration: none; font-style: oblique; }
a.near:link, a.near:visited, a.near:active, a.near:hover {
color: inherit; background-color: inherit;
}
a[class="near"]:after { content: " [" attr(title) "]"; }
}

View File

@@ -1,199 +0,0 @@
div.message { display:none; }
textarea { width:100%; }
body { background-color:rgb(255,250,240); color:rgb(139,69,19); }
img.logo {
float:right;
margin:0;
padding:0;
border:1px solid #000;
background-color:rgb(255,250,240);
}
hr {
clear: both;
}
a {
color:firebrick;
}
h1 a {
color:DarkOliveGreen;
text-decoration:none;
}
h1 {
font-size:48pt;
color:DarkOliveGreen;
background-color:LemonChiffon;
padding:0 0.5ex;
margin:0 0 1ex 0;
border: 2px solid #bdb7bd; /* DarkKhaki */
clear:both;
}
h2 {
color:DarkOliveGreen;
background-color:LemonChiffon;
font-size:22px;
padding:0 0.5ex;
margin-top:3ex;
margin-bottom:3ex;
border: 2px solid DarkKhaki;
clear:both;
}
h3 {
color:black;
font-size:18px;
padding:2px;
margin-top:4ex;
border-bottom: 1px solid black;
clear:both;
}
h4 {
color:#666;
font-size:18px;
padding:2px;
margin-top:5px;
text-decoration:underline;
clear:both;
}
h5 {
font-size:14pt;
color:DarkOliveGreen;
padding: 0;
margin: 0;
}
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; color:#000; }
div.new { background-color:#CFFFCF; color:#000; }
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div.message { background-color:#FEE; color:#000; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user {
border-collapse:collapse;
}
table.user tr td {
border:solid 1px rgb(139,69,19);
padding:0.5ex;
margin:0;
text-align:left;
}
form table td {
padding:5px;
}
table.anmeldung td { border-style:none; padding:1ex;}
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { background-color:#EEF; color:#000; }
div.rss a:link { background-color:#EEF; color:#00F; }
div.rss a:visited { background-color:#EEF; color:#A0A; }
div.rss a:active { background-color:#EEF; color:#F00; }
img.left { float:left; margin:1em; }
img.right { float:right; margin:1em; }
div.pic table { display:inline; }
div.pic table.rechts { float:right; }
div.pic table.links { float:left; }
/* fussbereich unsichtbar ausser fuer admin */
div.footer { display:none; }
body.admin div.footer { display:block; }
div.content + hr { display:none; }
div.refer { display:none; }
body.admin div.refer { display:block; }
/* header */
div.header {
background-color:LemonChiffon;
margin:0;
padding:0;
border-bottom: 2px solid DarkKhaki;
width: 100%;
text-align: center;
}
div.header h1 {
background-image: url("/claudia/pics/ornament-breit.png");
background-repeat: repeat-x;
background-position: 0 2px;
margin: none;
padding: 1.5ex 1ex 0 1ex;
border: none;
font-size: 32pt;
}
/* body and content layout: leave big margin on the left. */
html, body {
margin: 0;
padding:0;
}
div.content, div.footer, div.rc {
margin:0 0 0 25ex;
padding:2ex;
}
/* no gotobar */
div.header span.gotobar { display:none; }
/* sidebar */
div.sidebar {
display:block;
font-size:small;
position:absolute;
top:30ex;
left:1ex;
text-align: right;
}
div.sidebar ul {
padding:0;
margin:0;
}
div.sidebar li {
list-style-type:none;
padding: 0.2em;
}
div.sidebar a {
text-decoration: none;
}
/* printing */
@media print
{
body {
font-size:10pt;
color:black;
margin:0;
border:none;
}
pre, code, tt { font-size:8pt; font-family: Courrier, monospace;}
h1, h2, h3, h4, h5 { font-size:14pt; color:black; }
h1 { font-size: 16pt; padding: 0; }
h1, h2 { border:none; }
h1 a { color:black; }
a { text-decoration:none; color:black; }
div.header span.gotobar { display:none; }
span.specialdays { display:none; }
div.refer, div.footer, div.near, div.definition, div.sister, div.sidebar {
display:none;
}
}

View File

@@ -1,203 +0,0 @@
html, body { color:#000; background:#fefefe }
body[class="http://oddwiki.taoriver.net/wiki.pl"] {
background:#FEE;
}
textarea { width:100%; }
a:active { color:#F00; }
h1 { font-weight:bold; font-size:x-large; border-bottom:solid;
margin-top:3ex; margin-bottom:3ex; clear:left; }
h1 a { text-decoration:none; color:#000; }
h1 a:hover { background:#ddd; }
h2 { font-weight:bold; font-size:larger; clear:left;
color:#fff; background:#27b; padding:0.7ex; }
h2 a { text-decoration:none; color:#fff; }
h2 a:hover { background:#49c; }
h3 { font-weight:bold; font-size:medium; clear:left;
color:#fff; background:#5af; padding:0.7ex; }
h3 a { text-decoration:none; color:#fff; }
a.definition {
text-decoration:none; color:#000;
border-bottom:thin dashed;
}
a.definition:hover { background:#ddd; }
p a.definition {
font-weight:bold; font-size:larger;
color:#fff; background:#27b; padding:0.7ex;
text-decoration:none; display:block; margin-bottom:1ex;
border-bottom:none;
}
p a.definition:hover { background:#49c; }
a.alias { text-decoration:none; border-bottom: thin dashed; }
a.near:link { color:#093; }
a.near:visited { color:#550; }
a.footnote { font-size:50%; vertical-align:super }
div.footnotes hr {
border:none;
color:black;
background-color:#000;
height:1px;
margin-top:2ex;
}
div.footnotes hr + p {
font-weight:bold;
}
div.footer {
margin-top:3ex;
padding-bottom:1ex;
margin-bottom:1ex;
background-color:#fff;
border-bottom:solid;
}
div.footer hr {
border:none;
color:black;
background-color:#000;
height:2px;
margin-top:2ex;
}
div.rc { margin-top:4ex; }
div.rc hr { display:none; }
div.old { background-color:#ffd; }
div.new { background-color:#dfd; }
div.diff { padding-left:2ex; padding-right:2ex; border-style:dashed;
margin-left:5%; margin-right:5%; margin-bottom:5ex; }
div.diff + hr { display: none }
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div.rss { background-color:#eef; }
div.message { background-color:#fee; color:#f00; border:solid #f00;
font-weight:bold; padding-left:1em; margin:1em; }
div.sister { float:left; padding-right:1ex; background-color:#fff; }
div.sister p { margin-top:0; }
div.sister hr { display:none; }
div.near, div.definition { background-color:#efe; }
div.near p, div.definition p { margin-top: 0; }
div.footer + hr { display:none; }
div.journal hr { display:none; }
div.journal h1, div.journal h2, div.journal h3, div.journal h4 { font-size:medium; border:0; }
span.description { font-weight:bold; }
/* span.new { display:none; } */
table.user { border-style:dotted; border-width:thin; padding:1ex;
margin-bottom:1ex; width:90%; margin-left:5%; }
table.user tr td { padding-left:1em; padding-right:1em; }
dt { font-weight:bold; }
li { margin-bottom:0.5ex; }
img { border:0; }
pre, img.upload {
border: #777 1px solid; padding: 0.5em;
margin-left: 1em; margin-right: 2em;
white-space: pre;
background-color: #e6e6e6; color: black;
}
img.logo {
float:right; clear:right; background-color:#fff;
border:#999 1px solid; padding:1ex; margin:0;
}
img.portrait {
float:left; clear:left;
background-color:#fff;
border:#999 1px solid;
padding:10px;
margin:10px;
}
div.portrait {
float:left; clear:left;
font-size:xx-small;
padding-left:10px;
}
div.portrait img.portrait {
float:none;
margin:10px 10px 0 0;
}
div.portrait a {
text-decoration:none;
color:#999;
}
div.color {
clear:both;
min-height:105px;
}
div.one {
background-color: #eee;
}
div.two {
background-color: #fff;
}
hr { display:block; clear:both; }
@media screen {
body { margin-right: 22ex; padding-right:1em; border-right: 1px solid #999; }
div.sidebar { position: absolute; right: 1ex; width: 20ex; top: 0; }
div.sidebar ul { padding-left:1em; }
}
div.month { margin:0; padding:0; font-size:x-small; }
div.footer { clear:both; }
div.year div.month { float:left; font-size:medium; padding:1ex; }
div.month pre { margin:0; padding:0 0 0 1ex; background-color:#ffe; width:21ex; }
div.month a { text-decoration:none; color:inherit; }
div.month span.title a { background-color:inherit; }
div.month a.exact { background-color:#eef; }
div.month a.collection { background-color:#ccf; }
div.month a.today { background-color:#fcc; }
div.month a[class~="today"][class~="exact"] { background-color:#fcf; }
div.month a[class~="today"][class~="collection"] { background-color:#faf; }
@media print {
div.month { display: none; }
div.year div.month { display: block; }
div.year div.month a { display: inline; }
}
@media print {
span.gotobar, span.specialdays, div.sidebar, div.refer, div.footer,
div.near, div.definition, div.sister, div.languages { display:none; }
}
div.languages { border-top:1px solid; clear:both; }
div.languages form { margin-top:1ex; }
span[lang=en] { background-color:#ddf; }
span[lang=fr] { background-color:#fdd; }
span[lang=de] { background-color:#ffd; }
span[lang=it] { background-color:#dfd; }
span[lang=pt] { background-color:#bfb; }
span[lang=es] { background-color:#fec; }
span[lang=sv] { background-color:#adf; }
body.simple div.footer p.note,
body.simple div.footer span.gotobar + br,
body.simple div.footer span.gotobar,
body.simple div.sister,
body.simple div.near,
body.simple div.definition,
body.simple div.languages { display:none; }
body.explicit a.near[title=MeatBall]:before { content:"MeatBall:"; }
body.explicit a.near[title=WikiFeatures]:before { content:"WikiFeatures:"; }
body.nolang span[lang] { background-color:#fff; }
body[class~=en] span[lang] { display:none; }
body[class~=de] span[lang] { display:none; }
body[class~=fr] span[lang] { display:none; }
body[class~=it] span[lang] { display:none; }
body[class~=pt] span[lang] { display:none; }
body[class~=en] span[lang=en] { display:inline; }
body[class~=de] span[lang=de] { display:inline; }
body[class~=fr] span[lang=fr] { display:inline; }
body[class~=it] span[lang=it] { display:inline; }
body[class~=pt] span[lang=pt] { display:inline; }

View File

@@ -1,567 +0,0 @@
/* [Default Theme] */
body, rss {
background-color:#FFF;
color: #000;
font-weight: normal;
padding: 1em 2em;
}
div.header h1, title {
font-size: 250%;
line-height: 105%;
font-family: inherit;
font-weight: normal;
letter-spacing: 0.1em;
margin: 1em 0;
}
div.header h1 a, div.journal h1 a {
text-decoration: none;
color: #000;
}
h1, h2, item title {
font-size: larger;
font-weight: normal; /* inherit not supported by IE */
letter-spacing: 0.1em;
margin: 2em 0 1em 0;
}
h3 {
font-size: medium;
font-weight: normal;
font-style: italic;
margin: 2em 0 1em 0;
}
a:link {
color:#00F;
}
a:visited {
color:#A0A;
}
a:active {
color:#F00;
}
span.bar a {
margin-right:1ex;
}
img {
border-style:none;
}
img.upload {
background: inherit;
border: 1px solid #aaa;
padding: 5px;
}
img.logo {
float: right;
clear: right;
}
div.diff {
padding-left:5%;
padding-right:5%;
}
div.diff p b {
font-size: 150%;
font-weight: normal;
}
div.old {
background-color:#FFFFAF;
}
div.new {
background-color:#CFFFCF;
}
div.refer {
padding-left: 5%;
padding-right: 5%;
font-size: 80%;
}
div.message {
background-color:#FEE;
}
div.sister {
float:left;
margin-right:1ex;
background-color:#fff;
}
div.sister p {
margin-top:0;
}
div.sister hr {
display:none;
}
div.near, div.definition {
background-color:#efe;
}
div.near p, div.definition p {
margin-top: 0;
}
div.toc {
padding: 0 0.4em 0.4em 0.4em;
margin: 3em 20% 1em 2em;
margin-right: 200px;
background-color:#FAFAFF;
border:#999 1px solid;
font-size: 80%;
line-height: 90%;
font-family: sans-serif;
}
div.toc.dense li {
display: inline;
}
div.toc h2 {
margin: 0;
padding-top: 1em;
padding-left: 1em;
font-size: inherit;
}
/* get rid of useless "10 results found" when using indexed search. */
div.search p.result { display:none; }
label[for="searchlang"], input#searchlang { display: none; }
form.tiny, form.tiny p {
display:inline;
white-space:nowrap;
}
form.tiny input {
margin: 0.1em;
font-size: 80%;
font-family: inherit;
}
form.tiny input[type="text"] {
width: 10em;
}
/* portrait support */
div.color {
clear:left;
}
div.one {
background-color:#eee;
padding: 0.1ex 0;
}
img.portrait {
float:left;
clear:left;
background-color:#fff;
border:#999 1px solid;
padding:10px;
margin:10px;
}
li {
margin-left:1em;
}
div.portrait {
float: left;
clear: left;
font-size: xx-small;
padding-left: 10px;
}
div.portrait + p {
min-height:70px;
}
div.portrait img.portrait {
float:none;
margin:10px 10px 0 0;
}
div.portrait a {
text-decoration:none;
color:#999;
}
dl.irc dt {
width:15ex;
float:left;
text-align:right;
clear:left;
}
dl.irc dt span.time { display:none; }
dl.irc dd {
margin-left:17ex;
}
table.history {
border-style:none;
}
table.history td[colspan="3"] {
padding: 1em 0;
}
td.history {
border-style:none;
}
table.history input[type="submit"] {
font-size: 70%;
padding: 0;
margin: 0 1ex;
}
table.user {
border-style:solid;
border-width:thin;
}
table.user tr td {
border-style:solid;
border-width:thin;
padding:5px;
}
span.result {
font-size:larger;
}
span.info {
font-size:smaller;
font-style:italic;
}
div.rss {
background-color:#EEF;
}
.left { float:left; margin-right:1em; }
.right { float:right; margin-left:1em; }
/*
* a.definition:before { content:"[::"; }
* a.definition:after { content:"]"; }
* a.link:before { content:"[##"; }
* a.link:after { content:"]" }
*/
a.definition {
color:#000;
text-decoration:none;
border-bottom:dashed 1px;
}
a.alias {
text-decoration:none;
border-bottom:dashed 1px;
}
a.near:link {
color:#093;
}
a.near:visited {
color:#550;
}
ol, ul, dl {
padding-top:0.5em;
}
dd, li {
margin-bottom:0.5em;
}
/* elisp files and other scripts for download */
p.download a, a.download {
padding: 0.5em;
color: black;
text-decoration: none;
background-color: #cfa;
border: 1px solid #7a7;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
/* cal */
pre.cal {
float:left;
margin:3ex;
height:20ex;
}
pre.cal a {
text-decoration:none;
font-weight:bold;
}
pre.cal a:hover {
background-color:#eef;
}
h2, h3, h4, h5, h6, hr, div.footer {
clear:both;
}
div.footer {
margin-top: 2em;
}
.legal {
font-size: 80%;
}
/* printable index */
div.letter br {
display: none;
}
div.letter h2 {
clear: both;
padding-top: 2ex;
border-bottom: solid 1px;
}
div.letter > a {
display: block;
width: 40ex;
float: left;
border:none;
}
textarea[name="text"] {
width:100%;
height:80%;
}
textarea[name="summary"] {
width:100%;
height:3em;
}
div.comment textarea {
height:10em;
}
/* calendar */
div.month {
padding:0;
margin:0 2ex;
}
div.year div.month {
float:left;
}
div.month a {
text-decoration:none;;
}
div.month a.edit {
color:inherit;
}
div.month a.local {
font-weight:bold;
}
/* highlighting */
/* highlighting source code */
span.builtin { color: #483d8b; } /* DarkSlateBlue */
span.comment { color: #b22222; } /* Firebrick */
span.constant { color: #008b8b; } /* DarkCyan */
span.function { color: #0000ff; } /* Blue1 */
span.keyword { color: #7f007f; } /* Purple */
span.string { color: #8b475d; } /* VioletRed4 */
span.type { color: #228b22; } /* ForestGreen */
span.warning { color: #ff0000; font-weight: bold; } /* Red1 */
span.comment span,
span.string span { color: inherit; }
span.comment span.important.constant,
span.string span.important.constant { color: #008b8b; }
/* old: Equivalent to Output::HTML */
span.linecomment { color: green; }
span.blockcomment { color: green; }
span.prepro { color: purple; }
span.select { font-weight: bold; }
span.quote { color: blue; }
span.category_1 { color: teal; }
span.category_2 { color: blue; }
span.category_3 { color: blue; }
/* printing */
@media print {
body {
font-size: 10pt;
line-height: 12pt;
}
a:link, a:visited {
color:#000;
text-decoration:none;
}
img.logo, img.logo, div.header span, div.header br,
div.header form, div.diff,
a.edit, a.number span,
div.footer, div.footer + hr, div.sister {
display:none;
}
a[class="url number"]:after,
a[class="inter number"]:after {
content:"[" attr(href) "]";
}
a[class="local number"]:after {
content:"[" attr(title) "]";
}
}
/* remove the logo from the normal flow */
body.sidebar div.header img.logo {
position:absolute;
top:10pt;
right:10pt;
}
/* float the top goto bar to the left
leave enough space at the top for the logo which is removed from the flow
everything should be pixel based -- no scaling
assume maximum of 5 rows, 2 colums = 10 items
*/
body.sidebar div.header span.gotobar {
display:block;
width:200px;
height:200px;
background:#fff;
float:right;
padding:140px 0 0 30px;
margin:0;
}
body.sidebar div.header span.gotobar + br {
display:none;
}
body.sidebar div.header span.specialdays {
color:#aaa;
}
body.sidebar div.header span.gotobar a {
display:block;
float:left;
width:99px;
margin:0;
padding:0;
font-size:14px;
}
body.sidebar div.footer span.edit br {
display:none;
}
body.sidebar div.footer span.edit {
display:block;
position:absolute;
top:230px;
right:0;
padding:0;
margin:0;
width:208px;
}
body.sidebar div.footer span.edit a {
display:block;
font-size:14px;
}
body.sidebar div.footer span.gotobar {
display:none;
}
body.sidebar div.footer span.time br {
display:none;
}
body.sidebar hr, body.sidebar h2 {
clear: left;
}
body.sidebar div.toc {
margin-right:240px;
}
/* The textarea needs to be limited in width or else
the floating sidebar will force it down */
body.sidebar div.edit form {
margin-right:240px;
}
body.tiny {
font-size: 8pt;
line-height: 9pt;
}
body.small {
font-size: 10pt;
line-height: 11pt;
}
body.medium {
font-size: 12pt;
line-height: 14pt;
font-family: "Lucida Bright", serif;
}
body.medium div.content h1, body.medium h2 {
font-size: 14pt;
}
body.medium div.toc h2 {
font-size: inherit;
}
body.big {
font-size: 14pt;
line-height: 16pt;
font-family: "Lucida Bright", serif;
}
body.big div.toc {
font-family: "Lucida Sans", sans-serif;
}
body.typo div.content h1, body.typo div.content > h2 {
font-variant: small-caps;
margin-top: 5em;
margin-bottom: 2em;
}
body.typo h3 {
margin-top: 3em;
margin-bottom: 1em;
}
/* rss */
channel * { display: block; }
channel > link:before {
font-size: x-large;
display: block;
margin: 1ex;;
padding: 1ex;
content: "This is an RSS feed, designed to be read in an RSS application.";
color: red;
border: 1px solid red;
}
link {
font-size: small;
margin-bottom: 2ex;
}
username:before { content: "Last edited by "; }
username:after { content: "."; }
generator:before { content: "Feed generated by "; }
generator:after { content: "."; }
description {
font-weight: bold;
font-style: normal;
}
item title {
margin-bottom: 0;
}
item description {
font-weight: normal;
font-style: italic;
margin-bottom: 1em;
}
link, license {
font-size: 10pt;
}
copyright {
font-size: 12pt;
line-height: 14pt;
margin: 2em;
}
image url {
text-indent: -5000px; /* hide text off-screen */
height: 112px;
width: 196px;
background:url("http://www.emacswiki.org/emacs_logo.png") no-repeat;
position: absolute;
top: 0;
right: 10px;
display: block;
}
docs, language,
pubDate, lastBuildDate, ttl, guid, category, comments,
docs, image title, image link,
status, version, diff, history, importance, interwiki {
display: none;
}

View File

@@ -1,639 +0,0 @@
/* Authors: Murray Altheim (2004), Alex Schroeder (2004, 2005, 2006,
2009), Bayle Shanks (2006), Lion Kimbro (2006).
This file is in the public domain.
*/
html, body { /* hue 84 */
/* Default color for text. It doesn't appear that many places,
but you'll see it in Recent Changes summary comments, and
you'll see it in the languages at the bottom of the place;
It seeps out, here and there. */
color:#000;
/* This is the main light green background color. */
background-color:#def4b5;
margin:0;
padding:0;
}
/* This is not used in all that many places. */
body.gray {
background-color:#d5e0c5;
}
/* The next section includes some funky selectors.
See http://www.w3.org/TR/REC-CSS2/selector.html for more. */
div.content, div.rc, body > form, div.footnotes, div.edit text {
margin: 1em;
}
/* The following statement hides the result count at the end
of a search page (since most of the time the result per page
is 10. */
br + p.result { display: none; }
body.brown a { color:#550; text-decoration:none; }
a { color:#272; text-decoration:none; font-weight:bold; }
a:active { color:#f00; }
a:visited { color:#550; }
a.near, a.outside, a[class="url number"] {
text-decoration:underline;
font-weight:bold;
}
a.tag:before { content:"\2601\ "; }
a.tag { text-decoration:none; }
div.search p.links a { padding-right:2ex; }
a.number { text-decoration:none; }
a.alias { text-decoration:none; border-bottom: thin dashed; }
a.footnote { font-size:50%; vertical-align:super }
span.bar a { margin-right:1ex; }
p.plink, li.plink {
border: 2px solid #c8a8ff;
padding: 2px;
}
p a.plink, li a.plink {
display:none;
}
p:hover a.plink, p a:hover.plink,
li:hover a.plink, li a:hover.plink {
text-decoration: none;
display: inline;
position:absolute;
color: #a020f0; /* purple */
}
body.arrows a.near:before, body.arrows a.outside:before { content:"\2197"; }
body.arrows a.near, body.arrows a.outside { text-decoration:none; }
/* add every specific a here */
div.header h1 a:hover, h1 a:hover, h2 a:hover, h3 a:hover { color: #fbb; }
a.definition:hover, a.near:hover, a:hover { color:#f00; }
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
dl.irc dt span.time { float:left; }
dl.irc dd { margin-left:22ex; }
div.header {
background-color: #becc92;
margin: 0;
padding: 0;
height: 6em;
}
div.sidebar {
float: right;
width: 15%;
padding: 0 0.5em 0 1em;
margin: 1em 0 1em 5em;
font-size: x-small;
border: 3px solid #000;
text-align: left;
background-color: #dea;
}
div.sidebar h2 {
font-weight: bold;
font-size: small;
color: #000;
background-color: #dea;
padding: 0;
margin-right: 7%;
border-bottom: 1px solid #ab7;
}
div.sidebar ul, div.sidebar li {
display:block;
margin:0;
padding:0;
}
div.sidebar a:before {
content:"";
}
div.sidebar a {
font-weight: normal;
}
h3 {
font-weight:bold;
font-size:medium;
clear:left;
color:#fff;
background:#84d600;
padding:0.3ex;
}
div.header span.gotobar {
display:block;
padding:1ex;
}
div.message {
position: absolute;
top: 1.5em;
left:0;
right:0;
z-index: 5;
}
div.message p {
display:inline;
}
div.message, div.question {
background-color:#fee;
color:#f00;
border:solid #f00;
font-weight:bold;
padding:0.1em 0 0.1em 1em;
}
div.header h1 {
position: absolute;
top: 1.5em;
left:0;
right:0;
background-color:#517005;
font-family: "Tahoma", "Arial", "Helvetica", sans-serif;
font-size:xx-large;
border-bottom:2px dotted #87a036;
margin-top: 0;
padding: 0.125em 0.5em;
}
div.header h1 a {
text-decoration:none;
color: #ffffff;
}
img.logo {
position:absolute;
top:1ex;
right:1ex;
border:none;
z-index:10;
}
.right {
float:right;
}
.left {
float:left;
}
.top {
vertical-align: top;
}
.highlight {
background-color: #ffa;
font-style: normal;
padding: 0 0.2em;
}
/* search box in the top bar */
form.tiny, form.tiny p {
display: inline;
white-space: nowrap;
}
form.tiny input {
padding: 0;
width: 10ex;
font-size: 70%;
}
div.right .right, div.left .left {
float: none;
}
span.caption {
display:block;
margin: 0 1em 1em 1em;
}
a.small img {
max-width:300px;
}
h1 {
font-weight:bold;
font-size:larger;
clear:left;
color:#fff;
background:#69aa00;
padding:0.7ex;
text-decoration:none;
}
span.specialdays {
margin-left: 1em;
color: #4c6b1b;
font-style: italic;
}
h2 {
font-weight:bold;
font-size:larger;
color:#fff;
background:#69aa00;
padding:0.7ex;
}
h2 a, div.journal h1 a {
text-decoration:none; color:#fff;
}
h3 {
font-weight:bold; font-size:medium; clear:left;
color:#fff; background:#84d600; padding:0.7ex;
}
h3 a, div.journal h2 a {
text-decoration:none; color:#fff;
}
span.permanentanchor, a.definition {
text-decoration:none; color:#000;
border-bottom:thin dashed;
}
p > a.definition, p > span.permanentanchor {
font-weight:bold; font-size:larger;
color:#fff; background:#84d600; padding:0.7ex;
text-decoration:none; display:block; margin-bottom:1ex;
border-bottom:none;
}
div.footnotes hr {
border:none;
color:black;
background-color:#000;
height:1px;
margin-top:2ex;
}
div.footnotes hr + p {
font-weight:bold;
}
div.footer {
background-color:#becc92;
border-bottom:solid;
clear: both;
margin: 3em 0 0 0;
padding: 1ex;
border-top:2px solid;
color:black;
}
div.footer hr {
display:none;
}
div.rc { margin-top:4ex; }
div.rc hr { display:none; }
div.old { background-color:#ffd; }
div.new { background-color:#dfd; }
div.diff {
padding-left:2ex;
padding-right:2ex;
border-style:dashed;
width: 66%;
margin:1em 2em;
}
div.diff + hr {
display: none;
}
div.refer {
padding-left:5%;
padding-right:5%;
}
div.refer hr {
display: none;
}
div.rss { background-color:#ce9; }
body.gray div.rss {
background-color:#dec;
}
div.sister {
float:left;
margin-right:1ex;
padding-right:1ex;
border-right:1px dashed;
}
div.sister p { padding:1ex; margin:0; }
div.sister hr { display:none; }
div.near, div.definition { padding:1ex; margin:0; }
div.near p, div.definition p { margin: 0; }
div.footer + hr { display:none; }
div.journal hr { display:none; }
div.journal h1, div.journal h2, div.journal h3, div.journal h4 {
font-size:medium;
border:0;
}
div.include {
border-top: 1px dashed #ccd;
border-bottom: 1px dashed #ccd;
background-color: #d2f4b5;
}
span.description { font-weight:bold; }
span.new { display:inline; font-weight:bold; }
table.user { border-collapse:collapse; border:thin dotted; padding:1ex;
margin-bottom:1ex; width:inherit; margin:0 5%; }
table.user tr td { padding: 0.5ex 1em; border: thin dotted; text-align:left; }
table.history td[colspan="3"] {
padding: 1em 0;
}
dt { font-weight:bold; }
dd, li {
margin-bottom: 0.5ex;
margin-left: 2em;
}
dl, ol, ul { margin-left:0em; }
textarea#text { width:75%; height:70%; }
textarea#summary { width:75%; height:10%; }
/* links to change from text to file and back */
form.edit a.svg, form.edit a.upload {
padding: 0.5em;
margin-right: 0.5em;
background-color: #cfa;
border: 1px solid #7a7;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
/* images */
img { border:0; }
pre, img.upload {
border: #777 1px solid; padding: 0.5em;
margin-left: 1em; margin-right: 2em;
white-space: pre;
background-color: #fff; color: black;
overflow: hidden;
}
a.smiley img.upload {
border:none;
margin:0;
padding:0;
background-color:inherit;
}
img.portrait {
float:left; clear:left;
background-color:#fff;
border:#999 1px solid;
padding:10px;
margin:10px;
}
div.portrait {
float:left; clear:left;
font-size:xx-small;
padding-left:10px;
}
div.portrait img.portrait {
float:none;
margin:10px 10px 0 0;
}
div.portrait a {
text-decoration:none;
color:#999;
}
div.color {
clear: left;
min-height:105px;
margin: 0;
padding: 0;
}
div.one {
background-color: #efb;
}
div.level0, div.level0 div.portrait {
margin-left: 0;
}
div.level1, div.level1 div.portrait {
margin-left: 4em;
}
div.level2, div.level2 div.portrait {
margin-left: 8em;
}
div.level3, div.level3 div.portrait {
margin-left: 12em;
}
hr {
display:block;
clear: left;
}
div.month {
float:left;
margin:3ex;
height:15ex;
}
div.month pre {
background-color:inherit;
border:none;
padding:0;
margin:0;
}
div.month a.edit {
font-weight:normal;
color:#000;
}
rss {
color:#000;
margin:0;
padding:0;
background-color:#def4b5;
}
docs {
position: absolute;
top:0;
left:0;
right:0;
font-size: xx-large;
height: 1.5em;
color: #becc92; /* invisible */
background-color: #becc92;
}
channel * {
display: block;
}
/* if IE can't parse this, no problem */
channel > title {
font-family: "Tahoma", "Arial", "Helvetica", sans-serif;
}
title {
background-color:#517005;
font-size:xx-large;
font-weight:bold;
margin-top: 1.5em;
padding: 0.125em 0.5em;
border-bottom:2px dotted #87a036;
color:#fff;
}
item title {
background-color:#69aa00;
font-size: medium;
margin: 0 0 0 1em;
padding:0.7ex 0.5em;
}
copyright {
font-size: smaller;
margin: 1em 4em;
}
channel > link:before {
font-size: x-large;
display: block;
margin: 1em;
padding: 0.5em;
content: "This is an RSS feed, designed to be read in a feed reader.";
color: red;
border: 1px solid red;
}
link, license {
font-size: smaller;
margin: 1em 2em;
}
username, description, generator, interwiki { margin: 1em; }
username:before { content: "Last edited by "; }
username:after { content: "."; }
generator:before { content: "Feed generated by "; }
generator:after { content: "."; }
channel description {
font-weight: bold;
}
item description {
font-style: italic;
font-weight: normal;
margin: 1em;
}
language,
pubDate, lastBuildDate, ttl, guid, category, comments,
image title, image link,
status, version, diff, history, importance {
display: none;
}
/*
== Printing ==
"@media print" is special: Everything in this section only applies
when the page is printed (or during print preview). More information:
* http://www.w3.org/TR/css3-mediaqueries/
*/
@media print {
/* When printing, turn off a bunch of stuff. */
div.header span.gotobar,
span.specialdays,
div.refer,
div.footer,
div.near,
div.definition,
div.sister,
div.languages,
div.message,
img.logo { display:none; }
/* portraits */
div.portrait {
margin:0;
padding:0;
font-size:inherit;
float:none;
display:inline;
}
div.portrait + * { display:inline; }
div.portrait p { margin:0; padding:0; display:inline; }
div.portrait a.newauthor, div.portrait br { display:none; }
div.portrait a.local:after { content:": "; }
div.portrait a.local { color:inherit; }
div.color {
min-height:0;
background: inherit;
}
}
/*
== Languages stuff ==
*/
div.languages {
border-top:1px solid;
clear:both;
}
div.languages form {
margin: 1em 1ex 3em 1ex;
}
span[lang=en], .en { background-color:#ddf; }
span[lang=fr], .fr { background-color:#fdd; }
span[lang=de], .de { background-color:#ffd; }
span[lang=it], .it { background-color:#dfd; }
span[lang=pt], .pt { background-color:#bfb; }
span[lang=es], .es { background-color:#fec; }
span[lang=sv], .sv { background-color:#adf; }
body.simple div.footer p.note,
body.simple div.footer span.gotobar + br,
body.simple div.footer span.gotobar,
body.simple div.sister,
body.simple div.near,
body.simple div.definition,
body.simple div.languages { display:none; }
body.explicit a.near[title=MeatBall]:before { content:"MeatBall:"; }
body.explicit a.near[title=WikiFeatures]:before { content:"WikiFeatures:"; }
body.explicit a.near[title=CraoWiki]:before { content:"CraoWiki:"; }
body.explicit a.near[title=InterWiki]:before { content:"InterWiki:"; }
body.explicit a.near[title=OpenMeatballWiki]:before { content:"OpenMeatballWiki:"; }
body.nolang span[lang] { background-color:inherit; }
body[class~=en] span[lang] { display:none; }
body[class~=de] span[lang] { display:none; }
body[class~=fr] span[lang] { display:none; }
body[class~=it] span[lang] { display:none; }
body[class~=pt] span[lang] { display:none; }
body[class~=en] span[lang=en] { display:inline; }
body[class~=de] span[lang=de] { display:inline; }
body[class~=fr] span[lang=fr] { display:inline; }
body[class~=it] span[lang=it] { display:inline; }
body[class~=pt] span[lang=pt] { display:inline; }
span.debug { display:none; }
table.aside {
float: right;
width: 20ex;
padding: 0;
margin: 0 0 0 2ex;
border: 1px dashed #666;
}
.aside ul {
padding: 0;
}
table.aside tr td, table.aside tr th {
border: none;
}

View File

@@ -1,520 +0,0 @@
body
{
background-color: #DDDDDD;
font-family: sans-serif;
padding: 0px;
margin: 0px;
}
a
{
color: #ba102c;
text-decoration: none;
font-weight: bold;
}
a:hover
{
background-color: #eeeeee;
}
a:visited
{
color: #880011;
}
a.outside, a[class="url number"]
{
text-decoration:underline;
}
hr
{
display: none;
}
h1
{
color: #555555;
font-size: xx-large;
border-bottom: solid #555555;
}
h2
{
color: #555555;
font-size: x-large;
border-bottom: solid #555555;
}
h3
{
color: #555555;
font-size: large;
border-bottom: solid #555555;
}
h4
{
color: #555555;
font-size: larger;
border-bottom: dotted #555555 2px;
}
h5
{
color: #555555;
font-size: larger;
}
h6
{
color: #555555;
font-size: larger;
}
div.header
{
background-color: #777777;
padding: 0px;
}
div.header span.gotobar
{
background-color: #bbbbbb;
padding: 3px;
}
div.header a.local
{
text-decoration: none;
font-weight: bold;
color: #ba102c;
padding: 1px;
}
div.header a.local:hover
{
background-color: #dddddd;
}
div.header h1
{
background-color: #bbbbbb;
padding: 5px;
border-bottom: 3px dotted #555555;
}
div.header h1 a
{
text-decoration: none;
font-weight: bold;
/* color: #ba102c; */
color: #555555;
clear: right;
}
div.header h1 a:hover
{
color: #990000;
background-color: #bbbbbb;
}
img
{
border: 0;
}
img.logo
{
float: right;
margin: 1ex;
border: 2px solid black;
}
div.header .message
{
background-color: #cccccc;
border: 1px dashed #000000;
margin: 15px;
padding: 5px;
}
div.footer
{
background-color: #aaaaaa;
padding: 10px;
border-top: 3px solid black;
border-bottom: 3px solid black;
}
div.footer hr
{
display:none;
}
div.footer a.local, div.footer a.edit,
div.footer a.history, div.footer a.author,
div.footer a.diff, div.footer a.rc
{
text-decoration: none;
font-weight: bold;
color: #ba102c;
padding: 1px;
border: 1px;
}
div.footer a:hover
{
background-color: #cccccc;
}
div.content, div.rc
{
padding: 1em;
}
div.content hr
{
color: #555555;
background-color: #555555;
border: none;
height: 2px;
display: block;
}
div.rc hr
{
display: none;
}
pre
{
background-color: #eeeeee;
border: 2px solid black;
padding: 1em;
}
body > form
{
margin: 0 2em;
}
div.comment
{
margin: 0 2em;
}
textarea
{
background-color: #eeeeee;
border: 2px solid #555555;
width: 100%;
height: 80%;
}
textarea:focus
{
background-color: #ffffff;
}
input[type="text"], input[type="password"]
{
color: black;
background-color: #eeeeee;
border: 2px solid #555555;
padding: 3px;
font-weight: bold;
}
input[type="text"]:focus, input[type="password"]:focus
{
background-color: #ffffff;
}
input[type="submit"]
{
color: #aa0000;
font-weight: bold;
border: 2px solid #555555;
padding: 1px;
text-decoration: none;
background-color: #eeeeee;
}
input[type="submit"]:hover, input[type="submit"]:focus
{
background-color: #ffffff;
}
div.footer input[type="text"]
{
color: black;
background-color: #cccccc;
border: 2px solid #555555;
padding: 3px;
font-weight: bold;
}
div.footer input[type="text"]:focus
{
background-color: #eeeeee;
}
div.footer input[type="submit"]
{
color: #aa0000;
font-weight: bold;
border: 2px solid #555555;
padding: 1px;
text-decoration: none;
background-color: #cccccc;
}
div.footer input[type="submit"]:hover, div.footer input[type="submit"]:focus
{
background-color: #eeeeee;
}
div.diff
{
padding: 1em;
}
div.diff hr
{
color: #555555;
background-color: #555555;
border: none;
height: 2px;
display: block;
}
div.old
{
background-color: #dddddd;
border: 2px dashed #555555;
padding: 1em;
}
div.new
{
padding: 1em;
background-color: #eeeeee;
border: 2px dashed #555555;
}
div.rss
{
background-color: #dddddd;
/* border: 2px solid black; */
padding: 1em;
}
img.upload
{
padding: 1em;
}
div.color
{
padding: 5px;
border: 5px;
}
div.one
{
background-color: #d0bbbb;
padding: 5px;
margin: 5px;
}
div.two
{
background-color: #ccc0c0;
padding: 5px;
margin: 5px;
} div.footer a.local, div.footer a.edit,
div.footer a.history, div.footer a.author,
div.footer a.diff, div.footer a.rc
{
text-decoration: none;
font-weight: bold;
color: #ba102c;
padding: 1px;
border: 1px;
}
div.footer a:hover
{
background-color: #cccccc;
}
div.content, div.rc
{
padding: 1em;
}
div.content hr
{
color: #555555;
background-color: #555555;
border: none;
height: 2px;
display: block;
}
div.rc hr
{
display: none;
}
pre
{
background-color: #eeeeee;
border: 2px solid black;
padding: 1em;
}
body > form
{
margin: 0 2em;
}
div.comment
{
margin: 0 2em;
}
textarea
{
background-color: #eeeeee;
border: 2px solid #555555;
width: 100%;
height: 80%;
}
textarea:focus
{
background-color: #ffffff;
}
input[type="text"], input[type="password"]
{
color: black;
background-color: #eeeeee;
border: 2px solid #555555;
padding: 3px;
font-weight: bold;
}
input[type="text"]:focus, input[type="password"]:focus
{
background-color: #ffffff;
}
input[type="submit"]
{
color: #aa0000;
font-weight: bold;
border: 2px solid #555555;
padding: 1px;
text-decoration: none;
background-color: #eeeeee;
}
input[type="submit"]:hover, input[type="submit"]:focus
{
background-color: #ffffff;
}
div.footer input[type="text"]
{
color: black;
background-color: #cccccc;
border: 2px solid #555555;
padding: 3px;
font-weight: bold;
}
div.footer input[type="text"]:focus
{
background-color: #eeeeee;
}
div.footer input[type="submit"]
{
color: #aa0000;
font-weight: bold;
border: 2px solid #555555;
padding: 1px;
text-decoration: none;
background-color: #cccccc;
}
div.footer input[type="submit"]:hover, div.footer input[type="submit"]:focus
{
background-color: #eeeeee;
}
div.diff
{
padding: 1em;
}
div.diff hr
{
color: #555555;
background-color: #555555;
border: none;
height: 2px;
display: block;
}
div.old
{
background-color: #dddddd;
border: 2px dashed #555555;
padding: 1em;
}
div.new
{
padding: 1em;
background-color: #eeeeee;
border: 2px dashed #555555;
}
div.rss
{
background-color: #dddddd;
/* border: 2px solid black; */
padding: 1em;
}
img.upload
{
padding: 1em;
}
div.color
{
padding: 5px;
border: 5px;
}
div.one
{
background-color: #d0bbbb;
padding: 5px;
margin: 5px;
}
div.two
{
background-color: #ccc0c0;
padding: 5px;
margin: 5px;
}

View File

@@ -1,6 +0,0 @@
@import "alex-2012.css";
/* override alex-2012.css */
div.footer form.search {
display: block;
}

View File

@@ -1,149 +0,0 @@
body {
background-color:rgb(255,250,240);
color:rgb(139,69,19);
font-size:18pt;
font-family: sans-serif;
letter-spacing:.1ex;
padding: 1em;
}
img.logo {
float:right;
margin:0;
padding:0;
border:1px solid #000;
background-color:rgb(255,250,240);
}
a {
color:firebrick;
}
h1 a {
color:DarkOliveGreen;
text-decoration:none;
}
h1 {
font-size:48pt;
color:DarkOliveGreen;
background-color:LemonChiffon;
padding:10px;
margin:0 0 1ex 0;
border: 2px solid DarkKhaki;
clear:both;
}
h2 {
color:DarkOliveGreen;
font-size:30px;
margin:3ex 0;
border-bottom:2px solid DarkOliveGreen;
clear:both;
}
h3 {
color:black;
font-size:22px;
margin:3ex 0;
text-decoration:underline;
clear:both;
}
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; color:#000; }
div.new { background-color:#CFFFCF; color:#000; }
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div.message { background-color:#FEE; color:#000; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user {
border-collapse:collapse;
}
table.user td, table.user th {
border:solid 1px rgb(139,69,19);
padding:0.5ex;
margin:0;
text-align:left;
}
form table td {
padding:5px;
}
span.gotobar a {
padding-right:1ex;
}
div.header span.gotobar {
margin-bottom:1em;
padding-bottom:3px;
font-weight:bold;
display:block;
}
div.header span.gotobar a {
text-decoration:none;
}
div.footer {
color:DarkOliveGreen;
background-color:LemonChiffon;
padding:10px 10px 0 10px;
margin-top:5ex;
border: 2px solid DarkKhaki;
clear:both;
font-size: 16pt;
}
div.footer span.edit {
display: block;
}
div.footer a {
color:inherit;
}
span.time, span.edit a.history, span.edit a.admin, span.edit a.rc,
div.footer span.edit br, div.footer span.gotobar, div.footer hr {
display:none;
}
textarea { width:100%; height: 10em; }
textarea#summary { height:3em; }
div.edit p + p { display:none; } /* the first one remains visible */
div.edit p + p + p + p { display:block; } /* up to the edit note */
div.edit p + p + p + p + p { display:none; } /* the rest */
div.edit p + p + p + p + p + p { display:block; } /* the rest */
input[name="username"]:after {
content:"\A";
}
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { background-color:#EEF; color:#000; }
div.rss a:link { background-color:#EEF; color:#00F; }
div.rss a:visited { background-color:#EEF; color:#A0A; }
div.rss a:active { background-color:#EEF; color:#F00; }
a.links { float:left; margin:1em; }
a.rechts { float:right; margin:1em; }
@media print {
body { font-size:12pt; color:black; }
pre, code, tt { font-size:8pt; font-family: Courrier, monospace;}
h1, h2, h3, h4, h5 { font-size:14pt; color:black; }
h1 { font-size: 18pt; padding: 0; }
h1, h2 { border:none; }
h1 a { color:black; }
a { text-decoration:none; color:black; }
div.header span.gotobar,
span.specialdays,
div.refer,
div.footer,
div.near,
div.definition,
div.sister,
body.admin div.footer { display:none; }
}

View File

@@ -1,365 +0,0 @@
/* This file is in the public domain. */
/* Esteban is nice, but bold is not so nice, and on Windows it suffers.
@import url(http://fonts.googleapis.com/css?family=Esteban&subset=latin,latin-ext);
For campaignwiki.org, we need to use the same URL in the config file when
calling wkhtmltopdf.
@import url(https://fonts.googleapis.com/css?family=Noticia+Text:400,400italic,700italic,700&subset=latin,latin-ext); */
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 400;
src: local('Noticia Text'), local('NoticiaText-Regular)'), url('/fonts/NoticiaText-Regular.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: normal;
font-weight: 700;
src: local('Noticia Text Bold'), local('NoticiaText-Bold)'), url('/fonts/NoticiaText-Bold.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 400;
src: local('Noticia Text Italic'), local('NoticiaText-Italic)'), url('/fonts/NoticiaText-Italic.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Noticia Text';
font-style: italic;
font-weight: 700;
src: local('Noticia Text Bold Italic'), local('NoticiaText-BoldItalic)'), url('/fonts/NoticiaText-BoldItalic.woff') format('woff');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
@font-face {
font-family: 'Symbola';
src: local('Symbola'), url('/fonts/Symbola.woff') format('woff');
}
body {
font-family: "Noticia Text", Symbola, serif;
font-size: 14pt;
color: #000;
background-color: #eed;
margin:1em 2em;
}
textarea, pre, code, tt {
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, Symbola;
font-size: 80%;
}
@media print {
body {
background-color: white;
font-family: Times, serif;
font-size:10pt;
}
}
/* iPhone */
@media only screen and (max-device-width: 480px) {
img { max-width: 480px !important; }
}
/* iPad */
@media only screen and (min-device-width: 481px) and (max-device-width: 900px) {
body { font-size: 150%; }
textarea,input { font-size: 100%; }
img { max-width: 550px !important; }
}
/* general */
.browse { min-height: 3em; }
.header form, .header p { margin: 0; }
/* hide the buttons but don't use display:none because of
http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
.header input[type="submit"] { position: absolute; visibility: hidden; }
.header input { width: 5em; font-size: 80%; }
.footer { clear:both; font-size: 90%; }
.content input { font-size: 80%; line-height: 125%; }
/* comments, footer */
div.commentshown {
padding-bottom: 1ex;
padding-left: 2em;
border-left: 2px solid black;
font-size: smaller;
}
div.commenthidden { display:none; }
div.commentshown { display:block; }
/* comment pages with username, homepage, and email subscription */
.comment span { display: block; }
.comment span label {
display: inline-block; width: 10em;
}
input#mail, input#homepage, input#username {
display: inline-block; width: 20em;
}
/* titles */
h1 {
font-weight: bold;
font-size: 150%;
padding: 1em 0;
}
h1 a:link, h1 a:visited {
color: inherit;
background-color: inherit;
text-decoration: inherit;
}
h2 {
font-weight: bold;
font-size: 130%;
padding: 1em 0;
clear: both;
}
@media print {
h1 a, h2 a, h3 a, h4 a { font-style: normal; }
}
/* links */
a:link {
color: #851;
background-color: inherit;
}
a:visited {
color: #542;
background-color: inherit;
}
a:active {
color:#a41;
background-color: inherit;
}
.button {
display: inline-block;
font-size: 150%;
cursor: pointer;
padding: 0.3em 0.5em;
text-shadow: 0px -1px 0px #ccc;
background-color: #cfa;
border: 1px solid #9d8;
border-radius: 5px;
box-shadow: 0px 1px 3px white inset,
0px 1px 3px black;
}
.button a {
text-decoration: none;
font-weight: normal;
}
.bar a { padding-right: 1em; }
@media print {
a, a:link, a:visited {
color:#000;
text-decoration:none;
font-weight: normal;
}
a.edit, div.footer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after {
content:"[" attr(href) "]";
}
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
}
/* edit paragraphs: no more */
a.pencil { display: none; }
/* table of contents */
.toc {
font-size: smaller;
border-left: 1em solid #886;
}
.toc ol {
list-style-type: none;
padding-left: 1em;
}
.toc a {
font-weight: normal;
}
/* images with links, captions, etc */
div.image { display: inline; margin: 1em; font-size: 90%; text-align: center; }
.left { float: left; margin-right: 1em; }
.right { float: right; margin-left: 1em; }
div.right .right { float: none; }
div.left .left { float: none; }
.caption { padding: 0 1em; }
.license { font-size: small; }
.aside {
font-size: small;
width: 30%;
float: right;
margin-left: 1em;
margin-bottom: 1em;
padding-left: 1em;
}
.aside img.smiley { height: 1em; }
.narrow {
width: 70%;
}
a img { border: 1px solid #333; }
.fit img { width: 80%; text-align: center; margin: 2em 8%; }
.half img { width: 50%; height: 50%; text-align: center; margin: 2em 8%; }
.noborder img { border: none; }
.twenty img { max-width: 20em; }
img.logo {
float: right;
clear: right;
border-style:none;
margin-left: 1em;
margin-bottom: 1ex;
border: 1px solid black;
}
.hexmap a img { background: #fff; border: none; }
/* fancy bold underline */
em.underline { font-weight: bold; }
/* editing, previewing */
textarea { width:100%; }
div.edit { padding-right: 1em; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
/* div.message { background-color:#FEE; } */
div.message {
background-color: inherit;
font-size: smaller;
}
table.history { border-style:none; }
td.history { border-style:none; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rc hr { display: none; }
div.rc li { padding-bottom: 0.5em; }
/* Tables */
table.user {
margin: 1em 0;
padding: 0 1em;
border-top: 1px solid black;
border-bottom: 1px solid black;
}
div.aside table.user {
margin: 1em 0;
padding: 0;
}
table.user td, table.user th {
border-style: none;
padding:5px 10px;
vertical-align: top;
}
table.user th { font-weight:bold; }
table.user td.r { text-align:right; }
table.user td.l { text-align:left; }
table.user td.c { text-align:center; }
table.user td.j { text-align:justify; }
table.user td.mark { background-color:yellow; }
tr:empty { display: block; height: 0.5em; }
@media print {
table {
font-size: 9pt;
margin: 0;
}
table.user td, table.user th {
padding: 0 1ex;
}
}
/* Calendar */
div.month { margin:0; padding:0; font-size:x-small; float:right; }
div.content div.month { float:none; }
div.year div.month { float:left; font-size:medium; padding:1ex; }
div.month pre { margin:0; padding:0 0 0 1ex; }
div.month a { text-decoration:none; font: inherit; }
div.month span.title a { font: inherit; }
/* no difference between a.exact and a.collection */
div.month a.local { font-weight: bold; }
div.month a.local:link { color: #562; }
div.month a.local:visited { color: #542; }
div.month a.today { background-color: #faa; }
div.month span.title a.local { font-weight: normal; color: #842; }
@media print {
div.month { display: none; }
div.year div.month { display: block; }
div.year div.month a { display: inline; }
}

View File

@@ -1,88 +0,0 @@
body { background-color:#FFF; color:#000; margin:1em 2em; }
@media only screen and (max-device-width: 480px) {
body { font-size: 300%; }
}
textarea { width:100%; }
a:link { color:#00F; }
a:visited { color:#A0A; }
a:active { color:#F00; }
a.alias { text-decoration:none; border-bottom: thin dashed; }
a.near:link { color:#093; }
a.near:visited { color:#550; }
img.logo { float: right; clear: right; border-style:none; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
div.message { background-color:#FEE; }
div.journal h1 { font-size:large; }
table.history { border-style:none; }
td.history { border-style:none; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { background-color:#EEF; }
div.search { background-color:#F1F5FF }
div.sister { float:left; margin-right:1ex; background-color:#FFF; }
div.sister p { margin-top:0; }
div.sister img { border:none; }
div.near, div.definition { background-color:#EFE; }
div.near p, div.definition p { margin-top:0; }
form.comment span { display: block; }
@media print {
body { font:12pt sans-serif; }
a, a:link, a:visited { color:#000; text-decoration:none; font-style:oblique; }
h1 a, h2 a, h3 a, h4 a { font-style:normal; }
a.edit, div.footer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after { content:"[" attr(href) "]"; }
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
}
/* calendar */
div.month { margin:0; padding:0; font-size:x-small; float:right; }
div.content div.month { float:none; }
div.footer { clear:both; }
div.year div.month { float:left; font-size:medium; padding:1ex; }
div.month pre { margin:0; padding:0 0 0 1ex; background-color:#ffe; }
div.month a { text-decoration:none; color:inherit; }
div.month span.title a { background-color:inherit; }
div.month a.exact { background-color:#eef; }
div.month a.collection { background-color:#ccf; }
div.month a.today { background-color:#fcc; }
div.month a[class~="today"][class~="exact"] { background-color:#fcf; }
div.month a[class~="today"][class~="collection"] { background-color:#faf; }
@media print {
div.month { display: none; }
div.year div.month { display: block; }
div.year div.month a { display: inline; }
}
/* crumbs */
span.crumbs { font-size: smaller; }
/* dynamic comments */
div.commenthidden { display:none; }
div.commentshown { display:block; background-color:#ffc; padding:1ex; }
/* irc */
dl.irc dt { width:12ex; float:left; text-align:right; }
dl.irc dd { margin-left:15ex; }
/* page trail */
@media print { span.trail { display: none; }}
/* portrait support */
img.portrait { float: left; clear: left; margin: 1ex; border:#999 1px solid; }
div.footer, div.comment, hr { clear: both; }
div.portrait { float: left; clear: left; font-size: xx-small; margin-right: 1em; }
div.portrait img.portrait { float: none; margin: 0; }
div.portrait a { text-decoration: none; color: #999; }
div.color { clear: both; }
div.one { background-color: #ddd; }
/* referrer tracking */
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
@media print { div.refer { display:none; }}
/* usemod, tables, long tables */
table.user { border-style:solid; border-width:thin; }
table.user td, table.user th { border-style:solid; border-width:thin; padding:5px; }
table.user th { font-weight:bold; }
table.user td.r { text-align:right; }
table.user td.l { text-align:left; }
table.user td.c { text-align:center; }
table.user td.j { text-align:justify; }
table.user td.mark { background-color:yellow; }
/* sidebar */
div.sidebar { float: left; margin-right: 2em; margin-bottom: 3em; }

View File

@@ -1,230 +0,0 @@
@font-face {
font-family: 'Gentium Basic';
font-style: normal;
font-weight: 400;
src: local('Gentium Basic'), local('GentiumBasic'), url(http://themes.googleusercontent.com/static/fonts/gentiumbasic/v5/KCktj43blvLkhOTolFn-MVhr3SzZVY8L1R-AhaesIwA.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: normal;
font-weight: 700;
src: local('Gentium Basic Bold'), local('GentiumBasic-Bold'), url(http://themes.googleusercontent.com/static/fonts/gentiumbasic/v5/2qL6yulgGf0wwgOp-UqGyKuvVGpDTHxx0YlM6XbRIFE.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: italic;
font-weight: 400;
src: local('Gentium Basic Italic'), local('GentiumBasic-Italic'), url(http://themes.googleusercontent.com/static/fonts/gentiumbasic/v5/qoFz4NSMaYC2UmsMAG3lyajIwExuvJl80GezUi4i-sM.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: italic;
font-weight: 700;
src: local('Gentium Basic Bold Italic'), local('GentiumBasic-BoldItalic'), url(http://themes.googleusercontent.com/static/fonts/gentiumbasic/v5/8N9-c_aQDJ8LbI1NGVMrwjBWbH-5CKom31QWlI8zOIM.woff) format('woff');
}
body {
background:#fff;
padding:2% 5%;
margin:0;
font-family: "Gentium Basic", "Bookman Old Style", "Times New Roman", serif;
font-size: 16pt;
}
div.header h1 {
margin-top:2ex;
}
a {
text-decoration: none;
color: #a00;
}
a:visited {
color: #d88;
}
div.header h1 a:hover, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
a:hover, span.caption a.image:hover {
background:#fee;
}
img.logo {
float: right;
clear: right;
border-style:none;
background-color:#fff;
}
img {
padding: 0.5em;
margin: 0 1em;
}
a.image:hover {
background:inherit;
}
a.image:hover img {
background:#fee;
}
/* a.definition soll aussehen wie h2 */
h2, p a.definition {
display:block;
clear:both;
}
/* Such Link im h1 soll nicht auffallen. */
h1, h2, h3, h4, h1 a, h1 a:visited, p a.definition {
color:#666;
font-size: 30pt;
font-weight: normal;
margin: 4ex 0 1ex 0;
padding: 0;
border-bottom: 1px solid #000;
}
h3, h4 {
font-size: inherit;
}
div.diff {
padding: 1em 3em;
}
div.old {
background-color:#FFFFAF;
}
div.new {
background-color:#CFFFCF;
}
div.old p, div.new p {
padding: 0.5em 0;
}
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div[class="content refer"] p { margin-top:2em; }
div.content div.refer hr { display:none; }
div.content div.refer { padding:0; font-size:medium; }
div.content div.refer p { margin:0; }
div.refer a { display:block; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user {
border-style: none;
margin-left: 3em;
}
table.user tr td {
border-style: none;
padding:0.5ex 1ex;
}
dt {
font-weight:bold;
}
dd {
margin-bottom:1ex;
}
textarea {
width:100%;
height:80%;
font-size: 12pt;
}
textarea#summary { height: 3em; }
input {
font-size: 12pt;
}
div.image span.caption {
margin: 0 1em;
}
li img, img.smiley, .noborder img {
border:none;
padding:0;
margin:0;
background:#fff;
color:#000;
}
/* Google +1 */
a#plus1 img {
background-color: #fff;
padding: 0;
margin: 0;
border: none;
}
div.header img, div.footer img { border:0; padding:0; margin:0; }
.left { float:left; }
.right { float:right; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
span.author {
color: #501;
}
span.bar a {
padding-right:1ex;
}
.rc .author {
color: #655;
}
.rc strong {
font-weight: normal;
color: inherit;
}
.rc li {
position:relative;
padding: 1ex 0;
}
hr {
border:none;
color:black;
background-color:#000;
height:2px;
margin-top:2ex;
}
div.footer hr {
height:4px;
margin: 2em 0 1ex 0;
clear:both;
}
div.content > div.comment {
border-top: none;
padding-top: none;
border-left: 1ex solid #bbb;
padding-left: 1ex;
}
div.wrapper > div.comment {
border-top: 2px solid #000;
padding-top: 2em;
}
pre {
padding: 0.5em;
margin-left: 1em;
margin-right: 2em;
white-space: pre;
overflow:hidden;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
tt, pre, code {
font-size: 80%;
};

View File

@@ -1,250 +0,0 @@
@font-face {
font-family: 'Gentium Basic';
font-style: normal;
font-weight: 400;
src: local('Gentium Basic'), local('GentiumBasic'), url(/fonts/GenBasR.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: normal;
font-weight: 700;
src: local('Gentium Basic Bold'), local('GentiumBasic-Bold'), url(/fonts/GenBasB.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: italic;
font-weight: 400;
src: local('Gentium Basic Italic'), local('GentiumBasic-Italic'), url(/fonts/GenBasI.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: italic;
font-weight: 700;
src: local('Gentium Basic Bold Italic'), local('GentiumBasic-BoldItalic'), url(/fonts/GenBasBI.woff) format('woff');
}
@font-face {
font-family: 'Gentium Plus';
font-style: normal;
font-weight: 400;
src: local('Gentium Plus'), local('GentiumPlus'), url(/fonts/GentiumPlus-R.woff) format('woff');
}
@font-face {
font-family: 'Gentium Plus';
font-style: italic;
font-weight: 400;
src: local('Gentium Plus Italic'), local('GentiumPlus-Italic'), url(/fonts/GentiumPlus-I.woff) format('woff');
}
@font-face {
font-family: 'Symbola';
src: local('Symbola'), url('/fonts/Symbola.woff') format('woff') url('/fonts/Symbola.ttf') format('truetype');
}
body {
background:#fff;
padding:2% 5%;
margin:0;
font-family: "Gentium Basic", "Gentium Plus", "Symbola", serif;
font-size: 16pt;
}
div.header h1 {
margin-top:2ex;
}
a {
text-decoration: none;
color: #a00;
}
a:visited {
color: #d88;
}
div.header h1 a:hover, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
a:hover, span.caption a.image:hover {
background:#fee;
}
img.logo {
float: right;
clear: right;
border-style:none;
background-color:#fff;
}
img {
padding: 0.5em;
margin: 0 1em;
}
a.image:hover {
background:inherit;
}
a.image:hover img {
background:#fee;
}
/* a.definition soll aussehen wie h2 */
h2, p a.definition {
display:block;
clear:both;
}
/* Such Link im h1 soll nicht auffallen. */
h1, h2, h3, h4, h1 a, h1 a:visited, p a.definition {
color:#666;
font-size: 30pt;
font-weight: normal;
margin: 4ex 0 1ex 0;
padding: 0;
border-bottom: 1px solid #000;
}
h3, h4 {
font-size: inherit;
}
div.diff {
padding: 1em 3em;
}
div.old {
background-color:#FFFFAF;
}
div.new {
background-color:#CFFFCF;
}
div.old p, div.new p {
padding: 0.5em 0;
}
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div[class="content refer"] p { margin-top:2em; }
div.content div.refer hr { display:none; }
div.content div.refer { padding:0; font-size:medium; }
div.content div.refer p { margin:0; }
div.refer a { display:block; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user {
border-style: none;
margin-left: 3em;
}
table.user tr td {
border-style: none;
padding:0.5ex 1ex;
}
dt {
font-weight:bold;
}
dd {
margin-bottom:1ex;
}
textarea {
width:100%;
height:80%;
font-size: 12pt;
}
textarea#summary { height: 3em; }
input {
font-size: 12pt;
}
div.image span.caption {
margin: 0 1em;
}
li img, img.smiley, .noborder img {
border:none;
padding:0;
margin:0;
background:#fff;
color:#000;
}
/* Google +1 */
a#plus1 img {
background-color: #fff;
padding: 0;
margin: 0;
border: none;
}
div.header img, div.footer img { border:0; padding:0; margin:0; }
/* No goto bar at the bottom. */
.footer .gotobar, .footer .edit br { display: none; }
.left { float:left; }
.right { float:right; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
span.author {
color: #501;
}
span.bar a {
padding-right:1ex;
}
.rc .author {
color: #655;
}
.rc strong {
font-weight: normal;
color: inherit;
}
.rc li {
position:relative;
padding: 1ex 0;
}
hr {
border:none;
color:black;
background-color:#000;
height:2px;
margin-top:2ex;
}
div.footer hr {
height:4px;
margin: 2em 0 1ex 0;
clear:both;
}
div.content > div.comment {
border-top: none;
padding-top: none;
border-left: 1ex solid #bbb;
padding-left: 1ex;
}
div.wrapper > div.comment {
border-top: 2px solid #000;
padding-top: 2em;
}
pre {
padding: 0.5em;
margin-left: 1em;
margin-right: 2em;
white-space: pre;
overflow:hidden;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
tt, pre, code {
font-size: 80%;
};

View File

@@ -1,233 +0,0 @@
div.diff { padding-left:5%; padding-right:5% }
div.old { background-color:#FFFFAF }
div.new { background-color:#CFFFCF}
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
div[class="content refer"] p { margin-top:2em; }
div.content div.refer hr { display:none; }
div.content div.refer { padding:0; font-size:medium; }
div.content div.refer p { margin:0; }
div.refer a { display:block; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user { border-style:solid; border-width:thin; margin-left:5%; }
table.user tr td { border-style:solid; border-width:thin; padding:5px; }
dt { font-weight:bold; }
dd { margin-bottom:1ex; }
textarea { width:100%; height:80%; }
textarea#summary { height: 3em; }
img.logo {
float: right;
clear: right;
border-style:none;
background-color:#fff;
}
img {
border: #777777 1px solid;
padding: 0.5em;
margin: 0 1em;
background-color: #e6e6e6;
color: black;
}
div.image span.caption {
margin: 0 1em;
}
li img, img.smiley, .noborder img {
border:none;
padding:0;
margin:0;
background:#fff;
color:#000;
}
/* Google +1 */
a#plus1 img {
background-color: #fff;
padding: 0;
margin: 0;
border: none;
}
div.header img, div.footer img { border:0; padding:0; margin:0; }
.left { float:left; }
.right { float:right; }
div.left .left, div.right .right {
float:none;
}
.center { text-align:center; }
span.author {
color: #501;
}
span.bar a:first-child {
margin-left:-0.5ex;
}
span.bar a {
padding-right:0.5ex;
padding-left:-0.5ex;
}
body {
background:#fff;
padding:2% 5%;
margin:0;
font-family: "Bookman Old Style", "Times New Roman", serif;
font-size: 12pt;
}
body.large {
font-size:18pt;
}
body.sans {
font-family: "DejaVu", "Verdana", sans;
}
a {
text-decoration:none;
font-weight:bold;
color:#c00;
}
a:visited { color:#c55; }
.rc .author {
font-weight: normal;
color: #666;
}
.rc .dash {
display: none;
}
.rc strong {
font-weight: normal;
color: inherit;
display: block;
}
.rc li {
position:relative;
padding-right: 5em;
}
.rc .lang {
position: absolute;
top: 0;
right: 0;
z-index: 1;
}
.rc .type {
position: absolute;
top: 1.16em; /* don't forget line-height */
right: 0;
z-index: 2;
background:#fff; /* covers language if no summary */
padding: 0.1em 0 0.1em 1em;
}
div.header h1 a:hover, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
a:hover, span.caption a.image:hover {
background:#000000;
color:#FFFFFF;
}
a.image:hover {
background:inherit;
}
a.image:hover img {
background:#ccc;
}
p a.definition {
color:#666;
padding: 2px;
margin-top: 5px;
border-bottom: 2px solid #000000;
text-decoration:none;
display:block;
clear:both;
}
h2 {
clear:both;
}
p a.definition:hover {
background:#000000;
color:#FFFFFF;
}
h1, h2, h3, h4,
h1 a, h2 a, h3 a, h4 a,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited {
color:#666;
}
h1, h2, h3, h4 { font-size:medium; margin:4ex 0 1ex 0; padding:0; }
h1, h2 { border-bottom: 2px solid #000; }
h3 { border-bottom: 1px dashed #000; }
div.header h1 {
font-size:xx-large; margin-top:1ex;
border-bottom: 5px solid #000;
}
hr {
border:none;
color:black;
background-color:#000;
height:2px;
margin-top:2ex;
}
div.footer hr { height:4px; }
pre {
border: #777777 1px solid;
padding: 0.5em;
margin-left: 1em;
margin-right: 2em;
white-space: pre;
background-color: #e6e6e6;
color: black;
overflow:hidden;
font-size: smaller;
}
body.magenta a { color:#639; }
div.rss li span.time { display:none; }
div.rss .description { font: medium monospace; display:inline; }
div.month {
float:right;
margin:0;
padding:0 1ex;
}
div.year div.month { float:left; }
div.cal pre {
margin:0;
padding:1ex;
background-color:#ffe;
}
div.cal a { text-decoration:none; }
div.cal a.edit {
background-color:inherit;
font-weight:normal;
}
div.cal a.local {
background-color:#fee;
}
div.cal a.today { background-color:#fdd; }
div.cal a:hover {
color:#fff;
background-color:#000;
}
div.sidebar {
float:left;
border-right:1px solid black;
padding: 0.5ex 1ex 1ex 0;
margin: 0 1ex 1ex 0;
}
div.footer hr {
clear:both;
}
@media print {
body { font:11pt "Neep", "Arial", sans-serif; }
a, a:link, a:visited { color:#000; text-decoration:none; font-style:oblique; font-weight:normal; }
h1 a, h2 a, h3 a, h4 a { font-style:normal; }
a.edit, div.footer, div.refer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after { content:"[" attr(href) "]"; }
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
pre { border:0; font-size:10pt; }
}

View File

@@ -1,277 +0,0 @@
/* from http://de.veganwiki.org/wiki.css
modified by alex@emacswiki.org
*/
a:active {
color: #ffffff
}
a:link {
color: #000000; text-decoration: underline
}
a:visited {
color: #003300; text-decoration: underline
}
a:hover {
color: #0000aa;
}
body {
margin: 0px 0px -8px -8px;
padding: 0 0 0 0;
background-color: #ffddaa;
color: #000000;
font-family: verdana,"courier new",verdana,arial,helvetica,sans-serif;
font-size: 75%;
line-height: 150%;
}
img.logo {
float:right;
margin:1ex;
}
body body h1, body form {
padding-left: 15px;
}
div.header {
padding: 3px 0px 0px 15px;
background-color: #ffaa66;
border-top: #ccc 0px solid;
border-right: #999 0px solid;
border-bottom: #999 0px solid;
border-left: #ccc 0px solid;
}
div.footer {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 15px;
background-color: #ff9966;
border-top: #ccc 0px solid;
border-right: #999 0px solid;
border-bottom: #999 0px solid;
border-left: #ccc 0px solid;
}
div.footernote {
margin: 0 0px -10px -15px;
padding: 5px 0px 15px 15px;
background-color: #ee6633;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 75%;
}
div.content, div.edit, div.rc, div.preview {
margin: 0 0 0 0;
padding: 5px 40px 10px 15px;
background-color: #ffddaa;
border-right: #999 0px solid;
border-top: 0px;
border-left: #ccc 0px solid;
border-bottom: #999 0px solid;
}
div.content, div.content p, div.content ul, div.content dl, div.content td, p, li, ul, dl, td, div.sidebar {
font-family: verdana,arial,helvetica,sans-serif;
line-height: 150%;
}
div.sidebar {
float: right;
clear: none;
width: 150px;
margin: 5px 5px 50px 50px;
padding: 15px 15px 15px 15px;
background-color: #f7e7c6;
border-top: 5px #eecc99 solid;
border-bottom: 5px #eecc99 solid;
border-left: 1px #eecc99 solid;
border-right: 1px #eecc99 solid;
z-index: 1;
font-size: 95%;
}
div.sidebar hr {
margin: 5px 0px 0px 0px;
padding: 0px 0px 0px 0px;
height: 1px;
border: 1px #ddbb66 solid;
z-index: 0;
color: #ff0000;
}
div.sidebar img.inline {
margin 2px 2px 2px 2px;
border: 0px;
}
div.sidebar ul {
margin-left: 20px;
list-style: square;
}
h1 {
margin: 0.2em -15px 0px;
padding: 10px 0px 10px 16px
color: #003300;
border-top: #999 0px solid;
border-bottom: #ccc 0px solid;
border-left: 0px;
font-family: verdana,arial,helvetica,sans-serif
font-size: 120%;
}
div.header h1 {
margin: 0.2em -15px 0px;
margin-right: 0px;
padding: 7px 15px 7px 15px;
background-color: #ee6633;
color: #003300;
border-top: #999 0px solid;
border-bottom: #ccc 0px solid;
border-left: 0px;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 150%;
letter-spacing:0px;
word-spacing: 0px;
font-weight: normal;
}
div.header h1 a:link, div.header h1 a:visited, div.header h1 a:active, div.header h1 a:hover
{
text-decoration: none;
}
div.content h1 {
margin: 0.2em -15px 0px;
padding: 30px 15px 5px 15px;
color: #000000;
border: 0 0 0 0;
border-top: #ff9966 18px dotted;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 150%;
letter-spacing:0px;
word-spacing: 0px;
font-weight: bold;
}
h2 {
margin: 1.5em 0 0.6em 0;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 130%;
line-height: 250%;
color: #663300;
}
h3 {
margin-bottom: 0.1em;
font-size: x-small;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 120%;
color: #996633;
}
h4 {
margin-bottom: 0.3em;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 110%;
color: #bb9966;
}
div.content p, div.content ul, div.content dl {
padding-right: 0%;
}
div.content ul ul, div.content ul ul ul, div.content ul ul ul ul {
padding-right: 0%;
}
div.content ul, div.content dl {
line-height: 150%;
}
div.rc, div.rc p, div.rc ul, div.rc dl, div.rc td {
font-family: verdana,arial,helvetica,sans-serif;
line-height:150%;
}
pre, div.content pre {
font-size: 95%;
font-family: verdana,arial,helvetica,sans-serif;
line-height: 120%;
border: 1px #eecc99 solid;
border-left: 5px #eecc99 solid;
border-right: 5px #eecc99 solid;
background-color: #ffe5b5;
margin: 0 0 0 0;
padding: 5px;
color: #331100;
};
dd.quote, div.content dd.quote {
font-size: 95%;
font-family: verdana,arial,helvetica,sans-serif;
line-height: 120%;
border: 1px #eecc99 solid;
border-left: 5px #eecc99 solid;
border-right: 5px #eecc99 solid;
background-color: #ffe5b5;
margin: 0 0 0 0;
padding: 5px;
color: #331100;
};
img, div.content img, div.content img.inline {
margin 25px 25px 25px 25px;
padding 15px 15px 15px 15px;
border: 0px;
}
div.header hr, div.footer hr {
visibility: hidden;
height: 0px;
border-top: medium none;
border-right: medium none;
border-bottom: medium none;
border-left: medium none;
}
hr, div.content hr, div.rc hr, div.edit.hr {
margin: 5px 0px 5px 0px;
padding: 0px 0px 0px 0px;
height: 3px;
border: 3px #ffcc99 solid;
z-index: 0;
color: #ff0000;
}
div.editnote {
border-right: #999 1px solid; padding-right: 15px; border-top: #ccc 1px solid; margin-top: 0px; padding-left: 15px; padding-bottom: 15px; border-left: #ccc 1px solid; padding-top: 15px; border-bottom: #999 1px solid; background-color: #ffcc99;
}
div.refer {
padding: 0 15px 0 15px;
}
div.message {
border-right: #999 1px solid; padding-right: 15px; border-top: 0px; margin-top: 0px; padding-left: 15px; padding-bottom: 15px; border-left: #ccc 1px solid; padding-top: 15px; border-bottom: #999 0px solid; background-color: #ffcc99;
}
div.wikipreview {
border-right: #999 1px solid; border-top: #ccc 1px solid; padding-left: 15px; border-left: #ccc 1px solid; border-bottom: #999 1px solid; background-color: #ffcc99;
}
div.wikirc {
border-right: #999 1px solid; border-top: #ccc 1px solid; padding-left: 15px; border-left: #ccc 1px solid; border-bottom: #999 1px solid; background-color: #ffcc99;
}
div.wikipref {
border-right: #999 1px solid; border-top: #ccc 1px solid; padding-left: 15px; border-left: #ccc 1px solid; border-bottom: #999 1px solid; background-color: #ffcc99;
}
table, td, tr, th {
border: 1px solid #999;
}
div.footnotes
{
font-size:80%;
margin: 0px 0px 0px 15px;
padding: 0px 0px 0px 15px;
}
div.footnotes hr
{
visibility:hidden;
margin: 0px 0px 0px 0px;
padding: 0px 0 0px 0;
height: 0px;
border: 0px #99bbff solid;
z-index: 0;
color: #0000ff;
}
a.footnote, a.footnote:visited, a.footnote:active, a.footnote:hover {
font-size:85%;
vertical-align:20%;
text-decoration:none;
}
div.footnotes a:link, div.footnotes a:visited, div.footnotes a:active, div.footnotes a:hover
{
}
div.sister {
padding: 0 15px 0 15px;
}
div.sister a {
padding-right: 10px;
}

View File

@@ -1,189 +0,0 @@
/* don't show the name of the page */
div.header {
display:none;
}
/* the first h2 header is the title of the document */
div.content > h2:first-child {
font-size:x-large;
font-weight:bold;
text-align:center;
display:block;
}
/* invert author and address italics */
div.Author {
text-align:center;
font-style:italic;
font-size:smaller;
}
div.Author i {
font-style:normal;
font-size:medium;
}
/* printed smaller, and no "AUTHOR" heading, no numbering */
div.Author, div.Abstract, div.Keywords {
font-size:smaller;
}
div.Author h2 {
display:none;
}
div.Abstract h2, div.Keywords h2 {
display:block;
font-size:medium;
}
/* typical headers are all the same size and bold, h2 is uppercased, h3 is not */
h2, div.footnotes hr + p {
text-transform:uppercase;
font-size:large;
font-weight:bold;
}
h3 {
font-size:large;
font-weight:bold;
}
/* main text */
body {
font:12pt "Times New Roman", serif;
text-align:justify;
}
div.footnotes {
text-align:left;
}
/* images */
img {
border:none;
}
img[smiley] {
display:none;
}
div.Image a.image {
display:block;
padding:2ex;
}
div.Image h2 {
display:none;
}
/* this should keep image and caption together, but it seems not to work. */
div.Image {
page-break-inside:avoid;
}
/* link look like ordinary text */
a.number span {
display:none;
}
@media screen {
body {
padding:10ex;
}
div.header {
display: block;
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
vertical-align: top;
color:#aaa;
font-size: 10pt;
}
div.header h1 {
margin: 0;
padding: 0;
font-size: inherit;
}
div.header a {
text-decoration: none;
}
div.footer, div.refer, a, a.number:link, a.number:visited,
div.content + form, span.gotobar {
color:#aaa;
}
div.content a, div.footnotes a, div.rc a {
color:#000;
text-decoration:none;
}
}
@media print {
a.edit, div.footer, div.refer, a.number,
div.content + form, span.gotobar {
display:none;
}
a, a:link, a:visited {
color:#000;
text-decoration:none;
}
}
a[class="url number"]:after,
a[class="inter number"]:after {
content:"[" attr(href) "]";
}
a[class="local number"]:after {
content:"[" attr(title) "]";
}
/* footnotes */
a.footnote:before {
content:"[";
}
a.footnote:after {
content:"]";
}
div.footnotes a + a[class="url outside"]:after {
content: ", <" attr(href) ">";
}
div.footnotes a + a[class="url"]:before {
content: "<";
}
div.footnotes a + a[class="url"]:after {
content: ">";
}
div.footnotes hr {
display:none;
}
div.footnotes p {
padding-left:3em;
text-indent:-3em;
}
/* must come at the end */
div.content a:hover {
color:#000;
background-color:#999;
}

View File

@@ -1,251 +0,0 @@
/* Public Domain */
body {
font-family: sans-serif;
font-size: 0.8em;
line-height: 1.5em;
margin: 0;
padding: 0;
background: #fafafa repeat-y url(/css/emacs_sidebar_pedia.png)
}
/* Google Search Box */
div.header form {
position: absolute;
top: 0;
right: 1em;
}
/* Logo */
img.logo {
display: none;
}
a.logo {
display: block;
position: absolute;
top: 0;
left: 0;
width: 196px;
height: 150px;
background:transparent url(/css/emacs_logo_pedia.png);
}
/* Side Bar */
span.gotobar {
position: absolute;
top: 150px;
left: 0pt;
width: 196px;
}
span.gotobar a {
display: block;
font-size: 100%;
margin-left: 1.5em;
margin-top: 0.5em;
}
/* Links */
a {
color: #55b;
text-decoration: none;
}
a:visited {
color: #31b;
}
/* Header */
div.header {
margin-left: 196px;
height: 110px;
background-color: white;
padding: 10px;
}
div.header .specialdays {
display: block;
position: absolute;
top: 10px;
}
div.header h1 {
font-weight: normal;
margin-top: 40px;
padding-top: 40px;
padding-bottom: 7px;
border-top: 1px solid #aaccff;
border-bottom: 1px solid #aaaaaa;
width: auto;
white-space: nowrap;
}
div.header h1 a {
color: black;
}
/* Top Link Bar */
div.footer span.edit {
display: block;
position: absolute;
top: 30px;
left: 206px;
white-space: nowrap;
}
div.footer span.edit br {
display: none;
}
div.footer span.edit a {
padding-right: 1em;
}
/* But the talk link goes elsewhere */
body.top div.footer span.edit a.original,
body.top div.footer span.edit a.comment {
position: absolute;
top: 25px;
}
/* On the edit page, the buttons (6th paragraph) go up */
body.top div.edit {
margin-top: 30px;
}
body.top div.edit {
margin-top: 30px;
}
body.top p + p + p + p + p + p {
position: absolute;
top: 140px;
}
body.top p + p + p + p + p + p + p {
position: static;
}
/* Messages */
div.message {
position: absolute;
top: 1px;
left: 206px;
color: red;
}
/* Content */
div.content, div.rc, div.diff, div.comment {
margin-left: 196px; /* see gotobar */
padding: 1em;
border-bottom: 1px solid #aaccff;
background: white;
}
pre {
border: 1pt dashed black;
font-size: 8pt;
overflow: auto;
padding: 1em;
white-space: pre;
}
p {
margin-top: 0.4em;
margin-right: 0pt;
margin-bottom: 0.5em;
margin-left: 0pt;
}
ul {
list-style-type: square;
}
li {
margin-bottom: 0.1em;
}
/* Table of Contents */
div.toc {
width: 50%;
font-size: 90%;
padding: 0 1em;
margin: 2em 0;
border: 1px solid #ddd;
}
/* Diff */
div.diff {
font-size: 90%;
}
div.diff p b {
font-size: 150%;
font-weight: normal;
}
div.old {
background-color:#FFFFAF;
}
div.new {
background-color:#CFFFCF;
}
div.wrapper div.diff + hr {
display: none;
}
/* portrait support */
div.color {
clear:left;
}
div.one {
background-color:#eee;
padding: 0.1ex 0;
}
img.portrait {
float:left;
clear:left;
background-color:#fff;
border: 1px solid #999;
padding:10px;
margin:10px;
}
li {
margin-left:1em;
}
div.portrait {
float: left;
clear: left;
font-size: xx-small;
padding-left: 10px;
}
div.portrait + p {
min-height:70px;
}
div.portrait img.portrait {
float:none;
margin:10px 10px 0 0;
}
div.portrait a {
text-decoration:none;
color:#999;
}
/* IRC */
dl.irc dt {
width:15ex;
float:left;
text-align:right;
clear:left;
}
dl.irc dt span.time { display:none; }
dl.irc dd {
margin-left:17ex;
}
/* Category Convention */
hr {
border: none;
color: #aaccff;
background-color: #aaccff;
height: 1px;
padding: 0px;
margin: 1em 0;
}
hr + p:last-child {
background-color: #fafafa;
padding: 1em;
border: 1px solid #aaaaaa;
}
/* Comment Pages */
form.comment span {
display: block;
padding: 0.2em 0;
}
form.comment span label {
display: inline-block;
width: 10em;
}
form.comment span input {
display: inline-block;
width: 20em;
}
/* Footer */
div.footer {
font-size: 0.9em;
margin: 0;
padding: 1ex 1em 1ex 206px;
background: #fafafa;
}
div.footer span.gotobar, div.footer hr {
display: none;
}

View File

@@ -1,187 +0,0 @@
body {
background-color: #ffe4e4;
color: #606;
font-size: 14pt;
font-family: Geneva, Verdana, Arial, sans-serif;
margin: 0;
padding: 20px 30px;
border: 10px solid #f36;
}
img.logo {
float: right;
border:
}
img.logo, div.footer hr {
border: 1px solid #e09;
}
a:hover {
background-color: #fff5f5;
}
/* headers */
div.header, div.footer, div.near, div.definition {
font-family: Abadi MT Condensed Light, Arial Narrow, Arial, sans-serif;
font-size: 16px;
}
div.header h1 {
margin-top: 30px;
}
/* underlining using border-bottom */
h1 {
border-bottom: 5px solid #000;
padding: 2px;
margin: 0px;
margin-bottom: 8px;
}
h2 {
padding-top: 2ex;
margin-top: 3em;
border-bottom: 2px solid #000000;
clear:both;
}
h3 {
padding: 2px;
margin-top: 5em;
border-bottom: 1px dashed #000;
clear:both;
}
h4 {
padding:2px;
margin-top:3em;
text-decoration:underline;
clear:both;
}
hr { clear:both; }
h1, h2, h3,
h1 a, h2 a, h3 a, h4 a,
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited {
color:#f36;
}
h1, h2 {
border-bottom: 2px solid #936;
}
h3 {
border-bottom: 1px dashed #936;
}
h1, h2, h3, h4 { font-family:Skia, Verdana, sans-serif; }
h1 { font-size:xx-large; }
h2 { font-size:x-large; }
h3 { font-size:large; }
h4 { font-size:large; }
/* headers in the journal are smaller */
div.journal h1 { font-size:large; clear:both; }
div.journal h2 { font-size:medium; }
div.journal h3 { font-size:medium; }
div.journal h4 { font-size:medium; }
div.journal hr { display:none; }
/* Links */
a { text-decoration:none; font-weight:bold; color:#e33; }
div.header a, div.footer a, div.near a,
div.definition a { font-weight: normal; }
a:visited { color:#c66; }
a[class="url outside"]:before { content:"\2197"; }
a.near:link { color:#093; }
a.near:visited { color:#550; }
a.near:active { color:#0F0; }
/* near links */
div.near { background-color: inherit; }
a.near:link { color: #c90; }
a.near:visited { color: #cc0; }
/* Table of Contents */
div.toc {
font-size: 9pt;
border: 1px solid #e09;
margin: 20px;
padding: 0 10px;
}
div.toc h2 {
padding-top: 0;
font-size: 14pt;
}
/* Sister Sites */
div.sister { margin-right:1ex; background-color:inherit; }
div.sister p { margin-top:0; }
div.sister hr { display:none; }
div.sister img { border:none; background-color:#ffe; }
/* Portraits */
div.color {
clear:left;
}
div.one {
background-color:#fcc;
padding: 0.1ex 1ex;
}
img.portrait {
float:left;
clear:left;
background-color:#fff;
border:#999 1px solid;
padding:10px;
margin:10px;
}
li {
margin-left:1em;
}
div.portrait {
float:left;
clear:left;
font-size:xx-small;
padding-left:10px;
}
div.portrait + p {
min-height:70px;
}
div.portrait img.portrait {
float:none;
margin:10px 10px 0 0;
}
div.portrait a {
text-decoration:none;
color:#999;
}
dl.irc dt {
width:12ex;
float:left;
text-align:right;
}
dl.irc dd {
margin-left:15ex;
}
/* sister site background */
div.sister img {
background-color: inherit;
}
/* bold is too close for bold fonts */
a {
letter-spacing: 0.1ex;
}
div.rc strong {
font-weight: normal;
}
/* comments */
div.commentshown { background-color:#fff5f5; padding: 0 1ex; }

View File

@@ -1,47 +0,0 @@
body { background-color:#FFF; color:#000; }
textarea { width:100%; }
a:link { color:#00F; }
a:visited { color:#A0A; }
a:active { color:#F00; }
a.definition:before { content:"[::"; }
a.definition:after { content:"]"; }
a.alias { text-decoration:none; border-bottom: thin dashed; }
a.near:link { color:#093; }
a.near:visited { color:#550; }
img.logo { float: right; clear: right; border-style:none; }
div.diff { padding-left:5%; padding-right:5%; }
div.old { background-color:#FFFFAF; }
div.new { background-color:#CFFFCF; }
div.message { background-color:#FEE; }
div.journal h1 { font-size:large; }
table.history { border-style:none; }
td.history { border-style:none; }
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { background-color:#EEF; }
div.sister { float:left; margin-right:1ex; background-color:#FFF; }
div.sister p { margin-top:0; }
div.sister img { border:none; }
div.near { background-color:#EFE; }
div.near p { margin-top:0; }
h2, h3 { margin-top:10ex; }
.left { float: left; }
.right { float: right; }
@media print {
body { font:12pt sans-serif; }
a, a:link, a:visited { color:#000; text-decoration:none; font-style:oblique; }
h1 a, h2 a, h3 a, h4 a { font-style:normal; }
a.edit, div.footer, form, span.gotobar, a.number span { display:none; }
a[class="url number"]:after, a[class="inter number"]:after { content:"[" attr(href) "]"; }
a[class="local number"]:after { content:"[" attr(title) "]"; }
img[smiley] { line-height: inherit; }
}
table.user { border-style:solid; border-width:thin; }
table.user td, table.user th { border-style:solid; border-width:thin; padding:5px; }
table.user th { font-weight:bold; }
table.user td.r { text-align:right; }
table.user td.l { text-align:left; }
table.user td.c { text-align:center; }
table.user td.j { text-align:justify; }
table.user td.mark { background-color:yellow; }

View File

@@ -1,142 +0,0 @@
/* Some of this is based on a CSS by Damien Elmes from
http://repose.cx/core.css
It was in turn based on http://www.fantasy-coders.de/ruby/rubyStyle.css */
img.logo { float: right; clear: right; border-style:none; }
div.diff { padding-left:5%; padding-right:5% }
div.old { background-color:#FFFFAF }
div.new { background-color:#CFFFCF}
div.refer { padding-left:5%; padding-right:5%; font-size:smaller; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user { border-style:solid; border-width:thin; width:90%; margin-left:5%; }
table.user tr td { border-style:solid; border-width:thin;
padding:5px; text-align:center; }
img {
border: #777777 1px solid;
padding: 0.5em;
margin-left: 1em;
margin-right: 2em;
background-color: #e6e6e6;
color: black;
}
img.smiley {
border:none;
padding:0;
margin:0;
background:#fff;
color:#000;
}
div.header img, div.footer img { border:0; padding:0; margin:0; }
span.author {
color: #501;
}
@media print {
span.gotobar { display:none; }
div.refer { display:none; }
div.footer { display:none; }
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
background:#fff;
margin:auto;
padding:5%;
padding-top:2%;
margin:0px;
}
a {
text-decoration:none;
font-weight:bold;
color:#c00;
}
a:visited {
color:#c55;
}
body.magenta a {
color:#639;
}
a:hover {
background:#000000;
color:#FFFFFF;
}
p a.definition {
color:#666;
font-size: 22px;
padding: 2px;
margin-top: 5px;
border-bottom: 2px solid #000000;
text-decoration:none;
display:block;
}
p a.definition:hover {
background:#000000;
color:#FFFFFF;
}
h1 a {
color:#666;
}
h2 a {
color:#666;
}
h3 a {
color:#666;
}
h4 a {
color:#666;
}
h1 {
font-size: 48px;
color:#666;
border-bottom: 5px solid #000;
padding: 2px;
margin: 0px;
margin-bottom: 8px;
}
h2 {
color:#666;
font-size: 22px;
padding: 2px;
margin-top: 5px;
border-bottom: 2px solid #000000;
}
h3 {
color:#666;
font-size: 18px;
padding: 2px;
margin-top: 5px;
border-bottom: 1px dashed #000;
}
h4 {
color:#666;
font-size: 18px;
padding: 2px;
margin-top: 5px;
}
pre {
border: #777777 1px solid;
padding: 0.5em;
margin-left: 1em;
margin-right: 2em;
white-space: pre;
background-color: #e6e6e6;
color: black;
}

View File

@@ -1,178 +0,0 @@
/* Originally from Earle Martin, as seen on
http://downlode.org/log/2005-01-14/Mu_License,
Adapted by Alex Schroeder for Oddmuse.
Alex's changes available under the Mu License:
If you are asking what license this is released under,
you are asking the wrong question.
*/
body {
margin: 12px;
background: #002;
color: #fff;
font-family: "Andale Mono", Consolas, "Courier New", Courier, fixed;
}
h1 a:link, h1 a:visited {
font-weight: normal;
color: #bfe;
}
a {
text-decoration: none;
}
a:link, a:active {
color: #9df;
}
a:visited {
color: #add;
}
a:hover {
text-decoration: underline;
}
blockquote {
border-left: 1px solid #fff;
padding-left: 10px;
margin-left: 20px;
}
hr { clear:both; }
div.content {
border: 1px solid #fff;
padding: 20px;
color: #fff;
background: #333;
}
/* tables */
table.user {
margin: 1ex 4em;
padding: 1ex 1em;
border-top: 1px solid white;
border-bottom: 1px solid white;
}
table.user td, table.user th {
border-style: none;
padding:5px 10px;
vertical-align: top;
}
table.user td.mark { background-color: #6ca; }
table.user td.j { text-align: justify; }
table.user td.c { text-align: center; }
table.user td.l { text-align: left; }
table.user td.r { text-align: right; }
table.user th { font-weight: bold; }
table.history { border-style:none; }
td.history { border-style:none; }
/* images with links, captions, etc */
div.left .left { float: none; }
div.right .right { float: none; }
.right { float: right; margin-left: 1em; }
.left { float: left; margin-right: 1em; }
div.image { display: inline; margin: 1em; font-size: 90%; text-align: center; }
/* diff */
div.old { background-color: #944; }
div.new { background-color: #498; }
/* edit */
div.edit { border:none; background:inherit; width:100%; }
div.edit textarea { width:95%; color:#fff; background:#333; }
input[name=summary] { width:80%; }
/* recent changes */
.rc strong { font-weight: normal; }
/* calendar: not checked */
div.year { border:none; background:inherit; }
div.month { padding:0; margin:0 2ex; }
body > div.month {
float:right;
background-color:inherit;
border:solid thin;
padding:0 1ex;
}
div.year > div.month { float:left; }
div.footer { clear:both; }
div.month a.edit { color:inherit; font-weight:inherit; }
div.month .today { border: 1px solid red; }
/* logo */
img.logo {
border: none;
float:right;
margin:0;
padding:2px;
}
/* sidebar */
div.sidebar {
border:1px solid #fff;
padding: 0 1em;
margin: 0 0 1em 0;
background: #333;
}
/* not checked */
div.journal h1 { font-size: large }
dd, li { margin-bottom:0.5ex; }
/* portrait support: not checked */
div.color { clear:left; }
div.one { background-color:#444; padding: 0.1ex 0; }
img.portrait {
float:left;
clear:left;
background-color:#000;
border:#fff 1px solid;
padding:1px;
margin:10px;
}
li { margin-left:1em; }
div.portrait { float:left;
clear:left;
font-size:xx-small;
padding-left:10px;
}
div.portrait + p { min-height:70px; }
div.portrait img.portrait { float:none; margin:10px 10px 0 0; }
div.portrait a { text-decoration:none; color:#999; }
/* irc support: not checked */
dl.irc dt { width:12ex; float:left; text-align:right; }
dl.irc dd { margin-left:15ex; }
/* search support: not checked */
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { border:1px dashed; padding:0 1em;}
/* permanent anchors support: not checked */
a.definition { border-bottom:dashed 1px; }
a.alias { text-decoration:none; border-bottom:dashed 1px; }
/* near links: not checked */
a.near { text-decoration: underline; }

View File

@@ -1,47 +0,0 @@
/* use a traditional typesetting style */
p, dd { text-align:justify; }
p { margin-top:0; margin-bottom:0; }
p+p { text-indent:1em; }
/* argh, just throw out browser's margins and uses our own */
table, ol, ul, p, h1, h2, h3, h4 { margin:0; }
html { margin:0.2em; }
body { margin:0.0em; }
table, ol, ul { margin-left:1.4em; }
*+table, *+ul, *+ol, *+div { margin-top: 0.6em; }
table+p, ul+p, ol+p, div+p { margin-top: 0.6em; }
h1, h2, h3, h4 { margin-top: 0.6em; }
td, th { padding-left:0.5em; padding-right:0.5em; }
caption { margin-top: 0.6em; }
/* use faces from the manuscript */
body { font-family:Times New Roman, Times, serif; font-weight:medium; font-size:1.0em; font-style:normal; }
h1, h2, h3 { font-family:Helvetica, sans; font-weight:bold; }
h1 { font-size:2.0em; font-style:normal; }
h2 { font-size:1.4em; font-style:normal; }
h3 { font-size:1.2em; font-style:italic; }
h3 > em { font-style:normal; }
/* the exercise titles are a bit of a hack */
div > p:first-child > em:first-child > strong:first-child,
div.exercise > p:first-child > em:first-child > strong:first-child,
div.dialogue > em:first-child > strong:first-child,
div.lesson-goals > strong:first-child,
div.culture-point > strong:first-child { font-family:Helvetica, sans; }
table caption { font-family:Times New Roman, Times, serif; font-weight:bold; font-style:italic; }
div.lesson-goals,
div.culture-point { font-family:Helvetica, sans; }
th { font-weight:normal; font-style:italic; }
/* the first column in a dialogue is the speaker, which should be small caps */
div.dialogue > table tr > td:first-child { font-variant:small-caps; }
/* the book title and author are just h1s, I'm afraid */
h1.title { font-size:3em; text-align:center; margin-top:0em; }
h1.author { font-size:2.2em; text-align:center; margin-top:0em; }
// div { border: 1px solid grey; margin:1px; margin-left:1em; margin-right:1em; }
div.culture-point, div.lesson-goals { border:2px solid black; padding:0.2em; }
td { vertical-align:top; }
th { text-align:left; }
// .vocabulary { -moz-column-width:20em; -moz-column-gap:1.5em; }

View File

@@ -1,72 +0,0 @@
body {
font-family: Verdana, Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;
background: white;
color: black;
}
code {
font-family: "Courier New", Courier, Monaco, monospace;
}
pre {
font-family: "Courier New", Courier, Monaco, monospace;
}
hr {
color: gray;
}
div.footer span.gotobar, div.footer span.gotobar + br {
display:none;
}
span.gotobar {
font-size: small;
display: block;
background: #FFFF66;
font-family: Verdana, Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;
background: #FFFF66;
border-style: none none solid none;
border-width: thin;
margin: 0;
padding: 0.7ex;
top: 1ex;
left: 1ex;
}
span.gotobar a:first-child {
font-weight:bold;
}
span.gotobar a:first-child:visited {
color:blue;
}
img.logo {
max-height: 3ex;
max-width: 3ex;
border: 0;
float: right;
margin: 0.2ex;
}
div.footer form {
position:absolute;
top: 1.6ex;
right: 6ex;
font-size: smaller;
}
div.footer form input[name=lang] {
max-width: 2em;
}
table.densetable {
font-size: 80%;
}
h1, h2, h3, h4, h5, h6 {
font-family: Verdana, Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;
text-decoration: underline;
}
h1 a {
color: black;
}
h4 {
margin-bottom: 0.5em;
}
h5, h6 {
margin-bottom: 0.2em;
}
a.definition {
color: black;
font-weight: bold;
}

View File

@@ -1,268 +0,0 @@
/* This is the default CSS file for Oddmuse wikis. It is dedicated to
the public domain. You can copy, modify, distribute and use the
work, even for commercial purposes, all without asking permission.
https://creativecommons.org/publicdomain/zero/1.0/ */
body {
background: #fff;
padding: 2% 5%;
margin: 0;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 15pt;
}
div.header h1 {
margin-top: 2ex;
}
a {
text-decoration: none;
color: #a00;
}
a:visited {
color: #d88;
}
div.header h1 a:hover, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
a:hover, span.caption a.image:hover {
background: #fee;
}
img.logo {
float: right;
clear: right;
border-style: none;
background-color: #fff;
}
img {
padding: 0.5em;
margin: 0 1em;
max-width: 95%;
}
a.image:hover {
background: inherit;
}
a.image:hover img {
background: #fee;
}
/* a.definition soll aussehen wie h2 */
h2, p a.definition {
display: block;
clear: both;
}
/* Such Link im h1 soll nicht auffallen. */
h1, h2, h3, h4, h1 a, h1 a:visited, p a.definition {
color: #666;
font-size: 30pt;
font-weight: normal;
margin: 4ex 0 1ex 0;
padding: 0;
border-bottom: 1px solid #000;
}
h3, h4 {
font-size: inherit;
}
div.diff {
padding: 1em 3em;
}
div.old {
background-color: #FFFFAF;
}
div.new {
background-color: #CFFFCF;
}
div.old p, div.new p {
padding: 0.5em 0;
}
div.refer { padding-left: 5%; padding-right: 5%; font-size: smaller; }
div[class="content refer"] p { margin-top: 2em; }
div.content div.refer hr { display: none; }
div.content div.refer { padding: 0; font-size: medium; }
div.content div.refer p { margin: 0; }
div.refer a { display: block; }
table.history { border-style: none; }
td.history { border-style: none; }
table.user {
border-style: none;
margin-left: 3em;
}
table.user tr td {
border-style: none;
padding: 0.5ex 1ex;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 1ex;
}
textarea {
width: 100%;
height: 80%;
font-size: 12pt;
}
textarea#summary { height: 3em; }
input {
font-size: 12pt;
}
div.image span.caption {
margin: 0 1em;
}
li img, img.smiley, .noborder img {
border: none;
padding: 0;
margin: 0;
background: #fff;
color: #000;
}
/* Google +1 */
a#plus1 img {
background-color: #fff;
padding: 0;
margin: 0;
border: none;
}
div.header img, div.footer img { border: 0; padding: 0; margin: 0; }
/* No goto bar at the bottom. */
.footer .gotobar, .footer .edit br { display: none; }
.left { float: left; }
.right { float: right; }
div.left .left, div.right .right {
float: none;
}
.center { text-align: center; }
span.author {
color: #501;
}
span.bar a:first-child {
margin-left: -0.5ex;
}
span.bar a {
padding-right: 0.5ex;
padding-left: 0.5ex;
}
.rc .author {
color: #655;
}
.rc strong {
font-weight: normal;
color: inherit;
}
.rc li {
position: relative;
padding: 1ex 0;
}
hr {
border: none;
color: black;
background-color: #000;
height: 2px;
margin-top: 2ex;
}
div.footer hr {
height: 4px;
margin: 2em 0 1ex 0;
clear: both;
}
div.content > div.comment {
border-top: none;
padding-top: 0;
border-left: 1ex solid #bbb;
padding-left: 1ex;
}
div.wrapper > div.comment {
border-top: 2px solid #000;
padding-top: 2em;
}
pre {
padding: 0.5em;
margin-left: 1em;
margin-right: 2em;
white-space: pre;
overflow: hidden;
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
tt, pre, code {
font-size: 80%;
}
code {
background: #eee;
white-space: pre-wrap;
}
@font-face {
font-family: 'Gentium Basic';
font-style: normal;
font-weight: 700;
src: local('Gentium Basic Bold'), local('GentiumBasic-Bold'), url(/fonts/GenBasB.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: italic;
font-weight: 400;
src: local('Gentium Basic Italic'), local('GentiumBasic-Italic'), url(/fonts/GenBasI.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: italic;
font-weight: 700;
src: local('Gentium Basic Bold Italic'), local('GentiumBasic-BoldItalic'), url(/fonts/GenBasBI.woff) format('woff');
}
@font-face {
font-family: 'Gentium Basic';
font-style: normal;
font-weight: 400;
src: local('Gentium Basic'), local('GentiumBasic'), url(/fonts/GenBasR.woff) format('woff');
}
@font-face {
font-family: 'Gentium Plus';
font-style: normal;
font-weight: 400;
src: local('Gentium Plus'), local('GentiumPlus'), url(/fonts/GentiumPlus-R.woff) format('woff');
}
@font-face {
font-family: 'Gentium Plus';
font-style: italic;
font-weight: 400;
src: local('Gentium Plus Italic'), local('GentiumPlus-Italic'), url(/fonts/GentiumPlus-I.woff) format('woff');
}
@font-face {
font-family: 'Symbola';
src: local('Symbola'), url('/fonts/Symbola.woff') format('woff') url('/fonts/Symbola.ttf') format('truetype');
}

View File

@@ -1,122 +0,0 @@
/* Originally from Earle Martin, as seen on
http://downlode.org/log/2005-01-14/Mu_License,
Adapted by Alex Schroeder for Oddmuse.
Alex's changes available under the Mu License:
If you are asking what license this is released under,
you are asking the wrong question.
*/
body
{
margin: 10px;
background: #002;
color: #fff;
font-family: Trebuchet MS, serif;
}
a:link,a:visited,a:active
{
background: transparent;
color: #6c9;
text-decoration: none;
}
a:hover
{
border-bottom: 1px dotted #6c9
}
blockquote
{
border-left: 1px solid #fff;
padding-left: 10px;
margin-left: 20px;
}
div.sidebar { float:right; border:1px dotted #000; padding:0 1em; }
div.sidebar ul { padding-left:1em; }
hr { clear:both; }
div.content {
width: 75ex;
border: 1px solid #fff;
padding: 20px;
color: #fff;
background: #333;
}
body.bigger div.content { width:100ex; }
div.edit { border:none; background:inherit; width:100%; }
div.edit textarea { width:95%; color:#fff; background:#333; }
input[name=summary] { width:80%; }
div.old { background-color: #633; }
div.new { background-color: #364; }
div.year { border:none; background:inherit; }
div.month { padding:0; margin:0 2ex; }
body > div.month {
float:right;
background-color:inherit;
border:solid thin;
padding:0 1ex;
}
div.year > div.month { float:left; }
div.footer { clear:both; }
div.month a.edit { color:inherit; font-weight:inherit; }
img.logo {
border:1px solid #fff;
float:right;
margin:0;
padding:2px;
}
div.color { clear:left; }
div.one { background-color:#444; padding: 0.1ex 0; }
img.portrait {
float:left;
clear:left;
background-color:#000;
border:#fff 1px solid;
padding:1px;
margin:10px;
}
li { margin-left:1em; }
div.portrait { float:left;
clear:left;
font-size:xx-small;
padding-left:10px;
}
div.portrait + p { min-height:70px; }
div.portrait img.portrait { float:none; margin:10px 10px 0 0; }
div.portrait a { text-decoration:none; color:#999; }
dl.irc dt { width:12ex; float:left; text-align:right; }
dl.irc dd { margin-left:15ex; }
table.history { border-style:none; }
td.history { border-style:none; }
table.user { border-style:solid; border-width:thin; }
table.user tr td {
border-style:solid;
border-width:thin;
padding:5px;
text-align:center;
}
span.result { font-size:larger; }
span.info { font-size:smaller; font-style:italic; }
div.rss { border:1px dashed; padding:0 1em;}
/*
* a.definition:before { content:"[::"; }
* a.definition:after { content:"]"; }
* a.link:before { content:"[##"; }
* a.link:after { content:"]" }
*/
a.definition { border-bottom:dashed 1px; }
a.alias { text-decoration:none; border-bottom:dashed 1px; }
a.near { text-decoration: underline; }
div.journal h1 { font-size: large }
dd, li { margin-bottom:0.5ex; }

View File

@@ -1 +0,0 @@
Oddmuse

202
info-ref Normal file
View File

@@ -0,0 +1,202 @@
#!/usr/bin/perl
# Copyright (C) 2005 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use warnings;
use CGI;
use LWP::UserAgent;
use XML::LibXML;
use URI;
my @indexes = qw(
http://www.gnu.org/software/emacs/manual/html_node/Command-Index.html
http://www.gnu.org/software/emacs/manual/html_node/Variable-Index.html
http://www.gnu.org/software/emacs/manual/html_node/Concept-Index.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_728.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_729.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_730.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_731.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_732.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_733.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_734.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_735.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_736.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_737.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_738.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_739.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_740.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_741.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_742.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_743.html
http://www.gnu.org/software/emacs/elisp-manual/html_node/elisp_744.html
);
my $db = '/org/org.emacswiki/htdocs/emacs/info-ref.dat';
my $nl = "\n";
my $fs = "\023";
my $gs = "\024";
my $rs = "\025";
my $q = new CGI;
ProcessRequest();
sub ProcessRequest {
if ($q->param('init')) {
Initialize();
} elsif ($q->param('find')) {
Find($q->param('find'));
} else {
ShowForm();
}
}
sub ShowForm {
print $q->header, $q->start_html,
$q->start_form, "Index entry: ", $q->textfield('find'), $q->submit, $q->end_form,
$q->p('$Id: info-ref,v 1.6 2005/08/31 14:01:17 as Exp $'),
$q->end_html;
}
sub Find {
my $str = shift;
my %map = ();
my $data = ReadFileOrDie($db);
foreach my $line (split(/$nl/, $data)) {
my ($key, $rest) = split(/$fs/, $line);
$map{$key} = ();
foreach my $a (split(/$gs/, $rest)) {
my ($link, $label) = split(/$rs/, $a);
$map{$key}{$link} = $label;
}
}
my @links = keys %{$map{$str}};
if ($#links < 0) {
ReportError("No matches found for '$str'", '404 Not Found');
} elsif ($#links == 0) {
print $q->redirect($links[0]);
} else {
my @list = map { $q->a({-href=>$_}, $map{$str}{$_}) } @links;
print $q->header, $q->h1($str), $q->ol($q->li(\@list));
}
}
sub Initialize {
my %map = ();
print $q->header, $q->start_html;
foreach my $url (@indexes) {
print $q->p($url);;
# determine base URI
my $base = URI->new($url);
# fetch and parse data
my $data = GetRaw($url);
# some markup fixes for the elisp manual
$data =~ s/&([<"])/&amp;$1/g;
$data =~ s/<([<"])/&lt;$1/g;
$data =~ s/="fn_"">/="fn_&quot;">/;
$data =~ s/<!DOCTYPE.*?>//;
$data =~ s'</?font.*?>''gi;
$data =~ s'</table><br></P>'</table><br>';
my $parser = XML::LibXML->new();
my $doc;
eval { $doc = $parser->parse_html_string($data); };
print $q->p($@) if $@;
next if $@;
# emacs manual
my @nodelist = $doc->findnodes('/html/body/ul/li');
foreach my $node (@nodelist) {
my $text = $node->textContent;
my ($key) = split(/: /, $text);
my $a = $node->findnodes('descendant::a')->[0];
my $label = $a->textContent;
my $link = $a->getAttribute('href');
my $l = URI->new_abs($link, $base);
# print "$key -> $label $l\n";
$map{$key} = () unless $map{$key};
$map{$key}{$l->canonical} = $label;
}
# elisp manual
@nodelist = $doc->findnodes('descendant::table[position()=3]/descendant::tr');
foreach my $node (@nodelist) {
my ($item, $section) = $node->findnodes('td/a');
next unless $item and $section;
my $key = $item->textContent;
my $label = $section->textContent;
my $link = $item->getAttribute('href');
my $l = URI->new_abs($link, $base);
# print "$key -> $label $l\n";
$map{$key} = () unless $map{$key};
$map{$key}{$l->canonical} = $label;
}
}
my $data = join($nl, map {
my $key = $_;
$key . $fs . join($gs, map {
my $link = $_;
join($rs, $link, $map{$key}{$link});
} keys %{$map{$_}})
} keys %map);
WriteStringToFile($db, $data);
print $q->p('Database initialized'), $q->end_html;
}
sub GetRaw {
my $uri = shift;
return unless eval { require LWP::UserAgent; };
my $ua = LWP::UserAgent->new;
my $response = $ua->get($uri);
return $response->content;
}
sub ReadFile {
my ($filename) = @_;
my ($data);
local $/ = undef; # Read complete files
if (open(IN, "<$filename")) {
$data=<IN>;
close IN;
return (1, $data);
}
return (0, '');
}
sub ReadFileOrDie {
my ($filename) = @_;
my ($status, $data);
($status, $data) = ReadFile($filename);
if (!$status) {
ReportError("Cannot open $filename: $!", '500 Internal Server Error');
}
return $data;
}
sub WriteStringToFile {
my ($file, $string) = @_;
open(OUT, ">$file")
or ReportError("Cannot write $file: $!", '500 Internal Server Error');
print OUT $string;
close(OUT);
}
sub ReportError { # fatal!
my ($errmsg, $status, $log) = @_;
print $q->header(-status => $status);
print $q->start_html, $q->h2($errmsg), $q->end_html;
exit (1);
}

30
modules/aawrapperdiv.pl Normal file → Executable file
View File

@@ -16,27 +16,27 @@
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
$ModulesDescription .= '<p>$Id: aawrapperdiv.pl,v 1.2 2005/04/08 21:23:43 fletcherpenney Exp $</p>';
AddModuleDescription('aawrapperdiv.pl', 'WrapperDiv Module');
our ($q);
*OldGetHeader = \&GetHeader;
*GetHeader = \&WrapperGetHeader;
*OldGetHeader = *GetHeader;
*GetHeader = *WrapperGetHeader;
sub WrapperGetHeader {
my ($id, $title, $oldId, $nocache, $status) = @_;
my $result = OldGetHeader ($id, $title, $oldId, $nocache, $status);
$result .= $q->start_div({-class=>'wrapper'});
my ($id, $title, $oldId, $nocache, $status) = @_;
my $result = OldGetHeader ($id, $title, $oldId, $nocache, $status);
$result .= $q->start_div({-class=>'wrapper'});
}
*OldPrintFooter = \&PrintFooter;
*PrintFooter = \&WrapperPrintFooter;
*OldPrintFooter = *PrintFooter;
*PrintFooter = *WrapperPrintFooter;
sub WrapperPrintFooter {
print $q->start_div({-class=>'wrapper close'});
print $q->end_div(), $q->end_div();
OldPrintFooter(@_);
my ($id, $rev, $comment) = @_;
print $q->start_div({-class=>'wrapper close'});
print $q->end_div(), $q->end_div();
OldPrintFooter($id, $rev, $comment);
}

View File

@@ -1,39 +0,0 @@
# Copyright (C) 2014 Alex-Daniel Jakimenko <alex.jakimenko@gmail.com>
# Copyright (C) 2014 Alex Schroeder <alex@gnu.org>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use v5.10;
AddModuleDescription('accesskeys.pl', 'Links With AccessKeys Extension');
our (@MyRules, $FreeLinkPattern);
push(@MyRules, \&LinksWithAccessKeys);
sub LinksWithAccessKeys {
if (m/\G(\[\[$FreeLinkPattern\{(.)\}\]\])/cg) {
my ($id, $key) = ($2, $3);
Dirty($1);
$id = FreeToNormal($id);
my ($class, $resolved, $title, $exists) = ResolveId($id);
my $text = NormalToFree($id);
if ($resolved) { # anchors don't exist as pages, therefore do not use $exists
print ScriptLink(UrlEncode($resolved), $text, $class, undef, $title, $key);
} else {
print "[[" . QuoteHtml($text) . GetEditLink($id, '?') . "]]";
}
return ''; # this is a dirty rule that depends the definition of other pages
}
return; # the rule didn't match
}

View File

@@ -16,12 +16,7 @@
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
our ($q, %Page, %Action, $IndexFile, $PageDir, $KeepDir, @MyAdminCode, $RefererDir);
AddModuleDescription('admin.pl', 'Admin Power Extension');
$ModulesDescription .= '<p>$Id: admin.pl,v 1.10 2005/02/01 20:53:41 as Exp $</p>';
$Action{delete} = \&AdminPowerDelete;
$Action{rename} = \&AdminPowerRename;
@@ -40,7 +35,7 @@ sub AdminPowerDelete {
} else {
print $q->p(GetPageLink($id) . ' ' . T('deleted'));
WriteRcLog($id, Ts('Deleted %s', $id), 0, $Page{revision},
GetParam('username', ''), $q->remote_addr(), $Page{languages},
GetParam('username', ''), GetRemoteHost(), $Page{languages},
GetCluster($Page{text}));
}
# Regenerate index on next request
@@ -67,13 +62,13 @@ sub AdminPowerRename {
# Regenerate index on next request -- remove this before errors can occur!
unlink($IndexFile);
# page file
CreateDir($PageDir); # It might not exist yet
CreatePageDir($PageDir, $new); # It might not exist yet
rename($fname, $newfname)
or ReportError(Tss('Cannot rename %1 to %2', $fname, $newfname) . ": $!", '500 INTERNAL SERVER ERROR');
# keep directory
my $kdir = GetKeepDir($id);
my $newkdir = GetKeepDir($new);
CreateDir($KeepDir); # It might not exist yet (only the parent directory!)
CreatePageDir($KeepDir, $new); # It might not exist yet (only the parent directory!)
rename($kdir, $newkdir)
or ReportError(Tss('Cannot rename %1 to %2', $kdir, $newkdir) . ": $!", '500 INTERNAL SERVER ERROR')
if -d $kdir;
@@ -81,7 +76,7 @@ sub AdminPowerRename {
if (defined(&GetRefererFile)) {
my $rdir = GetRefererFile($id);
my $newrdir = GetRefererFile($new);
CreateDir($RefererDir); # It might not exist yet
CreatePageDir($RefererDir, $new); # It might not exist yet
rename($rdir, $newrdir)
or ReportError(Tss('Cannot rename %1 to %2', $rdir, $newrdir) . ": $!", '500 INTERNAL SERVER ERROR')
if -d $rdir;
@@ -89,10 +84,10 @@ sub AdminPowerRename {
# RecentChanges
OpenPage($new);
WriteRcLog($id, Ts('Renamed to %s', $new), 0, $Page{revision},
GetParam('username', ''), $q->remote_addr(), $Page{languages},
GetParam('username', ''), GetRemoteHost(), $Page{languages},
GetCluster($Page{text}));
WriteRcLog($new, Ts('Renamed from %s', $id), 0, $Page{revision},
GetParam('username', ''), $q->remote_addr(), $Page{languages},
GetParam('username', ''), GetRemoteHost(), $Page{languages},
GetCluster($Page{text}));
print $q->p(Tss('Renamed %1 to %2.', GetPageLink($id), GetPageLink($new)));
ReleaseLock();
@@ -108,9 +103,9 @@ sub AdminPower {
my $name = $id;
$name =~ s/_/ /g;
if ($id) {
push(@$menuref, ScriptLink('action=delete;id=' . $id, Ts('Immediately delete %s', $name), 'delete'));
push(@$menuref, ScriptLink('action=delete;id=' . $id, Ts('Immediately delete %s', $name)));
push(@$menuref, GetFormStart()
. $q->label({-for=>'new'}, Ts('Rename %s to:', $name) . ' ')
. Ts('Rename %s to:', $name) . ' '
. GetHiddenValue('action', 'rename')
. GetHiddenValue('id', $id)
. $q->textfield(-name=>'new', -size=>20)

View File

@@ -1,46 +0,0 @@
# Copyright (C) 2005 Bart van Kuik <bart@vankuik.nl>
# Copyright (C) 2010 Bertrand Habib <hbbb05@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use v5.10;
AddModuleDescription('adsense.pl', 'AdSense Module');
our (@MyInitVariables, @MyFooters);
our ($AdSensePageName, $AdSensePlace);
push (@MyInitVariables, \&AdSenseInit);
sub AdSenseInit {
$AdSensePageName = "AdSense" unless $AdSensePageName;
$AdSensePlace = "top" unless $AdSensePlace;
if ($AdSensePlace eq 'bottom') { # Process adsense after all modules have been loaded
push (@MyFooters, \&GetAdSense);
} elsif ($AdSensePlace eq 'top') {
*AdSenseOldGetHtmlHeader = \&GetHtmlHeader;
*GetHtmlHeader = \&AdSenseNewGetHtmlHeader;
}
}
sub AdSenseNewGetHtmlHeader {
my $result = AdSenseOldGetHtmlHeader(@_);
$result .= GetAdSense();
return $result;
}
sub GetAdSense {
return GetPageContent($AdSensePageName) if GetParam('action', 'browse') eq 'browse';
}

View File

@@ -1,37 +0,0 @@
# Copyright (C) 2014 Alex-Daniel Jakimenko <alex.jakimenko@gmail.com>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use v5.10;
AddModuleDescription('advanced-uploads.pl', 'Advanced File Upload Extension');
our ($q, $HtmlHeaders);
$HtmlHeaders .= '<script type="text/javascript" src="/js/uploader.js"></script>';
*AdvancedUploadsOldGetTextArea = \&GetTextArea;
*GetTextArea = \&AdvancedUploadsNewGetTextArea;
sub AdvancedUploadsNewGetTextArea {
my ($name, $text, $rows) = @_;
return AdvancedUploadsOldGetTextArea(@_) . $q->br() . ($name =~ 'text|aftertext' ? GetUploadForm() : '');
}
sub GetUploadForm {
return $q->span({-class=>'upload'}, $q->label({-for=>'fileToUpload'}, T('Attach file:')),
$q->filefield(-name=>'fileToUpload', -id=>'fileToUpload', -multiple=>'multiple', -onChange=>'fileSelected()', -size=>20),
$q->span({-id=>'fileSize'}, ''),
$q->button(-name=>'uploadButton', -value=>T('Upload'), -onClick=>'uploadFile()'),
$q->span({-id=>'progressNumber'}));
}

View File

@@ -1,56 +0,0 @@
# Copyright (C) 2006 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
AddModuleDescription('age.pl', 'Age Indication Extension');
our (%Page, $Now, $ScriptName);
our (%AgeEffect, $AgeParameter);
# map page age to theme
%AgeEffect = (60*60*24 => 'day',
60*60*24*7 => 'week',
60*60*24*28 => 'moon',
60*60*24*365 => 'year',
);
# attribute in the page file to use as the timestamp -- use 'created'
# if using creationdate.pl.
$AgeParameter = 'ts';
*OldAgeGetHeader = \&GetHeader;
*GetHeader = \&NewAgeGetHeader;
sub NewAgeGetHeader {
my $header = OldAgeGetHeader(@_);
return $header unless $Page{$AgeParameter}; # open page required
my $age = $Now - $Page{$AgeParameter};
my $theme = '';
for my $seconds (sort {$b <=> $a} keys %AgeEffect) {
if ($age > $seconds) {
$theme = $AgeEffect{$seconds};
last;
}
}
return $header unless $theme;
my $oldtheme = GetParam('theme', $ScriptName);
$header =~ s/class="$oldtheme"/class="$theme"/; # touch as little as possible
return $header;
}

View File

@@ -1,172 +0,0 @@
# Copyright (C) 2005, 2006 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
AddModuleDescription('aggregate.pl', 'Front Page Extension');
our ($q, $bol, %Action, %Page, $OpenPageName, $UseDiff, $UsePathInfo, $RssStyleSheet, $RssLicense, $RssRights, $RssImageUrl, $CommentsPrefix, $SiteName, $ScriptName, $HomePage, $SiteDescription, @MyRules, $LastUpdate, $InterWikiMoniker);
push(@MyRules, \&AggregateRule);
sub AggregateRule {
if ($bol && m/\G(&lt;aggregate\s+((("[^\"&]+",?\s*)+)|(sort\s+)?search\s+(.+?))&gt;)/cg) {
Clean(CloseHtmlEnvironments());
Dirty($1);
my ($oldpos, $old_, $str, $sort, $search) = ((pos), $_, $3, $5, $6);
my $master = $OpenPageName;
local ($OpenPageName, %Page);
print $q->start_div({class=>"aggregate journal"});
my @pages = ();
@pages = $str =~ m/"([^\"&]+)"/g if $str;
@pages = SearchTitleAndBody($search) if $search;
if ($sort) {
if (defined &PageSort) {
@pages = sort PageSort @pages;
} else {
@pages = sort(@pages);
}
}
foreach my $id (@pages) {
next if $id eq $master;
my $title = $id;
local $OpenPageName = FreeToNormal($id);
my $page = GetPageContent($OpenPageName);
my $size = length($page);
my $i = index($page, "\n=");
my $j = index($page, "\n----");
$page = substr($page, 0, $i) if $i >= 0;
$page = substr($page, 0, $j) if $j >= 0;
$page =~ s/^=.*\n//; # if it starts with a header
print $q->start_div({class=>"page"}),
$q->h2(GetPageLink($OpenPageName, $title));
ApplyRules(QuoteHtml($page), 1, 0, undef, 'p');
print $q->p(GetPageLink($OpenPageName, T('Learn more...')))
if length($page) < $size;
print $q->end_div();
}
print $q->end_div();
Clean(AddHtmlEnvironment('p'));
($_, pos) = ($old_, $oldpos); # restore \G (assignment order matters!)
return '';
}
return;
}
$Action{aggregate} = \&DoAggregate;
sub DoAggregate {
print GetHttpHeader('application/xml');
my $frontpage = GetParam('id', $HomePage);
my $title = $frontpage;
$title =~ s/_/ /g;
my $source = GetPageContent($frontpage);
my $url = QuoteHtml($ScriptName);
my $diffPrefix = $url . QuoteHtml("?action=browse;diff=1;id=");
my $historyPrefix = $url . QuoteHtml("?action=history;id=");
my $date = TimeToRFC822($LastUpdate);
my $rss = qq{<?xml version="1.0" encoding="utf-8"?>};
if ($RssStyleSheet =~ /\.(xslt?|xml)$/) {
$rss .= qq{<?xml-stylesheet type="text/xml" href="$RssStyleSheet" ?>};
} elsif ($RssStyleSheet) {
$rss .= qq{<?xml-stylesheet type="text/css" href="$RssStyleSheet" ?>};
}
$rss .= qq{<rss version="2.0"
xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/"
xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
};
$rss .= "<title>" . QuoteHtml("$SiteName: $title") . "</title>\n";
$rss .= "<link>" . $url . ($UsePathInfo ? "/" : "?") . UrlEncode($frontpage) . "</link>\n";
$rss .= "<description>" . QuoteHtml($SiteDescription) . "</description>\n";
$rss .= "<pubDate>" . $date. "</pubDate>\n";
$rss .= "<lastBuildDate>" . $date . "</lastBuildDate>\n";
$rss .= "<generator>Oddmuse</generator>\n";
$rss .= "<copyright>" . $RssRights . "</copyright>\n" if $RssRights;
if (ref $RssLicense eq 'ARRAY') {
$rss .= join('', map {"<creativeCommons:license>$_</creativeCommons:license>\n"} @$RssLicense);
} elsif ($RssLicense) {
$rss .= "<creativeCommons:license>" . $RssLicense . "</creativeCommons:license>\n";
}
$rss .= "<wiki:interwiki>" . $InterWikiMoniker . "</wiki:interwiki>\n" if $InterWikiMoniker;
if ($RssImageUrl) {
$rss .= "<image>\n";
$rss .= "<url>" . $RssImageUrl . "</url>\n";
$rss .= "<title>" . QuoteHtml($SiteName) . "</title>\n";
$rss .= "<link>" . $url . "</link>\n";
$rss .= "</image>\n";
}
while ($source =~ m/<aggregate\s+((("[^\"&]+",?\s*)+)|(sort\s+)?search\s+(.+?))>/g) {
my ($str, $sort, $search) = ($1, $5, $6);
my @pages = ();
@pages = $str =~ m/"([^\"&]+)"/g if $str;
@pages = SearchTitleAndBody($search) if $search;
if ($sort) {
if (defined &PageSort) {
@pages = sort PageSort @pages;
} else {
@pages = sort(@pages);
}
}
foreach my $id (@pages) {
my $data = ParseData(ReadFileOrDie(GetPageFile(FreeToNormal($id))));
my $page = $data->{text};
my $size = length($page);
my $i = index($page, "\n=");
my $j = index($page, "\n----");
$page = substr($page, 0, $i) if $i >= 0;
$page = substr($page, 0, $j) if $j >= 0;
$page =~ s/^=.*\n//; # if it starts with a header
my $name = $id;
$name =~ s/_/ /g;
my $date = TimeToRFC822($data->{ts});
my $host = $data->{host};
my $username = $data->{username};
$username = QuoteHtml($username);
$username = $host unless $username;
my $minor = $data->{minor};
my $revision = $data->{revision};
my $cluster = GetCluster($page);
my $description = ToString(sub { ApplyRules(QuoteHtml($page), 1, 0, undef, 'p') });
$description .= $q->p(GetPageLink($id, T('Learn more...')))
if length($page) < $size;
$rss .= "\n<item>\n";
$rss .= "<title>" . QuoteHtml($name) . "</title>\n";
$rss .= "<link>" . $url . (GetParam("all", 0)
? "?" . GetPageParameters("browse", $id, $revision, $cluster)
: ($UsePathInfo ? "/" : "?") . UrlEncode($id)) . "</link>\n";
$rss .= "<description>" . QuoteHtml($description) . "</description>\n";
$rss .= "<pubDate>" . $date . "</pubDate>\n";
$rss .= "<comments>" . $url . ($UsePathInfo ? "/" : "?")
. $CommentsPrefix . UrlEncode($id) . "</comments>\n"
if $CommentsPrefix and $id !~ /^$CommentsPrefix/;
$rss .= "<wiki:username>" . $username . "</wiki:username>\n";
$rss .= "<wiki:status>" . (1 == $revision ? "new" : "updated") . "</wiki:status>\n";
$rss .= "<wiki:importance>" . ($minor ? "minor" : "major") . "</wiki:importance>\n";
$rss .= "<wiki:version>" . $revision . "</wiki:version>\n";
$rss .= "<wiki:history>" . $historyPrefix . UrlEncode($id) . "</wiki:history>\n";
$rss .= "<wiki:diff>" . $diffPrefix . UrlEncode($id) . "</wiki:diff>\n"
if $UseDiff and GetParam("diffrclink", 1);
$rss .= "</item>\n";
}
$rss .= "</channel>\n</rss>\n";
}
print $rss;
}

View File

@@ -1,119 +0,0 @@
# Copyright (C) 2005 Bayle Shanks http://purl.net/net/bshanks
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
our ($Now, @MyMacros, @MyRules, $DefaultStyleSheet, $q, $bol);
AddModuleDescription('agree-disagree.pl', 'AgreeDisagreePlugin');
push(@MyRules, \&AgreeDisagreeSupportRule);
push(@MyMacros, sub{ s/\[\+\]/"[+:" . GetParam('username', T('Anonymous'))
. ':' . TimeToText($Now) . "]"/eg });
push(@MyMacros, sub{ s/\[\+(:[^]:]+)\]/"[+$1:" . TimeToText($Now) . "]"/eg });
push(@MyMacros, sub{ s/\[\-\]/"[-:" . GetParam('username', T('Anonymous'))
. ':' . TimeToText($Now) . "]"/eg });
push(@MyMacros, sub{ s/\[\-(:[^]:]+)\]/"[-$1:" . TimeToText($Now) . "]"/eg });
$DefaultStyleSheet .= <<'EOT' unless $DefaultStyleSheet =~ /div\.agree/; # mod_perl?
div.agreeCount {
float: left;
clear: left;
background-color: Green;
padding-left: .5em;
padding-right: .5em;
padding-top: .5em;
padding-bottom: .5em;
}
div.disagreeCount {
float: left;
clear: right;
background-color: Red;
padding-left: .5em;
padding-right: .5em;
padding-top: .5em;
padding-bottom: .5em;
}
div.agreeNames {
float: left;
background-color: Green;
font-size: xx-small;
display: none;
}
div.disagreeNames {
float: left;
background-color: Red;
font-size: xx-small;
display: none;
}
EOT
my %AgreePortraits = ();
sub AgreeDisagreeSupportRule {
if ($bol) {
if ($bol && m/(\G(\s*\[\+(.*?)\]|\s*\[-(.*?)\])+)/cgs) {
my $votes = $1;
my @ayes = ();
my @nayes = ();
while ($votes =~ m/\G.*?\[\+(.*?)\]/cgs) {
my ($ignore, $name, $time) = split(/:/, $1, 3);
push(@ayes, $name);
}
my $votes2 = $votes;
while ($votes2 =~ m/\G.*?\[-(.*?)\]/cgs) {
my ($ignore, $name, $time) = split(/:/, $1, 3);
push(@nayes, $name);
}
my $html = CloseHtmlEnvironments() ;
$html .= $q->div({-class=>'agreeCount'}) . ($#ayes+1) . ' ' . '</div>' ;
$html .= $q->div({-class=>'agreeNames'}) . printNames(@ayes) . '</div>' ;
$html .= $q->div({-class=>'disagreeCount'}) . ' ' . ($#nayes+1) . '</div>' ;
$html .= $q->div({-class=>'disagreeNames'}) . printNames(@nayes) . '</div>' ;
return $html;
}
}
return undef;
}
sub printNames {
my @names = @_;
my $html = '';
foreach my $name (@names) {
$html .= "$name<br>";
}
return $html;
}

View File

@@ -1,60 +0,0 @@
# Copyright (C) 2006 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
AddModuleDescription('all.pl', 'All Action');
our ($q, %Action, $HomePage, $UrlProtocols);
$Action{all} = \&DoPrintAllPages;
our $Monolithic = 0;
sub DoPrintAllPages {
return if (!UserIsAdminOrError());
$Monolithic = 1; # changes ScriptLink
print GetHeader('', T('Complete Content'))
. $q->p(Ts('The main page is %s.', $q->a({-href=>'#' . $HomePage}, $HomePage)));
print $q->p($q->b(Ts('(for %s)', GetParam('lang', 0)))) if GetParam('lang', 0);
PrintAllPages(0, 0, undef, undef, AllPagesList());
PrintFooter();
}
*OldAllScriptLink = \&ScriptLink;
*ScriptLink = \&NewAllScriptLink;
sub NewAllScriptLink {
my ($action, $text, $class, $name, $title, $accesskey, $nofollow) = @_;
if ($Monolithic
and $action !~ /^($UrlProtocols)\%3a/
and $action !~ /^\%2f/
and $action !~ /=/) {
my %params;
$params{-href} = '#' . $action;
$params{'-class'} = $class if $class;
$params{'-name'} = $name if $name;
$params{'-title'} = $title if $title;
$params{'-accesskey'} = $accesskey if $accesskey;
$params{'-rel'} = 'nofollow' if $nofollow;
return $q->a(\%params, $text);
} else {
return OldAllScriptLink(@_);
}
}

View File

@@ -1,33 +1,33 @@
# Copyright (C) 20042015 Alex Schroeder <alex@gnu.org>
# Copyright (C) 2004, 2005 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
$ModulesDescription .= '<p>$Id: anchors.pl,v 1.15 2005/04/16 08:36:49 as Exp $</p>';
AddModuleDescription('anchors.pl', 'Local Anchor Extension');
our ($q, %Page, $FootnoteNumber, $FreeLinkPattern, @MyRules, $BracketWiki);
push(@MyRules, \&AnchorsRule);
sub AnchorsRule {
if (m/\G\[\[\#$FreeLinkPattern\]\]/cg) {
if (m/\G\[\[\#$FreeLinkPattern\]\]/gc) {
return $q->a({-href=>'#' . FreeToNormal($1), -class=>'local anchor'}, $1);
} elsif ($BracketWiki && m/\G\[\[\#$FreeLinkPattern\|([^\]]+)\]\]/cg) {
} elsif ($BracketWiki && m/\G\[\[\#$FreeLinkPattern\|([^\]]+)\]\]/gc) {
return $q->a({-href=>'#' . FreeToNormal($1), -class=>'local anchor'}, $2);
} elsif ($BracketWiki && m/\G(\[\[$FreeLinkPattern\#$FreeLinkPattern\|([^\]]+)\]\])/cg
or m/\G(\[\[\[$FreeLinkPattern\#$FreeLinkPattern\]\]\])/cg
or m/\G(\[\[$FreeLinkPattern\#$FreeLinkPattern\]\])/cg) {
} elsif ($BracketWiki && m/\G(\[\[$FreeLinkPattern\#$FreeLinkPattern\|([^\]]+)\]\])/cog
or m/\G(\[\[\[$FreeLinkPattern\#$FreeLinkPattern\]\]\])/cog
or m/\G(\[\[$FreeLinkPattern\#$FreeLinkPattern\]\])/cog) {
# This one is not a dirty rule because the output is always a page
# link, never an edit link (unlike normal free links).
my $bracket = (substr($1, 0, 3) eq '[[[');
@@ -39,30 +39,14 @@ sub AnchorsRule {
if (!$text && $bracket) {
$text = BracketLink(++$FootnoteNumber); # s/_/ /g happens further down!
$class .= ' number';
# Since we're displaying a number such as [1], the title attribute should tell us where this will go.
$title = "$2 ($3)";
# The user might have writen [[[FooBar#one two]]] or [[[FooBar#one_two]]]
$title =~ s/_/ /g;
$title = $id; # override title
$title =~ s/_/ /g if $free;
}
$text = $id unless $text;
$text =~ s/_/ /g;
return ScriptLink(UrlEncode($id), $text, $class, undef, $title);
} elsif (m/\G\[\:$FreeLinkPattern\]/cg) {
return $q->a({-name=>FreeToNormal($1), -class=>'anchor'}, '');
} elsif (m/\G\[\:$FreeLinkPattern\]/gc) {
return $q->a({-name=>FreeToNormal($1), -class=>'anchor'});
}
return;
}
*OldAnchorsBrowsePage=\&BrowsePage;
*BrowsePage=\&NewAnchorsBrowsePage;
sub NewAnchorsBrowsePage {
my ($id) = @_;
OpenPage($id);
if (not GetParam('revision', '')
and not GetParam('oldid', '')
and $Page{text} =~ /^\#REDIRECT\s+\[\[$FreeLinkPattern\#$FreeLinkPattern\]\]/) {
return ReBrowsePage(FreeToNormal($1 . '#' . $2), $id);
}
return OldAnchorsBrowsePage(@_);
return undef;
}

44
modules/antispam.pl Normal file → Executable file
View File

@@ -16,13 +16,9 @@
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
$ModulesDescription .= '<p>$Id: antispam.pl,v 1.2 2005/04/08 21:23:43 fletcherpenney Exp $</p>';
AddModuleDescription('antispam.pl', 'Antispam Module');
our (@MyRules);
our ($DoMaskEmail, $CreateMailtoLinks, $EmailRegExp);
use vars qw($DoMaskEmail $CreateMailtoLinks);
$DoMaskEmail = 1; # Mask all email, not just those in []'s
$CreateMailtoLinks = 1; # Create mailto's for all addresses
@@ -31,33 +27,33 @@ $EmailRegExp = '[\w\.\-]+@([\w\-]+\.)+[\w]+';
push(@MyRules, \&MaskEmailRule);
sub MaskEmailRule {
# Allow [email@foo.bar Email Me] links
if (m/\G\[($EmailRegExp(\s\w+)*\s*)\]/cgi) {
my $chunk = $1;
if (m/\G\[($EmailRegExp(\s\w+)*\s*)\]/igc) {
$chunk = $1;
$chunk =~ s/($EmailRegExp)//i;
my $email = $1;
$email = $1;
$chunk =~ s/^\s*//;
$chunk =~ s/\s*$//;
my $masked = '';
my @decimal = unpack('C*', $email);
for (@decimal) {
$masked .= '&#' . $_ . ';';
$masked="";
@decimal = unpack('C*', $email);
foreach $i (@decimal) {
$masked.="&#".$i.";";
}
$email = $masked;
$chunk = $email if $chunk eq "";
return "<a href=\"mailto:$email\">$chunk</a>";
return "<a href=\"mailto:" . $email . "\">$chunk</a>";
}
if (m/\G($EmailRegExp)/cgi) {
my $email = $1;
if (m/\G($EmailRegExp)/igc) {
$email=$1;
if ($DoMaskEmail) {
my $masked="";
my @decimal = unpack('C*', $email);
for (@decimal) {
$masked .= '&#' . $_ . ';';
$masked="";
@decimal = unpack('C*', $email);
foreach $i (@decimal) {
$masked.="&#".$i.";";
}
$email = $masked;
}
@@ -66,5 +62,5 @@ sub MaskEmailRule {
}
return $email;
}
return;
return undef;
}

View File

@@ -1,51 +0,0 @@
# Copyright (C) 2007 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
AddModuleDescription('archive.pl', 'Archive Extension');
our ($q);
*OldArchiveGetHeader = \&GetHeader;
*GetHeader = \&NewArchiveGetHeader;
# this assumes that *all* calls to GetHeader will print!
sub NewArchiveGetHeader {
my ($id) = @_;
print OldArchiveGetHeader(@_);
my %dates = ();
for (AllPagesList()) {
$dates{$1}++ if /^(\d\d\d\d-\d\d)-\d\d/;
}
print $q->div({-class=>'archive'},
$q->p($q->span(T('Archive:')),
map {
my $key = $_;
my ($year, $month) = split(/-/, $key);
if (defined(&month_name)) {
ScriptLink('action=collect;match=' . UrlEncode("^$year-$month"),
month_name($month) . " $year ($dates{$key})");
} else {
ScriptLink('action=index;match=' . UrlEncode("^$year-$month"),
"$year-$month ($dates{$key})");
}
} sort { $b <=> $a } keys %dates));
return '';
}

View File

@@ -1,69 +0,0 @@
# Copyright (C) 2014 Alex-Daniel Jakimenko <alex.jakimenko@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use v5.10;
AddModuleDescription('askpage.pl', 'Ask Page Extension');
use Fcntl qw(:DEFAULT :flock);
our ($DataDir);
our ($AskPage, $QuestionPage, $NewQuestion);
# Don't forget to set your $CommentsPattern to include both $AskPage and $QuestionPage
$AskPage = 'Ask';
$QuestionPage = 'Question_';
$NewQuestion = 'Write your question here:';
sub IncrementInFile {
my $filename = shift;
sysopen my $fh, $filename, O_RDWR|O_CREAT or die "can't open $filename: $!";
flock $fh, LOCK_EX or die "can't flock $filename: $!";
my $num = <$fh> || 1;
seek $fh, 0, 0 or die "can't rewind $filename: $!";
truncate $fh, 0 or die "can't truncate $filename: $!";
(print $fh $num+1, "\n") or die "can't write $filename: $!";
close $fh or die "can't close $filename: $!";
return $num;
}
*OldAskPageDoPost=\&DoPost;
*DoPost=\&NewAskPageDoPost;
sub NewAskPageDoPost {
my $id = FreeToNormal(shift);
if ($id eq $AskPage and not GetParam('text', undef)) { # comment, not a regular edit
my $currentQuestion = IncrementInFile("$DataDir/curquestion");
$currentQuestion =~ s/[\s\n]//g;
return OldAskPageDoPost($QuestionPage . $currentQuestion, @_); # hack page name
}
OldAskPageDoPost($id, @_); # keep original functionality for regular edits
}
*OldAskPageGetTextArea=\&GetTextArea;
*GetTextArea=\&NewAskPageGetTextArea;
sub NewAskPageGetTextArea {
my ($name, $text, @rest) = @_;
if ($name eq 'aftertext' and not $text and GetId() eq $AskPage) {
$text = $NewQuestion;
}
OldAskPageGetTextArea($name, $text, @rest);
}
*OldAskPageJournalSort=\&JournalSort;
*JournalSort=\&NewAskPageJournalSort;
sub NewAskPageJournalSort {
return OldAskPageJournalSort() unless $a =~ m/^$QuestionPage\d+$/ and $b =~ m/^$QuestionPage\d+$/;
($b =~ m/$QuestionPage(\d+)/)[0] <=> ($a =~ m/$QuestionPage(\d+)/)[0];
}

View File

@@ -1,8 +1,8 @@
# Copyright (C) 2004, 2006, 2008, 2014 Alex Schroeder <alex@gnu.org>
# Copyright (C) 2004 Alex Schroeder <alex@emacswiki.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -11,243 +11,96 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
use strict;
use v5.10;
use XML::Atom;
use XML::Atom::Entry;
use XML::Atom::Link;
use XML::Atom::Person;
AddModuleDescription('atom.pl', 'Atom Extension');
our ($q, %Page, %Action, $CommentsPrefix, $ScriptName, $SiteName, $MaxPost, $UseDiff, $DeletedPage, @MyInitVariables, @MyMacros, $FS, $BannedContent, $RssStyleSheet, $RssRights, $RssLicense, $RssImageUrl, $RssExclude, $RCName, @UploadTypes, $UploadAllowed, $UsePathInfo, $SiteDescription, $LastUpdate, $InterWikiMoniker);
push(@MyInitVariables, \&AtomInit);
sub AtomInit {
SetParam('action', 'atom') if $q->path_info =~ m|/atom\b|;
}
$ModulesDescription .= '<p>$Id: atom.pl,v 1.8 2004/10/10 15:14:44 as Exp $</p>';
$Action{atom} = \&DoAtom;
sub DoAtom {
my $id = shift;
if ($q->request_method eq 'POST') {
DoAtomSave('POST');
} elsif (GetParam('info', 0) or $id eq 'info') {
DoAtomIntrospection();
} elsif (GetParam('wiki', 0)) {
if ($q->request_method eq 'PUT') {
DoAtomSave('PUT', $id);
} elsif ($q->request_method eq 'DELETE') {
DoAtomDelete($id);
} else {
DoAtomGet($id);
}
} else {
SetParam($id, 1); # /atom/full should work, too
print GetHttpHeader('application/atom+xml');
print GetRcAtom();
}
print GetHttpHeader('application/xml');
DoRc(\&GetRcAtom);
}
# from http://www.ietf.org/internet-drafts/draft-ietf-atompub-protocol-10.txt
sub DoAtomIntrospection {
print GetHttpHeader('application/atomserv+xml');
my @types = ('entry', );
push(@types, @UploadTypes) if $UploadAllowed;
my $upload = '<accept>' . join(', ', @types) . '</accept>';
print <<EOT;
<?xml version="1.0" encoding='UTF-8'?>
<service xmlns="http://purl.org/atom/app#">
<workspace title="Wiki" >
<collection title="$SiteName" href="$ScriptName/atom/wiki">
$upload
</collection>
</workspace>
</service>
EOT
sub AtomTime {
my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(shift);
return sprintf( "%4d-%02d-%02dT%02d:%02dZ",
$year+1900, $mon+1, $mday, $hour, $min);
}
sub AtomTag {
my ($tag, $value) = @_;
my ($tag, $value, $escaped) = @_;
return '' unless $value;
return "<$tag>$value</$tag>\n";
if ($escaped) {
return "<$tag mode=\"escaped\">$value</$tag>\n";
} else {
return "<$tag>$value</$tag>\n";
}
}
# based on GetRcRss
sub GetRcAtom {
my $url = QuoteHtml($ScriptName) . ($UsePathInfo ? "/" : "?");
my $diffPrefix = QuoteHtml($ScriptName) . "?action=browse;diff=1;id=";
my $historyPrefix = QuoteHtml($ScriptName) . "?action=history;id=";
my $limit = GetParam("rsslimit", 15); # Only take the first 15 entries
my $count = 0;
my $feed = qq{<?xml version="1.0" encoding="UTF-8"?>\n};
if ($RssStyleSheet =~ /\.(xslt?|xml)$/) {
$feed .= qq{<?xml-stylesheet type="text/xml" href="$RssStyleSheet" ?>\n};
} elsif ($RssStyleSheet) {
$feed .= qq{<?xml-stylesheet type="text/css" href="$RssStyleSheet" ?>\n};
}
$feed .= qq{<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/"
xmlns:cc="http://backend.userland.com/creativeCommonsRssModule">\n};
$feed .= AtomTag('title', QuoteHtml($SiteName) . ': ' . GetParam('title', QuoteHtml($RCName)));
$feed .= qq{<link href="} . $url . UrlEncode($RCName) . qq{"/>\n};
$feed .= AtomTag('subtitle', QuoteHtml($SiteDescription));
$feed .= AtomTag('updated', TimeToW3($LastUpdate));
$feed .= qq{<generator uri="http://www.oddmuse.org/">Oddmuse</generator>\n};
$feed .= AtomTag('rights', $RssRights) if $RssRights;
$feed .= join('', map { AtomTag('<cc:license>', QuoteHtml($_)) }
(ref $RssLicense eq 'ARRAY' ? @$RssLicense : $RssLicense));
$feed .= AtomTag('wiki:interwiki', $InterWikiMoniker) if $InterWikiMoniker;
$feed .= AtomTag('logo', $RssImageUrl) if $RssImageUrl;
my %excluded = ();
if (GetParam("exclude", 1)) {
return if $CollectingJournal; # avoid infinite loops
local $CollectingJournal = 1;
# from http://www.ietf.org/internet-drafts/draft-ietf-atompub-format-01.txt
print <<EOT;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
EOT
my $title = $SiteName;
my $link = $ScriptName;
print AtomTag('title', QuoteHtml($title), 1);
print "<link href=\"$link\" rel=\"alternate\" title=\"$title\" type=\"text/html\"/>\n";
print AtomTag('author', AtomTag('name', $RssPublisher)) if $RssPublisher;
print AtomTag('contributor', AtomTag('name', $RssContributor)) if $RssContributor;
print "<generator url=\"http://www.oddmuse.org/\">Oddmuse</generator>\n";
print AtomTag('copyright', QuoteHtml($RssRights), 1) if $RssRights;
print <<EOT;
<info mode="xml" type="text/html">
<div xmlns="http://www.w3.org/1999/xhtml">This is an Atom formatted XML site feed. It is intended to be viewed in a Newsreader or syndicated to another site.</div>
</info>
EOT
print AtomTag('modified', AtomTime($LastUpdate));
my @excluded = ();
if (GetParam('exclude', 1)) {
foreach (split(/\n/, GetPageContent($RssExclude))) {
if (/^ ([^ ]+)[ \t]*$/) { # only read lines with one word after one space
$excluded{$1} = 1;
if (/^ ([^ ]+)[ \t]*$/) { # only read lines with one word after one space
push(@excluded, $1);
}
}
}
# Now call GetRc with some blocks of code as parameters:
ProcessRcLines(sub {}, sub {
my ($pagename, $timestamp, $host, $username, $summary, $minor, $revision, $languages, $cluster) = @_;
return if $excluded{$pagename} or ($limit ne 'all' and $count++ >= $limit);
my $name = NormalToFree($pagename);
$username = QuoteHtml($username);
$username = $host unless $username;
$feed .= "\n<entry>\n";
$feed .= AtomTag('title', QuoteHtml($name));
$feed .= qq{<link rel="alternate" href="}
. (GetParam('all', $cluster)
? QuoteHtml($ScriptName) . "?" . GetPageParameters('browse', $pagename, $revision, $cluster)
: $url . UrlEncode($pagename)) . qq{"/>\n};
$feed .= AtomLink("$ScriptName/atom/wiki/$pagename");
$feed .= AtomTag('summary', QuoteHtml($summary));
$feed .= qq{<content type="xhtml">\n<div xmlns="http://www.w3.org/1999/xhtml">\n}
. PageHtml($pagename, 50*1024,$q->div(T('This page is too big to send over RSS.')))
. qq{\n</div>\n</content>\n} if GetParam('full', 0);
$feed .= AtomTag('published', TimeToW3($timestamp));
$feed .= qq{<link rel="replies" href="} . $url . $CommentsPrefix . UrlEncode($pagename) . qq{"/>\n}
if $CommentsPrefix and $pagename !~ /^$CommentsPrefix/;
$feed .= AtomTag('author', substr(AtomTag('name', $username), 0, -1)); # strip one newline
$feed .= AtomTag('wiki:username', $username);
$feed .= AtomTag('wiki:status', 1 == $revision ? 'new' : 'updated');
$feed .= AtomTag('wiki:importance', $minor ? 'minor' : 'major');
$feed .= AtomTag('wiki:version', $revision);
$feed .= AtomTag('wiki:history', $historyPrefix . UrlEncode($pagename));
$feed .= AtomTag('wiki:diff', $diffPrefix . UrlEncode($pagename))
if $UseDiff and GetParam('diffrclink', 1);
$feed .= "</entry>\n";
});
$feed .= "</feed>\n";
return $feed;
}
# Based on DoPost
sub DoAtomSave {
my ($type, $oldid) = @_;
my $entry = AtomEntry();
my $title = $entry->title();
my $author = $entry->author();
SetParam('username', $author->name) if $author; # Used in Save()
my $id = FreeToNormal($title);
UserCanEditOrDie($id);
$oldid = $id unless $oldid;
ValidIdOrDie($oldid);
my $summary = $entry->summary();
# Lock before getting old page to prevent races
RequestLockOrError(); # fatal
OpenPage($oldid);
my $old = $Page{text};
# FIXME: Assuming XML Type content, because that's what
# XML::Atom::Client does. Sent mail to the maintainers, asking for
# clarification.
$_ = $entry->content()->{elem}->getChildrenByTagName('div')->[0]->textContent;
foreach my $macro (@MyMacros) {
&$macro;
}
my $string = $_;
# Massage the string
$string =~ s/\r//g;
$string .= "\n" if ($string !~ /\n$/);
$string =~ s/$FS//g;
# Banned Content
if (not UserIsEditor()) {
my $rule = BannedContent($string) || BannedContent($summary);
ReportError(T('Edit Denied'), '403 FORBIDDEN', undef,
$q->p(T('The page contains banned text.')),
$q->p(T('Contact the wiki administrator for more information.')),
$q->p($rule . ' ' . Ts('See %s for more information.', GetPageLink($BannedContent))))
if $rule;
}
my $oldrev = $Page{revision};
if ($old eq $string and $oldid eq $id) {
ReportError(T('No changes to be saved.'), '200 OK'); # an update without consequence
} elsif ($oldrev == 0 and $string eq "\n") {
ReportError(T('No changes to be saved.'), '400 BAD REQUEST'); # don't fake page creation because of webdav
} else {
# My providing a different title, the entry is automatically renamed
if ($oldrev > 0 and $oldid ne $id) {
Save($oldid, $DeletedPage, Ts('Renamed to %s', NormalToFree($id)));
OpenPage($id);
}
# Now save the new page
Save($id, $string, $summary);
ReleaseLock();
# Do we reply 200 or 201 depending on the request, or depending on
# the action taken?
my $url = "$ScriptName/atom/wiki/$id";
if ($type eq 'POST') { # instead of $oldrev == 0
print $q->header(-status=>'201 CREATED', -location=>$url);
} else {
print $q->header(-status=>'200 OK');
}
$entry->title(NormalToFree($id));
$entry->add_link(AtomLink($url));
print '<?xml version="1.0" encoding="utf-8"?>', "\n";
print $entry->{elem}->toString;
}
}
sub DoAtomGet {
print $q->header(-status=>'304 NOT MODIFIED') and return if FileFresh(); # return value is ignored
print GetHttpHeader('application/atomserv+xml');
print '<?xml version="1.0" encoding="utf-8"?>', "\n";
my $id = GetId();
OpenPage($id);
my $entry = XML::Atom::Entry->new;
my $person = XML::Atom::Person->new;
$person->name($Page{username});
$entry->author($person) if $Page{username};
$entry->title(NormalToFree($id));
$entry->summary($Page{summary});
$entry->content($Page{text});
$entry->add_link(AtomLink("$ScriptName/atom/wiki/$id"));
print $entry->{elem}->toString;
}
sub AtomEntry {
my $data = $q->param('POSTDATA');
if (not $data) {
# CGI provides POSTDATA for POST requests, not for PUT requests.
# The following code is based on the CGI->init code.
my $content_length = defined($ENV{'CONTENT_LENGTH'}) ? $ENV{'CONTENT_LENGTH'} : 0;
if ($content_length > 0 and $content_length < $MaxPost) {
$q->read_from_client(\$data, $content_length, 0);
}
}
my $entry = XML::Atom::Entry->new(\$data);
return $entry;
}
sub AtomLink {
my $url = shift;
my $link = XML::Atom::Link->new;
$link->href($url);
$link->rel('edit');
return $link;
GetRc(sub {},
sub {
my ($pagename, $timestamp, $host, $userName, $summary, $minor, $revision, $languages, $cluster) = @_;
return if grep(/$pagename/, @excluded);
my $title = FreeToNormal($pagename);
$title =~ s/_/ /g;
my $link = $ScriptName . ($UsePathInfo ? '/' : '?') . UrlEncode($pagename);
my $author = $userName;
$author = $host unless $author;
# output
print "<entry>\n",
AtomTag('title', QuoteHtml($title), 1),
"<link href=\"$link\" rel=\"alternate\" title=\"$title\" type=\"text/html\"/>\n",
"<id>$link</id>\n",
AtomTag('author', AtomTag('name', $author)),
AtomTag('modified', AtomTime($timestamp)),
AtomTag('issued', AtomTime($timestamp)),
AtomTag('summary', QuoteHtml($summary), 1);
if (GetParam('full', 0)) {
print '<content type="application/xhtml+xml">', "\n",
'<div xmlns="http://www.w3.org/1999/xhtml">', "\n";
OpenPage($pagename);
PrintPageDiff();
PrintPageHtml();
print "\n</div>\n</content>\n";
}
print "</entry>\n";
},
@_);
print "</feed>\n";
return '';
}

View File

@@ -1,223 +0,0 @@
#!/usr/bin/env perl
use strict;
use v5.10;
# ====================[ autolock.pl ]====================
=head1 NAME
autolock - An Oddmuse module for locking pages via regular expression matching
on page names.
=head1 SYNOPSIS
autolock automatically locks pages whose page name matches some regular
expression from edits, creation, and deletion by non-privileged visitors (but
not by password-verified editors or administrators).
autolock thus "augments" the built-in, manual method for locking existing pages
against page edits and page deletions, by providing an automated alternative;
and provides a new method - which has no built-in, manual analogue - for locking
against page creations.
=head1 INSTALLATION
autolock is easily installable: move this file into the B<wiki/modules/>
directory of your Oddmuse Wiki.
=cut
AddModuleDescription('autolock.pl', 'Autolock Extension');
our (@MyInitVariables, $CommentsPrefix, $EditAllowed, $NoEditFile, %LockOnCreation);
# ....................{ CONFIGURATION }....................
=head1 CONFIGURATION
autolock is easily configurable: set these variables in the B<wiki/config.pl>
file for your Oddmuse Wiki.
=cut
our ($AutoLockPagesMatching,
$AutoLockCommentsPagesMatching,
$AutoLockSeverity,
$AutoLockUserCanEditEditorFix);
=head2 $AutoLockPagesMatching
A regular expression matching page names to be automatically locked against
page edits, creations, and deletions; e.g., this regular expression prevents
page edits, creations, and deletions for page names resembling
"Red Apple Falls--1997-02-16":
$AutoLockPagesMatching = '^Red_Apple_Falls--\d\d\d\d-\d\d-\d\d';
This regular expression is left undefined, by default. (Thus, this module does
nothing, by default.) When redefined, this regular expression:
=over
=item ...should not be a quoted regular expression (i.e., "qr/.../"); and
=item ...should not be prefixed with the contents of the C<$CommentsPrefix>
regular expression. (This module does that for you, as need be.)
=back
That aside, the limitless sky is yours.
=cut
$AutoLockPagesMatching = undef;
=head2 $AutoLockSeverity
A quadstate boolean specifying "how much" automatic locking to apply to pages
whose names match the regular expression, above. This boolean, being
"quadstate," may take any of four values, mirroring the C<$EditAllowed> site-
wide setting as follows (where "visitors" are users who are neither password-
verified administrators or password-verified editors):
=over
=item 0. B<Highest severity.> Do not allow visitors to edit, create, or delete any
autolock-matched pages or page comments.
=item 1. B<No severity.> Permissively allow visitors to edit, create, or delete any
autolock-matched pages or page comments, so long as the C<UserCanEdit>
function also allows that. (This disables autolock, effectively.)
=item 2. B<Low severity.> Do not allow visitors to edit, create, or delete any
autolock-matched pages but do allow visitors to edit, create, or delete
autolock-matched page comments. (This is the default.)
=item 3. B<Medium severity.> Do not allow visitors to edit, create, or delete any
autolock-matched pages or edit or delete autolock-matched page comments,
but do allow visitors to create new page comments.
=back
=cut
$AutoLockSeverity = 2;
=head2 $AutoLockUserCanEditEditorFix
A boolean that, if true, prompts this module to overwrite the C<UserCanEdit>
Oddmuse function with a "fix" to Oddmuse's page-locking logic. By default, the
Oddmuse script (v1.865, as of this writing) allows administrators but not
editors to edit locked pages; however, this contravenes explicit Oddmuse
documentation to the contrary.
"If you have the admin or the edit password, you may edit locked pages."
http://www.oddmuse.org/cgi-bin/oddmuse/Page_Locking
This minor "fix" amends that, by allowing both administrators and editors to
edit locked pages.
By default, this boolean is true; and therefore implements this fix.
=cut
$AutoLockUserCanEditEditorFix = 1;
# ....................{ INITIALIZATION }....................
push(@MyInitVariables, \&AutoLockInit);
sub AutoLockInit {
# Set "$AutoLockCommentsPagesMatching", if not already set (and relevant).
if ( defined($AutoLockPagesMatching) &&
!defined($AutoLockCommentsPagesMatching) && $CommentsPrefix) {
if ($AutoLockPagesMatching =~ m/^\^/) {
$AutoLockCommentsPagesMatching = $AutoLockPagesMatching;
$AutoLockCommentsPagesMatching =~ s/^\^/^${CommentsPrefix}/;
}
else {
$AutoLockCommentsPagesMatching =
"^${CommentsPrefix}.*${AutoLockPagesMatching}";
}
}
if ($AutoLockUserCanEditEditorFix) {
*UserCanEditAutoLockOld = \&UserCanEditAutoLockFix;
}
}
# ....................{ REDEFINITIONS }....................
*UserCanEditAutoLockOld = \&UserCanEdit;
*UserCanEdit = \&UserCanEditAutoLock;
sub UserCanEditAutoLock {
my ($page_name, $is_editing, $is_comment) = @_;
my $user_can_edit = UserCanEditAutoLockOld(@_);
if ($user_can_edit && $AutoLockSeverity != 1 && !(UserIsAdmin() || UserIsEditor())) {
my $is_page_locked = defined($AutoLockPagesMatching) &&
$page_name =~ m/$AutoLockPagesMatching/;
my $is_comments_page_locked = defined($AutoLockCommentsPagesMatching) &&
$page_name =~ m/$AutoLockCommentsPagesMatching/;
if (
($AutoLockSeverity == 0 && ($is_page_locked || $is_comments_page_locked)) ||
($AutoLockSeverity == 2 && $is_page_locked && ! $is_comments_page_locked) ||
($AutoLockSeverity == 3 && $is_page_locked && !($is_comments_page_locked &&
($is_comment || (GetParam('aftertext', '') && !GetParam('text', '')))))) {
return 0;
}
}
return $user_can_edit;
}
sub UserCanEditAutoLockFix {
my ($id, $editing, $comment) = @_;
return 0 if $id eq 'SampleUndefinedPage' or $id eq T('SampleUndefinedPage')
or $id eq 'Sample_Undefined_Page' or $id eq T('Sample_Undefined_Page');
return 1 if UserIsAdmin() || UserIsEditor();
return 0 if $id ne '' and -f GetLockedPageFile($id);
return 0 if $LockOnCreation{$id} and not -f GetPageFile($id); # new page
return 0 if !$EditAllowed or -f $NoEditFile;
return 0 if $editing and UserIsBanned(); # this call is more expensive
return 0 if $EditAllowed >= 2 and (not $CommentsPrefix or $id !~ /^$CommentsPrefix/);
return 1 if $EditAllowed >= 3 and ($comment or (GetParam('aftertext', '') and not GetParam('text', '')));
return 0 if $EditAllowed >= 3;
return 1;
}
=head1 MOTIVATION
Oddmuse does provide a built-in, manual method for locking existing pages
against page edits and page deletions: for each such page, manually browse to
the "Administration" page and then "Lock ${PAGE_NAME}" page for that page. (This
is, needless to say, a clumsy means of bulk-locking some series of similarly
named pages.)
Oddmuse does not, however, provide a built-in method for preventatively locking
against page creations.
Ergo, autolock.
=head1 SEE ALSO
Jorge Arroyo's B<lock-expression.pl> module, from which this module was
(marginally) inspired and which this module (largely) replaces.
=head1 COPYRIGHT AND LICENSE
The information below applies to everything in this distribution,
except where noted.
Copyleft 2008 by B.w.Curry <http://www.raiazome.com>.
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this file; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
=cut

View File

@@ -1,161 +0,0 @@
# Copyright (C) 2006 Charles Mauch <cmauch@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
# Grab MLDBM at http://search.cpan.org/dist/MLDBM/lib/MLDBM.pm
# ie: http://search.cpan.org/CPAN/authors/id/C/CH/CHAMAS/MLDBM-2.01.tar.gz
use strict;
use v5.10;
use Fcntl;
use MLDBM qw( DB_File Storable );
AddModuleDescription('backlinkage.pl', 'Inline Backlinks');
our ($q, %Action, %Page, @MyAdminCode, $DataDir, $LinkPattern);
my $debug=1; # Set Text Output Verbosity when compiling
my $backfile = $DataDir . '/backlinks.db'; # Where data lives
# Stuff buildback action into admin menu.
push(@MyAdminCode, \&BacklinksMenu);
sub BacklinksMenu {
my ($id, $menuref, $restref) = @_;
push(@$menuref,
ScriptLink('action=buildback', T('Rebuild BackLink database'))
);
}
# Build Database, called my oddmuse uri action
$Action{buildback} = \&BuildBacklinkDatabase;
sub BuildBacklinkDatabase {
print GetHttpHeader('text/plain');
unlink $backfile; # Remove old database
tie my %backhash, 'MLDBM', $backfile or die "Cannot open file $backfile $!\n";
log1("Starting Database Store Process ... please wait\n\n");
foreach my $name (AllPagesList()) {
log3("Opening $name ... \n");
OpenPage($name);
my @backlinks = BacklinkProcess($name,$Page{text});
my $hash = $backhash{$name}; # Declare Hash Ref
my $backlinkcount = 0; # Used to create link key
foreach my $link (@backlinks) {
$backlinkcount++;
$hash->{'link' . $backlinkcount} = $link;
}
log2("$backlinkcount Links found in $name\n") if $backlinkcount;
$backhash{$name} = $hash; # Store Hash data in HoH
}
if ($debug >= 3) {
log4("Printing dump of USABLE Data we stored, sorted and neat\n");
for my $source (sort keys %backhash) {
for my $role (sort keys %{ $backhash{$source} }) {
log4("\n\$HoH\{\'$source\'\}\{\'$role\'\} = \"$backhash{$source}{$role}\"");
}
}
}
untie %backhash;
log1("Done. \n");
}
# Used to filter though page text to find links, ensure there is only 1 link per destination
# per page, and then return an array of backlinks.
sub BacklinkProcess {
my $name = $_[0];
my $text = $_[1];
my %seen = ();
my @backlinks;
my @wikilinks = ($text =~ m/$LinkPattern/g);
foreach my $links (@wikilinks) {
my ($class, $resolved, $title, $exists) = ResolveId($links);
if ($exists) {
push (@backlinks,$resolved) unless (($seen{$resolved}++) or ($resolved eq $name));
}
}
return @backlinks;
}
# Function used by user to display backlinks in proper html.
sub GetBackLink {
my (@backlinks, @unpopped, @alldone);
my $id = $_[0];
our ($BacklinkBanned);
$BacklinkBanned = "HomePage|ScratchPad" if !$BacklinkBanned;
tie my %backhash, 'MLDBM', $backfile, O_CREAT|O_RDWR, oct(644) or die "Cannot open file $backfile $!\n";
# Search database for matches
while ( my ($source, $hashes) = each %backhash ) {
while ( my ($key, $value) = each %$hashes ) {
if ($id =~ /$value/) {
push (@backlinks, $source);
}
}
}
untie %backhash;
# Render backlinks into html links
foreach my $backlink (@backlinks) {
my ($class, $resolved, $title, $exists) = ResolveId($backlink);
if (($resolved ne $id) && ($resolved !~ /^($BacklinkBanned)$/)) {
push(@unpopped, ScriptLink(UrlEncode($resolved), $resolved, $class . ' backlink', undef, T('Internal Page: ' . $resolved)));
}
}
my $arraycount = @unpopped;
return if !$arraycount; # Dont bother with the rest if empty results
# Pop and Push data to make it look good (no trailing commas)
my $temp = pop(@unpopped);
foreach my $backlink (@unpopped) {
push(@alldone, $backlink . ", ");
}
push(@alldone, $temp); # And push last entry back in
print $q->div({-class=>'docmeta'}, $q->h2(T('Pages that link to this page')), @alldone);
}
# Debug functions, all expect a string as input, and print it if the debug level is high enough.
# This allows for increasing levels of verbosity for runtime commenting.
sub log1 { # Very little info (only outputs if error - great for scripts)
return if (($debug < 1) or ($debug == 4));
my $msg = shift;
print "$msg";
}
sub log2 { # Info Messages
return if (($debug < 2) or ($debug == 4));
my $msg = shift;
print "$msg";
}
sub log3 { # More Info for the curious
return if (($debug < 3) or ($debug == 4));
my $msg = shift;
print "$msg";
}
sub log4 { # Dump all sorts of garbage (usally data structures)
return if ($debug < 4);
my $msg = shift;
print "$msg";
}

View File

@@ -1,56 +0,0 @@
# Copyright (C) 2008 Weakish Jiang <weakish@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# You can get a copy of GPL version 2 at
# http://www.gnu.org/licenses/gpl-2.0.html
#
# For user doc, see:
# http://www.oddmuse.org/cgi-bin/oddmuse/Backlinks_Extension
use strict;
use v5.10;
AddModuleDescription('backlinks.pl', 'Backlinks Extension');
our ($q, %Action, %Page, $OpenPageName);
*OldGetSearchLink = \&GetSearchLink;
*GetSearchLink = \&NewGetSearchLink;
sub NewGetSearchLink {
my ($text, $class, $name, $title) = @_;
my $id = UrlEncode(QuoteRegexp($text));
$name = UrlEncode($name);
$text = NormalToFree($text);
$id =~ s/_/\ /g; # Search for url-escaped spaces
return ScriptLink("action=backlink;search=\\[\\[$id(\\|.*)*\\]\\]", $text, $class, $name, $title);
}
$Action{backlink} = \&DoBackLink;
sub DoBackLink {
my $id = shift;
my $search = GetParam('search', '');
my $taglabel = $search;
$taglabel =~ s/\\\[\\\[//;
$taglabel =~ s/\\\]\\\]//;
ReportError(T('The search parameter is missing.')) unless $search;
print GetHeader('', Ts('Pages link to %s', $taglabel), '');
local (%Page, $OpenPageName);
my %hash = ();
foreach my $id (SearchTitleAndBody($search)) {
$hash{$id} = 1;
}
my @found = keys %hash;
if (defined &PageSort) {
@found = sort PageSort @found;
} else {
@found = sort(@found);
}
@found = map { $q->li(GetPageLink($_)) } @found;
print $q->start_div({-class=>'search list'}),
$q->ul(@found), $q->end_div;
PrintFooter();
}

View File

@@ -1,160 +0,0 @@
# Copyright (C) 2013 Alex Schroeder <alex@gnu.org>
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
=head1 Ban Contributors Extension
This module adds "Ban contributors" to the administration page. If you
click on it, it will list all the recent contributors to the page
you've been looking at. Each contributor (IP or hostname) will be
compared to the list of regular expressions on the C<BannedHosts> page
(see C<$BannedHosts>). If the contributor is already banned, this is
mentioned. If the contributor is not banned, you'll see a button
allowing you to ban him or her immediately. If you click the button,
the IP or hostname will be added to the C<BannedHosts> page for you.
=cut
use strict;
use v5.10;
our ($q, $Now, %Page, $OpenPageName, %Action, $UrlPattern, $BannedContent, $BannedHosts, @MyAdminCode);
AddModuleDescription('ban-contributors.pl', 'Ban Contributors Extension');
push(@MyAdminCode, \&BanMenu);
sub BanMenu {
my ($id, $menuref, $restref) = @_;
if ($id and UserIsAdmin()) {
push(@$menuref, ScriptLink('action=ban;id=' . UrlEncode($id),
T('Ban contributors')));
}
}
$Action{ban} = \&DoBanHosts;
sub IsItBanned {
my ($it, $regexps) = @_;
my $re = undef;
foreach my $regexp (@$regexps) {
eval { $re = qr/$regexp/i; };
if (defined($re) && $it =~ $re) {
return $it;
}
}
}
sub DoBanHosts {
my $id = shift;
my $content = GetParam('content', '');
my $host = GetParam('host', '');
if ($content) {
SetParam('text', GetPageContent($BannedContent)
. $content . " # " . CalcDay($Now) . " "
. NormalToFree($id) . "\n");
SetParam('summary', NormalToFree($id));
DoPost($BannedContent);
} elsif ($host) {
$host =~ s/\./\\./g;
SetParam('text', GetPageContent($BannedHosts)
. "^" . $host . " # " . CalcDay($Now) . " "
. NormalToFree($id) . "\n");
SetParam('summary', NormalToFree($id));
DoPost($BannedHosts);
} else {
ValidIdOrDie($id);
print GetHeader('', Ts('Ban Contributors to %s', NormalToFree($id)));
SetParam('rcidonly', $id);
SetParam('all', 1);
SetParam('showedit', 1);
my %contrib = ();
for my $line (GetRcLines()) {
$contrib{$line->[4]}->{$line->[5]} = 1 if $line->[4];
}
my @regexps = ();
foreach (split(/\n/, GetPageContent($BannedHosts))) {
if (/^\s*([^#]\S+)/) { # all lines except empty lines and comments, trim whitespace
push(@regexps, $1);
}
}
print '<div class="content ban">';
foreach (sort(keys %contrib)) {
my $name = $_;
delete $contrib{$_}{''};
$name .= " (" . join(", ", sort(keys(%{$contrib{$_}}))) . ")";
if (IsItBanned($_, \@regexps)) {
print $q->p(Ts("%s is banned", $name));
} else {
print GetFormStart(undef, 'get', 'ban'),
GetHiddenValue('action', 'ban'),
GetHiddenValue('id', $id),
GetHiddenValue('host', $_),
GetHiddenValue('recent_edit', 'on'),
$q->p($name, $q->submit(T('Ban!'))), $q->end_form();
}
}
}
PrintFooter();
}
=head2 Rollback
If you are an admin and rolled back a single page, this extension will
list the URLs your rollback removed (assuming that those URLs are part
of the spam) and it will allow you to provide a regular expression
that will be added to BannedHosts.
=cut
*OldBanContributorsWriteRcLog = \&WriteRcLog;
*WriteRcLog = \&NewBanContributorsWriteRcLog;
sub NewBanContributorsWriteRcLog {
my ($tag, $id, $to) = @_;
if ($tag eq '[[rollback]]' and $id and $to > 0
and $OpenPageName eq $id and UserIsAdmin()) {
# we currently have the clean page loaded, so we need to reload
# the spammed revision (there is a possible race condition here)
my $old = GetTextRevision($Page{revision} - 1, 1)->{text};
my %urls = map {$_ => 1 } $old =~ /$UrlPattern/g;
# we open the file again to force a load of the despammed page
foreach my $url ($Page{text} =~ /$UrlPattern/g) {
delete($urls{$url});
}
# we also remove any candidates that are already banned
my @regexps = ();
foreach (split(/\n/, GetPageContent($BannedContent))) {
if (/^\s*([^#]\S+)/) { # all lines except empty lines and comments, trim whitespace
push(@regexps, $1);
}
}
foreach my $url (keys %urls) {
delete($urls{$url}) if IsItBanned($url, \@regexps);
}
if (keys %urls) {
print $q->p(Ts("These URLs were rolled back. Perhaps you want to add a regular expression to %s?",
GetPageLink($BannedContent)));
print $q->pre(join("\n", sort keys %urls));
print GetFormStart(undef, 'get', 'ban'),
GetHiddenValue('action', 'ban'),
GetHiddenValue('id', $id),
GetHiddenValue('recent_edit', 'on'),
$q->p($q->label({-for=>'content'}, T('Regular expression:')), " ",
$q->textfield(-name=>'content', -size=>30), " ",
$q->submit(T('Ban!'))),
$q->end_form();
};
print $q->p(T("Consider banning the IP number as well: "),
ScriptLink('action=ban;id=' . UrlEncode($id), T('Ban contributors')));
};
return OldBanContributorsWriteRcLog(@_);
}

View File

@@ -1,42 +0,0 @@
# Copyright (C) 20132015 Alex Schroeder <alex@gnu.org>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
#
# This file must load before logbannedcontent.pl such that quick
# editors will be logged.
use strict;
use v5.10;
AddModuleDescription('ban-quick-editors.pl', 'Banning Quick Editors');
our ($q, $Now, %RecentVisitors, $SurgeProtection);
*BanQuickOldUserIsBanned = \&UserIsBanned;
*UserIsBanned = \&BanQuickNewUserIsBanned;
sub BanQuickNewUserIsBanned {
my $rule = BanQuickOldUserIsBanned(@_);
if (not $rule
and $SurgeProtection # need surge protection
and GetParam('title')) {
my $name = GetParam('username', $q->remote_addr());
my @entries = @{$RecentVisitors{$name}};
# $entry[0] is $Now after AddRecentVisitor
my $ts = $entries[1];
if ($Now - $ts < 5) {
return "fast editing spam bot";
}
}
return $rule;
}

View File

@@ -1,85 +0,0 @@
# Copyright (C) 2012 Alex Schroeder <alex@gnu.org>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use v5.10;
AddModuleDescription('banned-regexps.pl', 'Banning Regular Expressions');
=encoding utf8
=head1 Compatibility
This extension works with logbannedcontent.pl.
=head1 Example content for the BannedRegexps page:
# This page lists regular expressions that prevent the saving of a page.
# The regexps are matched against any page or comment submitted.
# The format is simple: # comments to the end of the line. Empty lines are ignored.
# Everything else is a regular expression. If the regular expression is followed by
# a comment, this is used as the explanation when a user is denied editing. If the
# comment starts with a date, this date is not included in the explanation.
# The date could help us decide which regular expressions to delete in the future.
# In other words:
# ^\s*([^#]+?)\s*(#\s*(\d\d\d\d-\d\d-\d\d\s*)?(.*))?$
# Group 1 is the regular expression to use.
# Group 4 is the explanation to use.
порно # 2012-12-31 Russian porn
<a\s+href=["']?http # 2012-12-31 HTML anchor tags usually mean spam
\[url= # 2012-12-31 bbCode links usually mean spam
\s+https?:\S+[ .\r\n]*$ # 2012-12-31 ending with a link usually means spam
(?s)\s+https?:\S+.*\s+https?:\S+.*\s+https?:\S+.* # 2012-12-31 three naked links usually mean spam
=cut
our (%AdminPages, %LockOnCreation, @MyInitVariables, %PlainTextPages, $BannedContent, $BannedFile);
our ($BannedRegexps);
$BannedRegexps = 'BannedRegexps';
push(@MyInitVariables, sub {
$AdminPages{$BannedRegexps} = 1;
$LockOnCreation{$BannedRegexps} = 1;
$PlainTextPages{$BannedRegexps} = 1;
});
*RegexpOldBannedContent = \&BannedContent;
*BannedContent = \&RegexpNewBannedContent;
sub RegexpNewBannedContent {
my $str = shift;
my $rule = RegexpOldBannedContent($str, @_);
if (not $rule) {
foreach (split(/\n/, GetPageContent($BannedRegexps))) {
next unless m/^\s*([^#]+?)\s*(#\s*(\d\d\d\d-\d\d-\d\d\s*)?(.*))?$/;
my ($regexp, $comment, $re) = ($1, $4, undef);
eval { $re = qr/$regexp/i; };
if (defined($re) && $str =~ $re) {
my $group1 = $1;
my $explanation = ($group1
? Tss('Regular expression "%1" matched "%2" on this page.', QuoteHtml($regexp), $group1)
: Ts('Regular expression "%s" matched on this page.', QuoteHtml($regexp)));
$rule = $explanation . ' '
. ($comment ? Ts('Reason: %s.', $comment) : T('Reason unknown.')) . ' '
. Ts('See %s for more information.', GetPageLink($BannedRegexps));
last;
}
}
}
LogWrite($rule) if $rule and $BannedFile;
return $rule if $rule;
return 0;
}

Some files were not shown because too many files have changed in this diff Show More