parsewiki-0.4.3.orig/ 0040755 0001750 0001750 00000000000 07455365471 012673 5 ustar sto sto parsewiki-0.4.3.orig/GFDL 0100644 0001750 0001750 00000043275 07324273213 013325 0 ustar sto sto GNU Free Documentation License
Version 1.1, March 2000
Copyright (C) 2000 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
written document "free" in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License. The "Document", below, refers to any
such manual or work. Any member of the public is a licensee, and is
addressed as "you".
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has less than five).
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section entitled "History", and its title, and add to
it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. In any section entitled "Acknowledgements" or "Dedications",
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
M. Delete any section entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section as "Endorsements"
or to conflict in title with any Invariant Section.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections entitled "History"
in the various original documents, forming one section entitled
"History"; likewise combine any sections entitled "Acknowledgements",
and any sections entitled "Dedications". You must delete all sections
entitled "Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation. Such a compilation is called an "aggregate", and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate.
Otherwise they must appear on covers around the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License provided that you also include the
original English version of this License. In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation 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. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
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;
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have no Invariant Sections, write "with no Invariant Sections"
instead of saying which ones are invariant. If you have no
Front-Cover Texts, write "no Front-Cover Texts" instead of
"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
parsewiki-0.4.3.orig/LICENSE 0100644 0001750 0001750 00000043272 07446617370 013703 0 ustar sto sto GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange;
or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new
versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and
conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number
of
this License, you may choose any version ever published by the Free
Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the
author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software
and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
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
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy
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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
`show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate
parts of the General Public License. Of course, the commands you use
may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James
Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program
into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with
the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
parsewiki-0.4.3.orig/ChangeLog 0100644 0001750 0001750 00000015165 07455377515 014454 0 ustar sto sto 2002-04-11 22:12 villate
* parsewiki: Corrects repeated titles in LaTeX version when the
title is taken from the first section heading.
2002-04-11 20:57 villate
* ChangeLog: Updated by cvs2cl
2002-04-11 20:56 villate
* www/index.txt: Entered a link to version 0.4
2002-04-11 20:54 villate
* ChangeLog: Updated by cvs2cl
2002-04-11 20:51 villate
* doc/manual-pt.txt: Meta keywords are now in Portuguese.
2002-04-11 20:51 villate
* doc/manual-es.txt: Meta keywords are now in Spanish.
2002-04-11 20:51 villate
* doc/manual-en.txt: Updated to version 0.4.
2002-04-11 20:49 villate
* parsewiki: Meta keywords can now be in any of the supported
languages.
2002-04-11 19:50 villate
* templates/default.tex: Added a coment about parsewiki.
2002-04-11 19:49 villate
* templates/: default.html, default.xhtml, default.xml: Changed the
name of the lang attribute variable
2002-04-11 17:27 villate
* README: Version number and date updated.
2002-04-11 17:02 villate
* www/index.txt: Fixed a typo in the path to the Spanish manual.
2002-04-11 14:19 villate
* www/index.txt: Webpage for the project.
2002-04-11 14:15 villate
* README: Added hyperlinks to the manuals.
2002-04-11 14:12 villate
* doc/: manual-es.txt, manual-pt.txt, manual-en.txt: Added link to
iis source file.
2002-04-11 13:20 villate
* parsewiki: The first heading should not be repeated in teh
frontmatter when the title has been taken from it.
2002-04-11 12:49 villate
* ChangeLog: Updates by cvs2cl.
2002-04-11 12:49 villate
* doc/barra.png: Obtained from the new version of barra.ps
2002-04-11 12:42 villate
* parsewiki: An easier notation (,,xxx,,) introduced as an
alternative to tags.
2002-04-11 12:41 villate
* AUTHORS: List of authors.
2002-04-11 12:33 villate
* doc/barra.ps: The frame of the box in the ceiling is not stroked.
2002-04-11 12:30 villate
* doc/: manual-es.txt, manual-pt.txt: Instead of ,, is used,
and some minor changes in the text.
2002-04-11 12:29 villate
* doc/manual-en.txt: Initial English version of the Manual.
2002-04-11 11:49 villate
* README: Fixes a typo in the CVS keyword.
2002-04-11 11:48 villate
* README: A credits section added and CVS meta-info included.
2002-04-10 09:11 villate
* doc/manual-pt.txt: The name of the Portuguese manual has been
corrected.
2002-04-10 09:10 villate
* doc/manual-es.txt: Name of the Spanish manual corrected.
2002-04-10 08:48 villate
* parsewiki: The title will be correctly taken from the first
document's heading, if not given by a meta pair or a command-line
option.
2002-04-10 08:47 villate
* README: A couple of typos fixed.
2002-04-10 08:42 villate
* doc/manual-es.txt: Slight rephrasing of the last sentence.
2002-04-10 08:41 villate
* doc/manual-pt.txt: Proofreading has been done.
2002-04-09 22:45 villate
* README: Introduction to the program.
2002-04-09 22:27 villate
* ChangeLog: ChangeLog generated by cvs2cl.
2002-04-09 22:25 villate
* doc/manual-es.txt: Some grammar and typos fixed.
2002-04-09 22:24 villate
* parsewiki: Backsalshes and braces should in "pre" environments
should not be replaced by their latex code.
2002-04-09 22:23 villate
* doc/barra.png: Sample figure for version 0.2 of the manual.
2002-04-09 21:58 villate
* doc/manual-pt.txt: Portuguese version of the manual.
2002-04-09 20:08 villate
* doc/manual-es.txt: Changes after a first proof reading.
2002-04-09 20:07 villate
* doc/barra.ps: Simpler figure for version 0.2 of the manual.
2002-04-08 10:38 villate
* parsewiki: Changes the way special Latex characters are handled
to fix several standing bugs.
2002-04-04 22:40 villate
* GFDL: The original GNU FDL license.
2002-04-04 22:34 villate
* templates/: default.html, default.tex, default.xhtml,
default.xml: Default templates.
2002-04-04 22:33 villate
* doc/manual-es.txt: User's manual for parsewiki. Spanish version.
2002-04-04 22:31 villate
* parsewiki: Latex output format is now fully implemented.
2002-04-04 19:19 villate
* parsewiki: Meta-information now has to go at the begining of the
document, to avoid confliicts.
2002-04-04 17:53 villate
* parsewiki: Do not allow { } inside { } and forbid spaces in names
of meta variables to avoid confusion with normal text.
2002-04-04 17:29 villate
* parsewiki: Metainformation can now be given using the form {name:
contents}. A bug with nested lists have been fixed.
2002-04-04 10:40 villate
* parsewiki: Fixes a bug with anchor tags and adds a template
command-line option.
2002-04-03 22:49 villate
* parsewiki: Fixes a syntax error in SetUpXHTML.
2002-04-03 22:21 villate
* parsewiki: Put the copyright and copying permission statement in
a subroutine.
2002-04-03 22:09 villate
* parsewiki: Implemented a -T option for the title.
2002-04-03 21:47 villate
* parsewiki: Fixes a bug with changes of section levels. In HTML
and XHTML, h1 is now reserved for the document's title; section
headings will start at h2.
2002-04-03 20:56 villate
* parsewiki: Clearer code and format option (html | xhtml |
docbook) implemented.
2002-04-03 18:55 villate
* parsewiki: Section, inligraphic and ulink elements of DocBook
have been implemented.
2002-04-03 10:17 villate
* parsewiki: Adopted the URL handling mechanism of Use Mod Wiki and
added DocBook output support.
2002-04-03 00:30 villate
* wiki: Fixes a typo.
2002-04-02 20:36 villate
* wiki: Generates HTML closer to XHTML.
2002-04-02 15:59 villate
* parsewiki: Use item, rather than tag. Tag will be used for the
tag's names.
2002-04-02 15:43 villate
* parsewiki: Support for hyperlinks, using , [URL] or [URL
name].
2002-04-02 13:57 villate
* parsewiki: Gets the page title from the source file and allows
lines continued by \ at teh end.
2002-04-01 17:50 villate
* wiki: Get rid of Microsoft-specific names.
2002-04-01 17:28 villate
* wiki: A better way to translate months, using the translation
file.
2002-04-01 16:42 villate
* page1.wiki, page2.wiki, page3.wiki, page4.wiki, page5.wiki: Test
pages for parsewiki.
2002-03-28 13:29 villate
* parsewiki: Parser for text files with formating rules as those
used in Wikis.
2002-03-27 17:55 villate
* wiki: Get rid of white space at the beginning of , which
makes Konqueror misalign the list items.
2002-03-27 17:53 villate
* wiki: WikiLinesToHtml now produces HTML closer to XHTML.
2002-03-22 14:53 villate
* trans-pt.pl: Portuguese translated strings for UseMod Wiki.
2002-03-22 13:27 villate
* wiki: Fixes an error: variable Months had not been defined.
2002-03-22 12:11 villate
* LICENSE, config, wiki: UseMod Wiki, version 0.92
parsewiki-0.4.3.orig/parsewiki 0100755 0001750 0001750 00000065052 07550612256 014614 0 ustar sto sto #!/usr/bin/perl
# $Id: parsewiki,v 1.29 2002/10/08 17:23:05 villate Exp $
# parsewiki - Parses a text file, with formatting such as that used in a Wiki
sub Copying
{
print <<'EndTerms';
Copyright (C) 2002 Jaime Villate
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.
Some of the subroutines used are based on the Use Mod Wiki script
, version 0.92 (April 21, 2001)
by Clifford A. Adams
EndTerms
exit;
}
sub Usage
{
print STDERR <<"EndUsage";
Usage: $0 [OPTION]... [FILE]
Options:
-f, --format=FORMAT Output format; one of html, xhtml, docbook, latex.
(default html)
-T, --title=TITLE Title.
-t, --template=FILE File with a template to use instead of thestandard.
-c, --copyright Display copyright and copying permission statement.
-h, --help Show this usage summary.
FILE is a simple text file with wiki formating syntax. The result will be
sent to the Standard Output. If FILE is not given, input will be taken from
the Standard Input.
Examples:
$0 myfile.wiki
cat file.txt | $0 -fdocbook --title="An Example" >file.xml
Report bugs to .
EndUsage
exit 1;
}
use strict;
use vars qw($SaveUrlIndex $UrlProtocols $UrlPattern $authorcount $figcount
$UrlProtocols2 $UrlPattern2 $ImageExtensions $FS $frontmatter
$FreeLinkPattern $IndentLimit $language $Format $Template
$title $lang $babel $LT $GT $BL $BR $firstheading $Languages
$Titles $Authors $Orgs $Addresses $Dates $Versions $Abstracts
$Figures @Title @Author @Org @Address @Date @Version @Abstract
@Figure @Language @BabelLang @Tag %SaveUrl %OpenTag %CloseTag
%OpenItem %CloseItem %Meta %LangCode $Revision $LF);
# Configuration variables and Default options
%SaveUrl = ();
$SaveUrlIndex = 0;
$authorcount = 0;
@Tag = qw(ul ol dl pre em strong code img a p dt);
%OpenItem = qw(ol ul dl );
%CloseItem = qw(ol ul dl );
$Format = 'html';
$Revision = q($Revision: 1.29 $);
my $file = &GetOpts(); # Process command line options
# Set up output format
$_ = $Format;
FORMAT:
{
if (/^html$/i) { &SetUpHTML; last FORMAT}
if (/^xhtml$/i) { &SetUpXHTML; last FORMAT}
if (/^docbook$/i) { &SetUpDB; last FORMAT}
if (/^latex$/i) { &SetUpLatex; last FORMAT}
die "$0: Unknown format \"$Format\"\n\n";
}
# Get input file
open (IN,"<$file") or die "$0: Cannot read file $file\n\n" ;
undef $/;
my $page = ;
close IN;
&InitLinkPatterns();
&InitLangTables();
$page =~ s/([^\\])\\\\\r?\n/$1$FS$FS/go; # Encode paragraph breaks
$page =~ s/([^\\])\\\r?\n/$1 /g; # Join (text) lines ending in backslash
($firstheading) = ($page =~ /=\s+([^=]*)\s+=/);
if ($Format =~ /latex/i)
{
$page = &QuoteLatex1($page);
}
else
{
$page = &QuoteHtml($page);
}
$page = &CommonMarkup($page, 1, 0); # Multi-line markup
$page = &WikiLinesToHtml($page); # Line-oriented markup
# Get the title, if not defined by a command-line option
$title = $Meta{'title'} if ($Meta{'title'} && !$title);
$title = $firstheading unless $title;
$babel = $BabelLang[$language];
$lang = ' lang="' . $Meta{language} . '"' if ($Meta{language});
$_ = $Format;
FORMAT:
{
if (/^html$/i) { &SetHTMLFront; last FORMAT }
if (/^xhtml$/i) { &SetXHTMLFront; last FORMAT }
if (/^docbook$/i) { &SetDBFront; last FORMAT }
if (/^latex$/i) { &SetLatexFront }
}
$page =~ s/$FS$FS/\\\\$LF/g; # Decode \\ which are not paragraph breaks
$page =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore saved text
$page =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore nested saved text
# The following statement will fail if $Template has unmatched parentheses
# and will silently fail if the referred variables are undefined.
print eval("qq($Template)");
exit 0;
sub WikiLinesToHtml
{
my ($pageText) = @_;
my ($pageHtml, @htmlStack, $code, $depth, $oldCode, $oldDepth);
my ($hDepth, $oldhDepth, $index, $flag, $line);
@htmlStack = ();
$depth = 0;
$hDepth = 0;
$pageHtml = "";
$flag = 1;
$IndentLimit = 6 if ( $IndentLimit < 1);
# Process lines one-at-a-time
foreach $line (split(/\n/, $pageText))
{
# Search for meta-info lines
if ($flag > 0)
{
next if ($line =~ /^\s*$/);
if ($line =~ s/\s*(?:$BL)([^\s:]+):\s*(.+)(?:$BR)\s*$//o)
{
&StoreMeta($1, $2);
next;
}
else
{
$flag = 0;
}
}
# Process main text lines
$line .= "\n" unless ($line =~ /^\s*$/);
$oldDepth = $depth;
$depth = 0;
$oldhDepth = $hDepth;
$_ = $line;
# Process lines with special characters on the first column
CODE:
{
# Descriptive lists
if (s/^(\;+)\s*([^:]+\:?)\: */$OpenTag{dt}$2$CloseTag{dt}\n$OpenItem{dl}/)
{
$code = "dl";
$depth = length $1;
last CODE;
}
if (s/^(\:+) */$OpenTag{dt}$CloseTag{dt}\n<$OpenItem{dl}/)
{
$code = "dl";
$depth = length $1;
last CODE;
}
# Itemized lists
if (s/^(\*+) */$OpenItem{ul}/)
{
$code = "ul";
$depth = length $1;
last CODE;
}
# Ordered lists
if (s/^(\#+) */$OpenItem{ol}/)
{
$code = "ol";
$depth = length $1;
last CODE;
}
# Verbatim environment
if (/^[ \t].*\S/)
{
$code = "pre";
$depth = 1;
last CODE;
}
# Text line
if (/^[^\s\=]/)
{
$code = "p";
$depth = 1;
last CODE;
}
# Section headings
if (s/^(\=+)\s*([^\=]+)\s*\=+/&WikiHeading($1, $2)/e)
{
$hDepth = length $1;
$code = "h$depth";
last CODE;
}
# New paragraph
if (/^\s*$/)
{
$code = '';
}
}
# Close elements as needed
while (@htmlStack > $depth)
{
$oldCode = pop(@htmlStack);
if ($oldCode =~ /^[dou]l$/)
{
$pageHtml =~ s/\n$/$CloseItem{$oldCode}\n/;
}
$pageHtml .= $CloseTag{$oldCode} . "\n";
}
# Open or close new sections as needed
if ($hDepth > $oldhDepth)
{
while ($hDepth > $oldhDepth )
{
$oldhDepth++;
$pageHtml .= $OpenTag{'h'.$oldhDepth} . "\n";
$pageHtml .= $OpenItem{'h'.$oldhDepth} .
$CloseItem{'h'.$oldhDepth} . "\n"
unless ($hDepth == $oldhDepth );
}
}
elsif ($hDepth < $oldhDepth)
{
while ($hDepth <= $oldhDepth )
{
$pageHtml .= $CloseTag{'h'.$oldhDepth} . "\n";
$oldhDepth--;
}
$pageHtml .= $OpenTag{'h'.$hDepth};
}
elsif ($code =~ /h\d/)
{
$pageHtml .= $CloseTag{'h'.$hDepth} . "\n" . $OpenTag{'h'.$hDepth};
}
# Parse paragraphs and lists
if ($depth > 0)
{
$depth = $IndentLimit if ($depth > $IndentLimit);
if (@htmlStack)
{
# Non-empty stack
$oldCode = pop(@htmlStack);
if ($depth > $oldDepth)
{
# Start a nested list
push(@htmlStack, $oldCode);
$pageHtml .= "$OpenTag{$code}\n";
if (($depth - $oldDepth) > 1)
{
$pageHtml .= $OpenItem{$code} . "\n";
}
}
else
{
if ($oldCode =~ /^[dou]l$/)
{
$pageHtml =~ s/\n$/$CloseItem{$oldCode}\n/;
}
if ($oldCode ne $code)
{
$pageHtml .= "$CloseTag{$oldCode}\n$OpenTag{$code}\n";
}
}
push(@htmlStack, $code);
}
# Fill up stack as needed
while (@htmlStack < $depth)
{
push(@htmlStack, $code);
$pageHtml .= $OpenTag{$code} . "\n";
if ($code =~ /^[dou]l$/ && $depth > @htmlStack)
{
$pageHtml .= $OpenItem{$code} . "\n";
}
}
}
# Parse line-oriented common markup
unless (/^\s*$/)
{
$line = &CommonMarkup($_, 1, 2);
$line = &QuoteLatex2($line) if ($Format =~ /latex/i && $code !~ /pre/);
if ($code =~ /^[dou]l$/)
{
$line =~ s/$FS$FS/$CloseTag{p}\n$OpenTag{p}\n/go; # par. breaks
}
$pageHtml .= $line;
}
}
while (@htmlStack > 0)
{
# Clear stack
$oldCode = pop(@htmlStack);
if ($oldCode =~ /^[dou]l$/)
{
$pageHtml =~ s/\n$/$CloseItem{$oldCode}\n/;
}
$pageHtml .= $CloseTag{$oldCode} . "\n";
}
# Close open sections
while ($hDepth > 0)
{
$pageHtml .= $CloseTag{'h'.$hDepth} . "\n";
$hDepth--;
}
return $pageHtml;
}
sub CommonMarkup
{
my ($text, $useImage, $doLines) = @_;
local $_ = $text;
if ($doLines < 2)
{ # HTML tags that should be replaced before other tags are
# inserted into the text, to avoid mixing them up.
s/(?:$LT)pre$GT((.|\n)*?)$LT\/pre$GT/&StorePre($1, "pre")/igeo;
s/(?:$LT)code$GT((.|\n)*?)$LT\/code$GT/&StorePre($1, "code")/igeo;
# Note that these tags are restricted to a single line
s/(?:$LT)b$GT(.*?)$LT\/b$GT/$OpenTag{strong}$1$CloseTag{strong}/gio;
s/(?:$LT)i$GT(.*?)$LT\/i$GT/$OpenTag{em}$1$CloseTag{em}/gio;
s/(?:$LT)strong$GT(.*?)$LT\/strong$GT/$OpenTag{strong}$1$CloseTag{strong}/gio;
s/(?:$LT)em$GT(.*?)$LT\/em$GT/$OpenTag{em}$1$CloseTag{em}/gio;
s/(?:$LT)tt$GT(.*?)$LT\/tt$GT/$OpenTag{code}$1$CloseTag{code}/gio;
s/\[$UrlPattern\s+([^\]]+?)\]/&StoreBracketUrl($1, $2)/geos;
s/\[$UrlPattern\]/&StoreBracketUrl($1, "")/geo;
if ($Format =~ /^html$/i)
{
s/$UrlPattern2/&StoreUrl($1, $useImage)/geo;
} else {
s/$UrlPattern2/&StoreUrl($1, 0)/geo;
}
s/\[\[$FreeLinkPattern\s+([^\]]+?)\]\]/&StoreBracketUrl($1, $2)/geo;
s/\[\[$FreeLinkPattern\]\]/&StoreUrl($1, $useImage)/geo;
}
if ($doLines)
# TO DO: these substitutions should not be made inside the "pre" environment
{ # 0 = before other tags are inserted, 1 or 2 = after that
# TO DO: The quote markup patterns avoid overlapping tags (with 5 quotes)
# by matching the inner quotes for the strong pattern.
# s/(\'*)\'\'\'(.*?)\'\'\'/$1$OpenTag{strong}$2$CloseTag{strong}/go;
s/\'\'\'(.*?)\'\'\'/&TagText($1,'strong')/ge;
s/''(.*?)''/&TagText($1,'em')/ge;
s/,,(.*?),,/&TagText($1,'code')/ge;
}
return $_;
}
sub WikiHeading
{
my ($depth, $text) = @_;
$depth = length($depth);
$depth = 5 if ($depth > 5);
return $OpenItem{'h'.$depth} . $text . $CloseItem{'h'.$depth} . "\n";
}
sub QuoteLatex1
{
my ($html) = @_;
my $text = '';
$BL = '\\\{';
$BR = '\\\}';
foreach (split(/\n/, $html))
{
if (/^\S/)
{
s/\\/\\ensuremath$FS\\backslash$FS/go;
s/\{/\\{/g;
s/\}/\\}/g;
s/$FS(\\backslash)$FS/\{$1\}/go;
}
$text .= $_ . "\n";
}
return $text;
}
sub QuoteLatex2
{
my ($html) = @_;
$_ = $html;
s/&/\\&/g;
s/#/\\#/g;
s/%/\\%/g;
s/_/\\_/g;
s/\$/\\\$/g;
s/\^/\\^{}/g;
s/~/\\~{}/g;
s/>/\\ensuremath{>}/g;
s/\\ensuremath{<}/g;
return $_;
}
sub QuoteHtml
{
my ($html) = @_;
$html =~ s/&/&/g;
$html =~ s/</g;
$html =~ s/>/>/g;
# $html =~ s/&([\#a-zA-Z0-9]+);/&$1;/g; # Allow character references
$LT = '<';
$GT = 'gt;';
return $html;
}
sub InitLinkPatterns
{
# Field separators are used in the URL-style patterns below.
$FS = "\xb3"; # The FS character is a superscript "3"
$LT = '<';
$GT = '>';
$BL = '{';
$BR = '}';
$LF = "\n";
# Url-style links are delimited by one of:
# 1. Whitespace (kept in output)
# 2. Left or right angle-bracket (< or >) (kept in output)
# 3. Right square-bracket (]) (kept in output)
# 4. A single double-quote (") (kept in output)
# 5. A $FS (field separator) character (kept in output)
$UrlProtocols = "http|https|ftp|afs|news|nntp|mid|cid|mailto|wais|"
. "prospero|telnet|gopher";
$UrlPattern = "((?:(?:$UrlProtocols):[^\\]\\s\"$FS]+))";
$UrlProtocols2 = "http|https|ftp";
$UrlPattern2 = "((?:(?:$UrlProtocols2):[^\\]\\s\"$FS]+))";
$ImageExtensions = "(gif|jpg|png|bmp|jpeg|ico)";
$FreeLinkPattern = "([-,.()\/'_0-9A-Za-z\xc0-\xff]+)";
}
sub InitLangTables
{
$language = 0;
$babel = 'english';
@BabelLang = qw(english spanish portuges);
%LangCode = qw(en 0 es 1 pt 2);
$Languages = 'language idioma língua';
$Titles = 'title título título';
$Authors = 'author autor autor';
$Orgs = 'organization organización organização';
$Addresses = 'address dirección endereço';
$Dates = 'date fecha data';
$Versions = 'version versión versão';
$Abstracts = 'abstract resumen resumo';
$Figures = 'Figure Figura Figura';
@Language = split(/ /,$Languages);
@Title = split(/ /,$Titles);
@Author = split(/ /,$Authors);
@Org = split(/ /,$Orgs);
@Address = split(/ /,$Addresses);
@Date = split(/ /,$Dates);
@Version = split(/ /,$Versions);
@Abstract = split(/ /,$Abstracts);
@Figure = split(/ /,$Figures);
}
sub StoreMeta
{
my ($name, $content) = @_;
if ($Languages =~ /$name/i)
{
$language = $LangCode{$content} if ($LangCode{$content});
$Meta{language} = $content;
}
$content = &CommonMarkup($content, 1, 2);
$content = &QuoteLatex2($content) if ($Format =~ /latex/i);
$content =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore saved text
$content =~ s/$FS(\d+)$FS/$SaveUrl{$1}/ge; # Restore nested saved text
META:
{
if ($Titles =~ /$name/i)
{
$Meta{title} = $content;
next META;
}
if ($Authors =~ /$name/i)
{
$Meta{author}[$authorcount] = $content;
$Meta{organization}[$authorcount] = '';
$Meta{address}[$authorcount] = '';
$authorcount++;
next META;
}
if ($Orgs =~ /$name/i)
{
$authorcount = 1 if ($authorcount < 1);
$Meta{organization}[$authorcount-1] = $content;
next META;
}
if ($Addresses =~ /$name/i)
{
$authorcount = 1 if ($authorcount < 1);
$Meta{address}[$authorcount-1] = $content;
next META;
}
if ($Dates =~ /$name/i)
{
$Meta{date} = $content;
next META;
}
if ($Versions =~ /$name/i)
{
$Meta{version} = $content;
next META;
}
if ($Abstracts =~ /$name/i)
{
$content =~ s/$FS$FS/$CloseTag{p}\n$OpenTag{p}\n/go; # par. breaks
$Meta{abstract} = $content;
next META;
}
$Meta{lc($name)} = $content;
}
return '';
}
sub TagText
{
my ($text, $element) = @_;
my $result;
if ($Format =~ /latex/i)
{
$_ = $text;
LOOP:
{
if (/\G([^$FS]+)/goc)
{
$result .= "$OpenTag{$element}$1$CloseTag{$element}";
redo LOOP;
}
if (/\G$FS(\d+)$FS/goc)
{
$result .= "$FS$1$FS";
&TagURL($1,$element);
redo LOOP;
}
return $result;
}
}
else
{
$result = $OpenTag{$element} . $text . $CloseTag{$element};
return $result;
}
}
sub TagURL
{
my ($index, $element) = @_;
$SaveUrl{$index} =~ s/(\\href\{[^\}]*\})\{([^\}]*)\}/$1\{$OpenTag{$element}$2$CloseTag{$element}\}/;
return $FS . $index . $FS;
}
sub StoreRaw
{
my ($html) = @_;
$SaveUrl{$SaveUrlIndex} = $html;
return $FS . $SaveUrlIndex++ . $FS;
}
sub StoreUrl
{
my ($name, $useImage) = @_;
my ($link, $extra);
($link, $extra) = &UrlLink($name, $useImage);
# Next line ensures no empty links are stored
$link = &StoreRaw($link) if ($link ne "");
return $link . $extra;
}
sub UrlLink
{
my ($rawname, $useImage) = @_;
my ($name, $punct, $format, $text);
($name, $punct) = &SplitUrlPunct($rawname);
$text = $name;
$text = &QuoteLatex2($text) if ($Format =~ /latex/i);
if ($useImage && ($name =~ /\.$ImageExtensions$/))
{
$name =~ /\.([^\.]+)$/;
$format = uc($1);
$name =~ s/\.[^\.]+$// if ($Format =~ /latex/i);
return (eval("qq($OpenTag{img})"), $punct);
}
return (eval("qq($OpenTag{a})") . $text . $CloseTag{'a'}, $punct);
}
sub StoreBracketUrl
{
my ($name, $text) = @_;
$text = $name if ($text eq "");
$text = &QuoteLatex2($text) if ($Format =~ /latex/i);
return &StoreRaw(eval("qq($OpenTag{a})") . $text . $CloseTag{'a'});
}
sub SplitUrlPunct
{
my ($url) = @_;
my ($punct);
$url =~ s/\<//g;
$url =~ s/\&/&/g;
$punct = "";
($punct) = ($url =~ /([^a-zA-Z0-9\/\xc0-\xff\%\#\?\&\+\_\~]+)$/);
$url =~ s/([^a-zA-Z0-9\/\xc0-\xff\%\#\?\&\+\_\~]+)$//;
unless ($Format =~ /latex/i)
{
$url =~ s/\&/&/g;
$punct =~ s/</g;
$punct =~ s/>/>/g;
}
return ($url, $punct);
}
sub SetUpHTML
{
my $index;
my @htmltag = @Tag;
foreach $index (0..$#Tag)
{
$OpenTag{$Tag[$index]} = '<' . $htmltag[$index] . '>';
$CloseTag{$Tag[$index]} = '' . $htmltag[$index] . '>';
}
$OpenTag{img} = '
';
$OpenTag{a} = '';
%OpenItem = qw(ol ul
dl
);
%CloseItem = qw(ol
ul
dl );
foreach $index (1..5)
{
$OpenTag{'h'.$index} = '';
$CloseTag{'h'.$index} = '';
$OpenItem{'h'.$index} = '';
$CloseItem{'h'.$index} = '';
}
unless ($Template)
{
$Template = <<' EndHTML';
$title
$frontmatter
$page
EndHTML
}
}
sub SetUpXHTML
{
my $index;
my @xhtmltag = @Tag;
foreach $index (0..$#Tag)
{
$OpenTag{$Tag[$index]} = '<' . $xhtmltag[$index] . '>';
$CloseTag{$Tag[$index]} = '' . $xhtmltag[$index] . '>';
}
$OpenTag{img} = '
';
$OpenTag{a} = '';
%OpenItem = qw(ol ul
dl
);
%CloseItem = qw(ol
ul dl );
foreach $index (1..5)
{
$OpenTag{'h'.$index} = '';
$CloseTag{'h'.$index} = '';
$OpenItem{'h'.$index} = '';
$CloseItem{'h'.$index} = '';
}
unless ($Template)
{
$Template = <<' EndXHTML';
$title
$frontmatter
$page
EndXHTML
}
}
sub SetUpDB
{
my $index;
my @dbtag = qw(itemizedlist orderedlist variablelist programlisting
emphasis emphasis literal inlinegraphic ulink para term);
foreach $index (0..$#Tag)
{
$OpenTag{$Tag[$index]} = '<' . $dbtag[$index] . '>';
$CloseTag{$Tag[$index]} = '' . $dbtag[$index] . '>';
}
$OpenTag{dt} = '';
$OpenTag{strong} = '';
$OpenTag{img} = '';
$OpenTag{a} = '';
%OpenItem = qw(ol ul
dl );
%CloseItem = qw(ol ul
dl );
foreach $index (1..5)
{
$OpenTag{'h'.$index} = '';
$CloseTag{'h'.$index} = '';
$OpenItem{'h'.$index} = '';
$CloseItem{'h'.$index} = '';
}
unless ($Template)
{
$Template = <<' EndDB';
$frontmatter
$page
EndDB
}
}
sub SetUpLatex
{
my $index;
@Tag = qw(ul ol dl pre em strong code img a p dt);
my @latextag = qw(itemize enumerate description verbatim emph textbf
texttt);
foreach $index (0..2)
{
$OpenTag{$Tag[$index]} = "\\begin\{" . $latextag[$index] . '}';
$CloseTag{$Tag[$index]} = "\\end\{" . $latextag[$index] . '}';
}
foreach $index (4..8)
{
$OpenTag{$Tag[$index]} = "\\$latextag[$index]\{";
$CloseTag{$Tag[$index]} = "\}";
}
$OpenTag{p} = '';
$CloseTag{p} = '';
$OpenTag{dt} = '\item[';
$CloseTag{dt} = ']';
$OpenTag{pre} = '\begin{small}\begin{verbatim}';
$CloseTag{pre} = '\end{verbatim}\end{small}';
$OpenTag{img} = '\\\\includegraphics\{$name\}';
$OpenTag{a} = '\\\\href\{$name\}\{';
$CloseTag{a} = '}';
%OpenItem = ('ol', '\item ', 'ul', '\item ', 'dl', '');
%CloseItem = ('ol', '', 'ul', '', 'dl', '');
$OpenItem{h1} = '\section{';
$OpenItem{h2} = '\subsection{';
$OpenItem{h3} = '\subsubsection{';
$OpenItem{h4} = '\paragraph{';
$OpenItem{h5} = '\subparagraph{';
foreach $index (1..5)
{
$OpenTag{'h'.$index} = '';
$CloseTag{'h'.$index} = '';
$CloseItem{'h'.$index} = '}';
}
unless ($Template)
{
$Template = <<' EndLatex';
% Created by parsewiki $Revision
\\documentclass\[12pt,a4paper\]\{article\}
\\usepackage\[latin1\]\{inputenc\}
\\usepackage\[$babel\]\{babel\}
\\usepackage\{graphicx\}
\\usepackage\[colorlinks=true,urlcolor=blue\]\{hyperref\}
\\setlength\{\\oddsidemargin\}\{9pt\}
\\setlength\{\\textwidth\}\{425pt\}
\\setlength\{\\evensidemargin\}\{23pt\}
\\setlength\{\\topmargin\}\{28pt\}
\\setlength\{\\headheight\}\{17pt\}
\\setlength\{\\headsep\}\{14pt\}
\\setlength\{\\textheight\}\{45\\baselineskip\}
\\setlength\{\\footskip\}\{26pt\}
\\begin\{document\}
$frontmatter
$page
\\end\{document\}
EndLatex
}
}
sub SetHTMLFront
{
$frontmatter .= "$title
\n"
if ($title && ($title ne $firstheading));
if ($authorcount > 0)
{
for my $index (1..$authorcount)
{
$frontmatter .= "$Meta{author}[$index-1]
\n";
$frontmatter .= "$Meta{organization}[$index-1]
\n"
if ($Meta{organization}[$index-1]);
$frontmatter .= "$Meta{address}[$index-1]
\n"
if ($Meta{address}[$index-1]);
}
}
$frontmatter .= "
$Version[$language] $Meta{version}
\n"
if ($Meta{version});
$frontmatter .= "
$Meta{date}
\n" if ($Meta{date});
$frontmatter = "$frontmatter
\n"
if ($frontmatter);
if ($Meta{abstract})
{
$Meta{abstract} =~ s/$FS$FS/<\/p>\n/g;
$frontmatter .="
\n$Meta{abstract}
\n
\n";
}
$frontmatter .= "
$Meta{copyright}
\n"
if ($Meta{copyright});
}
sub SetXHTMLFront
{
$frontmatter = "$title
\n"
if ($title && ($title ne $firstheading));
if ($authorcount > 0)
{
for my $index (1..$authorcount)
{
$frontmatter .= "$Meta{author}[$index-1]
\n";
$frontmatter .= "$Meta{organization}[$index-1]
\n"
if ($Meta{organization}[$index-1]);
$frontmatter .= "$Meta{address}[$index-1]
\n"
if ($Meta{address}[$index-1]);
}
}
$frontmatter .= "
$Version[$language] $Meta{version}
\n"
if ($Meta{version});
$frontmatter .= "
$Meta{date}
\n" if ($Meta{date});
$frontmatter = "$frontmatter
\n"
if ($frontmatter);
if ($Meta{abstract})
{
$Meta{abstract} =~ s/$FS$FS/<\/p>\n/g;
$frontmatter .="
\n$Meta{abstract}
\n
\n";
}
$frontmatter .= "
$Meta{copyright}
\n"
if ($Meta{copyright});
}
sub SetDBFront
{
$frontmatter = "$title\n";
if ($authorcount > 0)
{
for my $index (1..$authorcount)
{
my $affil;
$frontmatter .= "\n";
$Meta{author}[$index-1] =~ /^(.*)\s(\S+)\s*$/;
$frontmatter .= "$1\n";
$frontmatter .= "$2\n";
$affil .= "$Meta{organization}[$index-1]" .
"\n" if ($Meta{organization}[$index-1]);
$affil .= "$Meta{address}[$index-1]\n"
if ($Meta{address}[$index-1]);
$frontmatter .= "\n$affil\n\n"
if ($affil);
$frontmatter .= "\n";
}
}
if ($Meta{version})
{
$frontmatter .= "\n$Meta{version}"
. "";
$frontmatter .= "$Meta{date}" if ($Meta{date});
$frontmatter .= "\n\n";
}
else
{
$frontmatter .= "$Meta{date}\n" if ($Meta{date});
}
if ($Meta{abstract})
{
$Meta{abstract} =~ s/$FS$FS/<\/para>\n/g;
$frontmatter .= "\n$Meta{abstract}\n\n";
}
$frontmatter .= "\n$Meta{copyright}\n"
. "\n" if ($Meta{copyright});
}
sub SetLatexFront
{
my $copyright = 0;
if ($title && ($title ne $firstheading))
{
$frontmatter = "\\title\{$title";
if ($Meta{copyright})
{
$frontmatter .= "\n\\footnote\{$Meta{copyright}\}";
$copyright = 1;
}
$frontmatter .= "\}\n";
}
if ($authorcount > 0)
{
$frontmatter .= '\author{';
for my $index (1..$authorcount)
{
$frontmatter .= "\\\\\n" if ($index > 1);
$frontmatter .= "$Meta{author}[$index-1]";
$frontmatter .= "\\\\\n\\emph\{$Meta{organization}[$index-1]\}"
if ($Meta{organization}[$index-1]);
$frontmatter .= "\\\\\n$Meta{address}[$index-1]"
if ($Meta{address}[$index-1]);
}
$frontmatter .= "\}\n";
}
if ($Meta{date})
{
$frontmatter .= "\\date\{";
$frontmatter .= "$Version[$language] $Meta{version}, "
if ($Meta{version});
$frontmatter .= "$Meta{date}" ;
$frontmatter .= "\}\n";
}
$frontmatter .= "\\maketitle\n" if ($frontmatter);
if ($Meta{abstract})
{
$Meta{abstract} =~ s/$FS$FS/\n\n/g;
$frontmatter .= "\\begin\{abstract\}\n$Meta{abstract}\n";
$frontmatter .= "\\end\{abstract\}\n";
}
$frontmatter .= "\n$Meta{copyright}\n\n"
if ($Meta{copyright} && $copyright == 0);
}
sub ReadTemplate
{
my $file = pop;
open (IN,"<$file") or die "$0: Cannot read template file $file\n\n" ;
undef $/;
$Template = ;
close IN;
}
sub GetOpts
{
my $file;
while ($_ = $ARGV[0], /^-/)
{
shift(@ARGV);
if (/^-f$/) { $Format = shift(@ARGV); next }
if (/^-f(.*)$/) { $Format = $1; next }
if (/^--format\=(.*)$/) { $Format = $1; next }
if (/^-T$/) { $title = shift(@ARGV); next }
if (/^-T(.*)$/) { $title = $1; next }
if (/^--title\=(.*)$/) { $title = $1; next }
if (/^-t$/) { &ReadTemplate(shift(@ARGV)); next }
if (/^-t(.*)$/) { &ReadTemplate($1); next }
if (/^--template\=(.*)$/) { &ReadTemplate($1); next }
if (/^(-c|--copyright)/) { &Copying; next }
if (/^(-h|--help)/) { &Usage }
}
unshift(@ARGV, '-') unless @ARGV;
&Usage if (@ARGV > 1);
$file = shift(@ARGV);
return $file;
}
parsewiki-0.4.3.orig/www/ 0040755 0001750 0001750 00000000000 07455365510 013511 5 ustar sto sto parsewiki-0.4.3.orig/www/index.txt 0100644 0001750 0001750 00000000507 07455377735 015374 0 ustar sto sto
= Parsewiki, a Documentation System Based on ASCII Text =
* [[README.html]]
Source code (use the most recent version):
* [[parsewiki_0.4.1.tar.gz]]
* [[parsewiki_0.4.tar.gz]]
* [[parsewiki_0.3.tar.gz]]
== User's Manual ==
* [[doc/manual-en.html English]]
* [[doc/manual-es.html Spanish]]
* [[doc/manual-pt.html Portuguese]] parsewiki-0.4.3.orig/doc/ 0040755 0001750 0001750 00000000000 07455365476 013445 5 ustar sto sto parsewiki-0.4.3.orig/doc/barra.png 0100644 0001750 0001750 00000011244 07455274112 015223 0 ustar sto sto ‰PNG
IHDR , ¨ ÕIDX gAMA ±üa [IDATxÚíÝL÷ÿð»RT) ¨E*0~¬t"*ÑeNpPÝÐbæ.qš¤°é2Ç6)N¸P¢Ã¡SÊŒ:êD‚*?\#”Z‘V†Ðï÷ý¦
«:~´}>þXèy½]¯¯çÝûÞw}©Óé 9l „ ! „ ! „À"1ŸõîÝ»Z›àåLž<ÙÆÆæ•B(—Ëëëë±)^ŽX,æóùhŽàœ B „ B€QãzG+++oß¾=¤kS__oäUÞÞ^|0ˆ¦¦¦G9ó”)Sìíí‡t}–.]úÜÞQÒøŸ2)
•J5¤kùùçŸÇÇÇ3grrò?ü€:ƒAìÛ·ÏÃÃÃÛÛû_ç,**òöööóóÒõE½Ò‘P õVKII™7ož1s:;;…BÔB.—{{{SQ¥¥¥~~~#UQ8'a! B€ Bøÿž>}jäœ===øò !üÖÖÖ9sggç¦M›ðýÁ@”JåþýûŸ?99y¨¯Àö~ðÁb±˜Íf9¿M~~¾——×Hm8ͶnÝúæ›oÚÙÙÿ––––Y³f]¸pÁBCXXXxòäÉÄÄD‡cìz3_~ù¥íG}„šƒcàO?ý9}útãßµlÙ²9sæÄÆÆZbU*Õ'Ÿ|²jÕ*ggç}¯X,>þ|zz:*ú…‡‡¼Ä½%aaacõêÕÂÐÐP.—ûr·ã°Ù쨨¨o¿ýR mÚ´©¹¹9,,ìåÞ.‹årù07JG8„uuu¯²ï“&MŠˆˆ@ýR© ww÷êêj‹¡\.ïìì¼-ZSSóÝwßýþûïƒ/ŠÇã={Uháß§«Õêï¾û.##cð帹¹ýùçŸÃ¶ÚÌÜd'NœàñxÏn&ý8gddÑÒÒ2øV»téªÐ’)Š'OžìÓÕjµþËŒŒú‚Öà¿3äñx………q$èêêÒŸÂçókjjô§Ðtpp0xï7ô_j4T¡…ÝÝÝåÔœ4ØûWTTè_¦Öh4Ã"B8qâDƒë{E•––êOIMM=zôhyy¹AuÚ´iúSÚÛÛŸ;À8X{{û¦¦¦þ—^^^•••ú3¬^½úôéÓ—/_6hµþý÷ßú!lllÎ_ŒpLJÃiooï9iÒ¤k×®Ì3oÞ<ƒxJKK===õ§ÔÖÖ˘+kkëÆÆFý#á_ýeÐ"õöö6H`ii©»»»Á>ÝÊÊÊRBhgg§¿ÕÜÜÜ\\\?onjjÊÏÏŸ={¶þDVËd2Q…®µµUŸNDPPÐàC‡©Õê-[¶ëOlnnnmmµ”’$ÙÜܬ?%888//Ï QªŸÀuëÖ½óÎ;úçß
…ÂàÀ–©»»Û`TΖ––vëjµ:99ÙÏÏOÿبÑh:::†sµG8„&LP*•ú?#d³Ùb±855599ùÙ®ÈÈÈùóçëŸj4šãÇGGG£ ˆ%K–\g‹Å·n݉Dú§‹t+tñâÅ]]]o¿ý¶þôÇÇÅÅ
ë¡ÈøqGÿsr¹\*•~óÍ7ï¾ûnRR’Açò¹sçêêêîß¿ïêêúèÑ£ÞÞ^·téRƒÙ
<<<ÂÃÃ¥Riqq1ªÐ’‘$ÙÑѸvíZƒåTWW———·µµ¹ººqçÎ>Ÿlp~¨P(ªªª®\¹B’Ñ?
ŒŠŠ:sæŒÁMØ!!!!!!ô±n úµµµ
§N’Ëå(A ‚¢¨]»v%%%mܸQº=dû å¤ÑhNœ8QVV6Ìë<*~Ô›žž~çÎîÖh“5559räСC¨<зlÙ²E‹>|ø¹WIàþýûÓÒÒž;R½ù‡n k4š={öôn
¤ //¯¨¨hÆ“³{÷nooïÝ»wœD¡PH¥Ò¤¤¤÷ßø×v´„¢¨S§NmÞ¼9==} ®Ñþ T*2eJyy9ƒäðÈ‘#yyyƒÌ¦ÑhöíÛW__ãÆIà¨8'Ô÷á‡FDDlܸqûöíEM™2ÅÍÍmüøñææÍ›mmm---</##cÉ’%¨3ø×î†ÚÚÚÍ›7ýõ×ŽŽŽ\.×ÙÙ™Çãi4𯯯öööææf‹µmÛ¶‘Šßh!}HÌÉÉ!B©T_¿~ýâÅ‹ÞÞÞ.œ?~`` j^HZZZZZšJ¥:þü¹s窫«fΜ9{öìeË–†5½w™ðùüa¾\fŒ¢¨+V¬X±b®†Á@B @B @B @B @B @B @B @B @B @B @_‰L&“Édø¾MEhh(I’$I:::Òÿ‰D
…!4íæææ¢¸MEqq1ýÀŽŽNW\\ÌçóE"Bhªrss333
ÞdB(Šêÿ[ H$•J…š*…B!bcc¥R)ŠÛÉåòÄÄÄÌÌL³ütLKH P($B"‘xxx(•Êáö¼´ÄÄD:„À\¿8ó?Êd2ú,ßÑÑQ¥Rá`hZRRRRRR***pNhª”J%EQºÿÉÌÌ”ÉdJ¥Åmr$‰¹~qfB™LÛÿ266–¢(\«0ѯÍQ“<›—ÉdýSèöŒL&C7éè?“§Ïéó¹\þÛo¿™å‡5玡PH_kêg®ß¢ù %%Å>,n[@B @B !fÒ;zïÞ½ŽŽ\x •J¥ç7B8ä
ÅöíÛKJJX,‹ÅÊÉÉAZ¸©S§ÚÛÛ‹D¢/¾øÂTÒhÂ!ŒÏÊÊ‹Å2™¬®®.///**
UhÉ~ùå—C‡Ý¿?;;ÛÇǧ @ „C˜ÀóçÏËd²±cÇ¢ø@Ÿ‹‹‹D")++ ©¬¬ý7»™dÇŒB¡ÈÊÊJHH@a sçÎ]¼xqLLÌè_U“áöíÛÅb1À®®®ƒnݺµªªê«¯¾ª¯¯GýY üüüèèh‚ Ö¯__VVFOŒ‰‰Q*•£¿»Î$CXRRDÿ]PP`kkKDòÞ{ïíܹ³««EiQΜ9£P(*++u:]vvöÞ½{û÷Åo½õÖÉ“'Âݾ}»££ãEQ*•vvvý
Ñ£G¦¥¥Ñý`IIIþþþUUU¨K‹rùòåmÛ¶Ñç~B¡0..îÒ¥Kô?yzz644¼Äù]ifB¹\¾`Á’$wîÜ©T*ÝÝݧN*‘HŒ!—ËÕŸ¢ßmooÿøñcÔ¥Ea0ú½/NNNý7îÁƒÆ—ÖŠ+H’\»v-A.¤(*!!a¨˜îÆÇÇGFFUTTlÙ²eÆŒgϞݳgÏÅ‹}}}Ù÷…«W¯ö¿;vìèß?~Ü××uiQÜÜÜöîÝKÿR©~ýõ׉'Ò/ëêêÞxã
c’’’²páBWW×ŠŠŠììl‚ Ž;VPPÐÖÖæçç7¤'–ŒaN`YYYaaaDDA×®]»{÷ngg'—ËMOO^´h‘1{×_½ººšþ{Íš5ááá111‹-Z³f‹‹êÒ¢DFFVWWûøølÚ´É×××ÕÕ5,,Œþ§ÖÖÖY³fýëŽ=ºwïÞü‘îM¥÷òÍÍÍvvv6lH$ëÖºÖ)©Óé†YXXHDNNÎÙ³g=<<<<<²²²D"Qtt4—ËMLLôóóKMM|Q;vìøùçŸÓÒÒè—]]]UUU?öõõE-Vuuu]]¯¯oÿX
ÕÕÕ;wîlhhüÖ•Jåîî¾cÇŽ€€€‚‚‚¢¢¢ÎÎN‘H$“É^{íµèè耀€ÔÔÔ\¸pÁ´C¸`Á‚ ˆˆˆœœœëׯgeeÑíxz´“'Ofggwvv†‡‡ÿëV#bÞ¼y'N4‰«@0"ººº6oÞ¼k×®U«V
>gBBB[[Û†
®^½šššš••E‘I„L&KHH(,,´³³ûôÓO?û쳡¸+køš£%%%t+´°°055µÿL𢍔”FS[[kggçååeÌ#8pëÖ-©TŠð¬²²²?þ8::ú_HÄ•+W‚(--]¿~} ‚ˆ]¹rå‰'‚˜1cÆ•+W†bm‡ä¶µgÏboß¾íîî~õêÕk×®3F¥RÌ’••µråJ{{û¬¬¬g—Éçóõ{Àø|~MMM|||ll¬§§'ŸÏ÷ôô7nêÏ’ÕÕÕÝ»w¯¡¡A«Õ;vL?NU&Ý7±|ùò’’’¢¢"‘Hd0§§ç÷ß?mÚ4‡#—ËŸ]EQ¯x‡ê4Gy<ž-I’‡ó³»»›Íf“$Éf³9Ž•••µµµN§ëíííîîÖjµjµš$ÉîînNÇb±ž}:=HÔsgpqqár¹ÝÝݶ¶¶ÃÚÚZVÛÛÛ“$É`0&L˜@’$‹Å"I’.ÚÞÞÞôõõõôôÐ5üôéS’$Õj5AZÖÆÆ¦¼¼|Ô œœfÏžíääÄ`0x<^__A‡¢¨ñãÇ;99±X,‡C6µZÝÓÓsçÎÎÎÎööv‹emmR©èÏïààpñâÅþ_E …Âg÷y Ï?~|`` ŸÏôè‘££#“Étpphkksttd³Ù......ƒÃá0Œ¾¾¾‡öôô´´´Ðw•ôõõÙÙÙiµZƒÑØØ¨ÓéÚÛÛ¯_¿>›£Ï²±±qrr²±±;v¬••ÕsÖƒÉtrrb³ÙãÆÓjµæ…–¯R©T*2aáè'ÿ¼è»x<ž•••£££Ísg`³Ù,‹Žß‹Væèê˜êqµ/Øä`Œ „ ! „ !4Gqqqè1Wþþþ¹¹¹áè¥R©üýý)ŠÒ8¡ù}F©TJ’d\\œ>ö´¸¸X*•šÇN–iNE)—Ë
}MTT”P(4³á€õïÝë¿[J"‘sÔüFF–H$tcG(
“ó×C¨T*sssår9}X (ÊüÊN(êçM.—#oQ0ËáÉù|>½Û¥sˆŽ°þgJÒiÌÍÍÍÌÌ4Ý/ÆÈ\¿žù=p“n‹÷o„ÐÐPœŽ–½£D"ÉÌ̉DÆü*Êt›ß/w—–yˆ‹‹“Ëåú Ä9áh<0š÷ñé¾A‹ù_(šÍg7çKƒü¤Å(
ƒ*4ãÃþ³Ìiïc&!¤(ÊÒ~B‘››«¿‹¡û„ Ëf¢û\†Ùl}3¾$ø,©TªR©I’$I244Ôßߥ2ÑÎ'ܶf’$‰NOqq±N§ÃÏ)Ñ „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ ! „ !@ !@ !@ !@`˜1‡b¡><}úô˜1c‚°±±ÑétŒÿ±²²"‚Éd’$Éd2u:N§ëíí%âéÓ§ôß}}}}}}===ôD&“©R©¼½½ñmÁ+úçŸþøã[[[º®H’´²²ê¯IƒÁd2 ‚ §èפ~eöõõ‘$ùäÉ‚ zzz&OžüŠkEêt:|7 hŽ „ € „ € „ € „ € „ € „ €˜¿ÿ´S¦Ì€ IEND®B`‚ parsewiki-0.4.3.orig/doc/manual-en.txt 0100644 0001750 0001750 00000026446 07455364453 016066 0 ustar sto sto {CVS: $Id: manual-en.txt,v 1.3 2002/04/11 19:51:07 villate Exp $ }
{Title: Parsewiki's manual}
{Author: Jaime E. Villate}
{Organization: University of Porto}
{Address: [mailto:villate@gnu.org villate@gnu.org] }
{Version: 0.4}
{Date: April 11, 2002}
{Language: en}
{Abstract: Parsewiki is a program that can transform a text file \
with a very minimal ''Wiki'' style syntax into various other formats, \
including HTML, XHTML, Docbook and LaTeX. This manual \
is also a good example of the type of syntax understood by parsewiki.}
{Copyright: Copyright, 2002 Jaime E. Villate. \
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; without any Invariant \
Sections. A copy of the license is included in the file GFDL.}
= Introduction =
In this manual we introduce a method to create documents, aimed at ease
of writing for the author and keeping the content to the minimum required
without mixing it with commands for presentation of the text. You just have to
know a few basic rules to begin writing documents that can be then transformed
into various documentation formats with the '''parsewiki''' program.
The main advantage of ''wiki'' systems is that a final version of the text can
be easily written down, almost as simply as we write an e-mail message, with a
minimum of formatting tags. The source document can be easily read or sent by
e-mail without scaring people away with strange tags. Another big advantage of
this system is that no matter what the author writes in the source file, there
will always be an output file when processed by parsewiki. There won't be any
syntax errors that prevents the output file to be formed; what might happen is
that the result is not what we expected, but there will be no formating
errors. This way of writing documents has proven to be very useful in websites
created by public contributions, such as the [http://www.wikipedia.com
Wikipedia] encyclopedia.
To begin learning this system, it is recommended that you process this
manual's source file ([[manual-en.txt]]) with ,,parsewiki,, to
produce an HTML version:
parsewiki manual-en.txt > manual-en.html
You should then read the HTML version side by side with the source file, to
understand how the formatting rules work. Those who know how to get a
printable version from a ''Docbook/XML'' or ''LaTeX'' file should also use the
following commands to create Docbook/XML or LaTeX versions of the manual
parsewiki -f docbook manual-en.txt > manual-en.xml
parsewiki -f latex manual-en.txt > manual-en.tex
= Basic rules =
The first rule you must remember is that the text in each line has to start at
the first column. If you leave any space at the beginning of the line, the
whole line will be interpreted as a program listing which will be presented
verbatim in the output file. The lines in this paragraph I am writing have no
space at the beginning, with the result that they are appended together to
form a nicely formatted paragraph; we would not want the same thing to happen
when we present a computer program, in which case we should add space at the
beginning of each line. Consider for instance the following subroutine which
makes part of ,,parsewiki,,:
sub WikiHeading
{
my ($depth, $text) = @_;
$depth = length($depth);
$depth = 5 if ($depth > 5);
return $OpenItem{'h'.$depth} . $text . $CloseItem{'h'.$depth} . "\n";
}
To mark the end of a paragraph, you should leave at least one empty line. The
title of a section should be written in between two = symbols, without any
space at the beginning of the line, but there should be space between the
equal signs and the text; for example:
= Section 1 =
Subsections of various levels are obtained by increasing the number of equal
signs on each side, as in:
=== A third level section ===
= Lists =
There are three types of lists: ordered lists, unnumbered lists and
descriptive lists (glossaries). Each item in a list must go into a single line
and there should not be any empty lines in between two items of the same
list, unless one of them is the last item and the other one is the first item
in a new list. When the contents of an item is too long, you can use the line
continuation character (backslash) to split it into shorter lines.
== Unnumbered lists ==
Each item in an unnumbered list must begin by an asterisk (in the first column
always); consider for instance:
* You may leave space after the asterisks.
* The list ends when a line without a * in the first column is found.
* You can split \
the contents of an item into several \
lines, if you use the line continuation character (\) at the end of \
each line you split.
This sentence is no longer part of the list and it marks the
beginning of a new paragraph, even though no (optional) empty lines were left
on top of it in the source file.
== Ordered Lists ==
# They work in a similar way to the previous ones.
# The difference is that you must use # rather than *.
# We will cover nested lists later on.
== Descriptive lists ==
These are lists of terms, followed by their descriptions, as in a dictionary
or glossary. Each item starts with a semicolon (;) in the first column,
followed by the term, followed by colon (:) and finally the description, all
in a single line. For instance:
;HTML: Used to publish contents on the web or to view it locally \
with a web browser.
;XHTML: The language proposed as a future replacement for HTML, with all the \
advantages associated to XML.
;DocBook: A type of XML documents very much in fashion in the editorial world.
;LaTeX: Without a doubt, the best format to produce scientific texts of high \
quality.
== Nested lists ==
To include a list inside another one, we must increase the ''level'' of
the list (or lists) which should be placed inside another; for instance:
# This is a fist level list
# Within this second item there is a second level list:
** The level is increased by increasing the count of the special character\
in the first column.
** In this case we have used two asterisks instead of one.
# We continue here with our initial list. If we wanted this item to start\
a new list, we would have left a blank line.
# For instance, we just started here a new list.
# Which will include a descriptive list:
;;option -t: A file containing a template to be used instead of the default\
one.
;;option -f: Output format. It can be:
*** html
*** xhtml
*** docbook
*** latex
# The list ends here.
= Hyperlinks =
Any time we write a URL, for example http://www.usemod.com/cgi-bin/wiki.pl,
it will be recognized by '''parsewiki''' and a link to the URL will appear in
the output format. If you want to associate some text to the link, you should
write the URL, followed by the text, inside square brackets and without
leaving any spaces after [. Example: I am a proud member of
[http://www.gnu.org The GNU Project].
Internal links for which a URL without starting ,,http://,, is given, will
have to be inside double brackets, [[ and ]], to be recognized as such. For
instance, if the source file for this manual is in the same directory where
the HTML version has been generated, the HTML page will have a link to the
source file here: [[manual.txt]]. Or if you want to use some text:
[[manual.txt Source file for this manual]].
= Figures =
If a URL ends with a name with an extension recognized as a graphic file
viewable by web browsers, the URL will be replaced by the image (when the
selected output file format is HTML or XHTML).
For example http://savannah.gnu.org/icons/back.png
If you want the figure to be detached from the text, you should
place it into a separate paragraph:
http://savannah.gnu.org/images/floating.jpg
(This figure will only appear in the HTML and XHTML versions, because the
other formats do not support the display of figures on the web).
If we associate some text to the URL of the figure, rather than being
displayed on the page, a hyperlink to it will be given:
[http://www.gnu.org/graphics/gnu-head-sm.jpg GNU's Logo]
If the figure is inside a local directory, its complete path and filename
should be given inside [[ and ]]. It is necessary that the filename end with
one of the extensions recognized by ,,parsewiki,,
jpg jpeg png bmp gif
(which can go in upper case too). If that's not the case, it will be necessary
to create a version in one of those formats. In the case of a LaTeX file
obtained with ,,parsewiki,,, even if we use one of those formats, it is a file
with the same name but with extension ,,.ps,, or ,,.eps,,, will be required by
,,dvips,,; if ,,pdflatex,, is used instead, it will expect to find files
ending on ,,.jpg,,, ,,.jpeg,,, or ,,pdf,,.
This manual comes with a vector figure ,,barra.ps,, which comes in PNG format
too (,,barra.png,,). It can be seen in all the output formats if we use:
[[barra.png]]
The PostScript version produced by ,,latex,, and ,,dvips,, will use the file
,,barra.ps,,. The PDF version obtained with ,,pdflatex,, will use the file
,,barra.png,,, since the file ,,barra.pdf,, does not exist.
= Other fonts =
You can get italics by using two consecutive apostrophes, or using the
HTML tag : ''like this'' or
like this. Bold face is obtained with
three apostrophes or the tag: '''3 apostrophes''' or
strong. To obtain fixed-space font, as in a typewriter, you
should use two consecutive commas, or the tag ; for
instance ",,ls --color,,".
In the three cases the text in a different font should be inside a single
line; looking at the source file of this manual, you will see that I have just
used that feature to typeset the tag
without a companion (I've done it again :-). If the text is too long,
use backslashes to split it.
= Meta information =
Some optional information about the document can be included within the front
matter, by using the syntax: {name: contents}. If ''name'' is one of the
following:
title author date organization address version abstract copyright
the companion contents will be displayed in the document's front matter.
You can use any other name not included in the list, but its content will be
silently ignored, unless you redefine the output template used.
All meta information should be together, at the beginning of the document, and
with no spaces at the beginning of the lines. Otherwise it might be
interpreted as normal text.
= Templates ==
In any of the four output formats that ,,parsewiki,, can produce, the output
file is created from default templates. In the directory ,,templates,,
distributed with this package you can find copies of the default
templates. You can use them as a model to create custom templates. For
example, if we have created a custom template in ,,~/template.tex,,, it can be
used giving a ,,-t,, option to ,,parsewiki,,: parsewiki -f latex -t
~/template.tex file.txt > file.tex
= Conclusions =
The simple system we have introduced in this manual allows us to create simple
documents in an easy and fast way. Due to its simplicity, you should not
expected to work for more complex documents; however, this method can be used
to create an initial version which can then be further developed working on
the LaTeX or DocBook file created with this method.
This is a preliminary beta release, and probably filled with bugs. Among the
future development plans are the implementation of tables, bibliographies and
figures captions.
parsewiki-0.4.3.orig/doc/barra.ps 0100644 0001750 0001750 00000007344 07455272163 015073 0 ustar sto sto %!PS-Adobe-2.0
%%Title: barra.ps
%%Creator: Jaime E. Villate
%%CreationDate: July 7 1999
%%BoundingBox: 45 410 260 530
%%EndComments
%
% Created with psimage (http://www.fe.up.pt/~villate/psimage.html)
% PostScript prologue psimage.pro
/in {72 mul} def /cm {28.3465 mul} def /pi 3.141592 def /Graylevels 50 def
/Box{2 copy 0 exch rlineto 0 rlineto 0 exch neg rlineto neg 0 rlineto}def
/Circle{3 copy add moveto 90 450 arc}def
/Boost{3 copy 3 1 roll translate rotate}def
/Unboost{neg rotate neg exch neg exch translate}def
/Succ{Boost currentlinewidth dup -2 mul 1 index 10 mul dup 270 215 arcn
0 0 moveto dup -2 mul exch -10 mul dup neg 90 145 arc 0 0 moveto Unboost}def
/Displacement{dup 0 eq{pop abs}{exch dup 0 eq{pop abs}{dup mul exch dup mul add
sqrt}ifelse}ifelse}def
/Setgray {1 exch sub currentcmykcolor pop 4 3 roll setcmykcolor} def
/Font {findfont dup length dict begin {1 index /FID ne {def} {pop pop}
ifelse} forall /Encoding ISOLatin1Encoding def currentdict end /Currentfont
exch definefont exch dup /Currentfontscale exch def scalefont setfont} def
/Pathlength{1 dict begin /l 0 def flattenpath {moveto}{ currentpoint 2 index
sub exch 3 index sub Displacement l add /l exch def moveto}{ }{ }pathforall
l end}def
/Gradient{8 dict begin 2 index xcheck{gsave 3 1 roll /G2 exch def
/G1 Currentgray def gsave dup exec Pathlength 3 2 roll mul G2 G1 sub
exch div /Conv exch def grestore exec flattenpath{newpath moveto}
{currentpoint 4 3 roll 3 2 roll sub 3 1 roll sub 2 copy Displacement
Conv mul dup G1 add /G1 exch def 3 index 4 1 roll G1 G2 gt{G2 exch
G1 G2 sub exch div 1 exch sub}{pop G1 1}ifelse Gradient G1 G2 ge
{exit}{G1 Setgray}ifelse}{ }{ }pathforall pop grestore}
{3 1 roll /G4 exch def /G3 currentgray def /N G4 G3 sub abs Graylevels
mul ceiling def N 1 add div 1 index mul /Y exch def N 1 add div mul
/X exch def G3 G4 G3 sub dup 0 eq{1 add}{N div}ifelse G4
{gsave Setgray dup X Y Tile fill grestore X Y rmoveto}for pop}
ifelse end}def
/Tile{dup xcheck{currentpoint moveto 2 copy exch exec exec reversepath exec
exec}{currentpoint moveto 2 copy 4 index exec rlineto reversepath
rlineto exec}ifelse}def
%%EndProlog
0.6 setlinewidth 0 setgray
% barra
93 465 2 0 360 arc 215 465 moveto 217 465 2 -180 180 arc
93 460 moveto 217 465 5 270 90 arc 93 465 5 90 270 arc closepath
gsave 0.7 setgray eofill grestore stroke
% cilindros
75 460 5 350 190 arc 75 460 3 190 350 arcn closepath
gsave 0.8 setgray fill grestore stroke
235 460 5 350 190 arc 235 460 3 190 350 arcn closepath
gsave 0.8 setgray fill grestore stroke
0.3 setgray
65 420 moveto {0 40 rlineto} 10 0 0.9 1 Gradient
85 420 moveto {0 40 rlineto} -10 0 0.9 1 Gradient
225 420 moveto {0 40 rlineto} 10 0 0.9 1 Gradient
245 420 moveto {0 40 rlineto} -10 0 0.9 1 Gradient
0 setgray
65 420 moveto 20 40 Box stroke
225 420 moveto 20 40 Box stroke
% techo
55 520 moveto currentpoint 200 5 Box 0.5 setgray fill
moveto 200 0 rlineto 0 setgray stroke
% cuerdas
0.8 setlinewidth
75 463 moveto 84 507 9 180 0 arcn 0 -40 rlineto stroke
235 463 moveto 226 507 9 0 180 arc 0 -40 rlineto stroke
% poleas
0.5 setlinewidth
84 507 9 Circle gsave 0.6 setgray fill grestore stroke
226 507 9 Circle gsave 0.6 setgray fill grestore stroke
79 520 moveto 84 507 5 180 360 arc 0 13 rlineto closepath
gsave 0.9 setgray fill grestore stroke
221 520 moveto 226 507 5 180 360 arc 0 13 rlineto closepath
gsave 0.9 setgray fill grestore stroke
84 507 1 0 360 arc fill 226 507 1 0 360 arc fill
% flechas
93 458 moveto 0 -10 rlineto 124 0 rmoveto 0 10 rlineto
93 452 moveto currentpoint 180 Succ 55 0 rlineto 14 0 rmoveto
55 0 rlineto currentpoint 0 Succ stroke
10 /Times-Roman Font
97 475 moveto (A) show 204 475 moveto (B) show
10 /Times-Italic Font
150 447 moveto (L) show
showpage
parsewiki-0.4.3.orig/doc/manual-es.txt 0100644 0001750 0001750 00000027404 07455364514 016064 0 ustar sto sto {CVS: $Id: manual-es.txt,v 1.8 2002/04/11 19:51:40 villate Exp $ }
{Título: Manual de parsewiki}
{Autor: Jaime E. Villate}
{Organización: Universidad de Porto}
{Dirección: [mailto:villate@gnu.org villate@gnu.org] }
{Versión: 0.4}
{Fecha: 11 de abril de 2002}
{Idioma: es}
{Resumen: Parsewiki es un programa que permite transformar un fichero \
de texto, con alguna sintaxis simple al estilo ''Wiki'', en \
varios formatos que incluyen HTML, XHTML, Docbook y LaTeX. Este manual \
sirve también como ejemplo del tipo de sintaxis que se puede usar \
en el fichero de texto.}
{Copyright: Copyright, 2002 Jaime E. Villate. \
Se otorga permiso para copiar, distribuir y/o modificar este documento \
bajo las condiciones de la Licencia GNU para Documentación Libre, \
versión 1.1 o posterior, publicada por la ''Free Software Foundation'', \
sin secciones invariantes. Una copia de la licencia se encuentra \
en el fichero GFDL.}
= Introducción =
El método que proponemos en este manual para producir documentos, tiene como
objetivo facilitarle al usuario la escritura del documento y separar al máximo
el contenido de la presentación. Basta saber unas pocas reglas de sintaxis
para comenzar a escribir documentos que después pueden generar varios formatos
diferentes cuando se procesa con '''parsewiki'''.
La ventaja de los sistemas ''wiki'' es permitir que se pueda escribir
rápidamente la versión final, con marcas de formatación mínimas, de forma casi
tan simple como escribir solo texto. El texto fuente es de muy fácil lectura y
hasta se puede enviar en mensajes de correo, sin asustar a nadie con marcas
extrañas. Otra grande ventaja de este sistema es que no interesa lo que se
escriba en el fichero fuente, siempre habrá un fichero de salida. Nunca habrán
errores que impidan la formatación del fichero; puede ocurrir que el resultado
no esté formatado como esperabamos, pero nunca habrán errores de sintaxis.
Esta forma de escritura de documentos ha resultado ser muy útil en la creación
de sitios en la web donde cualquier persona puede contribuir, como por ejemplo
la enciclopedia [http://www.wikipedia.com Wikipedia].
Para aprender a usar este sistema, se recomienda usar el documento fuente de
este manual ([[manual-es.txt]]) procesándolo con ,,parsewiki,, para
producir una versión HTML:
parsewiki manual-es.txt > manual-es.html
Después conviene leer simultamente las dos versiones, comparándolas para
entender como funcionan las reglas de formatación. Quien sepa como procesar
un fichero ''Docbook/XML'' o ''LaTeX'' para obtener una versión imprimible,
podrá también usar los siguientes comandos para obtener un fichero Docbook/XML
o LaTeX
parsewiki -f docbook manual-es.txt > manual-es.xml
parsewiki -f latex manual-es.txt > manual-es.tex
= Reglas elementales =
La primera regla que se debe tener en cuenta para escribir un documento
es que el texto en cada línea debe comenzar en la primera columna. Si dejamos
espacio al comienzo de la línea, esta será interpretada como parte de un
listado de programa y será presentada en forma textual en el fichero de
salida. Las líneas de este párrafo no tienen ningún espacio en blanco inicial,
de manera que serán unidas rellenando los márgenes del bloque que ocupa el
párrafo; el mismo comportamiento no sería adecuado para un listado de un
programa, siendo preciso insertar espacios al comienzo de cada línea. Por
ejemplo, una de las subrutinas del programa ,,parsewiki,, es la siguiente:
sub WikiHeading
{
my ($depth, $text) = @_;
$depth = length($depth);
$depth = 5 if ($depth > 5);
return $OpenItem{'h'.$depth} . $text . $CloseItem{'h'.$depth} . "\n";
}
Para terminar un párrafo y comenzar otro, dejamos por lo menos una línea en
blanco. El título de una sección se escribe entre dos símbolos =, sin dejar
espacio al comienzo de la línea, pero dejando espacio entre los símbolos = y
el texto del título; por ejemplo:
= Sección 1 =
Para subsecciones de varios niveles, se usa más que un símbolo =; por
ejemplo:
=== Sección de nivel 3 ===
= Listas =
Existen tres tipos de listas: listas sin enumerar, listas enumeradas y listas
descriptivas (glosarios). Cada item en una lista debe ocupar apenas una línea
y no se deben dejar líneas en blanco a menos que se quiera cerrar la lista.
Cuando el contenido de un item sea muy largo podemos cortar una línea,
colocando un \ al final para indicar que la línea continua en la siguiente.
== Listas sin enumerar ==
Cada item en una lista sin enumerar debe comenzar por un asterisco (siempre
en la primera columna); por ejemplo:
* Se puede dejar o no espacio después de cada asterisco.
* La lista acaba cuando aparezca una línea con algo diferente de * en la primera columna.
* Podemos distribuir \
el contenido de cada item en varias \
líneas, si usamos el caracter de continuación de línea (\).
Esta parte del texto ya no hace parte de la lista, y ha comenzado un
nuevo párrafo, a pesar de que no hemos dejado línea en blanco en el fichero
fuente (opcional).
== Listas enumeradas ==
# Funcionan de forma semejante a las anteriores.
# La diferencia es que en vez de *, se usa #.
# Ya veremos más adelante como incluir una lista dentro de otra.
== Listas descriptivas ==
Son listas con términos seguidos de descripciones, como un diccionario o un
glosario. Cada item comienza con un punto y coma (;) en la primera columna,
seguido por el termino, seguido por dos puntos (:) y finalmente la
definición, todo en una misma línea. Por ejemplo:
;HTML: Usado para publicar contenido en la web o para consultar localmente \
con un navegador web.
;XHTML: El lenguaje propuesto para substituir al HTML, con todas las \
ventajas del XML.
;DocBook: Un tipo de documentos XML muy de moda en el mundo editorial.
;LaTeX: Sin duda el mejor formato para producir textos científicos de buena \
calidad.
== Listas anidadas ==
Para incluir una lista dentro de otra, se le debe aumentar el '''nivel'''
a la lista (o las listas) que estén dentro; por ejemplo:
# Esta es una lista de nivel 1
# Dentro de este segundo item viene una lista de nivel 2:
** El nivel se aumenta aumentando el número de caracteres iniciales.
** En este caso hemos usado 2 asteriscos en vez de uno.
# Aquí continuamos con nuestra lista inicial. Si quisiéramos que este\
item comenzara una nueva lista independiente de la primera, habríamos\
dejado una línea en blanco.
# Por ejemplo aquí hemos comenzado una nueva lista.
# Que incluirá una lista descriptiva:
;;opción -t: Un fichero con una plantilla que será usada en vez de la\
estándar.
;;opción -f: Formato de salida. Puede ser:
*** html
*** xhtml
*** docbook
*** latex
# Aquí termina la lista.
= Enlaces (hyperlinks) =
Siempre que se escriba una URL como por ejemplo
http://www.usemod.com/cgi-bin/wiki.pl, será reconocida por '''parsewiki'''
y aparecerá con un enlace a la respectiva URL. Para poder asociar un texto
al enlace, se escribe la URL seguida por el texto, dentro de los caracteres
[ y ] sin dejar espacio después de [. Ejemplo: tengo mucho orgullo en ser
miembro del [http://www.gnu.org Proyecto GNU].
Enlaces "internos", con una URL que no comienza por ,,http://,, se tendrán
que escribir entre [[ y ]]. Por ejemplo, si el documento fuente de este
manual está en el mismo directorio donde ha sido generada la versión HTML,
la página HTML tendrá un enlace al fichero fuente aquí: [[manual-es.txt]].
O usando algún texto: [[manual-es.txt Fichero fuente de este manual]].
= Figuras =
Si una URL termina con un nombre de fichero con una extensión reconocida
como un formato gráfico visible por los navegadores web, la URL será
substituida por la imagen (cuando el formato de salida sea HTML o XHTML).
Por ejemplo http://savannah.gnu.org/icons/back.png
Si queremos que la figura aparezca aparte del texto, la pondremos dentro de
un párrafo separado:
http://savannah.gnu.org/images/floating.jpg
(Esta figura solo se verá en las versiones HTML y XHTML pues en los otros
formatos no se puede mostrar una figura en algún lugar de la web).
Si asociamos algún texto a la URL de la figura, en vez de aparecer la figura
dentro del documento, obtendremos un enlace a la figura:
[http://www.gnu.org/graphics/gnu-head-sm.jpg Logotipo de GNU]
Si la figura se encuentra dentro de un directorio local, el camino y nombre
completo deberán ser escritos dentro de [[ y ]]. Es necesario que el nombre de
la figura termine en alguna de las extensiones reconocidas por ,,parsewiki,,
jpg jpeg png bmp gif
(que pueden ir también en mayúsculas). Si no es así, será necesario crear una
versión en alguno de estos formatos. En el caso de LaTeX producido con
,,parsewiki,,, a pesar de que se use uno de estos formatos, se esperará que
exista el mismo fichero pero con extensión ,,.ps,, o ,,.eps,,, cuando se use
,,dvips,,; si se usa ,,pdflatex,, en vez, este esperará encontrar la ficheros
terminados en ,,.jpg,,, ,,.jpeg,,, ,,.png,, o ,,pdf,,.
Con este manual se distribuye una figura vectorial ,,barra.ps,, que
también viene en formato PNG (,,barra.png,,). La podremos ver en todos los
formatos de salida así:
[[barra.png]]
La versión PostScript obtenida con ,,latex,, y ,,dvips,,, usará el fichero
,,barra.ps,,. La versión PDF producida por ,,pdflatex,, usará el fichero
,,barra.png,,, ya que no existe en este caso un fichero ,,barra.pdf,,.
= Otros tipos de letras =
Se puede obtener letra itálica usando dos apóstrofos seguidos, o usando una
marca como en HTML: ''así'' o también
así. Para letra negrilla
se usan tres apóstrofos o la marca : '''3 comillas''' o
strong. Para obtener letra de espacios fijos, como en una
máquina de escribir, se usan dos comas seguidas o la marca ; por
ejemplo ",,ls --color,,".
En los 3 casos el texto en letra diferente debe estar dentro de una única
línea; observando el código fuente de este manual se verá que he usado
ese característica para evitar confusiones cuando escribí la marca
sin una compañera (lo he vuelto a hacer :-). Si el texto es muy largo,
se puede usar el caracter de continuación de línea.
= Meta información =
Alguna información opcional sobre el documento puede ser incluida al comienzo,
usando la sintaxis: {nombre: contenido}. Si ''nombre''
es alguno de los siguientes:
title author date organization address version abstract copyright
el respectivo contenido será usado en la parte inicial del documento. Se puede
usar cualquier otro nombre que no esté en la lista, pero su contenido será
ignorado, a menos que
modifiquemos la plantilla usada normalmente.
La meta información sobre un documento deberá estar toda al comienzo, antes
de cualquier otro texto, y cada conjunto {nombre: contenido} debe ocupar
una única línea. De lo contrario sería procesado como texto normal.
= Plantillas ==
El fichero de salida, en cualquiera de los cuatro formatos que puede producir
,,parsewiki,, se crea a partir de unas plantillas definidas por el
propio programa. En el subdirectorio ,,templates,, que se distribuye
con este programa vienen copias de las 4 plantillas usadas intrínsecamente.
Se pueden usar como modelo para producir otras plantillas diferentes que se
ajuste al formato que queramos producir. Si por ejemplo hemos modificado
la plantilla para LaTeX y la hemos puesto en
,,~/plantilla.tex,, la podremos usar por medio de la opción
,,-t,, de parsewiki:
parsewiki -f latex -t ~/plantilla.tex fichero.txt > fichero.tex
= Conclusiones =
El sistema simple que hemos documentado en este manual permite crear
documentos sencillos de forma fácil y rápida. Debido a su sencillez, no es
posible esperar que se pueda usar el mismo sistema para documentos más
complicados; sin embargo este método
puede servir como base para crear una versión inicial que después se puede
volver más completa trabajando sobre el fichero LaTeX o DocBook creado con
este método.
Esta es una versión beta y por eso probablemente esté llena de
errores. Entre los planes inmediatos se encuentran la implementación de
tablas, bibliografías e figuras con leyendas.
parsewiki-0.4.3.orig/doc/manual-pt.txt 0100644 0001750 0001750 00000027000 07455364535 016073 0 ustar sto sto {CVS: $Id: manual-pt.txt,v 1.6 2002/04/11 19:51:57 villate Exp $ }
{Título: Manual de parsewiki}
{Autor: Jaime E. Villate}
{Organização: Universidade do Porto}
{Endereço: [mailto:villate@gnu.org villate@gnu.org] }
{Versão: 0.4}
{Data: 11 de Abril de 2002}
{Língua: pt}
{Resumo: Parsewiki é um programa que permite transformar um ficheiro \
de texto, com alguma sintaxe simples do estilo ''Wiki'', em \
vários outros formatos que incluem HTML, XHTML, Docbook e LaTeX. Este manual \
serve também como exemplo do tipo de sintaxe que pode ser usada \
no ficheiro de texto.}
{Copyright: Copyright, 2002 Jaime E. Villate. \
Autoriza-se a copia, distribuição e/ou modificação deste documento \
sob as condições da Licencia GNU para Documentação Livre, \
versão 1.1 ou posterior, publicada pela ''Free Software Foundation'', \
sem secções invariantes. Uma cópia da licença encontra-se \
no ficheiro GFDL.}
= Introdução =
O método que propomos neste manual para produzir documentos, tem como
objectivo facilitar ao utilizador a escrita do documento e separar ao máximo
o conteúdo da apresentação. Basta saber umas poucas regras de sintaxe
para começar a escrever documentos que depois podem gerar vários formatos
diferentes quando processados com '''parsewiki'''.
A vantagem dos sistemas ''wiki'' é permitir que possa ser escrita rapidamente
uma versão final, com marcas de formatação mínimas, de forma quase tão simples
como escrever texto numa mensagem de correio. O texto fonte pode ser lido
facilmente e até enviado em mensagens de correio, sem assustar a ninguém com
marcas estranhas. Uma outra grande vantagem deste sistema é que
independentemente do que for escrito no ficheiro fonte, sempre teremos um
ficheiro de saída. Nunca aparecerão erros que impeçam a criação do ficheiro
final; pode acontecer que o resultado não seja o esperado, mas nunca existirão
erros de sintaxe. Esta forma de escrever documentos tem resultado ser muito
útil na criação de sites na web onde qualquer pessoa pode contribuir, como por
exemplo a enciclopédia [http://www.wikipedia.com Wikipedia].
Para aprender a usar este sistema, recomenda-se usar o documento fonte
deste manual ([[manual-pt.txt]]) processando-lo com ,,parsewiki,, para
produzir uma versão HTML:
parsewiki manual-pt.txt > manual-pt.html
Depois convém ler em simultâneo as duas versões, comparando-as para
entender o funcionamento das regras de formatação. Quem souber processar
um ficheiro ''Docbook/XML'' ou ''LaTeX'' para obter uma versão para impressão,
poderá também usar os seguintes comandos para obter um ficheiro Docbook/XML
ou LaTeX
parsewiki -f docbook manual-pt.txt > manual-pt.xml
parsewiki -f latex manual-pt.txt > manual-pt.tex
= Regras elementares =
A primeira regra a ter em conta para escrever um documento
é que o texto em cada linha deve começar na primeira coluna. Se deixarmos
espaço no começo da linha, esta será interpretada como parte de uma listagem
de programa e será apresentada textualmente no ficheiro de saída. As linhas de
este parágrafo não têm qualquer espaço inicial, o que faz com que sejam unidas
preenchendo as margens do bloco que ocupa o parágrafo; o mesmo comportamento
não será apropriado no caso de apresentarmos um fragmento de código de um
programa, sendo preciso inserir espaços no inicio de cada linha. Por exemplo,
uma subrutina no programa ,,parsewiki,, é:
sub WikiHeading
{
my ($depth, $text) = @_;
$depth = length($depth);
$depth = 5 if ($depth > 5);
return $OpenItem{'h'.$depth} . $text . $CloseItem{'h'.$depth} . "\n";
}
Para terminar um parágrafo e começar outro, deixamos pelo menos uma linha em
branco. O título de uma secção escreve-se entre dois símbolos =, sem deixar
espaço no começo da linha, mas deixando espaço entre os símbolos = e o texto
do título; por exemplo:
= Secção 1 =
Para subsecções de vários níveis, usa-se mais do que um símbolo =; por
exemplo:
=== Secção de nível 3 ===
= Listas =
Existem três tipos de listas: listas sem enumerar, listas enumeradas e listas
descritivas (glossários). Cada item numa lista deve ocupar apenas uma linha
e não devem ser deixadas linhas em branco a menos que quisermos fechar a lista.
Quando o conteúdo de um item for muito comprido, poderemos cortar uma linha,
colocando um \ no fim para indicar que a linha continua na seguinte.
== Listas sem enumerar ==
Cada item numa lista sem enumerar deve começar por um asterisco (sempre
na primeira coluna); por exemplo:
* Pode-se deixar ou não espaço a seguir a cada asterisco.
* A lista termina quando aparecer uma linha com algo diferente de * na primeira coluna.
* Podemos distribuir \
o conteúdo de cada item em várias \
linhas, se usarmos o caracter de continuação de linha (\).
Esta parte do texto já não faz parte da lista, e vai fazer com que comece um
novo parágrafo, a pesar de não termos deixado linha em branco no ficheiro
fonte (a linha em branco neste caso é optativa).
== Listas enumeradas ==
# Funcionam em forma semelhante às anteriores.
# A diferença está em que em vez de *, usa-se #.
# Já veremos mais para a frente como incluir uma lista dentro de outra.
== Listas descritivas ==
São listas de termos seguidos pelas suas descrições, como um dicionário ou un
glossário. Cada item começa com ponto e coma (;) na primeira coluna,
seguido pelo termo, seguido por dois pontos (:) e finalmente a sua
definição, tudo na mesma linha. Por exemplo:
;HTML: Usado para publicar conteúdo na Web ou para consultar localmente \
com um navegador web.
;XHTML: A linguagem proposta para substituir ao HTML, com todas as \
vantagens do XML.
;DocBook: Um tipo de documentos XML muito na moda no mundo editorial.
;LaTeX: Sem dúvida o melhor formato para produzir textos científicos de boa \
qualidade.
== Listas dentro de outras listas ==
Para incluir uma lista dentro de outra, deve-se aumentar o '''nível'''
da lista (ou as listas) que estejam dentro das outras; por exemplo:
# Esta é uma lista de nível 1
# Dentro de este segundo item vem uma lista de nível 2:
** O nível aumenta-se aumentando o número de caracteres iniciais.
** Neste caso temos usado 2 asteriscos em vez de um.
# Aqui continuamos com a nossa lista inicial. Se quiséssemos que este\
item começa-se uma nova lista independente da primeira, teríamos\
deixado uma linha em branco.
# Por exemplo aqui começámos uma nova lista.
# Que incluirá uma lista descritiva:
;;opção -t: Um ficheiro com um modelo que será usado em vez do modelo\
padrão.
;;opção -f: Formato de saída. Pode ser:
*** html
*** xhtml
*** docbook
*** latex
# Aqui termina a lista.
= Enlaces (hyperlinks) =
Sempre que se escrever uma URL como por exemplo
http://www.usemod.com/cgi-bin/wiki.pl, será reconhecida por '''parsewiki'''
e aparecerá com um enlace à respectiva URL. Para associar um texto
ao enlace, escreve-se a URL seguida pelo texto, dentro dos caracteres
[ e ] sem deixar espaço depois de [. Exemplo: orgulho-me de ser membro do
[http://www.gnu.org Projecto GNU].
Enlaces "internos", com uma URL que não começa por ,,http://,, terão
de ser escritos entre [[ e ]]. Por exemplo, se o documento fonte de este
manual estiver no mesmo directório onde foi gerada a versão HTML,
a página HTML terá um enlace ao ficheiro fonte aqui: [[manual-pt.txt]].
Ou se quiser usar algum texto: [[manual-pt.txt Ficheiro fonte de este manual]].
= Figuras =
Se uma URL terminar com um nome de ficheiro que tem uma extensão reconhecida
como um formato gráfico visível pelos navegadores web, a URL será
substituída pela imagem (quando o formato de saída for HTML ou XHTML).
Por exemplo http://savannah.gnu.org/icons/back.png
Se quisermos que a figura apareça aparte do texto, deverá ser posta num
parágrafo separado:
http://savannah.gnu.org/images/floating.jpg
(Esta figura só aparecerá nas versões HTML e XHTML pois nos outros
formatos não é possível apresentar figuras algures na web).
Se associarmos algum texto à URL da figura, em vez de aparecer a figura
dentro do documento, obteremos um enlace para a figura:
[http://www.gnu.org/graphics/gnu-head-sm.jpg Logotipo de GNU]
Se a figura se encontrar dentro dum directório local, o caminho e nome
completo deverão ser escritos dentro de [[ e ]]. É necessário que o nome da
figura termine em alguma das extensões reconhecidas por ,,parsewiki,,
jpg jpeg png bmp gif
(que podem vir também em maiúsculas). Se assim não for, será necessário criar
uma versão em algum desses formatos. No caso de LaTeX produzido com
,,parsewiki,,, a pesar de se usar um destes formatos, espera-se que exista o
mesmo ficheiro mas com extensão ,,.ps,, ou ,,.eps,,, quando se usar
,,dvips,,; se for usado ,,pdflatex,, em vez, este esperará encontrar ficheiros
terminados em ,,.jpg,,, ,,.jpeg,,, ,,.png,, ou ,,.pdf,,.
Junto com este manual distribui-se uma figura vectorial ,,barra.ps,, que
também vem em formato PNG (,,barra.png,,). Poderemos vé-la em todos os
formatos de saída assim:
[[barra.png]]
A versão PostScript obtida com ,,latex,, e ,,dvips,, usará o ficheiro
,,barra.ps,,. A versão PDF produzida por ,,pdflatex,, usará o ficheiro
,,barra.png,,, já que não existe neste caso um ficheiro ,,barra.pdf,,.
= Outros tipos de letras =
Pode-se obter letra itálica usando dois apóstrofos seguidos, ou usando uma
marca como em HTML: ''assim'' ou também
assim. Para letra bold
usam-se três apóstrofos ou a marca : '''3 apóstrofos''' ou
strong. Para obter letra com espaçamento constante, como
numa máquina de escrever, usam-se duas comas ou a marca ; por
exemplo ",,ls --color,,".
Nos 3 casos o texto em letra diferente deve estar dentro de uma única
linha; observando o código fonte de este manual ver-se-á que tenho usado
essa característica para evitar confusões quando escrevi a marca
sem uma companheira (e mais uma vez o mesmo truque :-). Se o texto
for muito comprido, pode-se usar o caracter de continuação de linha.
= Meta informação =
Alguma informação optativa sobre o documento pode ser incluída no começo,
usando a sintaxe: {nome: conteúdo}. Se ''nome'' for algum na lista a seguir:
title author date organization address version abstract copyright
o correspondente conteúdo será usado na parte inicial do documento.
Pode-se usar qualquer outro nome que no não esteja na lista, mas o seu
conteúdo será ignorado, a menos que
modifiquemos o modelo usado normalmente.
A meta informação sobre um documento deverá vir toda ao começo do documento,
antes de qualquer outro texto, e cada conjunto {nome: conteúdo} deverá
ocupar uma única linha. De outra forma seria processado como texto normal.
= Modelos ==
O ficheiro de saída, em qualquer um dos quatro formatos que podem ser
produzidos por ,,parsewiki,, cria-se
a partir de uns modelos definidos pelo
próprio programa. O subdirectório ,,templates,, no arquivo distribuído
com este programa traz cópias dos 4 modelos usados intrinsecamente.
Podem ser usados como base para produzir outros modelos diferentes que se
ajustem ao formato desejado. Se, por exemplo, temos modificado
o modelo para LaTeX ficando no ficheiro
,,~/modelo.tex,,, poderemos usá-lo por meio da opção ,,-t,, de parsewiki:
parsewiki -f latex -t ~/modelo.tex ficheiro.txt > ficheiro.tex
= Conclusões =
O sistema simples que temos documentado neste manual permite criar
documentos em forma fácil e rápida. Devido à sua simplicidade, não é
possível esperar que possa ser usado o mesmo sistema para documentos mais
complexos; no entanto, este método
pode servir como base para criar uma versão inicial que depois seja
tornada mais complexa a partir do ficheiro LaTeX ou DocBook criado com
este método.
Esta é uma versão beta e por isso provavelmente cheia de erros.
Os planos futuros incluem a implementação de tabelas, bibliografias y figuras
com legendas.
parsewiki-0.4.3.orig/AUTHORS 0100644 0001750 0001750 00000000752 07455273135 013737 0 ustar sto sto {CVS: $Id: AUTHORS,v 1.1 2002/04/11 11:41:17 villate Exp $ }
= Authorship of Parsewiki =
*Parsewiki has been developed by Jaime E. Villate .
*Significant parts of the code were taken from \
[http://www.usemod.com/cgi-bin/wiki.pl Mod Use Wiki], \
version 0.92 (April 21, 2001), copyright (C) 2000-2001 by \
Clifford A. Adams .
*Clifford A. Adams code is based on AtisWiki, version 0.3, \
copyright (C) 1998 Markus Denker . parsewiki-0.4.3.orig/README 0100644 0001750 0001750 00000002756 07455334576 013564 0 ustar sto sto {CVS: $Id: README,v 1.6 2002/04/11 16:27:42 villate Exp $ }
= ParseWiki. A simple documentation system based on ASCII text ==
Parsewiki is a Perl script that can be used to produce HTML, XHTML, Latex or
DocBook/XML from a simple ASCII text source document, with minimum syntax
rules (this [[README file]] itself is an example).
== Installation ==
All you have to do is copy the ''parsewiki'' script somewhere where you can
execute it. You need to have ,,perl,, installed; no additional libraries or
perl modules are required.
== Usage ==
Read the [[doc/manual-en.html manual]] that accompanies this
distribution. There are also a ([[/doc/manual-es.html Spanish version]])
and a [[doc/manual-pt.html Portuguese version]]. You should also use
./parsewiki --help
to see a summary of the options and usage of parsewiki.
== Credits ==
This program is based on [http://www.usemod.com/cgi-bin/wiki.pl Mod Use Wiki],
version 0.92 (April 21, 2001) by Clifford A. Adams. Some subroutines are
almost identical to the original ones, except for a few bugs corrected.
A few additional syntax rules were added: the use of ,, for fixed-space
fonts, the provision for figures in a local directory and the use of
meta-information. The generation of the output file was completely
re-implemented using templates, and three more output formats were added,
since ,,Use Mod Wiki,, can only produce HTML.
== Bugs ==
This is a beta version (0.4). Please report bugs to
Jaime Villate .
Porto, Portugal, 2002/04/11
parsewiki-0.4.3.orig/templates/ 0040755 0001750 0001750 00000000000 07455365503 014665 5 ustar sto sto parsewiki-0.4.3.orig/templates/default.html 0100644 0001750 0001750 00000000343 07455353601 017170 0 ustar sto sto
$title
$frontmatter
$page
parsewiki-0.4.3.orig/templates/default.xhtml 0100644 0001750 0001750 00000000457 07455353620 017367 0 ustar sto sto
$title
$frontmatter
$page
parsewiki-0.4.3.orig/templates/default.xml 0100644 0001750 0001750 00000000434 07455353704 017031 0 ustar sto sto
$frontmatter
$page
parsewiki-0.4.3.orig/templates/default.tex 0100644 0001750 0001750 00000001076 07455353755 017042 0 ustar sto sto % Created by parsewiki
\\documentclass\[12pt,a4paper\]\{article\}
\\usepackage\[latin1\]\{inputenc\}
\\usepackage\[$babel\]\{babel\}
\\usepackage\{graphicx\}
\\usepackage\[colorlinks=true,urlcolor=blue\]\{hyperref\}
\\setlength\{\\oddsidemargin\}\{9pt\}
\\setlength\{\\textwidth\}\{425pt\}
\\setlength\{\\evensidemargin\}\{23pt\}
\\setlength\{\\topmargin\}\{28pt\}
\\setlength\{\\headheight\}\{17pt\}
\\setlength\{\\headsep\}\{14pt\}
\\setlength\{\\textheight\}\{45\\baselineskip\}
\\setlength\{\\footskip\}\{26pt\}
\\begin\{document\}
$frontmatter
$page
\\end\{document\}