Compare commits
1 Commits
namespaces
...
new-file-u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03111c7f58 |
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
||||
*.pl linguist-language=Perl
|
||||
5
.gitignore
vendored
@@ -1,11 +1,8 @@
|
||||
*~
|
||||
/build/
|
||||
\#*\#
|
||||
/test-data*
|
||||
/test-data
|
||||
/Mac/pkg/
|
||||
*.dmg
|
||||
*.pkg
|
||||
.DS_Store
|
||||
wiki.log
|
||||
.prove
|
||||
TAGS
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -12,7 +12,10 @@
|
||||
# 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
|
||||
|
||||
package OddMuse;
|
||||
|
||||
@@ -24,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
@@ -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.
|
||||
675
LICENSE
@@ -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>.
|
||||
|
||||
14
Mac/Description.plist
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IFPkgDescriptionDeleteWarning</key>
|
||||
<string></string>
|
||||
<key>IFPkgDescriptionDescription</key>
|
||||
<string>A wiki engine.</string>
|
||||
<key>IFPkgDescriptionTitle</key>
|
||||
<string>Oddmuse</string>
|
||||
<key>IFPkgDescriptionVersion</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
42
Mac/Info.plist
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Oddmuse</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Oddmuse</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>IFMajorVersion</key>
|
||||
<integer>1</integer>
|
||||
<key>IFMinorVersion</key>
|
||||
<integer>0</integer>
|
||||
<key>IFPkgFlagAllowBackRev</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagAuthorizationAction</key>
|
||||
<string>RootAuthorization</string>
|
||||
<key>IFPkgFlagDefaultLocation</key>
|
||||
<string>/Library/WebServer</string>
|
||||
<key>IFPkgFlagFollowLinks</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagInstallFat</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagIsRequired</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagOverwritePermissions</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRelocatable</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagRestartAction</key>
|
||||
<string>NoRestart</string>
|
||||
<key>IFPkgFlagRootVolumeOnly</key>
|
||||
<true/>
|
||||
<key>IFPkgFlagUpdateInstalledLanguages</key>
|
||||
<false/>
|
||||
<key>IFPkgFlagUseUserMask</key>
|
||||
<integer>0</integer>
|
||||
<key>IFPkgFormatVersion</key>
|
||||
<real>0.10000000149011612</real>
|
||||
</dict>
|
||||
</plist>
|
||||
4
Mac/Source/CGI-Executables/wiki
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
package OddMuse;
|
||||
$DataDir = '/Library/WebServer/Oddmuse';
|
||||
do 'current';
|
||||
1
Mac/Source/Oddmuse/config
Normal file
@@ -0,0 +1 @@
|
||||
$AdminPass = '';
|
||||
1
Mac/config
Normal file
@@ -0,0 +1 @@
|
||||
$AdminPass = '';
|
||||
4
Mac/wiki
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
package OddMuse;
|
||||
$DataDir = '/Library/WebServer/Oddmuse';
|
||||
do 'current';
|
||||
179
Makefile
@@ -1,10 +1,9 @@
|
||||
# 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/*-utf8.pl)
|
||||
MODULES=$(sort $(wildcard modules/*.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
|
||||
@@ -17,64 +16,150 @@ prepare: build $(BUILD)
|
||||
build:
|
||||
mkdir -p build
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
prove t/setup.pl
|
||||
|
||||
release:
|
||||
perl stuff/release ~/oddmuse.org/releases 2.3.3
|
||||
|
||||
build/wiki.pl: wiki.pl
|
||||
perl -lne "s/(\\\$$q->a\(\{-href=>'https:\/\/www.oddmuse.org\/'\}, 'Oddmuse'\))/\\\$$q->a({-href=>'https:\/\/alexschroeder.ch\/cgit\/oddmuse\/tag\/?id=$(VERSION_NO)'}, 'wiki.pl') . ' ($(VERSION_NO)), see ' . \$$1/; print" < $< > $@
|
||||
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" < $< > $@
|
||||
|
||||
build/%-utf8.pl: modules/translations/%-utf8.pl
|
||||
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, 'translations\/', '$(VERSION_NO)')/; print" < $< > $@
|
||||
|
||||
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: https://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl
|
||||
# to: https://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl?id=2.1-11-gd4f1e27
|
||||
# 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" < $< > $@
|
||||
|
||||
modules/translations/new-utf8.pl: wiki.pl $(MODULES)
|
||||
cp $@ $@-old
|
||||
perl stuff/oddtrans -l $@-old wiki.pl $(MODULES) > $@
|
||||
rm -f $@-old
|
||||
|
||||
translations: $(TRANSLATIONS)
|
||||
for f in $^; do \
|
||||
echo updating $$f...; \
|
||||
perl stuff/oddtrans -l $$f wiki.pl $(MODULES) > $$f-new && mv $$f-new $$f; \
|
||||
perl oddtrans -l $$f wiki.pl $(MODULES) > $$f-new && mv $$f-new $$f; \
|
||||
done
|
||||
|
||||
# Running four jobs in parallel, but clean up data directories without
|
||||
# race conditions!
|
||||
# UNTESTED/OBSOLETE: these targets have not been tested in a long time
|
||||
# and are potentially obsolete.
|
||||
VERSION=oddmuse-$(VERSION_NO)
|
||||
UPLOADVERSION=oddmuse-inkscape-$(VERSION_NO)
|
||||
INKSCAPE=GPL $(wildcard inkscape/*.py inkscape/*.inx inkscape/*.sh)
|
||||
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
|
||||
DIST=$(VERSION).tar.gz $(VERSION).tar.gz.sig \
|
||||
contrib/simple-install/$(VERSION)-simple.tar.gz \
|
||||
contrib/simple-install/$(VERSION)-simple.tar.gz.sig
|
||||
OLDDIST=$(VERSION).dmg $(VERSION).dmg.sig \
|
||||
$(VERSION).tgz $(VERSION).tgz.sig
|
||||
PWD=$(shell pwd)
|
||||
|
||||
dist: $(DIST)
|
||||
|
||||
upload: $(DIST)
|
||||
for f in $^; do \
|
||||
scp $$f as@dl.sv.nongnu.org:/releases/oddmuse/; \
|
||||
done
|
||||
|
||||
upload-text: new-utf8.pl
|
||||
wikiupload new-utf8.pl http://www.oddmuse.org/cgi-bin/oddmuse-en/New_Translation_File
|
||||
|
||||
contrib/simple-install/$(VERSION)-simple.tar.gz:
|
||||
cd contrib/simple-install && make $(VERSION)-simple.tar.gz
|
||||
|
||||
$(VERSION).tar.gz: README FDL GPL ChangeLog wiki.pl $(TRANSLATIONS) $(MODULES) current.pl
|
||||
rm -rf $(VERSION)
|
||||
mkdir $(VERSION)
|
||||
cp $^ $(VERSION)
|
||||
tar czf $@ $(VERSION)
|
||||
|
||||
$(UPLOADVERSION).tar.gz: $(INKSCAPE)
|
||||
rm -rf $(UPLOADVERSION)
|
||||
mkdir $(UPLOADVERSION)
|
||||
cp $^ $(UPLOADVERSION)
|
||||
cp wikiupload $(UPLOADVERSION)/oddmuse-upload.py
|
||||
tar czf $@ $(UPLOADVERSION)
|
||||
|
||||
%.sig: %
|
||||
gpg --sign -b $<
|
||||
|
||||
# OSX: .pkg is the package, and .dmg is the disk image.
|
||||
|
||||
# Make sure to copy the files into a new directory so that the CVS
|
||||
#subdirectory are not inlcuded in the .pkg. And fix permissions. Skip
|
||||
#if we can't run PackageMaker. All cp commands need sudo because on a
|
||||
#second run the directories will already exist.
|
||||
$(VERSION).pkg: wiki.pl modules/creole.pl Mac/config Mac/wiki
|
||||
if test -x $(PACKAGEMAKER); then \
|
||||
mkdir -p Mac/pkg/CGI-Executables; \
|
||||
sudo cp wiki.pl Mac/pkg/CGI-Executables/current; \
|
||||
sudo cp Mac/wiki Mac/pkg/CGI-Executables/wiki; \
|
||||
sudo chown -R root:admin Mac/pkg/CGI-Executables; \
|
||||
sudo chmod 644 Mac/pkg/CGI-Executables/current; \
|
||||
sudo chmod 755 Mac/pkg/CGI-Executables/wiki; \
|
||||
mkdir -p Mac/pkg/Oddmuse; \
|
||||
sudo cp Mac/config Mac/pkg/Oddmuse; \
|
||||
sudo chown www:admin Mac/pkg/Oddmuse; \
|
||||
sudo chmod 775 Mac/pkg/Oddmuse; \
|
||||
sudo chown root:admin Mac/pkg/Oddmuse/config; \
|
||||
sudo chmod 664 Mac/pkg/Oddmuse/config; \
|
||||
mkdir -p Mac/pkg/Oddmuse/modules; \
|
||||
sudo cp modules/mac.pl Mac/pkg/Oddmuse/modules; \
|
||||
sudo cp modules/creole.pl Mac/pkg/Oddmuse/modules; \
|
||||
sudo chown -R root:admin Mac/pkg/Oddmuse/modules; \
|
||||
sudo chmod 775 Mac/pkg/Oddmuse/modules; \
|
||||
sudo chmod 644 Mac/pkg/Oddmuse/modules/*; \
|
||||
$(PACKAGEMAKER) -build \
|
||||
-p $(PWD)/$@ \
|
||||
-i $(PWD)/Mac/Info.plist \
|
||||
-d $(PWD)/Mac/Description.plist \
|
||||
-f $(PWD)/Mac/pkg; \
|
||||
fi;
|
||||
|
||||
$(VERSION).dmg: $(VERSION).pkg
|
||||
hdiutil create -srcfolder $< -fs HFS+ -volname "Oddmuse" $@
|
||||
|
||||
# Slackware: .tgz are .tar.gz files used by the installer
|
||||
# Slackware webserver is run by nobody uid/gid 99/99.
|
||||
|
||||
$(VERSION).tgz: wiki.pl modules/creole.pl Mac/config Mac/wiki
|
||||
sudo rm -rf Slack/var Slack/install
|
||||
mkdir -p Slack/var/www/wiki/modules
|
||||
mkdir -p Slack/var/www/cgi-bin
|
||||
mkdir -p Slack/install
|
||||
sudo cp Mac/config Slack/var/www/wiki
|
||||
sudo cp Mac/wiki Slack/var/www/cgi-bin
|
||||
sudo cp README Slack/var/www/wiki
|
||||
sudo cp modules/creole.pl Slack/var/www/wiki/modules
|
||||
sudo cp wiki.pl Slack/var/www/cgi-bin/current
|
||||
sudo sed -e 's/VERSION/$(VERSION_NO)/' < Slack/slack-desc > Slack/install/slack-desc
|
||||
sudo chown -R 0:0 Slack/var Slack/install
|
||||
sudo chgrp 99 Slack/var/www/cgi-bin/wiki
|
||||
sudo chmod 644 Slack/var/www/cgi-bin/current
|
||||
sudo chmod 775 Slack/var/www/cgi-bin/wiki
|
||||
cd Slack && tar czf ../$@ var install
|
||||
|
||||
update-translations: $(TRANSLATIONS)
|
||||
|
||||
upload-translations: always
|
||||
for f in $(TRANSLATIONS); do \
|
||||
cvs status $$f | grep 'Status: Up-to-date'; \
|
||||
wikiput -z "ham" -u "cvs" -s "update" \
|
||||
"http://www.oddmuse.org/cgi-bin/oddmuse/raw/$$f" < $$f; \
|
||||
done
|
||||
|
||||
deb:
|
||||
equivs-build control
|
||||
|
||||
install:
|
||||
@echo This only installs the deb file, not the script itself.
|
||||
dpkg -i oddmuse*.deb
|
||||
|
||||
jobs ?= 4
|
||||
test:
|
||||
prove t/setup.pl
|
||||
prove --jobs=$(jobs) --state=slow,save t
|
||||
prove t
|
||||
|
||||
# Spin up a quick test
|
||||
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/
|
||||
|
||||
development:
|
||||
@if grep --quiet 'ScriptName = "http://127.0.0.1:8080";' test-data/config; then \
|
||||
echo Not overwriting \$$ScriptName in test-data/config; \
|
||||
else \
|
||||
echo '$ScriptName = "http://127.0.0.1:8080";' >> test-data/config; \
|
||||
fi
|
||||
morbo --listen http://*:8080 \
|
||||
--watch wiki.pl --watch test-data/config --watch test-data/modules/ \
|
||||
stuff/mojolicious-app.pl
|
||||
package: debian-$(VERSION).tar.gz
|
||||
gpg --ascii --encrypt $<
|
||||
|
||||
%.pem:
|
||||
openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem
|
||||
|
||||
gemini: cert.pem key.pem
|
||||
perl stuff/gemini-server.pl --wiki_cert_file=cert.pem --wiki_key_file=key.pem
|
||||
debian-$(VERSION).tar.gz:
|
||||
rm -rf $(VERSION)
|
||||
mkdir $(VERSION)
|
||||
cp README FDL GPL wiki.pl $(VERSION)
|
||||
tar czf $@ $(VERSION)
|
||||
|
||||
37
OddMuse.pm
Normal file
@@ -0,0 +1,37 @@
|
||||
# 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 Apache2::RequestRec ();
|
||||
use Apache2::RequestIO ();
|
||||
use Apache2::Const -compile => qw(OK);
|
||||
|
||||
package OddMuse;
|
||||
|
||||
$RunCGI = 0;
|
||||
require 'wiki.pl';
|
||||
|
||||
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
@@ -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.
|
||||
197
README.creole
@@ -1,197 +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. You might also have to change its owner to
|
||||
an appropriate user on your system.
|
||||
|
||||
{{{
|
||||
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
|
||||
sudo chown www-data.www-data /usr/lib/cgi-bin/wiki.pl
|
||||
}}}
|
||||
|
||||
If you're on SUSE, the user might not be {{{www-data}}} but
|
||||
{{{wwwrun}}} without appropriate group:
|
||||
|
||||
{{{
|
||||
sudo chown wwwrun.root /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.
|
||||
|
||||
== Checking the Apache Setup
|
||||
|
||||
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 our 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
|
||||
}}}
|
||||
|
||||
== Using just Perl
|
||||
|
||||
You can use Mojolicious as your web server. There is a simple
|
||||
##server.pl## which you can use. Here's how you might start it:
|
||||
|
||||
{{{
|
||||
mkdir ~/oddmuse
|
||||
WikiDataDir=$HOME/oddmuse perl server.pl daemon
|
||||
}}}
|
||||
|
||||
This makes the server available on {{{http://localhost:3000/wiki}}}.
|
||||
Make sure you create the directory before starting the server!
|
||||
If you don't, you'll get a strange error:
|
||||
`STDERR: : No such file or directory at ... perl5/Mojolicious/Plugin/CGI.pm`.
|
||||
|
||||
If it works, feel free to upgrade to Hypnotoad.
|
||||
|
||||
{{{
|
||||
WikiDataDir=$HOME/oddmuse hypnotoad server.pl
|
||||
}}}
|
||||
|
||||
Note: Hypnotoad uses a different default port. The above makes the
|
||||
server available on {{{http://localhost:8080/wiki}}}. Hypnotoad will
|
||||
keep forking new processes. To stop it, use the {{{-s}}} flag.
|
||||
|
||||
{{{
|
||||
hypnotoad -s server.pl
|
||||
}}}
|
||||
|
||||
== License
|
||||
|
||||
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
|
||||
[[https://github.com/kensanata/oddmuse/blob/master/FDL|FDL]] and
|
||||
[[https://github.com/kensanata/oddmuse/blob/master/GPL|GPL]],
|
||||
respectively.
|
||||
19
Slack/slack-desc
Normal file
@@ -0,0 +1,19 @@
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
oddmuse: Oddmuse VERSION
|
||||
oddmuse:
|
||||
oddmuse: Oddmuse is the name of the wiki engine being further developed by
|
||||
oddmuse: Alex Schröder. The wiki engine consists of one big Perl script.
|
||||
oddmuse: When installed on a web host, the script generates a wiki -- a
|
||||
oddmuse: web site where users can read pages, change pages, add new pages,
|
||||
oddmuse: and delete old pages. All pages are accessed via the script.
|
||||
oddmuse:
|
||||
oddmuse: This package will also install the Creole markup extension.
|
||||
oddmuse:
|
||||
oddmuse: Package created by Alex Schröder
|
||||
@@ -3,17 +3,19 @@
|
||||
#
|
||||
# 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,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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/>.
|
||||
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
use Time::ParseDate;
|
||||
while (<STDIN>) {
|
||||
m/^(\S+) \S+ \S+ \[(.*?)\] "(.*?)" (\d+)/ or die "Cannot parse:\n$_";
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -12,7 +12,10 @@
|
||||
# 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
|
||||
|
||||
my $PageDir = 'page';
|
||||
my $Now = time;
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -12,7 +12,10 @@
|
||||
# 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 CGI;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
BIN
contrib/OddMuseWiki-2007.12.31-1suse.noarch.rpm
Normal file
BIN
contrib/OddMuseWiki-2007.12.31-1suse.src.rpm
Normal file
172
contrib/OddMuseWiki.spec
Normal file
@@ -0,0 +1,172 @@
|
||||
Name: OddMuseWiki
|
||||
Version: 2007.12.31
|
||||
Release: 1suse
|
||||
Group: Applications/Productivity
|
||||
License: /opt/OddMuseWiki/doc/COPYING
|
||||
Summary: Simple user-editted website (wiki)
|
||||
|
||||
Distribution: any perl+webserver+cgi distro
|
||||
Vendor: Alex Schröder
|
||||
Packager: Dr. Robert J. Meier <grandfather@sourceforge.org>
|
||||
URL: http://www.oddmusewiki.org/
|
||||
|
||||
BuildRoot: /var/tmp/rpm-oddmusewiki-root
|
||||
BuildArch: noarch
|
||||
Prefix: /opt/OddMuseWiki
|
||||
Prefix: /srv/www/wiki
|
||||
Prefix: /srv/www/cgi-bin
|
||||
Prefix: /etc/httpd/conf.d
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: %{name}-modules-%{version}.tar.gz
|
||||
Source2: %{name}-contents-%{version}.tar.gz
|
||||
|
||||
Provides: wiki
|
||||
Requires: perl >= 5.0.0
|
||||
|
||||
# Avoid automatic dependency calculation macros, as they are seldom portable.
|
||||
AutoReq: no
|
||||
AutoProv: no
|
||||
|
||||
|
||||
|
||||
%description
|
||||
OddMuseWiki is a program to run a wiki.
|
||||
A wiki can be used for communication in a team or for documentation,
|
||||
when things have to be quick and easy: Content Management for everybody.
|
||||
|
||||
A wiki enables other people to quickly join efforts. In the office,
|
||||
you can introduce new employees, distribute phone lists, store memos,
|
||||
plan trips, document projects, prepare meetings,
|
||||
or describe internal processes.
|
||||
|
||||
For many free software projects wikis have taken an important role
|
||||
somewhere between manual, FAQ, IRC, and mailing lists.
|
||||
|
||||
OddMuseWiki is very easy to install: Simple installation, compact code,
|
||||
and easy extensibility were the most important design factors.
|
||||
|
||||
Features
|
||||
|
||||
1. Easy to install: Just copy one file into the correct directory.
|
||||
2. No dependencies on version management tools or database installation.
|
||||
3. Web server needs only Perl installed.
|
||||
4. Easy to use for users, easy to hack for programmers.
|
||||
5. Capable of multilingual sites.
|
||||
6. Unicode (UTF-8) per default.
|
||||
7. Valid HTML; CSS friendly.
|
||||
8. Caching on several levels.
|
||||
9. Easy to download.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
# Record the environment variables
|
||||
# $RPM_ARCH $RPM_OS - host configuration
|
||||
# $RPM_OPT_FLAGS - c compile flags
|
||||
# $RPM_PACKAGE_[NAME VERSION RELEASE] - spec file fields
|
||||
# $RPM_SOURCE_DIR - base for Source and Patch filenames
|
||||
# $RPM_BUILD_DIR - base for setup macro filenames
|
||||
# $RPM_BUILD_ROOT - %{BuildRoot}
|
||||
# modified by rpmbuild --buildroot
|
||||
# $RPM_DOC_DIR - base for doc macro filenames
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-prep.log; fi
|
||||
|
||||
%setup -q -b1 -b2
|
||||
|
||||
|
||||
|
||||
%build
|
||||
# Record the environment variables
|
||||
# Nomimally these are the same as for %prep
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-build.log; fi
|
||||
|
||||
# Nothing to build yet.
|
||||
|
||||
|
||||
|
||||
%install
|
||||
# Record the environment variables
|
||||
# Nomimally these are the same as for %prep
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-install.log; fi
|
||||
|
||||
rm -rf "$RPM_BUILD_ROOT"
|
||||
mkdir -p "$RPM_BUILD_ROOT"/opt/OddMuseWiki/cgi-bin
|
||||
mkdir -p "$RPM_BUILD_ROOT"/opt/OddMuseWiki/doc
|
||||
mkdir -p "$RPM_BUILD_ROOT"/opt/OddMuseWiki/etc
|
||||
mkdir -p "$RPM_BUILD_ROOT"/opt/OddMuseWiki/libperl
|
||||
mkdir -p "$RPM_BUILD_ROOT"/srv/www/cgi-bin
|
||||
mkdir -p "$RPM_BUILD_ROOT"/srv/www/wiki
|
||||
mkdir -p "$RPM_BUILD_ROOT"/etc/httpd/conf.d
|
||||
|
||||
install cgi-bin/wiki.pl "$RPM_BUILD_ROOT"/opt/OddMuseWiki/cgi-bin
|
||||
install cgi-bin/wiki.pl "$RPM_BUILD_ROOT"/srv/www/cgi-bin
|
||||
install doc/COPYING "$RPM_BUILD_ROOT"/opt/OddMuseWiki/doc
|
||||
install etc/oddmusewiki.conf "$RPM_BUILD_ROOT"/opt/OddMuseWiki/etc
|
||||
install libperl/current libperl/*.pl "$RPM_BUILD_ROOT"/opt/OddMuseWiki/libperl
|
||||
cp -r wiki "$RPM_BUILD_ROOT"/srv/www
|
||||
|
||||
|
||||
|
||||
%clean
|
||||
# Record the environment variables
|
||||
# Nomimally these are the same as for %prep
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-clean.log; fi
|
||||
rm -rf "$RPM_BUILD_ROOT"
|
||||
|
||||
|
||||
|
||||
%pre
|
||||
# Record local environment variables.
|
||||
# $RPM_INSTALL_PREFIX* reflect the Prefix: field(s)
|
||||
# modified by --relocate and --prefix arguments
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-pre.log; fi
|
||||
|
||||
|
||||
|
||||
%post
|
||||
# Record local environment variables
|
||||
# $RPM_INSTALL_PREFIX* reflect the Prefix: field(s)
|
||||
# modified by --relocate and --prefix arguments
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-post.log; fi
|
||||
|
||||
# Because relocation may change configuration,
|
||||
# it cannot be symlinked into a public access site at rpmbuild -bb time.
|
||||
if [ \( -d "$RPM_INSTALL_PREFIX2" -a -w "$RPM_INSTALL_PREFIX2" \) -o -w "$RPM_INSTALL_PREFIX2"/wiki.pl ]; then
|
||||
cat "$RPM_INSTALL_PREFIX0"/cgi-bin/wiki.pl |
|
||||
perl -pe 's:/opt/OddMuseWiki:'"$RPM_INSTALL_PREFIX0"':;' |
|
||||
perl -pe 's:/srv/www/wiki:'"$RPM_INSTALL_PREFIX1"':;' |
|
||||
cat > "$RPM_INSTALL_PREFIX2"/wiki.pl
|
||||
fi
|
||||
|
||||
|
||||
|
||||
%preun
|
||||
# Record local environment variables
|
||||
# $RPM_INSTALL_PREFIX* reflect the Prefix: field(s)
|
||||
# modified by --relocate and --prefix arguments at rpm -i time
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-preun.log; fi
|
||||
|
||||
|
||||
|
||||
%postun
|
||||
# Record local environment variables
|
||||
# $RPM_INSTALL_PREFIX* reflect the Prefix: field(s)
|
||||
# modified by --relocate and --prefix arguments at rpm -i time
|
||||
if [ "$RPM_DUMPENV" != "" ] ; then env | sort > /tmp/rpm-postun.log; fi
|
||||
|
||||
|
||||
|
||||
%files
|
||||
# The doc, config, attr and many other macros are well documented in RPM-HOWTO
|
||||
%defattr(0444,root,root)
|
||||
%license
|
||||
%attr(0555,root,root) /opt/OddMuseWiki
|
||||
%config /opt/OddMuseWiki/etc/oddmusewiki.conf
|
||||
%attr(0777,root,root) /srv/www/wiki
|
||||
%attr(0555,root,root) /srv/www/cgi-bin/wiki.pl
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 3 2008 Dr. Robert Meier <grandfather@sourceforge.org> 2007.12.13-1suse
|
||||
- copy-and-edit from hello.rpm
|
||||
@@ -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.
|
||||
315
contrib/add-link.pl
Normal file
@@ -0,0 +1,315 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
# Copyright (C) 2011–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/>.
|
||||
|
||||
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 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++;
|
||||
# handle blogspot domain munging
|
||||
$item =~ s/blogspot(\.[a-z]+)+/blogspot.com/;
|
||||
$blog{$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 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; #
|
||||
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 = 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 or not $toc) {
|
||||
default();
|
||||
} elsif (not $confirm) {
|
||||
confirm($url, $name, $toc);
|
||||
} else {
|
||||
post_addition($url, $name, $toc, $summary);
|
||||
}
|
||||
print_end_of_page();
|
||||
}
|
||||
}
|
||||
|
||||
__DATA__
|
||||
@@ -1,4 +1,4 @@
|
||||
The files in this directory are used to run https://campaignwiki.org/
|
||||
The files in this directory are used to run http://campaignwiki.org/
|
||||
|
||||
add-link.pl
|
||||
===========
|
||||
@@ -8,7 +8,7 @@ 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.
|
||||
|
||||
https://campaignwiki.org/wiki/LinksToWisdom/HomePage
|
||||
http://campaignwiki.org/wiki/LinksToWisdom/HomePage
|
||||
|
||||
copy.pl
|
||||
=======
|
||||
@@ -17,7 +17,7 @@ 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.
|
||||
|
||||
https://campaignwiki.org/wiki/BlogArchive/HomePage
|
||||
http://campaignwiki.org/wiki/BlogArchive/HomePage
|
||||
|
||||
monster-tag.pl
|
||||
==============
|
||||
@@ -25,7 +25,7 @@ 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.
|
||||
|
||||
https://campaignwiki.org/wiki/Monsters/HomePage
|
||||
http://campaignwiki.org/wiki/Monsters/HomePage
|
||||
|
||||
submit.pl
|
||||
=========
|
||||
@@ -34,4 +34,4 @@ 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.
|
||||
|
||||
https://campaignwiki.org/wiki/Planet/HomePage
|
||||
http://campaignwiki.org/wiki/Planet/HomePage
|
||||
|
||||
80
contrib/campaignwiki/add-link.pl
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
# Copyright (C) 2011–2018 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2011–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
|
||||
@@ -23,28 +23,13 @@ use utf8;
|
||||
|
||||
# load Oddmuse core
|
||||
$RunCGI = 0;
|
||||
$DataDir = '/home/alex/campaignwiki';
|
||||
do "/home/alex/farm/wiki.pl";
|
||||
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';
|
||||
} elsif ($0 eq '/home/alex/campaignwiki.org/add-sf-link.pl') {
|
||||
$name = "OSRSF House Rules Wiki: Uplinked Intelligence";
|
||||
$wiki = 'UplinkedIntelligence';
|
||||
} else {
|
||||
ReportError('Cannot determine wiki!', '500 INTERNAL SERVER ERROR');
|
||||
}
|
||||
|
||||
# derived variables
|
||||
my $site = "https://campaignwiki.org/wiki/$wiki";
|
||||
# globals
|
||||
my $self = "http://campaignwiki.org/add-link";
|
||||
my $name = "OSR Links to Wisdom";
|
||||
my $wiki = 'LinksToWisdom';
|
||||
my $site = "http://campaignwiki.org/wiki/$wiki";
|
||||
# my $site = "http://localhost/wiki.pl";
|
||||
my $home = "$site/$HomePage";
|
||||
# http://www.emacswiki.org/pics/star.png
|
||||
@@ -52,13 +37,6 @@ my $stardata = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3e
|
||||
|
||||
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;
|
||||
@@ -84,7 +62,9 @@ sub top {
|
||||
for my $id (GetPageContent($HomePage) =~ /\* \[\[(.*?)\]\]/g) {
|
||||
for my $item (GetPageContent(FreeToNormal($id)) =~ /^\*+\s+\[(https?:\/\/[^\/\n\t ]+)/mg) {
|
||||
$n++;
|
||||
$blog{canonical($item)}++;
|
||||
# handle blogspot domain munging
|
||||
$item =~ s/blogspot(\.[a-z]+)+/blogspot.com/;
|
||||
$blog{$item}++;
|
||||
}
|
||||
}
|
||||
print $q->p("Total links counted: $n.");
|
||||
@@ -147,32 +127,6 @@ sub default {
|
||||
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 "
|
||||
@@ -276,7 +230,8 @@ sub post {
|
||||
my $response = $ua->post($site, \%params);
|
||||
if ($response->is_error) {
|
||||
print $q->p("The submission failed!");
|
||||
print $response->content;
|
||||
print $q->pre($response->status_line . "\n"
|
||||
. $response->content);
|
||||
} else {
|
||||
print $q->p("See for yourself: ", GetPageLink($id));
|
||||
}
|
||||
@@ -292,13 +247,10 @@ sub print_end_of_page {
|
||||
|
||||
sub main {
|
||||
$ConfigFile = "$DataDir/config"; # read the global config file
|
||||
$ModuleDir = "$DataDir/modules"; # global modules
|
||||
$DataDir = "$DataDir/$wiki"; # but link to the local pages
|
||||
Init(); # read config file
|
||||
Init(); # read config file (no modules!)
|
||||
$ScriptName = $site; # undo setting in the config file
|
||||
$FullUrl = $site; #
|
||||
InitPageVariables(); # call again: $ScriptName was wrong
|
||||
$HomePage = 'HomePage'; # $HomePage must not be translated
|
||||
binmode(STDOUT,':utf8');
|
||||
$q->charset('utf8');
|
||||
if ($q->path_info eq '/source') {
|
||||
@@ -334,15 +286,13 @@ sub main {
|
||||
$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 $url = 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) {
|
||||
if (not $url or not $toc) {
|
||||
default();
|
||||
} elsif (not $toc) {
|
||||
default() if not is_duplicate($url);
|
||||
} elsif (not $confirm) {
|
||||
confirm($url, $name, $toc);
|
||||
} else {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
if test -z "$2" -o ! -z "$3"; then
|
||||
echo "Usage: delete.sh USERNAME WIKI"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
username=$1
|
||||
wiki=$2
|
||||
|
||||
for p in $(curl --silent "https://campaignwiki.org/wiki/$wiki?action=index;raw=1"); do
|
||||
echo "Deleting: $p"
|
||||
curl -F frodo=1 -F "title=$p" -F text=DeletedPage -F summary=Deleted -F username="$username" "https://campaignwiki.org/wiki/$wiki"
|
||||
sleep 5
|
||||
done
|
||||
@@ -1,20 +1,26 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2004 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2004 Alex Schroeder <alex@emacswiki.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 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
|
||||
|
||||
# $Id: ell-to-wiki.pl,v 1.5 2007/02/15 22:00:26 as Exp $
|
||||
|
||||
use LWP::UserAgent;
|
||||
use XML::Parser;
|
||||
|
||||
93
contrib/emacswiki/bootstrap.js
vendored
@@ -1,93 +0,0 @@
|
||||
// Public Domain
|
||||
// initial version by Alex Schroeder <alex@gnu.org>
|
||||
// with many improvements by Evgkeni Sampelnikof
|
||||
|
||||
$(function(){
|
||||
|
||||
// add fancy classes
|
||||
$('div.header' ).addClass('container');
|
||||
$('div.wrapper').addClass('container');
|
||||
$('div.footer' ).addClass('container');
|
||||
$('div.footer > .navbar' ).remove();
|
||||
$('.message > p' ).addClass('alert');
|
||||
$('img.portrait').addClass('img-polaroid');
|
||||
|
||||
$('input:text').addClass('input-medium search-query');
|
||||
$('textarea').addClass('span12');
|
||||
$('input:submit').addClass('btn');
|
||||
$('.download a').addClass('btn btn-success');
|
||||
|
||||
$('.footer .gotobar').remove();
|
||||
$('.footer br').first().remove();
|
||||
var $gotobar = $('.gotobar')
|
||||
.after($('<div>').attr('class','navbar')
|
||||
.append($('<div>').attr('class','navbar-inner')
|
||||
.append($('<ul>').attr('class', 'nav'))));
|
||||
var $id = $('h1 a').first().text();
|
||||
var $list = $('.nav')
|
||||
.append($('<li>')
|
||||
.append($('<a>').attr('class', 'brand').attr('href', 'http://www.emacswiki.org/')
|
||||
.append('Emacs Wiki')));
|
||||
$('.gotobar a').each(function() {
|
||||
var $item = $('<li>');
|
||||
$(this).appendTo($item);
|
||||
$item.appendTo($list);
|
||||
if ($(this).text() == $id) {
|
||||
$item.addClass('active');
|
||||
}
|
||||
});
|
||||
$gotobar.remove();
|
||||
|
||||
// search without labels, without button, without language field
|
||||
$('form.search input[type=submit]').remove();
|
||||
$('form.search label').remove();
|
||||
$('form.search input#searchlang').remove();
|
||||
$('form.search')
|
||||
.css({'float': 'right',
|
||||
'margin-top': '10px'});
|
||||
$('.navbar').append($('form.search'));
|
||||
|
||||
// add button style to some links
|
||||
$('.edit.bar a').addClass('btn');
|
||||
|
||||
// add color to Talk button for a non-existing page
|
||||
$('a.btn.comment.edit').addClass('btn-warning');
|
||||
|
||||
// move article link and talk link below title
|
||||
var $link = $('a.original').add('a.comment');
|
||||
if ($link) {
|
||||
$('.header h1').after($('<p>').append($link));
|
||||
}
|
||||
|
||||
// toc
|
||||
if ($('title').text() == "EmacsWiki: Wikified Emacs Lisp List") {
|
||||
$('.content').addClass('ell');
|
||||
}
|
||||
|
||||
// tables
|
||||
$('table').addClass('table');
|
||||
|
||||
// minor edit checkbox
|
||||
$('input[type=checkbox]').addClass('checkbox');
|
||||
$('input[type=checkbox]').parent().addClass('checkbox');
|
||||
|
||||
// clean up admin page
|
||||
$('li a.clear').parent().remove();
|
||||
$('li a.index').parent().remove();
|
||||
|
||||
$('a[href="http://creativecommons.org/licenses/GPL/2.0/"]')
|
||||
.parent()
|
||||
.css({'margin-right': '120px',
|
||||
'opacity': 0.3,
|
||||
'padding-top': '1em'});
|
||||
$('.footer .bar')
|
||||
.after('<hr />');
|
||||
var footer_wrapper = $('<div/>')
|
||||
.addClass('footer_wrapper');
|
||||
var footer = $('.footer.container');
|
||||
footer.after(footer_wrapper);
|
||||
footer_wrapper.append(footer);
|
||||
var logo_image = $('<img />')
|
||||
.attr('src', 'http://emacswiki.org/ew_logo.png');
|
||||
$('.header .navbar .brand').html(logo_image);
|
||||
});
|
||||
@@ -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)
|
||||
@@ -1,131 +0,0 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2005-2016 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 Modern::Perl;
|
||||
use LWP::UserAgent;
|
||||
use utf8;
|
||||
binmode(STDOUT, ":utf8");
|
||||
|
||||
my $ua = LWP::UserAgent->new;
|
||||
|
||||
sub url_encode {
|
||||
my $str = shift;
|
||||
return '' unless $str;
|
||||
utf8::encode($str); # turn to byte string
|
||||
my @letters = split(//, $str);
|
||||
my %safe = map {$_ => 1} ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '-', '_', '.', '!', '~', '*', "'", '(', ')', '#');
|
||||
foreach my $letter (@letters) {
|
||||
$letter = sprintf("%%%02x", ord($letter)) unless $safe{$letter};
|
||||
}
|
||||
return join('', @letters);
|
||||
}
|
||||
|
||||
sub get_raw {
|
||||
my $uri = shift;
|
||||
my $response = $ua->get($uri);
|
||||
return $response->content if $response->is_success;
|
||||
}
|
||||
|
||||
sub get_wiki_page {
|
||||
my ($wiki, $id, $password) = @_;
|
||||
my $parameters = [
|
||||
pwd => $password,
|
||||
action => 'browse',
|
||||
id => $id,
|
||||
raw => 1,
|
||||
];
|
||||
my $response = $ua->post($wiki, $parameters);
|
||||
return $response->decoded_content if $response->is_success;
|
||||
die "Getting $id returned " . $response->status_line;
|
||||
}
|
||||
|
||||
sub get_wiki_index {
|
||||
my $wiki = shift;
|
||||
my $parameters = [
|
||||
search => "flickr.com",
|
||||
context => 0,
|
||||
raw => 1,
|
||||
];
|
||||
my $response = $ua->post($wiki, $parameters);
|
||||
return $response->decoded_content if $response->is_success;
|
||||
die "Getting the index returned " . $response->status_line;
|
||||
}
|
||||
|
||||
sub post_wiki_page {
|
||||
my ($wiki, $id, $username, $password, $text) = @_;
|
||||
my $parameters = [
|
||||
username => $username,
|
||||
pwd => $password,
|
||||
recent_edit => 'on',
|
||||
text => $text,
|
||||
title => $id,
|
||||
];
|
||||
my $response = $ua->post($wiki, $parameters);
|
||||
die "Posting to $id returned " . $response->status_line unless $response->code == 302;
|
||||
}
|
||||
|
||||
my %seen = ();
|
||||
|
||||
sub write_flickr {
|
||||
my ($id, $flickr, $dir, $file) = @_;
|
||||
say "Found $flickr";
|
||||
warn "$file was seen before: " . $seen{$file} if $seen{$file};
|
||||
die "$file contains unknown characters" if $file =~ /[^a-z0-9_.]/;
|
||||
$seen{$file} = "$id used $flickr";
|
||||
my $bytes = get_raw($flickr) or die("No data for $id");
|
||||
open(my $fh, '>', "$dir/$file") or die "Cannot write $dir/$file";
|
||||
binmode($fh);
|
||||
print $fh $bytes;
|
||||
close($fh);
|
||||
}
|
||||
|
||||
sub convert_page {
|
||||
my ($wiki, $pics, $dir, $username, $password, $id) = @_;
|
||||
say $id;
|
||||
my $text = get_wiki_page($wiki, $id, $password);
|
||||
my $is_changed = 0;
|
||||
while ($text =~ m!(https://[a-z0-9.]+.flickr.com/(?:[a-z0-9.]+/)?([a-z0-9_]+\.(?:jpg|png)))!) {
|
||||
my $flickr = $1;
|
||||
my $file = $2;
|
||||
write_flickr($id, $flickr, $dir, $file);
|
||||
$is_changed = 1;
|
||||
my $re = quotemeta($flickr);
|
||||
$text =~ s!$flickr!$pics/$file!g;
|
||||
}
|
||||
if ($is_changed) {
|
||||
post_wiki_page($wiki, $id, $username, $password, $text);
|
||||
} else {
|
||||
# die "$id has no flickr matches?\n$text";
|
||||
}
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
sub convert_site {
|
||||
my ($wiki, $pics, $dir, $username, $password) = @_;
|
||||
my @ids = split(/\n/, get_wiki_index($wiki));
|
||||
for my $id (@ids) {
|
||||
convert_page($wiki, $pics, $dir, $username, $password, $id);
|
||||
}
|
||||
}
|
||||
|
||||
our $AdminPass;
|
||||
do "/home/alex/password.pl";
|
||||
convert_site('https://alexschroeder.ch/wiki',
|
||||
'https://alexschroeder.ch/pics',
|
||||
'/home/alex/alexschroeder.ch/pics',
|
||||
'Alex Schroeder',
|
||||
$AdminPass);
|
||||
1054
contrib/oddmuse-curl.el
Normal file
17
contrib/simple-install/.htaccess
Normal file
@@ -0,0 +1,17 @@
|
||||
DirectoryIndex wiki.pl
|
||||
Options ExecCGI SymLinksIfOwnerMatch
|
||||
AddHandler cgi-script .pl
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteRule ^(.*)$ wiki.pl?$1 [L,QSA]
|
||||
|
||||
# The config file might contain passwords. Also protect possible
|
||||
# backup filenames.
|
||||
RewriteRule ^config(\~|\.bak)?$ wiki.pl/config [L]
|
||||
# The visitor.log file contains IP numbers of visitors.
|
||||
RewriteRule ^visitors.log$ wiki.pl/visitor.log [L]
|
||||
</IfModule>
|
||||
14
contrib/simple-install/Makefile
Normal file
@@ -0,0 +1,14 @@
|
||||
all:
|
||||
@echo Please invoke make dist on the top level
|
||||
|
||||
%-simple.tar.gz: README config wiki.pl .htaccess current.pl FDL GPL
|
||||
tar czf $@ $^
|
||||
|
||||
current.pl: ../../wiki.pl
|
||||
cp $^ $@
|
||||
|
||||
FDL: ../../FDL
|
||||
cp $^ $@
|
||||
|
||||
GPL: ../../GPL
|
||||
cp $^ $@
|
||||
76
contrib/simple-install/README
Normal file
@@ -0,0 +1,76 @@
|
||||
This is the README file distributed as part of the simple-install
|
||||
package together with the Oddmuse script.
|
||||
|
||||
Unzip all the files into a directory served by Apache. Get the
|
||||
current.pl file from here: http://emacswiki.org/scripts/current.pl
|
||||
|
||||
Your directory should now contain the following files:
|
||||
|
||||
* README (this file)
|
||||
* .htaccess (information for Apache)
|
||||
* config (a simple config file for you to modify)
|
||||
* wiki.pl (a wrapper script setting the data directory)
|
||||
* current.pl (the main script)
|
||||
* modules (a directory containing modules)
|
||||
* modules/creole.pl (support for the standard wiki markup)
|
||||
|
||||
The wiki pages will be saved in this directory.
|
||||
|
||||
Make sure the www user (or whoever Apache runs under) has write access
|
||||
to this directory. In that directory, try chmod o+w . and see if that
|
||||
helps when you get an error message saying that Oddmuse cannot create
|
||||
the temp directory.
|
||||
|
||||
You need to make sure that your administrator has allowed
|
||||
AllowOverride All in his httpd.conf file for the settings in the
|
||||
.htaccess file provided to have an effect.
|
||||
|
||||
Running Oddmuse will create more files, eventually.
|
||||
|
||||
* pages (the directory containing the pages)
|
||||
* keep (the directory containing older versions of pages)
|
||||
* pageidx (a file containing the names of existing pages)
|
||||
* rc.log (the file used to produce RecentChanges)
|
||||
* visitors.log (the file used to log the most recent visitors)
|
||||
* temp (a temporary directory for log files and the like)
|
||||
|
||||
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.
|
||||
2
contrib/simple-install/config
Normal file
@@ -0,0 +1,2 @@
|
||||
# Where to find diff(1) and grep(1)
|
||||
$ENV{PATH} = '/usr/bin:/bin';
|
||||
10
contrib/simple-install/wiki.pl
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# This wrapper does nothing but tell Oddmuse to use the current
|
||||
# directory as its data directory.
|
||||
package OddMuse;
|
||||
$DataDir = '.';
|
||||
|
||||
# You need to get the latest copy of this script from
|
||||
# http://emacswiki.org/scripts/current.pl
|
||||
do 'current.pl';
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
168
contrib/vc-oddmuse.el
Normal file
@@ -0,0 +1,168 @@
|
||||
;;; 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)
|
||||
@@ -3,17 +3,19 @@
|
||||
#
|
||||
# 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,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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/>.
|
||||
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
my $FS = "\x1e";
|
||||
my %Total = ();
|
||||
my %Month = ();
|
||||
14
control
Normal 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).
|
||||
@@ -1,539 +0,0 @@
|
||||
/* This file is in the public domain. */
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, 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;
|
||||
}
|
||||
@@ -1,536 +0,0 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 14pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
font-style: italic;
|
||||
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 img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
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; }
|
||||
|
||||
/* 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;
|
||||
}
|
||||
@@ -1,544 +0,0 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 14pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@import url(file:///home/alex/alexschroeder.ch/css/alex-2017.css) print;
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
font-style: italic;
|
||||
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 {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table tr td, table 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 img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
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; }
|
||||
|
||||
/* mastodon */
|
||||
|
||||
div.mastodon { padding: 0 2em }
|
||||
div.mastodon .status {padding-top: 1ex; border-bottom: 1px solid grey;}
|
||||
div.mastodon .status:first-child {border-top: 1px solid grey;}
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel:before {
|
||||
font-size: 14pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This document is to be read in a feed reader. The item content is escaped HTML, which makes it hard to read for humans. Sorry!";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
contributor:before { content: "Last edited by "; }
|
||||
contributor:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
link, managingEditor, webMaster, license, url,
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
@@ -1,615 +0,0 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "DejaVu Serif", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 16pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media only screen and (max-device-width: 600px) {
|
||||
body {
|
||||
padding: 1ex;
|
||||
}
|
||||
textarea {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "DejaVu Mono", "Andale Mono", Monaco, "Courier New", Courier, monospace;
|
||||
}
|
||||
|
||||
pre, code, tt {
|
||||
font-size: 12pt; /* fits 80ex */
|
||||
}
|
||||
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+ */
|
||||
}
|
||||
|
||||
@import url(file:///home/alex/alexschroeder.ch/css/alex-2017.css) print;
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
.header input {
|
||||
width: 10ex;
|
||||
}
|
||||
|
||||
/* other form fields */
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0;
|
||||
font-size: 80%;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/* Recent Changes */
|
||||
|
||||
div.rc {
|
||||
overflow: hidden;
|
||||
}
|
||||
div.rc li + li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
div.rc li strong, table.history strong, strong.description {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
.red {
|
||||
background: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.orange {
|
||||
background: orange;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: green;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: blue;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.indigo {
|
||||
background: indigo;
|
||||
color: indigo;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: violet;
|
||||
color: violet;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ip-code {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
/* Diff */
|
||||
|
||||
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 {
|
||||
font-style: italic;
|
||||
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 {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table tr td, table 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 img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
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; }
|
||||
|
||||
/* mastodon */
|
||||
|
||||
div.mastodon { padding: 0 2em }
|
||||
div.mastodon .status {padding-top: 1ex; border-bottom: 1px solid grey;}
|
||||
div.mastodon .status:first-child {border-top: 1px solid grey;}
|
||||
|
||||
/* terminal "screenshots" */
|
||||
|
||||
.terminal {
|
||||
width: 80%;
|
||||
margin: 50px auto 100px auto;
|
||||
padding: 5px;
|
||||
font-size: 62%; /* fits 80ex */
|
||||
border: 1px solid #999;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 25px 50px #999;
|
||||
}
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel:before {
|
||||
font-size: 14pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This document is to be read in a feed reader. The item content is escaped HTML, which makes it hard to read for humans. Sorry!";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
contributor:before { content: "Last edited by "; }
|
||||
contributor:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
link, managingEditor, webMaster, license, url,
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
@@ -321,6 +321,7 @@ 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; }
|
||||
|
||||
425
css/latex.css
@@ -1,425 +0,0 @@
|
||||
/*!
|
||||
* LaTeX.css (https://latex.now.sh/)
|
||||
*
|
||||
* Source: https://github.com/vincentdoerig/latex-css
|
||||
* Licensed under MIT (https://github.com/vincentdoerig/latex-css/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-regular.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-regular.woff') format('woff'),
|
||||
url('/style/fonts/LM-regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-italic.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-italic.woff') format('woff'),
|
||||
url('/style/fonts/LM-italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-bold.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-bold.woff') format('woff'),
|
||||
url('/style/fonts/LM-bold.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-bold-italic.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-bold-italic.woff') format('woff'),
|
||||
url('/style/fonts/LM-bold-italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* Box sizing rules */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Remove default margin */
|
||||
body,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
p,
|
||||
ul[class],
|
||||
ol[class],
|
||||
li,
|
||||
figure,
|
||||
figcaption,
|
||||
dl,
|
||||
dd {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Make default font-size 1rem and add smooth scrolling to anchors */
|
||||
html {
|
||||
font-size: 1.4rem;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Latin Modern', Georgia, Cambria, 'DejaVu Serif', 'Times New Roman', Times, serif;
|
||||
line-height: 1.4;
|
||||
max-width: 80ch;
|
||||
min-height: 100vh;
|
||||
overflow-x: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.25rem;
|
||||
|
||||
counter-reset: theorem;
|
||||
counter-reset: definition;
|
||||
|
||||
color: hsl(0, 5%, 10%);
|
||||
background-color: hsl(210, 20%, 98%);
|
||||
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
/* Justify and hyphenate all paragraphs */
|
||||
p {
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
/* A elements that don't have a class get default styles */
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto;
|
||||
}
|
||||
|
||||
/* Make links red */
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #a00;
|
||||
}
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: #800;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
outline-offset: 2px;
|
||||
outline: 2px solid hsl(220, 90%, 52%);
|
||||
}
|
||||
|
||||
|
||||
/* Ueberschriften mit Links nur dezent einfärben */
|
||||
h1 a, h1 a:visited,
|
||||
h2 a, h2 a:visited,
|
||||
h3 a, h3 a:visited,
|
||||
h4 a, h4 a:visited,
|
||||
h5 a, h5 a:visited,
|
||||
h6 a, h6 a:visited {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* goto bar */
|
||||
div.menu form.search {
|
||||
font-size:75%;
|
||||
margin-top:2em;
|
||||
margin-bottom:3em;
|
||||
}
|
||||
|
||||
div.menu span.gotobar a.local,
|
||||
div.menu span.gotobar a.local:visited {
|
||||
text-decoration: none;
|
||||
color: #1e133c87;
|
||||
margin-right:1.1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Make images easier to work with */
|
||||
img {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Inherit fonts for inputs and buttons */
|
||||
input,
|
||||
button,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* Prevent textarea from overflowing */
|
||||
textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Natural flow and rhythm in articles by default */
|
||||
article > * + * {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/* Styles for inline code or code snippets */
|
||||
code,
|
||||
pre,
|
||||
kbd {
|
||||
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||
monospace;
|
||||
font-size: 85%;
|
||||
}
|
||||
pre {
|
||||
padding: 1rem 1.4rem;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
border-radius: 4px;
|
||||
background: hsl(210, 28%, 93%);
|
||||
}
|
||||
pre code {
|
||||
font-size: 95%;
|
||||
position: relative;
|
||||
}
|
||||
kbd {
|
||||
background: hsl(210, 5%, 100%);
|
||||
border: 1px solid hsl(210, 5%, 70%);
|
||||
border-radius: 2px;
|
||||
padding: 2px 4px;
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
/* Make table 100% width, add borders between rows */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
text-align: left;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
td {
|
||||
border-bottom: 1px solid hsl(0, 0%, 85%);
|
||||
}
|
||||
thead th {
|
||||
border-bottom: 2px solid hsl(0, 0%, 70%);
|
||||
}
|
||||
tfoot th {
|
||||
border-top: 2px solid hsl(0, 0%, 70%);
|
||||
}
|
||||
|
||||
/* Center align the title */
|
||||
h1:first-child {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Nested ordered list for ToC */
|
||||
nav ol {
|
||||
counter-reset: item;
|
||||
padding-left: 2rem;
|
||||
}
|
||||
nav li {
|
||||
display: block;
|
||||
}
|
||||
nav li:before {
|
||||
content: counters(item, '.') ' ';
|
||||
counter-increment: item;
|
||||
padding-right: 0.85rem;
|
||||
}
|
||||
|
||||
/* Center definitions (most useful for display equations) */
|
||||
dl dd {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Theorem */
|
||||
.theorem {
|
||||
counter-increment: theorem;
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
.theorem::before {
|
||||
content: 'Satz ' counter(theorem) '. ';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Lemma */
|
||||
.lemma {
|
||||
counter-increment: theorem;
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
.lemma::before {
|
||||
content: 'Lemma ' counter(theorem) '. ';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Proof */
|
||||
.proof {
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: normal;
|
||||
position: relative;
|
||||
}
|
||||
.proof::before {
|
||||
content: 'Beweis. ' attr(title);
|
||||
font-style: italic;
|
||||
}
|
||||
.proof:after {
|
||||
content: '◾️';
|
||||
position: absolute;
|
||||
right: -12px;
|
||||
bottom: -2px;
|
||||
}
|
||||
|
||||
/* Definition */
|
||||
.definition {
|
||||
counter-increment: definition;
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: normal;
|
||||
}
|
||||
.definition::before {
|
||||
content: 'Definition ' counter(definition) '. ';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Center align author name, use small caps and add vertical spacing */
|
||||
.author {
|
||||
margin: 0.85rem 0;
|
||||
font-variant-caps: small-caps;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Make footnote text smaller and left align it (looks bad with long URLs) */
|
||||
.footnotes p {
|
||||
text-align: left;
|
||||
line-height: 1.5;
|
||||
font-size: 85%;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.footnotes {
|
||||
border-top: 1px solid hsl(0, 0%, 39%);
|
||||
}
|
||||
|
||||
/* Center title and paragraph */
|
||||
.abstract,
|
||||
.abstract p {
|
||||
text-align: center;
|
||||
}
|
||||
.abstract {
|
||||
margin: 2.25rem 0;
|
||||
}
|
||||
|
||||
/* Format the LaTeX symbol correctly (a higher up, e lower) */
|
||||
.latex span:nth-child(1) {
|
||||
text-transform: uppercase;
|
||||
font-size: 0.75em;
|
||||
vertical-align: 0.28em;
|
||||
margin-left: -0.48em;
|
||||
margin-right: -0.15em;
|
||||
line-height: 1ex;
|
||||
}
|
||||
|
||||
.latex span:nth-child(2) {
|
||||
text-transform: uppercase;
|
||||
vertical-align: -0.5ex;
|
||||
margin-left: -0.1667em;
|
||||
margin-right: -0.125em;
|
||||
line-height: 1ex;
|
||||
}
|
||||
|
||||
/* Heading typography */
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
line-height: 3.25rem;
|
||||
margin-bottom: 1.625rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.7rem;
|
||||
line-height: 2rem;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.4rem;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1rem;
|
||||
margin-top: 1.8rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
line-height: 1.625rem;
|
||||
}
|
||||
|
||||
h1 + h2 {
|
||||
margin-top: 1.625rem;
|
||||
}
|
||||
|
||||
h2 + h3,
|
||||
h3 + h4,
|
||||
h4 + h5 {
|
||||
margin-top: 0.8rem;
|
||||
}
|
||||
|
||||
h5 + h6 {
|
||||
margin-top: -0.8rem;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
div.diff div.old {
|
||||
background-color: #FFFFAF;
|
||||
}
|
||||
|
||||
div.diff div.new {
|
||||
background-color: #CFFFCF;
|
||||
}
|
||||
|
||||
div.content blockquote {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
192
css/light.css
@@ -8,8 +8,110 @@
|
||||
|
||||
@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: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-family: "Noticia Text", Symbola, serif;
|
||||
font-size: 14pt;
|
||||
color: #000;
|
||||
background-color: #eed;
|
||||
@@ -17,20 +119,16 @@ body {
|
||||
}
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, Symbola;
|
||||
font-size: 80%;
|
||||
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, Symbola;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
background-color: white;
|
||||
background-color: white;
|
||||
font-family: Times, serif;
|
||||
font-size:10pt;
|
||||
}
|
||||
/* Printing from Firefox */
|
||||
svg {
|
||||
transform: translate(-1.5cm, -1cm);
|
||||
}
|
||||
}
|
||||
|
||||
/* iPhone */
|
||||
@@ -51,10 +149,9 @@ textarea, pre, code, tt {
|
||||
.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: 6em; font-size: 80%; }
|
||||
.header input[type="checkbox"] { width: 1em; }
|
||||
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%; }
|
||||
|
||||
@@ -78,9 +175,9 @@ input#mail, input#homepage, input#username {
|
||||
|
||||
/* titles */
|
||||
h1 {
|
||||
font-weight: bold;
|
||||
font-size: 150%;
|
||||
padding: 1em 0;
|
||||
font-weight: bold;
|
||||
font-size: 150%;
|
||||
padding: 1em 0;
|
||||
}
|
||||
h1 a:link, h1 a:visited {
|
||||
color: inherit;
|
||||
@@ -120,7 +217,7 @@ a:active {
|
||||
border: 1px solid #9d8;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 1px 3px white inset,
|
||||
0px 1px 3px black;
|
||||
0px 1px 3px black;
|
||||
}
|
||||
.button a {
|
||||
text-decoration: none;
|
||||
@@ -134,23 +231,48 @@ a:active {
|
||||
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; }
|
||||
/* edit paragraphs */
|
||||
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;
|
||||
}
|
||||
}
|
||||
table a.pencil {
|
||||
position: absolute;
|
||||
right: inherit;
|
||||
}
|
||||
|
||||
/* table of contents */
|
||||
.toc {
|
||||
font-size: smaller;
|
||||
border-left: 1em solid #886;
|
||||
font-size: smaller;
|
||||
border-left: 1em solid #886;
|
||||
}
|
||||
.toc ol {
|
||||
list-style-type: none;
|
||||
padding-left: 1em;
|
||||
list-style-type: none;
|
||||
padding-left: 1em;
|
||||
}
|
||||
.toc a {
|
||||
font-weight: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* images with links, captions, etc */
|
||||
@@ -188,8 +310,6 @@ img.logo {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.hexmap a img { background: #fff; border: none; }
|
||||
|
||||
/* fancy bold underline */
|
||||
em.underline { font-weight: bold; }
|
||||
|
||||
@@ -206,28 +326,26 @@ div.message {
|
||||
}
|
||||
table.history { border-style:none; }
|
||||
td.history { border-style:none; }
|
||||
div.history span.dash + strong { font-weight: normal; }
|
||||
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; }
|
||||
div.rc li strong { font-weight: normal; }
|
||||
|
||||
/* Tables */
|
||||
table.user {
|
||||
margin: 1em 0;
|
||||
padding: 0 1em;
|
||||
border-top: 1px solid black;
|
||||
border-bottom: 1px solid black;
|
||||
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;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
table.user td, table.user th {
|
||||
border-style: none;
|
||||
padding:5px 10px;
|
||||
vertical-align: top;
|
||||
border-style: none;
|
||||
padding:5px 10px;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.user th { font-weight:bold; }
|
||||
table.user td.r { text-align:right; }
|
||||
@@ -238,7 +356,7 @@ table.user td.mark { background-color:yellow; }
|
||||
tr:empty { display: block; height: 0.5em; }
|
||||
@media print {
|
||||
table {
|
||||
font-size: 9pt;
|
||||
font-size: 9pt;
|
||||
margin: 0;
|
||||
}
|
||||
table.user td, table.user th {
|
||||
|
||||
@@ -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; }
|
||||
@@ -58,12 +58,8 @@ div.left .left, div.right .right {
|
||||
span.author {
|
||||
color: #501;
|
||||
}
|
||||
span.bar a:first-child {
|
||||
margin-left:-0.5ex;
|
||||
}
|
||||
span.bar a {
|
||||
padding-right:0.5ex;
|
||||
padding-left:-0.5ex;
|
||||
padding-right:1ex;
|
||||
}
|
||||
body {
|
||||
background:#fff;
|
||||
|
||||
363
css/wiki.css
@@ -1,281 +1,88 @@
|
||||
/* 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;
|
||||
body { background-color:#FFF; color:#000; margin:1em 2em; }
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
body { font-size: 300%; }
|
||||
}
|
||||
|
||||
div.header h1 {
|
||||
margin-top: 2ex;
|
||||
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; }
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
.red {
|
||||
background: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.orange {
|
||||
background: orange;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: green;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: blue;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.indigo {
|
||||
background: indigo;
|
||||
color: indigo;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: violet;
|
||||
color: violet;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ip-code {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* for https://oddmuse.org/wiki/All_Modules */
|
||||
.foo_list + .journal h1 {
|
||||
font: inherit;
|
||||
border: none;
|
||||
display: list-item;
|
||||
margin-top: 0;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.foo_list + .journal a {
|
||||
font: inherit;
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
color: #a00;
|
||||
/* 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; }
|
||||
|
||||
7
debian-packages
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# minimum
|
||||
apt-get install perl-modules
|
||||
# recommended
|
||||
apt-get install diff libwww-perl libxml-rss-perl
|
||||
# optional
|
||||
apt-get install libcgi-fast-perl
|
||||
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 978 B After Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 975 B After Width: | Height: | Size: 975 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 316 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 730 B After Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 1010 B After Width: | Height: | Size: 1010 B |
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
@@ -1,8 +1,8 @@
|
||||
# Copyright (C) 2018 Alex Schroeder <alex@gnu.org>
|
||||
# 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 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,13 +11,15 @@
|
||||
# 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
|
||||
|
||||
require './t/test.pl';
|
||||
use CGI::Fast;
|
||||
package OddMuse;
|
||||
use Test::More tests => 3;
|
||||
|
||||
test_page(update_page("Omega", "last page"), "last page");
|
||||
test_page(update_page("Alpha", "first page\n<search page>"),
|
||||
"Omega");
|
||||
test_page(get_page('Omega'), 'last page');
|
||||
$RunCGI = 0;
|
||||
do 'wiki.pl';
|
||||
while ($q = new CGI::Fast) {
|
||||
DoWikiRequest();
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -12,8 +12,12 @@
|
||||
# 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
|
||||
#
|
||||
#
|
||||
# Usage: perl graph.pl URL StartPage depth breadth stop-regexp
|
||||
# All arguments are optional.
|
||||
#
|
||||
202
info-ref
Normal 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/&([<"])/&$1/g;
|
||||
$data =~ s/<([<"])/<$1/g;
|
||||
$data =~ s/="fn_"">/="fn_"">/;
|
||||
$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);
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -12,7 +12,10 @@
|
||||
# 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 CGI qw/:standard/;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -13,7 +13,12 @@
|
||||
# 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
|
||||
#
|
||||
# $Id: leech-detector,v 1.1 2004/07/09 06:39:32 as Exp $</p>'
|
||||
|
||||
use Time::ParseDate;
|
||||
while (<STDIN>) {
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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,
|
||||
@@ -12,7 +12,10 @@
|
||||
# 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 CGI;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||