pax_global_header 0000666 0000000 0000000 00000000064 11762200422 0014506 g ustar 00root root 0000000 0000000 52 comment=8145fba6002ed44be6edee747134f2b209b03acb
kupfer-v208/ 0000775 0000000 0000000 00000000000 11762200422 0013043 5 ustar 00root root 0000000 0000000 kupfer-v208/.gitignore 0000664 0000000 0000000 00000000113 11762200422 0015026 0 ustar 00root root 0000000 0000000 /GIT_VERSION
/build/
/waf
/.waf-*/
/.lock-wscript
/po/untitled.pot
*.pyc
kupfer-v208/COPYING 0000664 0000000 0000000 00000104374 11762200422 0014107 0 ustar 00root root 0000000 0000000
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
kupfer-v208/Documentation/ 0000775 0000000 0000000 00000000000 11762200422 0015654 5 ustar 00root root 0000000 0000000 kupfer-v208/Documentation/Contributing.rst 0000664 0000000 0000000 00000011350 11762200422 0021055 0 ustar 00root root 0000000 0000000
Guidelines and Policy
=====================
Contributing
------------
You can clone git from its official repository at git.gnome.org, see:
http://git.gnome.org/browse/kupfer/
You can structure your changes into a series of commits in git. A series
of well disposed changes is easy to review. Write a sufficient commit
log message for each change. Do not fear writing down details about
why the change is implemented as it is, if there are multiple
alternatives. Also, if you forsee any future possibilites or problems,
please describe them in the commit log.
It is not easy to write good commit messgages, because writing is an
art. It is however essensial, and only by trying it, can you improve.
You may publish your changes by sending an email to the mailing list,
. You can attach your changes as patches, or you
may also just attach a link to your published git repository.
You can find kupfer's `git repository at github`__ and fork it there,
for easy publication of your changes.
If you suggest your changes for inclusion into Kupfer, make sure you
have read the whole *Guidelines and Policy* chapter of this manual. And
take care to structure your changes, do not fear asking for advice. Good
Luck!
__ http://github.com/engla/kupfer
Icon Guidelines
---------------
Consider the following:
* A Leaf is an object, a metaphor for a physical thing. It can have as
detailed icon as is possible.
* An Action is a verb, a command that can be carried out. Choose its
name with care. The icon should be simple, maybe assign the action
to a category, rather than trying to illustrate the action itself.
For example, all text display actions use the "bold style" icon, in
some icon themes simply a bold "A".
.. important::
Actions should have stylized, simple icons. Leaves and Sources
should have detailed, specific icons.
Coding style
------------
Kupfer python code is indented with tabs, which is a bit uncommon. (My
editor is set to tabs of size four.) Otherwise, if you want to
contribute to kupfer keep in mind that
* Python code should be clear
* Kupfer is a simple project. Do simple first. [#simple]_
Python's general style guideline is called `PEP 8`_, and you should
programmers should read it. The advice given there is very useful when
coding for Kupfer.
.. _`PEP 8`: http://www.python.org/dev/peps/pep-0008/
.. [#simple] Writing simple code is more important than you think.
Read your diff (changes) when you are finished writing a
feature. Can you make it more simple to read? If you can
make it simpler, often a more effective algorithm comes out
of it at the same time. All optimizations have a price,
and unless you measure the difference, abstain from
optimizations.
Specific Points
---------------
Using ``rank_adjust``
.....................
A declaration like this can modify the ranking of an object::
class MyAction (Action):
rank_adjust = -5
...
1. Often, this is useless. Don't use it, let Kupfer learn which actions
are important.
2. If the action is destructive, the adjust should be negative. Never
positive. For example *Move to Trash* has a negative 10
``rank_adjust``.
3. If the action is very general, and applies to almost everything but
still should never be the default for anything, the adjust should be
negative.
Using ``super(..)``
...................
Many of kupfer plugin code uses super statements such as::
super(RecentsSource, self).__init__(_("Recent items"))
We have learnt that it is not so practical. Therefore, when writing new
code, you should however use the following style::
Source.__init__(self, _("Recent items"))
Why? Because the second version is easier to copy! If you copy the whole
class and rename it, which you often do to create new plugins, the
second version does not need to be updated -- you are probably using the
same superclass.
Text and Encodings
..................
Care must be taken with all input and output text and its encoding!
Internally, kupfer must use ``unicode`` for all internal text.
The module ``kupfer.kupferstring`` has functions for the most important
text conversions.
Two good resources for unicode in Python are to be found here:
| http://farmdev.com/talks/unicode/
| http://www.amk.ca/python/howto/unicode
**Always** find out what encoding you must expect for externally read
text (from files or command output). If you must guess, use the locale
encoding.
Text received from PyGTK is either already unicode or in the UTF-8
encoding, so this text can be passed to ``kupferstring.tounicode``.
Note that the gettext function ``_()`` always returns a unicode string.
.. vim: ft=rst tw=72 et sts=4
.. this document best viewed with rst2html
kupfer-v208/Documentation/Copyright.rst 0000664 0000000 0000000 00000000641 11762200422 0020357 0 ustar 00root root 0000000 0000000
Copyright
=========
The program Kupfer is released under the
`GNU General Public Licence v3`:t: (or at your option, any later
version). Please see the main program file for more information.
This documentation is released under the same terms as the main
program. The documentation sources are available inside the Kupfer
source distribution.
Copyright 2009–2011 Ulrik Sverdrup
.. vim: ft=rst tw=72 et sts=4
kupfer-v208/Documentation/GTKTheming.rst 0000664 0000000 0000000 00000006643 11762200422 0020360 0 ustar 00root root 0000000 0000000 ====================
GTK+ Theming Support
====================
----------------------------
Changing Kupfer's Appearance
----------------------------
.. contents::
Introduction
============
In Kupfer's new 2011 interface, the interface elements are marked-up so
that they can be changed using GTK+'s normal styling mechanism.
For the general topic of GTK+ themes, read `this excellent tutorial.`__
__ http://live.gnome.org/GnomeArt/Tutorials/GtkThemes
Kupfer's UI can be themed by using the normal GtkRc style language.
Theming can change colors and some pre-defined parameters, but
not the layout.
Example Style
=============
The following example style includes inline comments::
style "dark"
{
## bg: background color
bg[NORMAL] = "#333"
bg[SELECTED] = "#000"
bg[ACTIVE] = "#222"
bg[PRELIGHT] = "#222"
bg[INSENSITIVE] = "#333"
## fg: foreground text color
fg[NORMAL] = "#DDD"
fg[SELECTED] = "#EEE"
fg[ACTIVE] = "#EEE"
fg[PRELIGHT] = "#EEE"
fg[INSENSITIVE] = "#DDD"
## text: text color in input widget and treeview
text[NORMAL] = "#EEE"
text[SELECTED] = "#EEE"
text[ACTIVE] = "#EEE"
text[PRELIGHT] = "#EEE"
text[INSENSITIVE] = "#EEE"
## base: background color in input widget and treeview
base[NORMAL] = "#777"
base[SELECTED] = "#100"
base[ACTIVE] = "#112"
base[PRELIGHT] = "#777"
base[INSENSITIVE] = "#777"
## These are UI Widget style properties with their approximate
## default values. These can all be overidden in the theme.
## The MatchView is the bezel around each pane in the interface
MatchView :: corner-radius = 15
MatchView :: opacity = 95
## The Search controls the result list
Search :: list-opacity = 93
Search :: list-length = 200
## The KupferWindow is the whole main window
KupferWindow :: corner-radius = 15
KupferWindow :: opacity = 85
KupferWindow :: decorated = 0
KupferWindow :: border-width = 8
}
## These are the two defined icon sizes
gtk-icon-sizes="kupfer-small=24,24:kupfer-large=128,128"
To apply this style, it must be matched against the widgets in the UI
using their names, as follows::
## The main window is 'kupfer'
widget "kupfer" style "dark"
widget "kupfer.*" style "dark"
## The window with result list is 'kupfer-list'
widget "kupfer-list.*" style "dark"
## Additional less used items:
## The menu button is '*.kupfer-menu-button'
## The description text is '*.kupfer-description'
## The context menu is '*.kupfer-menu'
Injecting a Custom Style
========================
Any user can override the GTK+ style used for their applications. But
more conventient is injecting the gtkrc at runtime by means of a Kupfer
plugin. See ``kupfer/plugin/customtheme.py`` for an example.
Icons
=====
The kupfer-specific icon names we use are:
+ ``kupfer`` (application)
+ ``kupfer-catalog`` (root catalog)
+ ``kupfer-execute`` (default action icon)
+ ``kupfer-launch`` (default launch icon)
+ ``kupfer-object`` (blue box generic object icon)
+ ``kupfer-object-multiple`` (multiple generic objects)
.. vim: ft=rst tw=72 et sts=4 sw=4
.. this document best viewed with rst2html
kupfer-v208/Documentation/Localization.rst 0000664 0000000 0000000 00000005433 11762200422 0021043 0 ustar 00root root 0000000 0000000
Localization
============
kupfer is translated using gettext and it is managed in the build system
using ``intltool``. Translation messages are located in the ``po/``
directory.
Kupfer's localizations are listed among GNOME's modules. Its homepage
is:
http://l10n.gnome.org/module/kupfer/
You can download the latest version of your language's translation file
there, if Kupfer is already translated to your language.
.. contents::
To create a new translation
---------------------------
Go into the directory ``po``
1. Add the language code ``$LANG`` to the file ``LINGUAS``
2. Run ``intltool-update --pot``, and copy ``untitled.pot`` to ``$LANG.po``
3. Edit and check the whole file header:
+ Write in yourself as author
+ Check ``plurals`` (copy from a language that you know uses the same
number of plural forms, or look up in GNOME's translation pages.)
+ Replace everything written in CAPS
Fill in the charset used; Kupfer translations *must* use the UTF-8 encoding.
When the header is filled-in, go to `To update or check an existing
translation`_
To update or check an existing translation
------------------------------------------
Go to your Kupfer source directory.
Here we will call your language ``$LANG``. You should use a two or
four-letter code for your language instead of ``$LANG``, for example
"de" for German or "pt_BR" for Brazilian Portuguese.
Go to the translation directory ``po``::
cd po/
To update and check the translation file, run::
intltool-update $LANG
Now check and edit ``$LANG.po``. Search for all messages marked "fuzzy",
and remove the word "fuzzy" from them when they are done.
Continue running ``intltool-update $LANG`` and check that you have 0
fuzzy and 0 untranslated, then you're finished.
This will also check consistency of the file, so that you know that all
your syntax is correct.
If you want to send in the translation to a repository, or as a patch,
you can use git if you have a checked-out copy of kupfer::
git add po/$LANG.po
git commit -m "$LANG: Updated translation"
# now we create a patch out of the latest change
git format-patch HEAD^
You can send the patch, or the whole file, to the mailing list
kupfer-list@gnome.org.
To try the new translation
--------------------------
Make sure the translation is listed in ``po/LINGUAS``.
To try it, you have to install kupfer with ``./waf install``, then you
can run kupfer as normal.
.. note::
If you run ``./kupfer-run`` from the source directory it won't
find the installed translations unless you make a symlink called
``locale`` to the installed location (for example
``~/.local/share/locale`` if install prefix was ``~/.local``)::
$ ln -s ~/.local/share/locale
.. vim: ft=rst tw=72 et sts=4
.. this document best viewed with rst2html
kupfer-v208/Documentation/Makefile 0000664 0000000 0000000 00000000453 11762200422 0017316 0 ustar 00root root 0000000 0000000 # This makefile can generate html versions that are pleasant to read
# needs python-docutils
all: Contributing.html Copyright.html Localization.html Manpage.html \
Manual.html PluginAPI.html \
GTKTheming.html VersionHistory.html
%.html: %.rst
rst2html $^ > $@
%.pdf: %.rst
rst2pdf -o $@ $^
kupfer-v208/Documentation/Manpage.rst 0000664 0000000 0000000 00000004677 11762200422 0017774 0 ustar 00root root 0000000 0000000 ======
kupfer
======
-----------------------------------------------------------------
Convenient command and access tool for applications and documents
-----------------------------------------------------------------
:Author: Ulrik Sverdrup
:Date: 2011
:Manual section: 1
SYNOPSIS
========
| ``kupfer`` [ *OPTIONS* | *FILE* ... ]
| ``kupfer-exec`` *FILE* ...
DESCRIPTION
===========
Kupfer is an interface for quick and convenient access to applications
and their documents.
The most typical use is to find a specific application and launch it. We
have tried to make Kupfer easy to extend with plugins so that this
quick-access paradigm can be extended to many more objects than just
applications.
``kupfer-exec`` is a helper script that can execute commands saved to
file, but only by connecting to an already running instance of Kupfer.
SPAWNING
========
Running kupfer on the command line (without options) will try to show
the program it if already running.
Kupfer can be invoked with a list of files
``kupfer`` *FILE* ...
This can be used to select files given as command-line arguments in the
program. Then you can invoke actions even on objects from a shell-based
context.
You may also pipe text to ``kupfer`` to pass it to a currently running
instance of the program.
OPTIONS
=======
--no-splash Launch without presenting main interface
--list-plugins Display a list of all installed plugins
--debug Enable more verbose output that can help understanding
the program's operation.
--relay Is deprecated and will be started by the Multihead
Support plugin when needed
--exec-helper=HELPER Run plugin helper program, which should be the
name of a module inside kupfer.
The following are generic options
--help Display usage information
--version Display version information
CONFIGURATION
=============
Custom plugins are added to kupfer by installing them to the directory
*~/.local/share/kupfer/plugins*, or any kupfer/plugins directory in any
of ``$XDG_DATA_DIRS``.
ENVIRONMENT VARIABLES
=====================
If *KUPFER_NO_CUSTOM_PLUGINS* is set, only allow loading built-in
plugins (installed in the program's python package).
If *KUPFER_NO_CACHE* is set, do not load from or write to any source
cache files.
.. vim: ft=rst tw=72
.. this document best viewed with::
rst2pdf Quickstart.rst && xdg-open Quickstart.pdf
kupfer-v208/Documentation/Manual.rst 0000664 0000000 0000000 00000001756 11762200422 0017634 0 ustar 00root root 0000000 0000000
==============================
Kupfer Technical Documentation
==============================
.. topic:: `Kupfer Plugin API `_
..
.. topic:: `GTK+ Theme Support `_
..
.. topic:: `Contributing `_
..
.. topic:: `Localization `_
..
.. topic:: `Man Page `_
..
.. topic:: `Version History `_
..
.. topic:: `Copyright `_
..
There is also `User Documentation`__
__ http://kaizer.se/wiki/kupfer/help/
.. How to Generate HTML or PDF from this documentation.
This is a RestructuredText_ document and it can be rendered
by installing ``python-docutils`` (``docutils`` module).
This package should also provide the utilities ``rst2html`` and
``rst2pdf`` as well as ``rst2man``.
.. _RestructuredText: http://docutils.sourceforge.net/rst.html
.. vim: ft=rst tw=72 et sts=4 sw=4
.. this document best viewed with rst2html
kupfer-v208/Documentation/PluginAPI.rst 0000664 0000000 0000000 00000071531 11762200422 0020205 0 ustar 00root root 0000000 0000000 =================
Kupfer Plugin API
=================
:Homepage: http://kaizer.se/wiki/kupfer
.. contents:: :depth: 2
Introduction
============
Kupfer is a Python program that allows loading extension modules
at runtime. A plugin is equivalent to one Python module implemented
as one ``.py`` file or as a Python package.
The ``kupfer`` package is organized as follows::
kupfer/
obj/
ui/
core/
plugin/
core/__init__.py
applications.py
...
...
Plugins live in the package ``kupfer.plugin``. Kupfer also includes
directories called ``kupfer/plugins`` from ``$XDG_DATA_DIRS``, which
typically means ``/usr/share/kupfer/plugins`` and
``$HOME/.local/share/kupfer/plugins``. These directories are
transparently included into the kupfer package, so the user has multiple
choices of where to install plugins.
The Plugin File
:::::::::::::::
A kupfer plugin is a ``.py`` file with some special attributes.
It starts like this (an imagined example)::
__kupfer_name__ = _("Cool X-Documents")
__kupfer_sources__ = ("DocumentSource", )
__kupfer_text_sources__ = ()
__kupfer_actions__ = ("Open", )
__description__ = _("Documents from the X program")
__version__ = "1"
__author__ = "Tom Author"
For a plugin, the following attributes are required::
__kupfer_name__ (Localized name of plugin)
__description__ (Localized description of plugin)
__version__
__author__
For the plugin to do anything, the following attributes may be defined::
__kupfer_sources__ = ()
__kupfer_text_sources__ = ()
__kupfer_actions__ = ()
__kupfer_action_generators__ = ()
__kupfer_contents__ = ()
They should be tuples of *names* of classes in the module:
* all sources have to be subclasses of ``kupfer.objects.Source``
* all text sources have to be subclasses of ``kupfer.objects.TextSource``
* all actions have to be subclasses of ``kupfer.objects.Action``
If an example plugin declares::
__kupfer_sources__ = ("DocumentSource", )
it will later in the file define the class ``DocumentSource``::
from kupfer.objects import Source
class DocumentSource (Source):
def __init__(self):
Source.__init__(self, _("Cool X-Documents"))
def get_items(self):
...
# later we will see what we can do here!
Ok, this looks simple. So what are Leaves, Sources and Actions?
A **Leaf** is an object, it represents a program or a file, or a text or
something else. Every type of Leaf has different possibilities, and you
can define new Leaves. Example: a ``FileLeaf`` represents a file on the
disk.
A **Source** produces a collection of Leaves, so it makes Kupfer know
about new objects. For example, it can provide all the FileLeaves for a
particular folder.
An **Action** is the part where something happens, an action is applied
to a Leaf, and something happens. For example, *Open* can be an
action that works with all ``FileLeaf``.
A Short Working Example
:::::::::::::::::::::::
The very simplest thing we can do is to provide an action on
objects that already exist in Kupfer. These actions appear in the
right-hand actions pane in kupfer, when an object of the right type is
selected.
The complete python code for the plugin::
__kupfer_name__ = _("Image Viewer")
__kupfer_actions__ = ("View", )
__description__ = _("View images quickly")
__version__ = ""
__author__ = "Tom Author"
import gtk
from kupfer.objects import Action, FileLeaf
class View (Action):
def __init__(self):
Action.__init__(self, _("View"))
def item_types(self):
yield FileLeaf
def valid_for_item(self, fileobj):
return fileobj.object.endswith(".jpg")
def activate(self, fileobj):
image_widget = gtk.image_new_from_file(fileobj.object)
image_widget.show()
window = gtk.Window()
window.add(image_widget)
window.present()
That is all. What we did was the following:
* Declare a plugin called "Image Viewer" with an action class ``View``.
* ``View`` declares that it works with ``FileLeaf``
* ``View`` only accepts ``FileLeaf`` that end with '.jpg'
* ``View`` defines a method ``activate`` that when called, will use gtk
to show the file in a window
.. note::
Kupfer uses a simplified programming style of composition and
cooperative superclasses.
You normally never call a superclass implementation inside a method
that you define, with the exception of ``__init__``.
On the other hand, there are superclass methods that should not be
overridden. For example, ``KupferObject.get_pixbuf`` is never
overridden, instead you implement ``KupferObject.get_icon_name``.
Reference
=========
Below follows a complete summary. To accompany this reference, you can
read kupfer's inline module documentation with pydoc, by doing the
following in the source directory::
$ pydoc kupfer.obj.base
or equivalently::
$ python
>>> help("kupfer.obj.base")
KupferObject
::::::::::::
KupferObject implements the things that are common to all objects:
*name*, *description*, *icon*, *thumbnail* and *name aliases*.
``__init__(self, name)``
This is called when you call ``Leaf.__init__``, or ``Source.__init__``,
and so on in your object's ``__init__`` method.
The name parameter must be a unicode string. An object can not
change name after it has called __init__.
``get_description(self)``
Return a longer user-visible unicode string that
describes the object.
``get_icon_name(self)``
Return a string of one icon name for the object.
The icon name should preferably be in the `Icon Naming
Specification`_
.. _`Icon Naming Specification`: \
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
``get_gicon(self)``
Return a GIcon (GIO icon) object. This takes precedence
over the icon name, if it is defined.
``get_thumbnail(self, width, height)``
Implement ``get_thumbnail`` to return a GdkPixbuf object of the
requested size that is a thumbnail of the object. If applicable.
``get_pixbuf(self, x)``
This should not be redefined. Define ``get_icon_name`` and/or
``get_gicon`` instead.
``get_icon(self)``
This should not be redefined. Define ``get_icon_name`` and/or
``get_gicon`` instead.
``repr_key(self)``
Return an object whose str() will be used in the __repr__,
self is returned by default.
This value is used to differentiate and recognize objects.
Override this if the objects type and name is not enough
to differentiate it from other objects.
``__repr__``
This should not be redefined. Define ``repr_key`` instead.
``kupfer_add_alias(self, alias)``
This should not be redefined, but can be called by the object
to add an alternate name to the object.
KupferObject Attributes
.......................
``KupferObject.rank_adjust``
A number to adjust the ranking of a certain object. Should only
be used on Actions. Should be set in the range -10 to -1 for actions
that apply to many objects but not default for any.
``KupferObject.fallback_icon_name``
Used as a the class' fallback for icon name. Do not change this.
Leaf
::::
Leaf inherits from KupferObject.
A Leaf represents an object that the user will want to act on. Examples
are a file, an application or a free-text query (TextLeaf).
This defines, in addition to KupferObject:
``__init__(self, obj, name)``
The default implementation of ``__init__`` stores the parameter
``obj`` into ``self.object`` and passes ``name`` up to
``KupferObject.__init__``.
``obj`` can be any data that the Leaf represents. ``name`` must be
a unicode string.
``Leaf.object``
``Leaf.object`` is the represented object, which is the
implementation-specific internal data.
``get_actions()``
Return a sequence of Actions that always apply to the Leaf. These
are "built-in" actions.
``__hash__`` and ``__eq__``
Leaves are hashable, can be members in a set, and duplicates are
recognized (and removed); this is essensial so that equivalent
Leaves from different sources are recognized.
These methods need normally not be overridden.
By default leaves are equal if both the name and the ``Leaf.object``
attribute are the same.
``has_content()`` and ``content_source()``
A leaf can contain something, like a folder contains files or a
music album songs.
If the Leaf should have content, it should override ``has_content``
to return ``True`` and define ``content_source()`` to return
an instance of a Source.
A Leaf may decide dynamically if it has content or not.
Action
::::::
Action inherits from KupferObject.
An Action represents a command using a direct object and an optional
indirect object. One example is ``kupfer.obj.fileactions.Open`` that
will open its direct object (which must be a file), with its default
viewer.
Actions are the most versatile parts of Kupfer, since they can define
ways to use objects together. They also have to decide, which types of
Leaves they apply to, and if they apply to a given Leaf.
An action is either a `Subject + Verb`:t: action: It needs one object,
this is the direct object.
Or it is a `Subject + Verb + Object`:t: action: It needs two objects,
one direct object ("obj") and one indirect object ("iobj").
Action defines, in addition to KupferObject:
Activate: Carrying Out the Action
.................................
``activate(self, obj)``
Called to perform the action if the action is a normal
`Subject + Verb`:t: action.
``activate(self, obj, iobj)``
Called to perform the action if the action is a three-way
`Subject + Verb + Object`:t: action. (That is, ``requires_object``
returns ``True``)
``activate_multiple(self, objects)``
..
``activate_multiple(self, objects, iobjects)``
If implemented, ``activate_multiple`` is called with preference over
``activate(self, obj, iobj)`` or ``activate(self, obj)`` as
appropriate.
Implement ``activate_multiple`` to handle multiple objects on either
side in a smart way.
You should implement ``activate_multiple`` if it is possible to do
something better than the equivalent of repeating ``activate``
*n* for *n* objects.
``activate`` and ``activate_multiple`` also receive a keyword argument
called ``ctx`` if the action defines ``wants_context(self)`` to return
``True``. See ``wants_context`` below for more information.
Determining Eligible Objects
............................
``item_types(self)``
This method should return a sequence of all Leaf types
that the action can apply to (direct object).
``valid_for_item(self, item)``
This method is called for each potential direct object
of the correct type.
Return True if the object is compatible with the action.
By default always returns ``True``.
``requires_object(self)``
Return ``True`` if the action is a `Subject + Verb + Object`:t:
action and requires both a direct and an indirect object.
If ``requires_object`` returns ``True``, then you must must also
define (at least) ``object_types``.
``object_types(self)``
Return a sequence of all Leaf types that are valid for the action's
indirect object.
``object_source(self, for_item)``
If the action's indirect objects should not be picked from the full
catalog, but from a defined source, return an instance of the Source
here, else return None. ``for_item`` is the direct object.
``valid_object(self, iobj, for_item)``
This method, if defined, will be called for each indirect object
(with the direct object as ``for_item``), to decide if it can be
used. Return ``True`` if it can be used.
Auxiliary Method ``wants_context(self)``
........................................
``wants_context(self)``
Return ``True`` if ``activate`` should receive an ``ExecutionToken``
as the keyword argument ``ctx``. This allows posting late
(after-the-fact) results and errors, as well as allowing access to
the GUI environment.
``wants_context`` defaults to ``False`` which corresponds to
the old protocol without ``ctx``.
So instead of ``activate(self, obj)``, the method should be implemented
as ``activate(self, obj, ctx)``.
The object passed as ``ctx`` has the following interface:
``ctx.register_late_result(result_object)``
Register the ``result_object`` as a late result. It must be a
``Leaf``.
``ctx.register_late_error(exc_info=None)``
Register an asynchronous error. (For synchronous errors, simply raise
an ``OperationError`` inside ``activate``.)
For asynchronous errors, call ``register_late_error``. If
``exc_info`` is ``None``, the current exception is used.
If ``exc_info`` is an ``OperationError`` instance, then it is used
as error. Otherwise, a tuple like ``sys.exc_info()`` can be passed.
``ctx.environment``
The environment object, which has the following methods:
``get_timestamp(self)``
Return the current event timestamp
``get_startup_notification_id(self)``
Make and return a startup notification id
``get_display(self)``
Return the display name (i.e ``:0.0``)
``present_window(self, window)``
Present ``window`` (a ``gtk.Window``) on the current
workspace and monitor using the current event time.
Auxiliary Action Methods
........................
Some auxiliary methods tell Kupfer about how to handle the action:
``is_factory(self)``
Return ``True`` if the return value of ``activate`` is a source
that should be displayed immediately.
``has_result(self)``
Return ``True`` if the action's return value in ``activate`` should
be selected.
``is_async(self)``
Return ``True`` if the action returns a ``Task`` object conforming to
``kupfer.task.Task`` from ``activate``. The task will be executed
asynchronously in Kupfer's task queue.
``repr_key(self)``
Override this to define a unique key for the action,
if you need to differentiate between different instances of the
same Action class.
Source
::::::
Source inherits from KupferObject.
A Source understands specific data and delivers Leaves for it.
A Source subclass must at a minimum implement ``__init__``,
``get_items`` and ``provides``.
``Source`` defines, in addition to ``KupferObject``:
``__init__(self, names)``
You must call this method with a unicode name in the subclass
``__init__(self)``.
``get_items(self)``
Your source should define ``get_items`` to return a sequence
of leaves which are its items; the return value is cached and used
until ``mark_for_update`` is called.
Often, implementing ``get_items`` in the style of a generator (using
``yield``) is the most convenient.
The Leaves shall be returned in natural order (most relevant first),
or if sorting is required, return in any order and define
``should_sort_lexically``.
``get_leaves(self)``
``get_leaves`` must not be overridden, define ``get_items``
instead.
``provides(self)``
Return a sequence of all precise Leaf types the Source may contain.
Often, the Source contains Leaves of only one type, in that case
the implementation is written simply as ``yield ThatLeafType``.
``should_sort_lexically(self)``
Return ``True`` if the Source's leaves should be sorted
alphabethically. If not sorted lexically, ``get_items`` should yield
leaves in order of the most relevant object first (for example the
most recently used).
``initialize(self)``
This method is called when the source should be made ready to use.
This is where it should register for external change callbacks, for
example.
``finalize(self)``
This method is called before the Source is disabled (shutdown or
plugin deactivated).
``get_leaf_repr(self)``
Return a Leaf that represents the Source, if applicable; for example
the DirectorySource is represented by a FileLeaf for the directory.
``__hash__`` and ``__eq__``
Sources are hashable, and equivalents are recognized just like
Leaves, and the central SourceController manages them so that there
are no duplicates in the application.
``get_items_forced(self)``
Like ``get_items``, called when a refresh is forced. By default
it just calls ``get_items``.
``mark_for_update(self)``
Should not be overridden. Call ``mark_for_update`` in the source to
mark it so that it is refreshed by calling ``get_items``.
``repr_key(self)``
Define to a unique key if you need to differentiate between sources
of the same class. Normally only used with Sources from factory
actions or from decorator sources.
``toplevel_source(self)``
If applicable, the source can return a different source to represent
it and its objects in the top level of the catalog. The default
implementation returns ``self`` which is normally what you want.
``is_dynamic(self)``
Return ``True`` if the Source should not be cached. This is almost
never used.
Saving Source configuration data
................................
These methods are must be implemented if the Source needs to save
user-produced configuration data.
``config_save_name(self)``
Return the name key to save the data under. This should almost
always be literally ``return __name__``
``config_save(self)``
Implement this to return a datastructure that succintly but
perfectly represents the configuration data. The returned
value must be a composition of simple types, that is, nested
compositions of ``dict``, ``list``, ``str`` etc.
This is called after ``finalize`` is called on the source.
``config_restore(self, state)``
The ``state`` parameter is passed in as the saved return value
of ``config_save``. ``config_restore`` is called before
``initialize`` is called on the Source.
Content Decorators
..................
A content-decorating source provides content to a Leaf, where it does
not control the Leaf. An example is the recent documents content
decorator, that provides document collections as content to
applications.
A normal Source listed in ``__kupfer_sources__`` will be eligible for
content decoration as well if it implements the needed methods.
Otherwise content-only sources are listed in ``__kupfer_contents__``.
``@classmethod decorates_type(cls)``
Return the type of Leaf that can be decorated. You must also
implement ``decorate_item``.
``@classmethod decorate_item(cls, leaf)``
Return an instance of a Source (normally of the same type as the
content decorator itself) that is the content for the object
``leaf``. Return ``None`` if not applicable.
Sources returned from ``decorate_item`` go into the common Source
pool. The new source instance will not be used if the returned
instance is equivalent (as defined by class and ``reepr_key``
above).
Source Attributes
.................
``Source.source_user_reloadable = False``
Set to ``True`` if the source should have a user-visible
*Rescan* action. Normally you much prefer to use change
notifications so that this is not necessary.
``Source.source_prefer_sublevel = False``
Set to ``True`` to not export its objects to the top level by
default. Normally you don't wan't to change this
``Source._version``
Internal number that is ``1`` by default. Update this number in
``__init__`` to invalidate old versions of cache files.
TextSource
::::::::::
TextSource inherits from KupferObject.
A text source returns items for a given text string, it is much like a
simplified version of Source. At a minimum, a TextSource subclass must
implement ``get_text_items`` and ``provides``.
``__init__(self, name)``
Override as ``__init__(self)`` to provide a unicode name for the
source.
``get_text_items(self, text)``
Return a sequence of Leaves for the unicode string ``text``.
``provides(self)``
Return a sequence of the Leaf types it may contain
``get_rank(self)``
Return a static rank score for text output of this source.
ActionGenerator
:::::::::::::::
ActionGenerator inherits from object.
ActionGenerator is a helper object that can be declared in
``__kupfer_action_generators__``. It allows generating action objects
dynamically.
``get_actions_for_leaf(self, leaf)``
Return a sequence of Action objects appropriate for this Leaf
.. note::
The ``ActionGenerator`` should not perform any expensive
computation, and not access any slow media (files, network) when
returning actions. Such expensive checks must postponed and be
performed in each Action's ``valid_for_item`` method.
The Plugin Runtime
::::::::::::::::::
.. topic:: How a plugin is activated
1. The plugin module is imported into Kupfer.
If an error occurs, the loading fails and the plugin is disabled.
If the error raised is an ImportError then Kupfer report it as a
dependency problem.
2. Kupfer will initialize a ``kupfer.plugin_support.PluginSettings``
object if it exists (see next section)
3. Kupfer will call the module-level function
``initialize_plugin(name)`` if it exists.
4. Kupfer instantiates the declared sources and actions and insert
sources, actions, content decorators, action generators and text
sources into the catalog.
.. topic:: When a plugin is deactivated
When the plugin is disabled, the module-level function
``finalize_plugin(name)`` is called if it exists. [It is not yet
final whether this function is called at shutdown or only when
hot-unplugging plugins.]
kupfer.plugin_support
:::::::::::::::::::::
This module provides important API for several plugin features.
PluginSettings
..............
To use user-settable configuration parameters, use::
__kupfer_settings__ = plugin_support.PluginSettings(
{
"key" : "frobbers",
"label": _("Number of frobbers"),
"type": int,
"value": 9,
},
)
Where ``PluginSettings`` takes a variable argument list of config
parameter descriptions. The configuration values are accessed with
``__kupfer_settings__[key]`` where ``key`` is from the parameter
description. Notice that ``__kupfer_settings__`` is not updated with
the user values until the plugin is properly initialized.
``PluginSettings`` is read-only but supports the GObject signal
``plugin-setting-changed (key, value)`` when values change.
check_dbus_support and check_keyring_support
............................................
``plugin_support`` provides the convenience functions
``check_dbus_support()`` and ``check_keyring_support()`` that raise the
appropriate error if a dependency is missing.
Alternatives
............
Alternatives are mutually exclusive features where the user must select
which to use. Each category permits one choice.
.. topic:: Categories of Alternatives
:``terminal``: the terminal used for running programs that require
terminal
:``icon_renderer``: method used to look up icon names
Each category has a specific format of required data that is defined in
``kupfer/plugin_support.py``. A plugin should use the function
``kupfer.plugin_support.register_alternative(caller, category_key, id_, **kwargs)``
to register their implementations of new alternatives. The arguments are:
.. topic:: ``register_alternative(caller, category_key, id_, ** kwargs)``
:``caller``: the name of the calling plugin, is always ``__name__``
:``category_key``: one of the above categories
:``id_``: the plugin's identifier for the alternative
:`kwargs`: key-value pairs defining the alternative
``register_alternative`` is normally called in the plugin's
``initialize_plugin(..)`` function.
.. topic:: Fields requried for the category ``terminal``
:``name``: unicode visible name
:``argv``: argument list: list of byte strings
:``exearg``: the execute-flag as a byte string (``""`` when N/A)
:``desktopid``: the likely application id as a byte string
:``startup_notify``: whether to use startup notification as boolean
.. topic:: Fields required for the category ``icon_renderer``
:``name``: unicode visible name
:``renderer``: an object with an interface just like
``kupfer.icons.IconRenderer``
Plugin Packages, Resources and Distribution
:::::::::::::::::::::::::::::::::::::::::::
A plugin is a Python module–either a single python file or a folder with
an ``__init__.py`` file (a package module). In the latter case, the
whole of the plugin can be defined inside ``__init__.py``, or it can be
split into several modules. Kupfer will look for all the description
variables (like ``__kupfer_name__``) in ``__init__.py``.
.. topic:: Plugin-installed custom icons
A package module may include custom icons as .svg files. The icon files
must be declared in a file inside the python package called
``icon-list``.
* Each line is a tab-separated field list, with the icon name in
the first column and the filename (relative to the plugin package)
in the second column.
* Lines can be commented with a leading ``#``
* If a literal ``!override`` appears in the third column, the icon
is installed even if it overrides the currently used GTK icon
theme.
Plugins may be installed into any of the ``kupfer/plugins`` data
directories. Package modules can also be installed and used as ``.zip``
files, so they too can be distributed as single files.
Example Plugins
===============
I want to specifically highlight certain files in Kupfer that are good
to read as examples.
+ Custom Leaf and Action: the common case of creating a custom
``Leaf`` type and defining its default ``Open`` action, see
``kupfer/plugin/notes.py``
+ Content decoration: making content for objects, see
``kupfer/plugin/archiveinside.py`` (*Deep Archives* plugin)
+ Asynchronous error reporting: see ``kupfer/plugin/volumes.py``, action
*Unmount*
Reference to the ``kupfer`` Package
===================================
There are several modules inside the ``kupfer`` package that a plugin
can reuse.
.. topic:: ``kupfer.commandexec``
``kupfer.commandexec`` is not used by plugins anymore
after version v204. See `Auxiliary Method wants_context(self)`_
above instead.
.. topic:: ``kupfer.config``
..
.. topic:: ``kupfer.interface``
This module does not need to be imported just to implement the
interface it defines.
``TextRepresentation``
``get_text_representation``
If a Leaf has a text representation (used for
copy-to-clipboard), it should implement this method
and return a unicode string.
.. topic:: ``kupfer.kupferstring``
A **byte string** (Python ``str``) is just a stream of data. When
you handle byte strings that is text, you must convert it to unicode
as soon as possible. You only know the encoding depending on the
source of the byte string.
``tounicode``
decode UTF-8 or unicode object into unicode.
``tolocale(ustr)``
coerce unicode ``ustr`` into a locale-encoded bytestring.
``fromlocale(lstr)``
decode locale-encoded bytestring ``lstr`` to a unicode object.
.. topic:: ``kupfer.objects``
``kupfer.objects`` includes the basic objects from the package
``kupfer.obj``, such as ``Leaf``, ``Action``, ``Source`` etc.
``FileLeaf``, ``AppLeaf``, ``TextLeaf`` etc.
The basic re-usable types live here
``OperationError``
Exception type for user-visible errors in action execution.
Raise ``OperationError`` with a unicode localized error message
inside ``Action.activate`` to notify the user of a serious
error.
Specialized versions exist: Such as
``CommandMissingError(cmd)``, ``NotAvailableError(toolname)``,
``NoMultiError()``
.. topic:: ``kupfer.pretty``
..
.. topic:: ``kupfer.runtimehelper``
..
.. topic:: ``kupfer.textutils``
..
.. topic:: ``kupfer.uiutils``
``show_notification(title, text='', icon_name='', nid=0)``
Show a notification. If a previous return value is passed as
``nid`` , try to replace that previous notification.
Returns a notification identifier, or None if notifications
are not supported.
.. topic:: ``kupfer.utils``
``spawn_async(argv)``
Spawn a child process, returning True if successfully started.
``spawn_in_terminal(argv)``
..
``show_path(path)``
..
``show_url(url)``
Display with default viewer for ``path`` or ``url``.
``get_display_path_for_bytestring(filepath)``
File paths are bytestrings (and are not text).
``get_display_path_for_bytestring`` returns a user-displayable
text representation as a unicode object.
.. topic:: ``kupfer.task``
..
.. topic:: ``kupfer.weaklib``
..
.. topic:: ``kupfer.core``
The module ``kupfer.core`` can not be used by plugins.
.. vim: ft=rst tw=72 et sts=4 sw=4
.. this document best viewed with rst2html
kupfer-v208/Documentation/VersionHistory.rst 0000664 0000000 0000000 00000110606 11762200422 0021421 0 ustar 00root root 0000000 0000000 .. role:: lp(strong)
NEWS for kupfer
===============
kupfer v208
-----------
Released Friday, 1 June 2012
* Fix bug with nonexisting catalog directories (Karol) (:lp:`1000980`)
* Fix sending to many with Thunderbird (Karol) (:lp:`955100`)
* Fix history file for OpenOffice/LibreOffice (Karol)
* *Audacious* plugin: Work with Audacious 3 (Ulrik)
* Localization updates:
+ cs, Marek Černocký
+ es, Daniel Mustieles
+ fr, Alexandre Franke, Bruno Brouard
+ ru, Nikolay Barbariyskiy
+ sl, Matej Urbančič
kupfer v207
-----------
Released Sunday, 26 February 2012
* Documentation translated to French by Bruno Brouard
* New translation to Brazilian Portuguese by Djavan Fagundes
* New translation to Hungarian by SanskritFritz
* Handle large text objects a bit better
* Introduce proxy objects *Clipboard File* and *Clipboard Text*. These
objects are implemented in the *Clipboard* plugin, just like the *Selected
Text* object which has changed home to this plugin. Accordingly,
deactivating the clipboard plugin will deactivate these proxies.
* Support copying and pasting files from/to the clipboard, which allows much
easier integration with file managers.
* Add an information text detailing which keyring backend is used to store
passwords, visible in the user credentials dialog.
* *Vim:* Expand the vim plugin to use a helper process to track running
server instances of (G)Vim. Each running session is exported as an object,
and most importantly, files can be opened in a session using the action
*Open With*.
* *Multihead Support:* This new plugin will start the "keyboard shortcut
relay" service on additional screens, if it is needed. It is active by
default, and does not do anything on configurations with a single
X screen.
* *Send Keys:* Allow sending key sequences using comma trick.
* *Thunar:* Add action *Symlink In...*
* *Quicksilver Icons:* New plugin with a few icons from Quicksilver
* Use themable custom icon names ``kupfer-execute``, ``kupfer-catalog``,
``kupfer-launch``. Also allow plugins to choose to supply icons when the
icon theme lacks them, or always override the icon theme.
* Fix passing zero-length arguments to programs (Fabián Ezequiel Gallina)
(:lp:`863349`)
* *Gmail:* Expose more contact info fields (Adi Sieker, Karol Będkowski)
* Add plugin *DuckDuckGo* (Isaac Aggrey)
* Add quick note action to *Zim* (Karol Będkowski)
* Add *Edit Contact in Gmail* to *Gmail* (Karol)
* Fix version detection in *Gajim* (Karol)
* *Google Translate:* Since Google no longer provides this API (for free),
this plugin is no longer included in Kupfer.
* Fix compatibility with dbus-python version 1.0 (:lp:`921829`)
* Fix loss of window shape when centering (David Schneider) (:lp:`779845`)
* We are now using the format .tar.xz for the distribution tarball.
* The git repository and tarball now includes a local copy of waf (1.6.11),
unmodified but with unused in Tools/ and extras/ removed.
* Localization updates:
+ (cs) Marek Černocký
+ (de) Mario Blättermann
+ (fr) Bruno Brouard
+ (es) Daniel Mustieles
+ (hu) SanskritFritz
+ (pl) Piotr Drąg
+ (pt_BR) Djavan Fagundes
+ (sl) Andrej Žnidaršič
+ (sv) Ulrik
kupfer v206
-----------
`The longest changelog ever—the best Kupfer ever?`:t:
Released Thursday, 14 April 2011
These are changes since the v205 release. Below this I have included, the
full changelog for all the features introduced in v205, since it was not
published in whole together with the v205 release.
I would like to thank all contributors for patches, bug reports, comments
and translations. A special thanks to those who have contributed to the
`user documentation`__; it is now complete in both Polish and Spanish.
If you like my work with Kupfer, you can support me by donating. There are
instructions how to do so on the web page. –ulrik.
__ http://kaizer.se/wiki/kupfer/help/
* *Thunderbird:* fix double create email windows (:lp:`747198`)
* *Thunderbird:* fix problem with loading contacts (Karol Będkowski)
(:lp:`747438`)
* Use ``rst2man`` as it was configured (:lp:`747500`)
* Reduce runtime memory use for substantially by reimplementing the icon
cache (expectations vary btw. 10 to 30 percent).
* Prefer gnomekeyring over kwallet, and don't load keyring support if it is
not requested by a plugin (:lp:`747864`)
* Make the "folder" icon take precedence over "inode/directory"
* Fix a regression in *Go To* that would not focus minimized windows.
* In *Go To* action, cycle application windows (if they are all on the same
workspace).
* Fix :lp:`671105`: the user's home is aliased as *Home Folder* and the
"lookalike" application is hidden.
* Use GTK+ as default icon set, the ASCII icon set remains as a plugin
* Fix regression :lp:`749824`, kupfer used a GTK+ 2.20 feature. Kupfer
should now run under GTK+ 2.18 (2.16?). GTK+ 2.20 is recommended and
needed for full input method support.
* Remake ``.desktop`` file parsing to be much more lenient, so that we
can launch all applications again. Affected were especially launcher files
written by wine.
* Make sure the ``Home`` key works in text mode (:lp:`750240`)
* *Rhythmbox:* Fix omission of ``.jpg`` extension when searching cover art
(William Friesen)
* Support xfce4-dict in *Dictionary* plugin (David Schneider)
* Make sure ``kupfer.svg`` can be mimetype-detected (NAKAMURA Yoshitaka)
(:lp:`750488`)
* Fix regression that prevented mimetypes and icon cache from being updated
properly when installing from source.
* Focus the plugin list search box by default in the preferences window.
* Fix regression in *XFCE Session Management* that had a broken logout
command.
* Install kupfer as a Thunar 'sendto' object.
* Fix a bug in the autostart file we installed, it was including a '%F'
which broke ``--no-splash`` when autostarted on XFCE.
* *LibreOffice:* support their newer recent documents file (Karol Będkowski)
* *Notes:* Insert newlines after the new note title (:lp:`748991`)
* *Commands:* Recognize absolute paths with arguments as shell commands (for
example ``/bin/grep --help``. (:lp:`152093`)
* *GNU Screen:* check if sessions are still active (:lp:`756449`), don't
give up even if ``$SCREENDIR`` is missing when we are started
(:lp:`753376`)
* *Notes:* support the program kzrnote as well
* Renamed the two like-named command actions in spanish (Daniel Mustieles)
* Localization updates for v206:
+ sl Andrej Žnidaršič
+ es Daniel Mustieles
+ de Mario Blättermann
This is the changelog for the v205 release, which was released previously.
* Changes to the interface
+ Add a small menu button on the window for explicit access to
context actions, preferences window, and help.
+ Increase icon size to 128px
+ Always show description field
+ Use an undecorated window with rounded corners
+ Let the frame be slightly transparent if supported
+ Themable colors and properties by using GTK+ styling, see
``Documentation/GTKTheming.rst``, and the plugin *Custom Theme* that
shows how to use custom styles.
* Add context action "Set X as default action for object Y"
+ For example, you can make *Launch Again* default for Terminal, and our
default configuration uses this setting for two common terminals (GNOME
and XFCE).
* Updated Kupfer's technical documentation (in ``Documentation/``),
including the Plugin API reference.
* Implement a preedit widget for input methods, also resolving
the incompatibility with ibus (David Schneider) (:lp:`696727`)
* Re-implement launching of applications
* Allow the user to configure which terminal program is used.
Applies to all of *Run in Terminal*, *Open Terminal Here*, for .desktop
files that specify ``Terminal=true`` etc.
* Implement an "alternatives" mechanism so that plugins can
register mutually exclusive alternatives. Currently implemented
are Terminals (see above) and Icon Renderers.
* *Thunar*: Use Thunar 1.2's Copy and Move API.
+ These allow copying and moving anything through thunar, and it will
show progress dialogs for longer transactions.
* Add *Ascii & Unicode Icon Set* for fun
* Add simple plugin *Quick Image Viewer* to show images in a simple way.
* Add *Send Keys* plugin that can send synthetic keyboard events,
and prominently can be used for the *Paste to Foreground Window*
action on text. Requires ``xautomation`` package. (:lp:`621453`)
* *Volumes:* treat mounts as regular folders, so they can be targets for
file operations.
* *File Actions:* the action *Move to Trash* switches home to the *Trash*
plugin, the archive actions go to new *Archive Manager* plugin. *Archive
Manager* also updated to recognize more archive file types, including
``.xz``.
* Activate current selection on double-click in the interface.
(:lp:`700948`)
* Update the preferences window and move the folder configuration to the
Catalog tab.
* Add ``initialize_plugin`` to the plugin interface.
* The D-Bus interface has been extended with X screen and timestamp-aware
versions of all methods:
+ ``PresentOnDisplay``, ``PutFilesOnDisplay``, ``PutTextOnDisplay``,
``ExecuteFileOnDisplay`` all act like their similarly-named
predecessors, but take ``$DISPLAY`` and ``$DESKTOP_STARTUP_ID`` as their
last two arguments.
+ ``kupfer-exec`` activation sends the event timestamp so that focus can
be carried along correctly even when running ``.kfcom`` files (if
activated as an application by startup-notification-aware launchers,
this works with most standard desktop components).
* Internally, change how actions are carried out by allowing the
action execution context object to be passed down the execution chain
instead of being a global resource. This also allows plugins to cleanly
access current environment (event timestamp, current screen etc).
+ Support running kupfer on multiple X screens (:lp:`614796`), use
the command ``kupfer --relay`` on each additional screen for global
keyboard shortcut support. This is experimental until further notice!
* The *Tracker 0.8* plugin supports version 0.8 and 0.10 alike. Because of
that and the expected compatibility with one version after this too, it's
now called *Tracker*.
* The *Favorites* plugin lists *Kupfer Help* and *Kupfer Preferences* by
default (for new users), so that it's not empty and those items are ranked
higher.
* In free-text mode, show a character count in the text entry.
* The action *Go To* on applications has changed implementation. It will
first bring to front all the application's windows on the current
workspace, and upon the next invocations it will focus the other
workspaces, in order, if they have windows from the same application. For
single-window applications, nothing is changed.
* Localization updates for v205:
+ (cs) Marek Černocký
+ (de) Mario Blättermann
+ (es) Daniel Mustieles
+ (ko) Kim Boram
+ (nb) Kjartan Maraas
+ (pl) Karol Będkowski
+ (sl) Andrej Žnidaršič
+ (sv) Ulrik
kupfer v205
-----------
Congratulating ourselves
Released Friday, 1 April 2011
* Changes to the interface
+ NOw we have a teh awsum interface
* Add context action "Set X as default action for object Y"
+ You can finally make Kupfer do what you want.
* Implement a preedit widget for input methods, also resolving
the incompatibility with ibus (David Schneider) (:lp:`696727`)
+ Ok, so that foreign people can enter text too.
* Updated Kupfer's technical documentation (in ``Documentation/``),
including the Plugin API reference.
+ Someone finally bothered
* The action *Go To* on applications has changed implementation. It will
first bring to front all yada yada, etc...
+ Whatever, it finally works in a sensible way
* And tons of other stuff, enjoy!
kupfer v204
-----------
Released Friday, 18 March 2011
* Expand and improve upon `Kupfer's User Documentation`__.
* Use and require **Waf 1.6**, which supports building using either Python 3
or Python 2.6+. Kupfer itself still uses Python 2.6+ only.
* Add *Gwibber* plugin that allows integration with Twitter, Identi.ca, Buzz
etc. (Karol Będkowski)
* Add chat client *Empathy* plugin (Jakh Daven)
* Remove the plugin *Twitter* since it is incompatible and has no updated
implementation.
* Add *Show QRCode* plugin by Thomas Renard (:lp:`611162`)
* Periodically save data from plugins so it's not lost if Kupfer can't exit
cleanly at logout
* *Commands*: Add actions *Pass to Command*, *Filter through Command*, *Send
to Command* which add a lot of shell script-related power to Kupfer.
These actions, and *Run (Get Output)* as well, use a shell so
that you can run shell pipelines.
* *Search the Web*: Fix bug in OpenSearch parser (:lp:`682476`)
* *VirtualBox*: Support vboxapi4 (Karol Będkowski)
* *Thunderbird*: Fix problems in the mork parser (Karol Będkowski)
(:lp:`694314`)
* *OpenOffice*: Support LibreOffice too (Karol Będkowski)
* Fix "Y2011 bug" where the time parameter overflowed INT32 in keybinder
* *Shorten Links*: Use only services with stable API, added and removed
services.
* *Google Search*, *Google Translate* and ``bit.ly`` in *Shorten Links* can
use SSL for transport if a third-party plugin is installed.
* Fix bug if evolution address book is missing (Luca Falavigna)
(:lp:`691305`)
* Fix *Search the Web* to use localized ``firefox-addons`` subdirectories
for search engines (:lp:`735083`)
* Fix bug with integer division (Francesco Marella)
* *APT:* Workaround bug with ``subprocess`` (:lp:`711136`)
* Find cover art files just like Rhythmbox (William Friesen) (:lp:`676433`)
* Use ``readlink`` in ``kupfer-exec`` script too since ``realpath`` is not
always available.
* Allow plugins to use update notifications (William Friesen)
* Bug :lp:`494237` is hopefully fixed once and for all.
* The *Large Type* action will work with anything that has
``TextRepresentation``
__ http://kaizer.se/wiki/kupfer/help/
* Localization updates:
+ (cs) Marek Černocký
+ (da) Joe Hansen
+ (de) Mario Blättermann
+ (es) Daniel Mustieles
+ (gl) Marcos Lans
+ (pl) Karol Będkowski
+ (sl) Andrej Žnidaršič
+ (sv) Ulrik
+ (zh_CN) Aron Xu, Yinghua Wang
kupfer v203
-----------
.. role:: git(emphasis)
Released Saturday, 6 November 2010
* Center Kupfer on the monitor were the mouse pointer is (:lp:`642653`,
:git:`3d0ba12`)
* Ignore the system's configured input manager by default (User can choose
by pressing Shift+F10 in Kupfer). Kupfer is still not compatible with
ibus 1.3. (:lp:`601816`, :git:`4f029e6`)
* Use ``readlink`` instead of ``realpath`` (:git:`656b32d`)
* *Opera Mail*: Handle contacts with multiple e-mail addresses (Chris
Parsons) (:lp:`661893`, :git:`12924be`)
* *Google Translate*: Fix language list (Karol Będkowski) (:lp:`600406`,
:git:`7afac2b`)
* *TSClient*: Search recursively for session files (Karol, Freddie Brandt)
(:git:`ad58c2e`)
* *Rhythmbox*: Fix thumbnail lookup (William Friesen) (:lp:`669077`,
:git:`b673f98`)
* New Slovenian translation of help by Matej Urbančič (:git:`3b7df25`)
* New Turkish translation by M. Deran Delice (:git:`bd95d2a`)
kupfer v202
-----------
Released Sunday, 5 September 2010
* Add option to hide Kupfer when focus is lost (and enable by default)
(Grigory Javadyan) (:lp:`511972`)
* Use application indicators when available (Francesco Marella)
(:lp:`601861`)
* Python module `keyring` is now optional for Kupfer (but required for
the same plugins that used them before)
* Update *Google Translate* for protocol changes (Karol, Ulrik) (:lp:`600406`)
* Disable saving window position until a better solution is found
* Use 'mailto:' as URL (:lp:`630489`)
* Fix UI glictch with empty Source (William Friesen) (:lp:`630244`)
* Small changes (Francesco Marella)
* New Czech translation of the help pages (Marek Černocký)
* New Italian translation of the help pages (Francesco Marella)
* New Polish translation of the help pages (Karol Będkowski)
* New Basque translation (Oier Mees, Iñaki Larrañaga Murgoitio)
* New Galician translation (Fran Diéguez)
* Localization updates:
+ cs (Marek Černocký)
+ de (Mario Blättermann)
+ pl (Karol Będkowski)
+ sl (Andrej Žnidaršič)
+ zh_CN (Aron Xu)
kupfer v201
-----------
Released Wednesday, 30 June 2010
* New Logo and Icon by Nasser Alshammari!
* New plugin *Opera Mail* by Chris Parsons
* New plugin *SSH Hosts* by Fabian Carlström
* New plugin *Filezilla* by Karol Będkowski
* New plugin *Getting Things GNOME!* (Karol)
* New plugin *Vim* (recent files)
* *Clipboard:* Option *Copy selection to primary clipboard* (Karol)
* *Firefox:* Option *Include visited sites* (Karol) (:lp:`584618`)
* *Thunar:* Action *Send To...* (Karol)
* New preferences tab for Catalog configuration
* Allow disabling and "unloading" plugins at runtime
* Support new tracker in plugin *Tracker 0.8*
* *Shell Commands:* New Action *Run (Get Output)*
* New plugin capabilities: ActionGenerator, Plugin setting change
notifications (Karol)
* Use ``setproctitle`` module if available to set process title to
``kupfer`` (new optional dependency)
* Don't use a crypted keyring (partially addresses :lp:`593319`)
* Fix :lp:`544908`: Retain window position across sessions
* Fix :lp:`583747`: Use real theme colors for highlight
* Fix :lp:`593312`: About window has no icon
* More minor changes
* Localization updates:
+ cs, Marek Černocký
+ de, Mario Blättermann
+ es, Jorge González
+ it, Francesco Marella
+ pl, Karol Będkowski
+ sl, Andrej Žnidaršič
+ sv, Ulrik
kupfer v200
-----------
Released Wednesday, 7 April 2010
* Add Keyboard Shortcut configuration (Karol Będkowski)
* Make it easier to copy and move files (William Friesen), while showing
user-friendly errors when action is not possible (Ulrik) (:lp:`516530`)
* Collect results in a *Command Results* subcatalog, including results from
asynchronous commands (Pro tip: Bind a trigger to *Command Results* →
*Search Contents*, for quick access to copied files, downloaded files etc)
* *Last Result* proxy object implemented
* Add *Cliboards* -> *Clear* action (Karol)
* Add *Rescan* action for some sources (Karol)
* Add an icon in the plugin list search field to enable clearing it (Karol)
* Fix spelling (Francesco Marella)
* Fix bug `544289`:lp:
* Require python module ``keyring`` (since pandoras-box-1.99, but was not
mentioned)
* Recommend python-keybinder version 0.0.9 or later
* Localization updates:
+ cs Marek Černocký
+ de Mario Blättermann
+ es Jorge González
+ pl Karol Będkowski
+ sl Andrej Žnidaršič
+ sv Ulrik
+ zh_CN Aron Xu
kupfer version pandoras-box-1.99
--------------------------------
Released Tuesday, 16 March 2010
* Plugins can be loaded at runtime, although not unloaded can they not
* Plugins can bundle icons, and plugins can be packaged in .zip files
* New plugins *Google Search*, *Textfiles* and *Thunar*
* New plugin *Deep Archives* to browse inside .zip and .tar files
* New plugins *Twitter*, *Gmail* and *Google Picasa* by Karol Będkowski
* New plugin *Evolution* by Francesco Marella
* New action *Get Note Search Results...* in *Notes* by William Friesen
(LP#511954)
* New plugin capabilities (user credentials, background loader) by Karol
* Added *Next Window* proxy object to *Window List* plugin
* Allow saving Kupfer commands to .kfcom files, and executing them with
the ``kupfer-exec`` helper script.
* Display error notifications to the user when some actions can not be
carried out.
* Allow collecting selections with the *Clipboard* plugin (Karol)
* Include Gnome/Yelp documentation written using Mallard (Mario Blättermann)
* Make *Zim* plugin compatible with newer Zim (Karol, Ulrik)
* Detect multiple volume rar files (William Friesen) (LP#516021)
* Detect XFCE logout better (Karol) (LP#517819)
* Fix reading VirtualBox config files (Alexey Porotnikov) (LP#520987)
* Fixed module name collision in user plugins (LP#518958), favoriting "loose"
applications (LP#518908), bookmarked folders description (LP#509385),
Locate plugin on OpenSUSE (LP#517819), Encoding problem for application
aliases (LP#537730)
* New French translation by Christophe Benz
* New Norwegian (Bokmål) translation by Kjartan Maraas
* Kupfer now requires Python 2.6
* Localization updates:
+ cs Marek Černocký
+ de Mario Blättermann
+ es Jorge González
+ fr Christophe Benz
+ it Francesco Marella
+ nb Kjartan Maraas
+ pl Karol Będkowski
+ pt Carlos Pais
+ sl Andrej Žnidaršič
+ sv Ulrik
kupfer version pandoras-box-1.1
-------------------------------
Released Monday, 8 February 2010
* Fix bug in contact grouping code that could cause unusable Kupfer with Pidgin
plugin. Reported by Vadim Peretokin (LP#517548)
* Chromium plugin will index Google Chrome bookmarks as fallback, by William
Friesen (LP#513602)
* Kupfer's nautilus plugin was changed to be easier to reuse for others
* Some minor changes
* Localization updates:
+ pt (Carlos Pais)
kupfer version pandoras-box-1
-----------------------------
"Pandora's box"
Released Monday, 1 February 2010
* Implement the famous "comma trick": Press , (comma) in the first or
third pane to make a stack of objects to perform actions on. This allows
actions on many objects and even many-to-many actions.
* New plugin: *Triggers*: Add global keybindings to any command you can
perform in Kupfer.
* New plugin *Skype* by Karol Będkowski
* New plugin *Thunderbird* (or Icedove) (Karol)
* Implement merging of contacts and hosts: All contacts of the same name are
merged into one object. (Karol, Ulrik)
* New plugin *Higher-order Actions* to work with saved commands as objects
* The *Favorites* plugin was reimplemented: you may favorite (almost) any
object. Favorites get a star and a rank boost.
* *Window List* plugin was improved, most notably a *Frontmost Window* proxy
object was added
* New proxy object *Last Command*
* The *Firefox* plugin now includes most-visited sites from browser history
(William Friesen, Karol, Ulrik)
* The list of plugins has a field to allow filtering the list (Karol)
* New Czech localization by Marek Černocký
* Many smaller changes.
* Localization updates:
+ cs (Marek Černocký, Petr Kovar)
+ de (Mario Blättermann)
+ nl (Martin Koelewijn)
+ pl (Karol)
+ sv
+ sl (Andrej Žnidaršič)
kupfer version c19.1
--------------------
Released 31 December 2009
* New plugin: *Shorten Links* by Karol Będkowski
* Implemented *Ctrl+C* (and *Ctrl+X*) to copy (cut) selected object
* Fix bug LP #498542: restore window position code to c18
* Partial fix of bug LP #494237, window is sometimes blank
* Fix bug LP #500395, column order in *Top* plugin (Karol)
* Fix bug LP #500619, handle network errors in *Google Translate* plugin
(Karol)
* Localization updates:
+ pl (Karol)
+ sv
kupfer version c19
------------------
Released 18 December 2009
* New plugins:
+ *Gnome Terminal Profiles* by Chmouel Boudjnah
+ *OpenOffice* recent documents in OpenOffice by Karol Będkowski
+ *Top* show and send signals to running tasks (Karol)
+ *Truecrypt* show volumes in truecrypt history and allow mounting them
(Karol)
+ *Vinagre* Remote Desktop Viewer (Karol)
+ *XFCE Session Management* (Karol)
+ *Audacious* by Horia V. Corcalciuc
* New Slovenian translation by Andrej Žnidaršič
* Some plugins will now explicitly require a D-Bus connection and fail to
load if no connection was found.
* Add accelerators *Page Up*, *Page Down* and *Home* in the result list.
(Karol)
* Use customized or localized desktop directory instead of hardcoding
``~/Desktop`` by default. It will not affect users who already customized
which directories Kupfer indexes.
* It now is possible to favorite shell commandlines
* *Gajim* plugin now works with version 0.13 (Karol) (LP #489484)
* Basic support for Right-to-left (RTL) interface
* Fix bugs with "loose" Applications (not in system directories), reported
by Chmouel.
* Add accelerator *Ctrl+Return* for **Compose Command**: You may compose a
command object out of an (Object, Action) combination, to be used with the
new action *Run After Delay...*.
* Added file action *Send by Email* to *Claws Mail* plugin (Karol)
* Added file action *Mount as TrueCrypt Volume* to *TrueCrypt* plugin (Karol)
* Many small bugfixes
Localization updates:
* de: Mario Blättermann
* es: Jorge González
* it: Francesco Marella
* pl: Karol Będkowski
* sl: new (Andrej)
* sv: Ulrik Sverdrup
kupfer version c18.1
--------------------
Released 20 November 2009
* Fix bug to toss out malfunctioning plugins properly (Reported by Jan)
* Fix bug in showing the shutdown dialog, reported by user sillyfofilly (LP
484664)
* Fix bug in plugin *Document Templates*, reported by Francesco Marella
(part of LP 471462)
kupfer version c18
------------------
Released 18 November 2009
"Mímisbrunnr"
* New plugins:
+ *Pidgin* by Chmouel Boudjnah
+ *Google Translate* by Karol Będkowski
+ *APT* (package manager APT) by Martin Koelewijn and Ulrik
+ *Document Templates*
+ *Kupfer Plugins*
+ *Show Text*
* *Gajim* plugin matches contacts by jid as well as name, suggested by
Stanislav G-E (LP 462866)
* Action *Rescan* on sources is now debug only (should not be needed)
* Kupfer installs its Python package into ``$PREFIX/share`` by default,
instead of installing as a system-wide Python module.
* Kupfer can take input on stdin and pass as text to an already running
instance
* Fix bug in *Services* for Arch Linux, reported by lh (LP 463071)
* Changes for plugin authors:
+ May use ``uiutils.show_text_result`` to show text
+ ``kupfer.task.ThreadTask`` is now a reliable way to run actions
asynchronously (in a thread)
+ You can use item *Restart Kupfer* to restart (in debug mode)
+ Plugins may be implemented as Python packages, as well as modules
* Updated the dependencies in the README. pygobject 2.18 is required. Added
gvfs as very recommended.
* Other bugfixes
Localization updates:
* de (Mario Blättermann)
* es (Jorge González)
* nl (Martin Koelewijn)
* pl (Karol Będkowski)
* sv
* zh_CH (lh)
kupfer version c17
------------------
Released, 25 October 2009
"A fire lit by nine kinds of wood"
* 8 new plugins by Karol Będkowski:
+ *Claws Mail*, Contacts and actions
+ *Gajim*, Access to gajim contacts
+ *Opera Bookmarks*, for the web browser Opera
+ *PuTTY Sessions*, access to PuTTY sessions
+ *System Services*, start, stop or restart system services
+ *Terminal Server Client*, access to TSClient sessions
+ *VirtualBox*, control virtual machines, Sun or OSE version
+ *Zim*, access pages in the desktop wiki
* New plugin *Chromium Bookmarks* by Francesco Marella
* Plugins missing dependencies will be presented in the GUI with a clear
error message.
* *Firefox Bookmarks* plugin: Workaround Firefox 3.5 writing invalid JSON
(Karol, Ulrik)
* *Locate* plugin: Ignore case by default, add option to control this.
(Karol)
* Kupfer is much more friendly and says "Type to search in *Catalog*" when
it is ready to be used.
* Localization updates:
+ New Simplified Chinese localization (lh)
+ New Dutch localization (Martin Koelewijn)
+ New Portuguese localization (Carlos Pais)
+ Updated pl (Karol)
+ Updated es (Jesús Barbero Rodríguez)
kupfer version c16
------------------
Released 5 October 2009
* Translation to German (Thibaud Roth)
* Polish translation updated (Maciej Kwiatkowski)
* Add search engine descriptions from ``firefox-addons`` (Francesco Marella)
* Speed up directory browsing by using much less system calls
* Improve documentation and put it together into a `Manual`.
* Generate man page from reStructuredText document `Quickstart`.
* Evaluate valid actions (per object) lazily to save work.
* Add accelerators *Ctrl+Q* (select quit) and *Alt+A* (activate)
* Parse even horribly wrong search engine descriptions (Bug reported by
Martin Koelewijn)
kupfer version c15
------------------
* Translation to Polish by Maciej Kwiatkowski
* Speed up the string ranker tremendously; 3x faster in common cases.
* All objects now have an alias in the basic latin alphabet (if possible) so
that, for example, query `wylacz` matches item *Wyłącz*.
* Show notification icon by default
* Read XML with cElementTree (Faster.)
* Read Firefox 3's bookmarks (Python2.5 requires `cjson` module)
* New Plugin: Image Tools, with action *Scale...* and JPEG rotation actions
(*Scale* requires ImageMagick (`convert`), JPEG actions `jpegtran` and
`jhead`)
* Basic support for a Magic Keybinding: summon kupfer with current selection
kupfer version c14.1
--------------------
* Fix two bugs with new browisng mode (soft reset for text mode, backspace or
left to erase a subcatalog search)
kupfer version c14
------------------
* Rewrite and improve browsing mode:
* Browsing the catalog or folders is much improved; it is easier to keep the
overview and be oriented.
* Returning to kupfer after having performed an action, the old object is
still available, but without locking the catalog to its location.
When spawning kupfer again, the previous context is available if you
immediately browse; if you search, you search the whole catalog.
* The search times out after 2 seconds if no key is typed. Now the highlight
text will fade to show this.
* Add accelerators `Ctrl+G` and `Ctrl+T` to get current selection in nautilus
and currently selected text (if available).
kupfer version c13.1
--------------------
* Fix two bugs with *Rename To...*
kupfer version c13
------------------
* New Plugin: Calculator
* New Action: *Rename To...* in File Actions Plugin
* Smaller changes (Stop learned mnemonics database from growing indefinitely,
Catch SIGINT without python's handler, *Copy To...* requires pygobject 2.18
now)
kupfer version c12
------------------
* Translation to Spanish by Leandro Leites
* Preferences. Display plugin settings and options beside the plugin list,
and allow configuring included (and watched) directories.
* Support the new Gnome session protocol to save state on log out.
* Improve embarassingly bad shell command quoting for *Execute* and Tracker tag
actions.
* Specify user data locations with `X-UserData`
* Fix an AttributeError in Notes plugin reported by Francesco Marella
* Smaller fixes (Add/remove favorite could cease to work, Track intantiated
sources better)
kupfer version c11
------------------
The "this one goes to 11" release
* New plugin: Notes (Gnote and Tomboy support)
* Access notes, Actions: *Create Note* and *Append to Note...*
* New plugin: Selected File
* Kupfer ships with a Nautilus python extension that once installed,
you can access the currently selected file in Nautilus from Kupfer,
as the *Selected File* object
This release is localized in: Swedish (100%), Italian (90%)
kupfer version c10.1
--------------------
* Spanish Translation by Leandro Leites
kupfer version c10
------------------
* Updated italian localization
* New plugins: Url Actions, Web Search (rewritten to use all Firefox' search
engines)
* New actions: *Set Default Application*, *Create Archive In...*,
*Restore* (Restore trashed file)
* Add accelerators `Control+R` for reset, `Control+S` for select first
(source) pane and `Control+.` for untoggle text mode.
* Only the bookmarks plugins can toggle "include in toplevel" now.
* Other smaller changes (Refuse invalid Application objects from the
cache)
This release is localized in: Swedish (100%), Italian (93%)
kupfer version c9.1
-------------------
* User interface consistency and behaviour improvements. UI is simpler and
better.
* Other improvements.
This release is localized in: Swedish (100%), Italian (60%)
kupfer version c9
-----------------
The "c9" release
* Search and browse perform better
* The interface is now modal. In command mode we can bind special keys to
new functions. Type period `.` to enter free-text mode (just like in QS).
* Pressing kupfer's keybinding again will hide the window.
* Other smaller improvements
This release is localized in: Swedish (100%), Italian (60%)
kupfer version c8
-----------------
* Make the use of the indirect object pane much more fluid
* Apply interface polish (proper english capitalization of actions and
other objects, other changes)
* Add `Copy To...` action
* Try `xdg-terminal` first in *Open Terminal Here* (non-Gnome users can
either install `xdg-terminal` or symlink it to their terminal program)
* Allow unbinding the keybinding
* Fix a bug with tracker tags
[Please file bug reports and feature requests.][lp]. Read the files in
`Documentation/` and see how you can add new plugins with object and
application knowledge to kupfer.
This release is localized in: Swedish (100%), Italian (60%)
[lp]: http://launchpad.net/kupfer
kupfer version c7
-----------------
The "choice" release
This is a followup with some small changes after the c6 release, which
introduced lots of major changes, including a preferences window and
"application content."
* Allow wnck to be optional. Kupfer needs wnck to do application matching
and focusing of already running applications, but can now run without it if
wnck is not available. Window List plugin also needs wnck
* Rhythmbox plugin should not crash even if library is not found, now kupfer
can run even if rhythmbox's files are not there.
* Applications will match names as well as the executables, so that "gedit"
matches Text Editor regardless of what the displayed localized name is.
[Please file bug reports and feature requests.][lp]. Read the files in
`Documentation/` and see how you can add new plugins with object and
application knowledge to kupfer.
This release is localized in: Swedish (100%), Italian (60%)
[lp]: http://launchpad.net/kupfer
kupfer version c6
-----------------
The "Sisyphus incremental improvements" release
* Preferences window
* Allows setting keybinding on the fly
* List and enable/disable plugins and set plugin options
* Everything was improved slightly, but steadily
* Understands more applications, provides more files and objects,
and actions with **new plugins:** *Rhythmbox, Abiword, Clipboards, Dictionary,
Favorites, Selected Text, Wikipedia*
* Connect applications with their related object sources and make it their
content, such as Rhythmbox music for the Rhythmbox application.
* Applications contain their recently used documents, if
available.
* Firefox and Epiphany bookmarks are identified with each application
* Miscellaneous improvements:
* Kupfer object icon ("blue box")
* *Some* default application associations are installed (others
are learned by launching applications).
* Experimental UI with two-line title+description in browse mode
* Thumbnails for files and albums in browse mode
* Allow sending files and queries to kupfer from the commandline
using `kupfer 'query'` or `kupfer docs/file.pdf`.
* Even more plugins listen to change callbacks or filesystem monitors
to be up to date to the instant.
* Do not display nonexisting files as results
* Fine-tune how sources are loaded and refreshed on load
This release deserves lots of testing. [File bug reports and feature
requests.][bug] Read the files in `Documentation/` and see how you can add
new plugins with object and application knowledge to kupfer.
This release is localized in: Swedish (100%), Italian (60%)
Future: part 2 of beautification is refactoring of the interface, so
that the UI can be modularized and exchanged in plugins.
[bug]: http://launchpad.net/kupfer
kupfer version c5
-----------------
The "Beauty from the inside, part 1" release
* Big refactorings of the whole data model
* Move all of the data model to kupfer.data
* Allow actions with indirect objects "threepane kupfer" (with
means to configure which objects to use for an action etc)
* Uses unicode internally, instead of UTF-8-encoded strings
* Some new actions using new possibilities (Open with any, Move file
to new location, Add/Remove tracker tags) but more is possible.
* Basic manual page included
* Fileactions plugin includes unpack archive/create archive
* Ship extra and demonstration plugins in contrib/ and interals
documentation in Documentation/
* Change learning algorithm to recognize an item's type as well
(so that two objects named "project" can be ranked differently)
* Small fixes (alphabethic sorting for applications, sources, check
if objects still exist after an action, ``rank_adjust`` default actions
slightly)
This release deserves lots of testing. File bug reports and feature
requests. Read the files in Documentation/ and see how you can add
new plugins with object and application knowledge to kupfer.
This release is localized in: Swedish (100%), Italian (80%)
Future: part 2 of beautification is refactoring of the interface, so
that the UI can be exchanged. And preferences will hopefully be implemented
.. -*- encoding: UTF-8 -*-
.. vim: tw=76 ft=rst
kupfer-v208/NEWS 0000777 0000000 0000000 00000000000 11762200422 0022107 2Documentation/VersionHistory.rst ustar 00root root 0000000 0000000 kupfer-v208/README.rst 0000664 0000000 0000000 00000006604 11762200422 0014540 0 ustar 00root root 0000000 0000000 kupfer is a simple, flexible, launcher for Gnome
++++++++++++++++++++++++++++++++++++++++++++++++
:Homepage: http://kaizer.se/wiki/kupfer/
:Credits: Copyright 2007–2011 Ulrik Sverdrup
:Licence: GNU General Public License v3 (or any later version)
Kupfer is an interface for quick and convenient access to applications
and their documents.
The most typical use is to find a specific application and launch it. We
have tried to make Kupfer easy to extend with plugins so that this
quick-access paradigm can be extended to many more objects than just
applications.
Installing
==========
This project is configured for the Waf build system;
Installation follows the steps::
./waf configure
./waf
then::
./waf install
or ::
sudo ./waf install
You can use ``--prefix=$PREFIX`` when configuring to assign an
installation spot. By default, Kupfer is installed for all users.
Installing only for your user, the prefix ``~/.local`` is often used;
you just have to make sure that ``~/.local/bin`` is in your ``$PATH``.
About Waf
---------
Waf is included in both the distributable tarball and the repository (so
that full source code is incuded. See the file `waf` for author and
licensing information).
Waf was acquired through http://waf.googlecode.com/files/waf-1.6.11.tar.bz2
on Saturday, 25 February 2012. The following files extracted::
./waf-light -> ./waf
./waflib -> ./waflib
./ChangeLog -> ./Waf.ChangeLog
./waflib/Tools/* some files excluded
./waflib/extras/* some files excluded
No file contents touched.
Build Requirements
------------------
* Python 2.6 or Python 3
* intltool
* optionally: rst2man (python-docutils) to install the manpage
* optionally: xml2po (gnome-doc-utils) to install mallard help pages
Runtime Requirements
--------------------
Kupfer requires Python 2.6 or later, and the following important libraries:
* gtk python bindings, GTK+ version 2.20 [#]_
* glib python bindings (pygobject) 2.18
* dbus python bindings
* python-xdg
.. [#] GTK+ 2.20 required for using full support. Kupfer is known to run with
version 2.18 as well.
Optional, but very recommended runtime dependencies:
* python-keybinder (see below)
* wnck python bindings
* gvfs
* `keyring` python module
Opportunistic dependencies
* The deprecated 'gnome' module is used for session connection as
fallback
* If available, 'setproctitle' is used to set the process name
* python-appindicator for ubuntu-style notification icon
* nautilus-python for nautilus selected file
* python-gdata for Google plugins
Some plugins will require additional python modules!
Spawning
========
The program is installed as ``kupfer`` into ``$PREFIX/bin``. Only one
instance can be active for one user at a given time. Normal use of
kupfer requires an active dbus session bus.
Keybinder Module
----------------
Keybinder_ is a module for global keyboard shortcuts that originates
from tomboy.
.. _`Keybinder`: http://kaizer.se/wiki/keybinder
You can use kupfer without the keybinder module, for example by
assigning a global keybinding to the ``kupfer`` binary, but it not the
recommended way.
Documentation
=============
Please read ``Documentation/`` and ``Documentation/Manpage.rst`` for
technical documentation. User documentation is installed as GNOME
(Mallard) help pages, available under the "Kupfer Help" object in the
program itself.
.. vim: ft=rst tw=72
kupfer-v208/Waf.ChangeLog 0000664 0000000 0000000 00000025273 11762200422 0015342 0 ustar 00root root 0000000 0000000 NEW IN WAF 1.6.11
-----------------
* Enable custom variables for the boost detection #1089
* Disable the config test execution when detecting boost #1090
* Process moc classes in .cpp files by default #1095
* Apply the chmod attribute to the versioned libraries (vnum) #1097
* Fixed the python detection on OSX #1098
* Changed the win32 color settings for Windows 7 #1099
* Set the default fortran linker for ifort to xiar #1104
NEW IN WAF 1.6.10
-----------------
* Fixed the 'remove' attribute propagation in ant_glob #1086
* Fixed the behavior of recurse(name=xyz) when looking in existing folders
* Fixed a problem with include paths in the relocation tool #1078
* Improved the pgicc compiler detection #1080
* Fixed the behavior of 'waf options' #1076
* Process larger java projects #1074
* Remove the ':' from the drives when dealing with foreign files and folders on Win32
* Let the 'subst' feature process a chmod attribute
* Added a hook for distutils variable query #1083
NEW IN WAF 1.6.9
----------------
* Fixed the duplicate moc file creation in slow_qt4 #1047
* Fixed the Visual Studio 2008 projects creation #1033
* Added a workaround to avoid creating include folders not under the build directory #1049
* Added a default virtual folder structure for out-of-tree build files #1053
* Added a way to set variants containing /, for example linux/debug
* Added a more intuitive behaviour for conf.setenv() #1062
* Fixed the multiple bibliography processing for tex #1040
* Windows CE detection improvements #1065
* Fixed the library installation on OSX
* Fixed the Powerpc/IPhone platform detection
* Added an Xcode project generator
NEW IN WAF 1.6.8
----------------
* Fixed a typo in Utils.py affecting Win32 platforms (copystat) #1029
* Fixed a minor bug in the Eclipse project generator
* Fixed a typo that prevented Waf from running on Pypy-trunk
* Make the xlc/xlc++ compiler detection more accurate by looking at the version number #1022
* Minor perl, python and ruby tool improvements
* Better logs for the boost detection #1036
* Fixed a performance issue in Runner.py #1039
* Changed the position of the linker flags #1025
NEW IN WAF 1.6.7
----------------
* Provide more diagnostic for invalid build groups #914
* Various enhancements to msvs.py
* Read MSVC_VERSIONS and MSVC_TARGETS from the command-line
* Minor cross-compiler detection fix on msvc.py
* Fix the redirections with pipes (waf configure > log)
* Do not display runnable_status exceptions when running with -k
* Let -k stop at the first runnable_status error and -kk run even further
* Merge the add_object extension in the main line (source='file.o')
* Make update_outputs more robust with changes in the task definition #1017
* Qt4 detection on Win32
NEW IN WAF 1.6.6
----------------
* Fix the performance regression related to #974
NEW IN WAF 1.6.5
----------------
* More documentation
* Re-enable the colors for msys
* Add the .ui files for the qt4 translations
* Fix the conf.check_large_file() test
* Fix the conf.check_library() in C++ mode #955
* Improve the latex scanner to avoid depending on generated files #943
* Remove the @file processing from the winrc tasks
* Fix the python detection using python-config
* Add the missing default includes and defines to the moc command
* Improve support for hierarchical go-lang packages #953
* Fix the gfortran verbose flag detection on Windows
* Fix the support of fortran import libraries #950
* Added a fix for running with Python 2.4 on Windows #949
* Limited support for IronPython
* Support for older Visual Studio versions (VC6) #952
* New waf.bat file #964
* New method ConfigSet.keys
* New Visual Studio and Eclipse CTD project generators (waflib/extras)
* New lru_cache tool for use with WAFCACHE (waflib/extras)
NEW IN WAF 1.6.4
----------------
* Fix the Python detection on win32 #883
* Optimize the Python file installation #892
* Force +x permissions on installed fortran programs #893
* Qt library detection fixes #895
* Ensure that unit tests are executed only after the symlinks are created
* Fix the precedence constraints for classes ending in _task #896
* Support the install_path attribute with add_pcfile #913
* Make the goprograms executable when installed #928
* Allow non-python data files in the waf executable #927
* Enforce a build order based on the scanner results #777, #922
* Multiple msvc detection fixes #907 #910 #923 #924 #926
* Fix the -of flag append with dmd #917
* Boost detection fixes #920
* Support newer javac compilers #921
* Fix the execution on python 2.3 for: "waf update", msvc.py, fc.py
* Improve the support for mac applications (demos/mac_app)
* Better default regexps in "waf step"
* New error check for tasks creating the same nodes or having the same identifiers (waf -v)
* New variables conf.env.NO_LOCK_IN_TOP/OUT/RUN for special projects (top='..')
* New example on avoiding rebuilds when moving a project (playground/relocate)
* Improve go-lang support for cgo-packages (fixes #932)
* Fix the progress bar on cmd and msys
NEW IN WAF 1.6.3
----------------
* Fixed the interaction of Fortran configuration tests and WAFCACHE #842
* Various documentation fixes
* Set the PYTHONARCHDIR variable for installing python extensions
* Fixed the Waf file creation with --zip-type=gz (bunzip2 was not replaced by gzip -d)
* Fixed multiple problems in the call to TaskGen.declare_chain(...) #850
* Fixed the task attribute 'vars' which might cause unnecessary rebuilds #852
* Return the value of post_check(...) in conf.check(...) #857
* Rewrite the boost tool (waflib/extras/boost.py) #814, #454, #424
* More fortran file extensions: .for, .FOR #867
* Searching above the root nodes no longer raise exceptions #868
* Msvc detection fixes for non-utf8 encodings #873
* Fixed the destdir processing on Windows #874
* Stop changing the flags on waf -v (make the errors more visible) #875
* Fixed the resource file compilation on Windows #876
* Fixed the vala file installation #881
* New system of plugins for C/C++/Fortran compilers (files named c_* in waflib/extras/)
* New examples of interaction between Waf and existing makefiles (playground/)
* New names for @before/@after: @before_method/@after_method
NEW IN WAF 1.6.2
----------------
* Support for C# debugging files #797
* Add -relocation-model=pic for shared libraries on ldc
* Fixed 'waf dist' for tar files on python 3 #799
* Make the latex scanner recursive #798
* Enable the packing of non-python files in the waf file #802
* Improve the feature sniffing for hybrid programs/libraries #800
* New apidocs + tutorial in Sphinx format
* Add the CPPFLAGS from os.environ #803
* Create the java output directory anywhere #806
* Enable the .luac file installation
* Process Qt translation files
* Detect when the folders were copied and prompt for "waf configure"
* Parse_flags for the *-config outputs on windows (backslashes) #811
* Fix the doxygen task build order + improve the dependency scanner #821
* Various msvc fixes #819, #826, #825
* Ported the batch executor to waf 1.6 (batched_cc)
* New tools: erlang, scala
* Moved conf.multicheck(..) from playground to the library
* New parameter to avoid reading the same scripts: bld.recurse(dir, once=True)
* Detect invalid method calls in 'waf -v' such as env.append/env.add/env.prepend
* New manifest option for jar targets #832
NEW IN WAF 1.6.1
----------------
* Fixed the method check_waf_version #764
* Fixed the name in ctx.recurse(name) #769
* Stop caching the install tasks and tasks that have no outputs #770
* Fix the log in Context.cmd_and_log() when calling with "quiet" #778
* c_preproc exception when a file has the same name as a directory #777
* 'intltool_po' does not install the .mo files #782
* 'intltool_in' was broken #792
* Bind stderr and stdout to the exception in Context.cmd_and_log #779
* Tasks not rebuilding properly when the 'run' method changes #786
* Print the progress bar information as late as possible #787
* Fix for the FRAMEWORK value processing
* Verbose mode should not require the compat15 tools #790
* Let static libraries use other static libraries as in 1.5 #768
* Fix for the boost tool #776
* boost tool update (in playground) #780
* Updated the java tool and examples
* New gcj tool in playground
* Update the c# tool and examples (playground) #796
* Read external c# libraries #774
* Xelatex support #785
* Rebuild fortran files when .mod files change #766
* docs #781
* Improve the ant_glob behaviour on ctx.root + absolute paths
* Fix for glib_mkenums and dbus-binding-tool #795
* New feature 'subst' (see demos/subst)
NEW IN WAF 1.6.0
----------------
General:
* Python 3 syntax by default (runs unmodified for 2.6, 2.7, 3.0 and 3.1)
* Environment -> ConfigSet
* only lists are allowed in ConfigSet
* Better Node apis
* Utils.load_tool -> Context.load_tool
* set_options becomes options
* only the build-related commands require a configured project
* new variant system + build context commands
* removed the pseudo glob in installation methods
* eliminate find_sources_in_dirs
* node.__class__.bld → node.ctx
* bld.new_task_gen(...) disappears, use bld(...)
* network updates for waf tools
* accept node objects in the source and includes attributes
* remove task_gen.allnodes: modify self.source directly
* merge the include system for c, c++, d, gas and nasm
* allow top == out (no build directory)
* merge the Tool/wscript system (detect->configure, set_options->options)
* new command "waf list" to list the x for "waf build --targets=x"
* rename apply_core -> process_source
* rename apply_rule -> process_rule
* rename Task.TaskBase.classes -> Task.classes
* the modules Utils.py and Logs.py are now independent from the rest of waf (imports)
* remove Task.TaskManager and Build.BuildContext.all_task_gen to improve the build group handling
* remove program_USELIB, shlib_USELIB staticlib_USELIB support
* use tasks for target installation
* improve the exception handling (WscriptError was removed, use WafError)
* let the commands access node objects
* infer the build directory from the lock filename
* waf step --file=main.c
* post task generators in a lazy manner
preview 3:
* remove the /W3 flag from msvc default flags
* opt.tool_options -> opt.load (now all commands inherit the 'tool' method)
* conf.check_tool -> conf.load
* do not copy files when creating tar files in 'waf dist'
* add zip files in 'waf dist'
* fix the behaviour of 'waf distcheck'
* preprocessor optimizations
* python 2 fixes
release candidate:
* cache fixes
* fortran fixes
* python 2 and 3 fixes
* docs and docstrings
* support for custom waf files and preludes
* fix in waflib.Context for overriding command classes
* port the doxygen tool
* Utils.to_hashtable -> Utils.str2dict
* change the thread pool to enable thread pool sharing
* fixed a regression on win32 + ansiterm.py + python 3 -> thanks to kesselhaus :-)
* various msvc fixes (thanks to Nicolas Mercier)
kupfer-v208/auxdata/ 0000775 0000000 0000000 00000000000 11762200422 0014472 5 ustar 00root root 0000000 0000000 kupfer-v208/auxdata/kupfer-exec.desktop.in 0000664 0000000 0000000 00000000237 11762200422 0020712 0 ustar 00root root 0000000 0000000
[Desktop Entry]
Version=1.0
Type=Application
Exec=kupfer-exec %F
_Name=Execute in Kupfer
Icon=kupfer
NoDisplay=true
StartupNotify=true
MimeType=text/x-kfcom;
kupfer-v208/auxdata/kupfer-mimetypes.xml.in 0000664 0000000 0000000 00000000605 11762200422 0021130 0 ustar 00root root 0000000 0000000
<_comment>Saved Kupfer Command
kupfer-v208/auxdata/kupfer.desktop.in 0000664 0000000 0000000 00000000436 11762200422 0017771 0 ustar 00root root 0000000 0000000 [Desktop Entry]
Version=1.0
_Name=Kupfer
_GenericName=Application Launcher
_Comment=Convenient command and access tool for applications and documents
Icon=kupfer
Exec=kupfer %F
Type=Application
Categories=Utility;
StartupNotify=true
X-UserData=$CONFIG/kupfer;$DATA/kupfer;$CACHE/kupfer
kupfer-v208/auxdata/kupfer.svg 0000664 0000000 0000000 00000062424 11762200422 0016517 0 ustar 00root root 0000000 0000000
kupfer-v208/auxdata/wscript 0000664 0000000 0000000 00000005252 11762200422 0016114 0 ustar 00root root 0000000 0000000 #! /usr/bin/env python
import os
from waflib import Options, Utils, Logs
def options(opt):
opt.add_option('--no-update-mime',
action='store_true',
default=False,
help='Do not update mime and desktop databases [Default:Update]')
opt.add_option('--no-update-icon-cache',
action='store_true',
default=False,
help='Do not update icon cache [Default:Update]')
def configure(conf):
if not Options.options.no_update_mime:
conf.env["AUXDATA_MIME"] = 1
if not Options.options.no_update_icon_cache:
conf.env["UPDATE_ICON_CACHE"] = 1
def build(bld):
# merge translations into the .desktop file
# and set it up to be installed
def install_desktop_file(desktop_subst_file):
return bld(
features="intltool_in",
podir="../po",
flags = ("-d", "-q", "-u", "-c"),
source = desktop_subst_file + ".in",
target = desktop_subst_file,
install_path = "${DATADIR}/applications",
chmod = 0o755,
)
k_desktop = install_desktop_file("kupfer.desktop")
x_desktop = install_desktop_file("kupfer-exec.desktop")
## install kupfer.desktop as a Thunar sendto object
kd_install = os.path.join(
Utils.subst_vars(k_desktop.install_path, bld.env), "kupfer.desktop")
symlink_location = \
Utils.subst_vars("${DATADIR}/Thunar/sendto/kupfer.desktop", bld.env)
symlink_target = \
os.path.relpath(kd_install, os.path.dirname(symlink_location))
bld.symlink_as(symlink_location, symlink_target)
## install mimetype descriptions
mimetypes_file = "kupfer-mimetypes.xml"
bld(
features="intltool_in",
podir="../po",
flags = ("-x", "-q", "-u", "-c"),
source = mimetypes_file + ".in",
target = mimetypes_file,
install_path = "${DATADIR}/mime/packages/",
)
def update_mime(bld):
Logs.pprint('GREEN',"Updating mime database")
bld.exec_command(["update-mime-database",
Utils.subst_vars("${DATADIR}/mime", bld.env)])
bld.exec_command(["update-desktop-database",
Utils.subst_vars("${DATADIR}/applications", bld.env)])
if bld.is_install and bld.env["AUXDATA_MIME"]:
bld.add_post_fun(update_mime)
## install kupfer.svg icon
icons_inst = bld.install_files("${DATADIR}/icons/hicolor/scalable/apps",
"kupfer.svg")
def update_icon_cache(bld):
icon_dir = Utils.subst_vars('${DATADIR}/icons/hicolor', bld.env)
if not Options.options.destdir:
Logs.pprint('GREEN',"Updating Gtk icon cache.")
command='gtk-update-icon-cache -q -f -t %s' % icon_dir
bld.exec_command(command)
else:
Logs.pprint('YELLOW','Icon cache not updated. After install, run this:')
Logs.pprint('YELLOW','gtk-update-icon-cache -q -f -t %s'%icon_dir)
if icons_inst and bld.is_install and bld.env["UPDATE_ICON_CACHE"]:
bld.add_post_fun(update_icon_cache)
kupfer-v208/bin/ 0000775 0000000 0000000 00000000000 11762200422 0013613 5 ustar 00root root 0000000 0000000 kupfer-v208/bin/kupfer-exec.in 0000775 0000000 0000000 00000001661 11762200422 0016370 0 ustar 00root root 0000000 0000000 #!/bin/sh
# This is a helper program to execute saved command files,
# by sending them to a running instance of Kupfer.
export TEXTDOMAIN='@PACKAGE@'
export TEXTDOMAINDIR='@LOCALEDIR@'
PYTHON='@PYTHON@'
if test ! -f "$1"
then
echo "A file argument required"
exit 1
fi
SERVICE="se.kaizer.kupfer"
OBJ="/interface"
IFACE="se.kaizer.kupfer.Listener"
while test $# != 0
do
FILE=$(readlink -f "$1")
dbus-send --print-reply --dest=$SERVICE $OBJ \
$IFACE.ExecuteFileOnDisplay string:"$FILE" \
string:"$DISPLAY" string:"$DESKTOP_STARTUP_ID" \
> /dev/null 2>&1
KUPFER_RUNNING=$?
if test $KUPFER_RUNNING != 0
then
# NOTE: If you change this string, you have to change
# it inside kupfer/version.py as well.
zenity --info --text "$(gettext 'Could not find running Kupfer')" &
exit 1
fi
shift
done
if test -n "$DESKTOP_STARTUP_ID" -a -n "${PYTHON##@*}"
then
${PYTHON} -c "import gtk.gdk; gtk.gdk.notify_startup_complete()"
fi
kupfer-v208/bin/kupfer.in 0000775 0000000 0000000 00000005216 11762200422 0015446 0 ustar 00root root 0000000 0000000 #!/bin/sh
# kupfer A convenient command and access tool
#
# Copyright 2007--2010 Ulrik Sverdrup
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# This script invokes kupfer by calling an already running instance, or
# starting a new if none is found running.
_hasprefix () {
test "x${1#$2}" != "x$1"
}
PYTHON="@PYTHON@"
PYTHONDIR="@PYTHONDIR@"
_hasprefix "$PYTHON" "@" && PYTHON=python
_hasprefix "$PYTHONDIR" "@" && PYTHONDIR=$(dirname $(readlink -f -- $0))/..
SERVICE="se.kaizer.kupfer"
OBJ="/interface"
IFACE="se.kaizer.kupfer.Listener"
# We allow reading directly from stdin if we pipe text into Kupfer
if ! tty --quiet
then
echo "kupfer: Reading from stdin" >&2
TEXT_INPUT=$(cat)
fi
# If there are any options, like "--help", we run Kupfer directly
_hasprefix "$1" "--"
KUPFER_HAS_OPTIONS=$?
test $KUPFER_HAS_OPTIONS != 0 && dbus-send --type=method_call --print-reply \
--dest=$SERVICE $OBJ $IFACE.PresentOnDisplay string:"$DISPLAY" \
"string:$DESKTOP_STARTUP_ID" >/dev/null 2>&1
KUPFER_RUNNING=$?
if test \( -n "$TEXT_INPUT" -a $KUPFER_HAS_OPTIONS != 0 \)
then
dbus-send --type=method_call --dest=$SERVICE $OBJ \
$IFACE.PutTextOnDisplay string:"$TEXT_INPUT" \
string:"$DISPLAY" string:"$DESKTOP_STARTUP_ID"
fi
_realpaths () {
# Emit realpaths for arguments, separated by NUL bytes
while test $# != 0
do
LINK=$(readlink -e -- "$1")
if test $? != 0 ; then
echo "Error: $1 does not exist" >&2
shift
continue
fi
printf "%s\0" "$LINK"
shift
done
}
if test \( -n "$1" -a $KUPFER_HAS_OPTIONS != 0 \)
then
# NOTE: We must escape commas here since it is dbus-send's
# array item separator. This is then unescaped by kupfer
ARRAY=$(_realpaths "$@" | sed -e 's/,/%%kupfercomma%%/g' | tr \\0 ,)
dbus-send --type=method_call --dest=$SERVICE $OBJ \
$IFACE.PutFilesOnDisplay array:string:"$ARRAY" \
string:"$DISPLAY" string:"$DESKTOP_STARTUP_ID"
fi
if test $KUPFER_RUNNING != 0
then
exec ${PYTHON} "$PYTHONDIR/kupfer.py" $*
fi
if test -n "$DESKTOP_STARTUP_ID"
then
${PYTHON} -c "import gtk.gdk; gtk.gdk.notify_startup_complete()"
fi
kupfer-v208/contrib/ 0000775 0000000 0000000 00000000000 11762200422 0014503 5 ustar 00root root 0000000 0000000 kupfer-v208/contrib/README 0000664 0000000 0000000 00000000601 11762200422 0015360 0 ustar 00root root 0000000 0000000 contrib
=======
A place to put contributed plugins that can serve as examples, even
though they might not be enabled for release or installed by default
The plugins here can't be guaranteed to be compatible with the current
release, it might be that changes to the main code makes them
incomptible.
Custom plugins (like these) should be installed into
~/.local/share/kupfer/plugins
kupfer-v208/contrib/evilplugin.py 0000664 0000000 0000000 00000001337 11762200422 0017237 0 ustar 00root root 0000000 0000000 """
This is a plugin that should do everything wrong, for debugging Purposes
"""
__kupfer_name__ = u"Evil Plugin"
__kupfer_sources__ = (
"EvilSource",
"EvilInstantiationSource",
)
__description__ = u"Evil for debugging purposes (necessary evil)"
__version__ = ""
__author__ = "Ulrik Sverdrup "
from kupfer.objects import Leaf, Action, Source
class EvilError (Exception):
pass
class EvilInstantiationSource (Source):
def __init__(self):
raise EvilError
class EvilSource (Source):
def __init__(self):
Source.__init__(self, u"Evil Source")
def initialize(self):
raise EvilError
def get_items(self):
raise EvilError
def get_icon_name(self):
raise EvilError
def provides(self):
pass
kupfer-v208/contrib/google_translate.py 0000664 0000000 0000000 00000016737 11762200422 0020424 0 ustar 00root root 0000000 0000000 # -*- coding: UTF-8 -*-
'''
Translate TextLeaf by Google Translate.
'''
__kupfer_name__ = _("Google Translate")
__kupfer_actions__ = ("Translate", "TranslateUrl", 'OpenTranslatePage')
__description__ = _("Translate text with Google Translate")
__version__ = "2011-09-14"
__author__ = "Karol Będkowski "
import httplib
import locale
import urllib
import re
import socket
from kupfer.objects import Source, Action, TextLeaf, Leaf, UrlLeaf
from kupfer import icons, utils, pretty
from kupfer.plugin import ssl_support
try:
import cjson
json_decoder = cjson.decode
except ImportError:
import json
json_decoder = json.loads
_GOOGLE_TRANSLATE_HOST = 'ajax.googleapis.com'
_GOOGLE_TRANSLATE_PATH = '/ajax/services/language/translate?'
_GOOGLE_TRANS_LANG_PATH = '/#'
_GOOGLE_TRANS_LANG_HOST = 'translate.google.com'
_HEADER = {
'Content-type':'application/x-www-form-urlencoded',
'Accept': 'text/xml,application/xml,application/xhtml+xml,text/html',
'Accept-charset': 'utf-8;q=0.7'
}
def _parse_encoding_header(response, default="UTF-8"):
"""Parse response's header for an encoding, that is return 'utf-8' for:
text/html; charset=utf-8
"""
ctype = response.getheader("content-type", "")
parts = ctype.split("charset=", 1)
if len(parts) > 1:
return parts[-1]
return default
def _translate(text, lang):
''' Translate @text to @lang. '''
query_param = urllib.urlencode(dict(v="1.0",langpair="|"+lang,
q=text.encode('utf-8')))
try:
if ssl_support.is_supported():
conn = ssl_support.VerifiedHTTPSConnection(_GOOGLE_TRANSLATE_HOST,
timeout=5)
pretty.print_debug(__name__, "Connected to",
_GOOGLE_TRANSLATE_HOST, "using SSL")
else:
conn = httplib.HTTPConnection(_GOOGLE_TRANSLATE_HOST, timeout=5)
conn.request("POST", _GOOGLE_TRANSLATE_PATH, query_param, _HEADER)
resp = conn.getresponse()
if resp.status != 200:
raise ValueError('invalid response %d, %s' % (resp.status,
resp.reason))
response_data = resp.read()
encoding = _parse_encoding_header(resp)
response_data = response_data.decode(encoding, 'replace')
pretty.print_debug(__name__, "Translate response:", repr(response_data))
try:
resp = json_decoder(response_data)
yield resp['responseData']['translatedText'], ''
except:
pretty.print_exc(__name__)
yield text, ''
except socket.timeout:
yield _("Google Translate connection timed out"), ""
except (httplib.HTTPException, ValueError), err:
pretty.print_error(__name__, '_translate error', repr(text), lang, err)
yield _("Error connecting to Google Translate"), ""
finally:
conn.close()
_RE_GET_LANG_SELECT = re.compile(
r'\