Initial commit
|
@ -0,0 +1,8 @@
|
|||
**/__pycache__
|
||||
**/*.*~
|
||||
data/#*#
|
||||
po/*.mo
|
||||
untracked
|
||||
_build
|
||||
.buildconfig
|
||||
flatpak/.flatpak-builder/
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,19 @@
|
|||
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:foaf="http://xmlns.com/foaf/0.1/"
|
||||
xmlns:gnome="http://api.gnome.org/doap-extensions#"
|
||||
xmlns="http://usefulinc.com/ns/doap#">
|
||||
|
||||
<name xml:lang="en">MangaScan</name>
|
||||
<shortdesc xml:lang="en">An online/offline manga reader</shortdesc>
|
||||
<description>An online/offline manga reader</description>
|
||||
<bug-database rdf:resource="https://gitlab.com/valos/MangaScan/issues" />
|
||||
<category rdf:resource="http://api.gnome.org/doap-extensions#apps" />
|
||||
<programming-language>Python</programming-language>
|
||||
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Valéry Febvre</foaf:name>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
</Project>
|
|
@ -0,0 +1,2 @@
|
|||
# Manga Scan
|
||||
Manga Scan is an online / offline manga reader.
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkAboutDialog" id="about_dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="program_name">Manga Scan</property>
|
||||
<property name="version">@VERSION@</property>
|
||||
<property name="copyright">© 2019 Valéry Febvre</property>
|
||||
<property name="comments" translatable="yes">An online/offline manga reader</property>
|
||||
<property name="website">@PACKAGE_URL@</property>
|
||||
<property name="website_label" translatable="yes">Learn more about Manga Scan</property>
|
||||
<property name="authors">@CONTRIBUTORS@</property>
|
||||
<property name="translator_credits" translatable="yes" comments="Add your name to the translator credits list">translator-credits</property>
|
||||
<property name="artists"></property>
|
||||
<property name="logo_icon_name">@APPID@</property>
|
||||
<property name="license_type">gpl-3-0</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -0,0 +1,363 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="libhandy" version="0.0"/>
|
||||
<object class="HdyDialog" id="search_dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="default_width">500</property>
|
||||
<property name="default_height">460</property>
|
||||
<property name="type_hint">normal</property>
|
||||
<child type="titlebar">
|
||||
<object class="HdyTitleBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkHeaderBar" id="header_bar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="back_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">go-previous-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="title">
|
||||
<object class="GtkStack" id="custom_title_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="transition_type">slide-left-right</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="custom_title_servers_page_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_right">38</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Select a server</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">servers</property>
|
||||
<property name="title" translatable="yes">servers</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="custom_title_search_page_search_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">search</property>
|
||||
<property name="title" translatable="yes">search</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="custom_title_manga_page_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="custom_title_manga_page_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">title</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="add_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">manga</property>
|
||||
<property name="title" translatable="yes">manga</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolled_window">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="viewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="HdyColumn" id="responsive_container">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="maximum_width">640</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="transition_duration">250</property>
|
||||
<property name="transition_type">slide-left-right</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="servers_page_list_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">servers</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="search_page_list_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">search</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="manga_page_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="column_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="cover_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-missing-image</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="height">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="author_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Author</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="author_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">author value</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="type_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Type</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="type_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">type value</property>
|
||||
<property name="justify">fill</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="status_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Status</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="status_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">status value</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="server_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Server</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="server_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">server value</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="synopsis_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Synopsis</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="synopsis_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label">synopsis value</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">9</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">manga</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>@APPID@</id>
|
||||
<name>Manga Scan</name>
|
||||
<launchable type="desktop-id">@APPID@.desktop</launchable>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<metadata_license></metadata_license>
|
||||
<content_rating type="oars-1.1" />
|
||||
<summary>An online / offline manga reader for Gnome</summary>
|
||||
<description>
|
||||
<p>An online / offline manga reader for Gnome developed with the aim of being used with Librem 5</p>
|
||||
</description>
|
||||
<releases>
|
||||
<release version="0.0.0" date="2019-03-14">
|
||||
<description>
|
||||
<p>First usable version</p>
|
||||
<ul>
|
||||
<li>Add manga (only two servers)</li>
|
||||
<li>Simple reader (next, prev, no zoom, no swipe, no preload)</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
<categories>
|
||||
<category>Sundry</category>
|
||||
</categories>
|
||||
<screenshots>
|
||||
</screenshots>
|
||||
<url type="homepage">https://gitlab.com/valos/MangaScan</url>
|
||||
<updatecontact>vfebvre@easter-eggs.com</updatecontact>
|
||||
<developer_name>Valéry Febvre</developer_name>
|
||||
</component>
|
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Name=Manga Scan
|
||||
Comment=An online / offline manga reader
|
||||
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
|
||||
Icon=@ICON@
|
||||
Exec=mangascan
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Sundry;GTK;GNOME;
|
||||
MimeType=application/octet-stream;
|
||||
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords=manga;reader;
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist>
|
||||
<enum id="com.gitlab.valos.MangaScan.Sorting">
|
||||
<value nick="a-z" value="0" />
|
||||
<value nick="z-a" value="1" />
|
||||
<value nick="last_added" value="2" />
|
||||
</enum>
|
||||
<schema path="/com/gitlab/valos/MangaScan/" id="com.gitlab.valos.MangaScan" gettext-domain="mangascan">
|
||||
<key type="b" name="dark-theme">
|
||||
<default>false</default>
|
||||
<summary>Use dark GTK+ theme</summary>
|
||||
<description>Use the dark variant of your GTK+ theme. Please note that not every GTK+ theme has a dark variant.</description>
|
||||
</key>
|
||||
<key type="ai" name="window-size">
|
||||
<default>[1050, 600]</default>
|
||||
<summary>Window size</summary>
|
||||
<description>Remember the window size.</description>
|
||||
</key>
|
||||
<key type="b" name="development-backup-mode">
|
||||
<default>false</default>
|
||||
<summary>Backup the database</summary>
|
||||
<description>If an error occurs while saving the database, a backup can be found at ~/.cache/mangascan/backups</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
|
@ -0,0 +1,6 @@
|
|||
/* Main window - manga page - chapters list */
|
||||
|
||||
.listboxrow-chapter {
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 16px;
|
||||
}
|
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 8.3 KiB |
|
@ -0,0 +1,28 @@
|
|||
datadir = join_paths('share', 'icons')
|
||||
icondir = join_paths('hicolor', 'scalable', 'apps')
|
||||
if get_option('profile') == 'development'
|
||||
install_data (
|
||||
join_paths(icondir, 'com.gitlab.valos.MangaScan.svg'),
|
||||
install_dir: join_paths(datadir, icondir),
|
||||
rename: 'com.gitlab.valos.MangaScanDevel.svg'
|
||||
)
|
||||
else
|
||||
install_data (
|
||||
join_paths(icondir, 'com.gitlab.valos.MangaScan.svg'),
|
||||
install_dir: join_paths(datadir, icondir)
|
||||
)
|
||||
endif
|
||||
|
||||
icondir = join_paths('hicolor', 'symbolic', 'apps')
|
||||
if get_option('profile') == 'development'
|
||||
install_data (
|
||||
join_paths(icondir, 'com.gitlab.valos.MangaScan-symbolic.svg'),
|
||||
install_dir: join_paths(datadir, icondir),
|
||||
rename: 'com.gitlab.valos.MangaScanDevel-symbolic.svg'
|
||||
)
|
||||
else
|
||||
install_data (
|
||||
join_paths(icondir, 'com.gitlab.valos.MangaScan-symbolic.svg'),
|
||||
install_dir: join_paths(datadir, icondir)
|
||||
)
|
||||
endif
|
After Width: | Height: | Size: 648 B |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 522 B |
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 47 KiB |
|
@ -0,0 +1,512 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="libhandy" version="0.0"/>
|
||||
<object class="GtkGrid" id="first_start_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="welcome_box">
|
||||
<property name="width_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_left">25</property>
|
||||
<property name="margin_right">25</property>
|
||||
<property name="margin_top">25</property>
|
||||
<property name="margin_bottom">25</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="app_logo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">False</property>
|
||||
<property name="pixel_size">140</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">12</property>
|
||||
<property name="label" translatable="yes" comments="The umbrella sentence of the application on the first start screen">Manga Scan</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="size" value="21000"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="subtitle_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">10</property>
|
||||
<property name="label" translatable="yes" comments="The subtitle of the umbrella sentence in the first start screen. This is a sentence which gives the user a starting point what he can do if he opens the application for the first time.">An online / offline manga reader.</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="track_visited_links">False</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="manga_page_menubutton_popover">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="delete_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="action_name">app.delete</property>
|
||||
<property name="text" translatable="yes">Delete</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="menubutton_popover">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="settings_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="action_name">app.settings</property>
|
||||
<property name="text" translatable="yes">Preferences</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="shortcuts_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="action_name">app.shortcuts</property>
|
||||
<property name="text" translatable="yes">Keyboard Shortcuts</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton" id="about_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="action_name">app.about</property>
|
||||
<property name="text" translatable="yes" comments=""Manga Scan" is the application name">About</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="HdyTitleBar" id="titlebar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkHeaderBar" id="headerbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Manga Scan</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="left_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">start</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="left_button_stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hhomogeneous">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">library</property>
|
||||
<property name="title" translatable="yes">library</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">go-previous-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">manga</property>
|
||||
<property name="title" translatable="yes">manga</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">go-previous-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">reader</property>
|
||||
<property name="title" translatable="yes">reader</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="menubutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="popover">menubutton_popover</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">open-menu-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkBox" id="spinner_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkSpinner">
|
||||
<property name="width_request">50</property>
|
||||
<property name="height_request">50</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkFlowBox" id="library_page_flowbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">library</property>
|
||||
<property name="title" translatable="yes">library</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="manga_page_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="column_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="cover_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-missing-image</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="height">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="author_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Author</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="author_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">author value</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="type_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Type</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="type_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">type value</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="status_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Status</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="status_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">status value</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="server_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Server</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="server_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">server value</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="synopsis_label_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Synopsis</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="synopsis_value_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label">synopsis value</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">9</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="chapters_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">10</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">manga</property>
|
||||
<property name="title" translatable="yes">manga</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="reader_page_viewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">reader</property>
|
||||
<property name="title" translatable="yes">reader</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/com/gitlab/valos/MangaScan">
|
||||
<file compressed="true">css/style.css</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">about_dialog.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">add_dialog.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">main_window.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">settings_dialog.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">shortcuts_overview.ui</file>
|
||||
<file compressed="true">icons/ui/flags/es.png</file>
|
||||
<file compressed="true">icons/ui/flags/fr.png</file>
|
||||
<file compressed="true">icons/ui/favicons/japscan.ico</file>
|
||||
<file compressed="true">icons/ui/favicons/submanga.ico</file>
|
||||
<file compressed="true">images/logo.png</file>
|
||||
</gresource>
|
||||
</gresources>
|
|
@ -0,0 +1,93 @@
|
|||
gnome = import('gnome')
|
||||
|
||||
message('Compiling resources')
|
||||
|
||||
gnome.compile_resources(
|
||||
meson.project_name(),
|
||||
meson.project_name() + '.gresource.xml',
|
||||
gresource_bundle: true,
|
||||
source_dir: '.',
|
||||
install_dir: DATA_DIR,
|
||||
install: true,
|
||||
dependencies: configure_file (
|
||||
input: 'about_dialog.ui.in',
|
||||
output: 'about_dialog.ui',
|
||||
configuration: conf
|
||||
)
|
||||
)
|
||||
|
||||
# Installing the schema file
|
||||
install_data(
|
||||
project_id + '.gschema.xml',
|
||||
install_dir: 'share/glib-2.0/schemas'
|
||||
)
|
||||
|
||||
desktop_conf = configuration_data()
|
||||
application_id = 'com.gitlab.valos.MangaScan'
|
||||
if get_option('profile') == 'development'
|
||||
application_id = 'com.gitlab.valos.MangaScanDevel'
|
||||
endif
|
||||
desktop_conf.set('ICON', application_id)
|
||||
desktop = i18n.merge_file(
|
||||
'desktop',
|
||||
input: configure_file(
|
||||
input: files('com.gitlab.valos.MangaScan.desktop.in.in'),
|
||||
output: 'com.gitlab.valos.MangaScan.desktop.in',
|
||||
configuration: desktop_conf
|
||||
),
|
||||
output: '@0@.desktop'.format(application_id),
|
||||
po_dir: join_paths(meson.source_root(), 'po'),
|
||||
type: 'desktop',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
|
||||
)
|
||||
|
||||
# Validating the desktop file
|
||||
desktop_file_validate = find_program('desktop-file-validate', required:false)
|
||||
if desktop_file_validate.found()
|
||||
test (
|
||||
'Validate desktop file',
|
||||
desktop_file_validate,
|
||||
args: join_paths(meson.current_build_dir (), application_id + '.desktop')
|
||||
)
|
||||
endif
|
||||
|
||||
appdata_conf = configuration_data()
|
||||
application_id = 'com.gitlab.valos.MangaScan'
|
||||
if get_option('profile') == 'development'
|
||||
application_id = 'com.gitlab.valos.MangaScanDevel'
|
||||
endif
|
||||
appdata_conf.set('APPID', application_id)
|
||||
appdata = i18n.merge_file(
|
||||
'appdata',
|
||||
input: configure_file(
|
||||
input: files('com.gitlab.valos.MangaScan.appdata.xml.in.in'),
|
||||
output: 'com.gitlab.valos.MangaScan.appdata.xml.in',
|
||||
configuration: appdata_conf
|
||||
),
|
||||
output: application_id + '.appdata.xml',
|
||||
install: true,
|
||||
install_dir: join_paths(join_paths('share'), 'metainfo'),
|
||||
po_dir: join_paths(meson.source_root(), 'po')
|
||||
)
|
||||
|
||||
|
||||
# Validating the appdata file
|
||||
appstreamcli = find_program('appstream-util', required: false)
|
||||
if appstreamcli.found()
|
||||
test (
|
||||
'Validate appdata file',
|
||||
appstreamcli,
|
||||
args: ['validate-relax', join_paths(meson.current_build_dir (), application_id + '.appdata.xml')]
|
||||
)
|
||||
endif
|
||||
|
||||
# Validating schemas
|
||||
compile_schemas = find_program('glib-compile-schemas', required: false)
|
||||
if compile_schemas.found()
|
||||
test('Validate schema file', compile_schemas,
|
||||
args: ['--strict', '--dry-run', meson.current_source_dir()]
|
||||
)
|
||||
endif
|
||||
|
||||
subdir('icons')
|
|
@ -0,0 +1,201 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<requires lib="libhandy" version="0.0"/>
|
||||
<object class="HdyDialog" id="settings_dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="default_width">500</property>
|
||||
<property name="default_height">460</property>
|
||||
<property name="type_hint">normal</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="headerbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes" comments="Title of the settings dialog">Settings</property>
|
||||
<property name="show_close_button">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolled_window">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="viewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="HdyColumn" id="responsive_container">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="maximum_width">500</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="frame_box">
|
||||
<property name="height_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_top">15</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="section_label_general">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="label" translatable="yes">General</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="section_frame_general">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">20</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="section_list_box_general">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="settings_theme_row">
|
||||
<property name="width_request">100</property>
|
||||
<property name="height_request">50</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="settings_theme_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">8</property>
|
||||
<property name="margin_right">8</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="settings_theme_label_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="settings_theme_name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="label" translatable="yes">Dark Theme</property>
|
||||
<property name="ellipsize">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="settings_theme_description">
|
||||
<property name="name">SubtitleLabel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="label" translatable="yes">Use dark GTK+ theme</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="9500"/>
|
||||
</attributes>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="settings_theme_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts_overview">
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">True</property>
|
||||
<property name="section-name">shortcuts</property>
|
||||
<property name="max-height">10</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes" context="Shortcut window description">Application</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes" context="Shortcut window description">Add manga</property>
|
||||
<property name="accelerator"><Primary>plus</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes" context="Shortcut window description">Open preferences</property>
|
||||
<property name="accelerator"><Primary>P</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"app-id" : "com.gitlab.valos.MangaScanDevel",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "master",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"tags" : [
|
||||
"devel",
|
||||
"development",
|
||||
"nightly"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"command" : "mangascan",
|
||||
"finish-args" : [
|
||||
"--share=ipc",
|
||||
"--share=network",
|
||||
"--socket=x11",
|
||||
"--socket=wayland",
|
||||
"--filesystem=home",
|
||||
"--filesystem=xdg-run/dconf",
|
||||
"--filesystem=~/.config/dconf:ro",
|
||||
"--filesystem=xdg-run/gvfs",
|
||||
"--env=DCONF_USER_CONFIG_DIR=.config/dconf",
|
||||
"--talk-name=ca.desrt.dconf",
|
||||
"--talk-name=org.gtk.vfs",
|
||||
"--talk-name=org.gtk.vfs.*",
|
||||
"--talk-name=org.freedesktop.Notifications"
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "cfscrape",
|
||||
"buildsystem" : "simple",
|
||||
"build-commands" : [
|
||||
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} cfscrape"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl",
|
||||
"sha256" : "61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39"
|
||||
},
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl",
|
||||
"sha256" : "ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
|
||||
},
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl",
|
||||
"sha256" : "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
|
||||
},
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl",
|
||||
"sha256" : "993f830721089fef441cdfeb4b2c8c9df86f0c63239f06bd025a76a7daddb033"
|
||||
},
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl",
|
||||
"sha256" : "7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b"
|
||||
},
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/88/15/f1ede66075340071e53d249b340e2e0989b454de09be2312aab18d286446/cfscrape-1.9.6-py3-none-any.whl",
|
||||
"sha256" : "8aba80eb002869577b2dc59edc158e73ad7cefc837abf39dbead5ca142a55e49"
|
||||
}
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "node",
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "https://github.com/nodejs/node/archive/v11.10.0.tar.gz",
|
||||
"sha256" : "ed2a5a7430cb67eaca3adf2e3455c75f2d0b4443af76f4e6fb74c4dcb9c30e9e"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "beautifulsoup4",
|
||||
"buildsystem" : "simple",
|
||||
"build-commands" : [
|
||||
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} beautifulsoup4"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/77/78/bca00cc9fa70bba1226ee70a42bf375c4e048fe69066a0d9b5e69bc2a79a/soupsieve-1.8-py2.py3-none-any.whl",
|
||||
"sha256" : "afa56bf14907bb09403e5d15fbed6275caa4174d36b975226e3b67a3bb6e2c4b"
|
||||
},
|
||||
{
|
||||
"type" : "file",
|
||||
"url" : "https://files.pythonhosted.org/packages/1d/5d/3260694a59df0ec52f8b4883f5d23b130bc237602a1411fa670eae12351e/beautifulsoup4-4.7.1-py3-none-any.whl",
|
||||
"sha256" : "034740f6cb549b4e932ae1ab975581e6103ac8f942200a0e9759065984391858"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libhandy",
|
||||
"buildsystem" : "meson",
|
||||
"config-opts" : [
|
||||
"-Dglade_catalog=disabled"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"tag" : "v0.0.8",
|
||||
"url" : "https://source.puri.sm/Librem5/libhandy.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "mangascan",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"-Dprofile=development"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.com/valos/MangaScan.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"build-options" : {
|
||||
"env" : {
|
||||
"LANGUAGE" : "fr_FR.utf-8",
|
||||
"LANG" : "fr_FR.utf-8"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
#!@PYTHON@
|
||||
|
||||
import sys
|
||||
import os
|
||||
import locale
|
||||
import gettext
|
||||
|
||||
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
|
||||
sys.path.insert(1, '@PYTHON_DIR@')
|
||||
|
||||
from gi.repository import Gio
|
||||
|
||||
localedir = '@LOCALE_DIR@'
|
||||
pkgdatadir = '@DATA_DIR@'
|
||||
extensiondir = '@EXTENSION_DIR@'
|
||||
|
||||
from mangascan.application import Application
|
||||
|
||||
def install_excepthook():
|
||||
""" Make sure we exit when an unhandled exception occurs. """
|
||||
from gi.repository import Gtk
|
||||
old_hook = sys.excepthook
|
||||
|
||||
def new_hook(etype, evalue, etb):
|
||||
old_hook(etype, evalue, etb)
|
||||
while Gtk.main_level():
|
||||
Gtk.main_quit()
|
||||
sys.exit()
|
||||
sys.excepthook = new_hook
|
||||
|
||||
if __name__ == "__main__":
|
||||
install_excepthook()
|
||||
|
||||
locale.bindtextdomain('mangascan', localedir)
|
||||
locale.textdomain('mangascan')
|
||||
gettext.bindtextdomain('mangascan', localedir)
|
||||
gettext.textdomain('mangascan')
|
||||
|
||||
resource = Gio.resource_load(os.path.join(pkgdatadir, 'mangascan.gresource'))
|
||||
Gio.Resource._register(resource)
|
||||
|
||||
if @PROFILE@ == 'Devel':
|
||||
Application.development_mode = True
|
||||
Application.application_id = 'com.gitlab.valos.MangaScanDevel'
|
||||
else:
|
||||
Application.development_mode = False
|
||||
|
||||
app = Application()
|
||||
|
||||
exit_status = app.run(sys.argv)
|
||||
sys.exit(exit_status)
|
|
@ -0,0 +1,177 @@
|
|||
from gettext import gettext as _
|
||||
import threading
|
||||
|
||||
from gi.repository import Gio
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Notify
|
||||
from gi.repository.GdkPixbuf import InterpType
|
||||
from gi.repository.GdkPixbuf import Pixbuf
|
||||
from gi.repository import Pango
|
||||
|
||||
from mangascan.servers import get_servers_list
|
||||
|
||||
|
||||
class AddDialog():
|
||||
server = None
|
||||
page = None
|
||||
manga = None
|
||||
search_lock = False
|
||||
|
||||
def __init__(self, window):
|
||||
self.window = window
|
||||
self.builder = Gtk.Builder()
|
||||
self.builder.add_from_resource("/com/gitlab/valos/MangaScan/add_dialog.ui")
|
||||
|
||||
# Header bar
|
||||
self.headerbar = self.builder.get_object('headerbar')
|
||||
self.builder.get_object('back_button').connect("clicked", self.on_back_button_clicked)
|
||||
|
||||
self.custom_title_stack = self.builder.get_object("custom_title_stack")
|
||||
self.stack = self.builder.get_object("stack")
|
||||
|
||||
# Servers page
|
||||
list_box = self.builder.get_object('servers_page_list_box')
|
||||
list_box.connect("row-activated", self.on_server_clicked)
|
||||
|
||||
for server in get_servers_list():
|
||||
row = Gtk.ListBoxRow()
|
||||
row.data = server
|
||||
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
|
||||
row.add(box)
|
||||
|
||||
# Server logo
|
||||
pix = Pixbuf.new_from_resource_at_scale(
|
||||
'/com/gitlab/valos/MangaScan/icons/ui/favicons/{0}.ico'.format(server['id']), 16, 16, True)
|
||||
logo = Gtk.Image(xalign=0)
|
||||
logo.set_from_pixbuf(pix)
|
||||
box.pack_start(logo, False, True, 0)
|
||||
|
||||
# Server title
|
||||
label = Gtk.Label(xalign=0)
|
||||
label.set_text(server['name'])
|
||||
box.pack_start(label, True, True, 0)
|
||||
|
||||
# Server country flag
|
||||
pix = Pixbuf.new_from_resource_at_scale(
|
||||
'/com/gitlab/valos/MangaScan/icons/ui/flags/{0}.png'.format(server['country']), 32, 32, True)
|
||||
flag = Gtk.Image(xalign=1)
|
||||
flag.set_from_pixbuf(pix)
|
||||
box.pack_start(flag, False, True, 0)
|
||||
|
||||
list_box.add(row)
|
||||
|
||||
list_box.show_all()
|
||||
|
||||
# Search page
|
||||
self.custom_title_search_page_search_entry = self.builder.get_object('custom_title_search_page_search_entry')
|
||||
self.custom_title_search_page_search_entry.connect("activate", self.on_search_entry_activated)
|
||||
|
||||
self.search_page_list_box = self.builder.get_object('search_page_list_box')
|
||||
self.search_page_list_box.connect("row-activated", self.on_manga_clicked)
|
||||
|
||||
# Manga page
|
||||
self.custom_title_manga_page_label = self.builder.get_object('custom_title_manga_page_label')
|
||||
self.builder.get_object('add_button').connect("clicked", self.on_add_button_clicked)
|
||||
|
||||
self.show_page('servers')
|
||||
|
||||
def clear_search(self):
|
||||
self.custom_title_search_page_search_entry.set_text('')
|
||||
for child in self.search_page_list_box.get_children():
|
||||
self.search_page_list_box.remove(child)
|
||||
|
||||
def on_add_button_clicked(self, button):
|
||||
self.server.save_manga_data_and_cover(self.manga)
|
||||
|
||||
notification = Notify.Notification.new(_('{0} manga added').format(self.manga['name']))
|
||||
notification.set_timeout(Notify.EXPIRES_NEVER)
|
||||
notification.show()
|
||||
|
||||
self.window.populate_library()
|
||||
|
||||
def on_back_button_clicked(self, button):
|
||||
if self.page == 'servers':
|
||||
self.dialog.close()
|
||||
elif self.page == 'search':
|
||||
self.show_page('servers')
|
||||
elif self.page == 'manga':
|
||||
self.show_page('search')
|
||||
|
||||
def on_manga_clicked(self, listbox, row):
|
||||
self.manga = self.server.get_manga_data(row.data)
|
||||
print(self.manga)
|
||||
|
||||
cover_stream = Gio.MemoryInputStream.new_from_data(self.server.get_manga_cover_image(self.manga['id']), None)
|
||||
pixbuf = Pixbuf.new_from_stream_at_scale(cover_stream, 180, -1, True, None)
|
||||
|
||||
self.builder.get_object('cover_image').set_from_pixbuf(pixbuf)
|
||||
|
||||
self.builder.get_object('author_value_label').set_text(self.manga['author'] or '-')
|
||||
self.builder.get_object('type_value_label').set_text(self.manga['type'] or '-')
|
||||
self.builder.get_object('status_value_label').set_text(self.manga['status'] or '-')
|
||||
self.builder.get_object('server_value_label').set_text(
|
||||
'{0} ({1} chapters)'.format(self.server.name, len(self.manga['chapters'])))
|
||||
|
||||
self.builder.get_object('synopsis_value_label').set_text(self.manga['synopsis'] or '-')
|
||||
|
||||
self.show_page('manga')
|
||||
|
||||
def on_search_entry_activated(self, entry):
|
||||
term = entry.get_text().strip()
|
||||
if not term or self.search_lock:
|
||||
return
|
||||
self.search_lock = True
|
||||
|
||||
self.clear_search()
|
||||
|
||||
def run():
|
||||
result = self.server.search(term)
|
||||
GLib.idle_add(populate, result)
|
||||
|
||||
def populate(result):
|
||||
for item in result:
|
||||
print(item)
|
||||
row = Gtk.ListBoxRow()
|
||||
row.data = item
|
||||
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
|
||||
row.add(box)
|
||||
label = Gtk.Label(xalign=0, margin=6)
|
||||
label.set_ellipsize(Pango.EllipsizeMode.END)
|
||||
label.set_text(item['name'])
|
||||
box.pack_start(label, True, True, 0)
|
||||
|
||||
self.search_page_list_box.add(row)
|
||||
|
||||
self.search_page_list_box.show_all()
|
||||
self.search_lock = False
|
||||
|
||||
return False
|
||||
|
||||
thread = threading.Thread(target=run)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
def on_server_clicked(self, listbox, row):
|
||||
self.server = row.data['class']()
|
||||
print(self.server)
|
||||
self.show_page('search')
|
||||
|
||||
def open(self, action, param):
|
||||
self.dialog = self.builder.get_object("search_dialog")
|
||||
|
||||
self.dialog.set_modal(True)
|
||||
self.dialog.set_transient_for(self.window)
|
||||
self.dialog.present()
|
||||
|
||||
def show_page(self, name):
|
||||
if name == 'search':
|
||||
self.custom_title_search_page_search_entry.set_placeholder_text(_('Search in {0}...').format(self.server.name))
|
||||
if self.page == 'servers':
|
||||
self.clear_search()
|
||||
elif name == 'manga':
|
||||
self.custom_title_manga_page_label.set_text(self.manga['name'])
|
||||
|
||||
self.custom_title_stack.set_visible_child_name(name)
|
||||
self.stack.set_visible_child_name(name)
|
||||
self.page = name
|
|
@ -0,0 +1,74 @@
|
|||
import gi
|
||||
import logging
|
||||
import sys
|
||||
|
||||
gi.require_version('Gtk', '3.0')
|
||||
gi.require_version('Handy', '0.0')
|
||||
gi.require_version('Notify', '0.7')
|
||||
|
||||
from gi.repository import Gio
|
||||
from gi.repository import GLib
|
||||
from gi.repository import GObject
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Handy
|
||||
from gi.repository import Notify
|
||||
|
||||
from mangascan.main_window import MainWindow
|
||||
|
||||
|
||||
class Application(Gtk.Application):
|
||||
development_mode = False
|
||||
application_id = "com.gitlab.valos.MangaScan"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, application_id=self.application_id, flags=Gio.ApplicationFlags.HANDLES_OPEN)
|
||||
self.window = None
|
||||
|
||||
def do_startup(self):
|
||||
Gtk.Application.do_startup(self)
|
||||
|
||||
GLib.set_application_name('Manga Scan')
|
||||
GLib.set_prgname("Manga Scan")
|
||||
|
||||
Notify.init('Manga Scan')
|
||||
|
||||
# Register LibHandy Responsive Column
|
||||
GObject.type_register(Handy.Column)
|
||||
|
||||
def do_activate(self):
|
||||
if not self.window:
|
||||
self.window = MainWindow(application=self, title="Manga Scan", icon_name=self.application_id)
|
||||
self.window.application = self
|
||||
|
||||
self.add_global_accelerators()
|
||||
self.add_actions()
|
||||
|
||||
self.window.present()
|
||||
|
||||
def get_logger(self):
|
||||
logger = logging.getLogger()
|
||||
|
||||
if self.development_mode is True:
|
||||
logging.basicConfig(format="%(asctime)s | %(levelname)s | %(message)s", datefmt='%d-%m-%y %H:%M:%S', level=logging.DEBUG)
|
||||
else:
|
||||
logging.basicConfig(format="%(asctime)s | %(levelname)s | %(message)s", datefmt='%d-%m-%y %H:%M:%S', level=logging.INFO)
|
||||
|
||||
return logger
|
||||
|
||||
def add_actions(self):
|
||||
quit_action = Gio.SimpleAction.new("quit", None)
|
||||
quit_action.connect("activate", self.on_quit_menu_clicked)
|
||||
self.add_action(quit_action)
|
||||
|
||||
self.window.add_actions()
|
||||
|
||||
def add_global_accelerators(self):
|
||||
self.window.add_global_accelerators()
|
||||
|
||||
def on_quit_menu_clicked(self, action, param):
|
||||
self.quit()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = Application()
|
||||
app.run(sys.argv)
|
|
@ -0,0 +1,53 @@
|
|||
from gi.repository import GLib, Gio
|
||||
|
||||
setting = Gio.Settings.new("com.gitlab.valos.MangaScan")
|
||||
|
||||
dark_theme = "dark-theme"
|
||||
first_start_screen = "first-start-screen"
|
||||
window_size = "window-size"
|
||||
sort_order = "sort-order"
|
||||
development_backup_mode = "development-backup-mode"
|
||||
|
||||
|
||||
def get_dark_theme():
|
||||
return setting.get_boolean(dark_theme)
|
||||
|
||||
|
||||
def set_dark_theme(value):
|
||||
setting.set_boolean(dark_theme, value)
|
||||
|
||||
|
||||
def get_window_size():
|
||||
return setting.get_value(window_size)
|
||||
|
||||
|
||||
def set_window_size(list):
|
||||
g_variant = GLib.Variant('ai', list)
|
||||
setting.set_value(window_size, g_variant)
|
||||
|
||||
|
||||
def get_sort_order():
|
||||
value = setting.get_enum(sort_order)
|
||||
if value == 0:
|
||||
return "A-Z"
|
||||
elif value == 1:
|
||||
return "Z-A"
|
||||
elif value == 2:
|
||||
return "last_added"
|
||||
|
||||
|
||||
def set_sort_order(value):
|
||||
if value == "A-Z":
|
||||
setting.set_enum(sort_order, 0)
|
||||
elif value == "Z-A":
|
||||
setting.set_enum(sort_order, 1)
|
||||
elif value == "last_added":
|
||||
setting.set_enum(sort_order, 2)
|
||||
|
||||
|
||||
def get_development_backup_mode():
|
||||
return setting.get_boolean(development_backup_mode)
|
||||
|
||||
|
||||
def set_development_backup_mode(value):
|
||||
setting.set_boolean(development_backup_mode, value)
|
|
@ -0,0 +1,272 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from gi.repository import Gio
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gtk
|
||||
from gi.repository.GdkPixbuf import Pixbuf
|
||||
|
||||
from mangascan.add_dialog import AddDialog
|
||||
import mangascan.config_manager
|
||||
from mangascan.settings_dialog import SettingsDialog
|
||||
from mangascan.manga import Manga
|
||||
from mangascan.reader import Reader
|
||||
|
||||
|
||||
class MainWindow(Gtk.ApplicationWindow):
|
||||
mobile_width = False
|
||||
page = 'library'
|
||||
manga = None
|
||||
reader = None
|
||||
first_start_grid = None
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.logging_manager = kwargs['application'].get_logger()
|
||||
|
||||
self.builder = Gtk.Builder()
|
||||
self.builder.add_from_resource("/com/gitlab/valos/MangaScan/main_window.ui")
|
||||
self.stack = self.builder.get_object('stack')
|
||||
self.reader = Reader(self.builder)
|
||||
|
||||
self.assemble_window()
|
||||
|
||||
if Gio.Application.get_default().development_mode is True:
|
||||
mangascan.config_manager.set_development_backup_mode(True)
|
||||
|
||||
def add_actions(self):
|
||||
add_action = Gio.SimpleAction.new("add", None)
|
||||
add_action.connect("activate", self.on_left_button_clicked)
|
||||
|
||||
delete_action = Gio.SimpleAction.new("delete", None)
|
||||
delete_action.connect("activate", self.on_delete_button_clicked)
|
||||
|
||||
settings_action = Gio.SimpleAction.new("settings", None)
|
||||
settings_action.connect("activate", self.on_settings_menu_clicked)
|
||||
|
||||
about_action = Gio.SimpleAction.new("about", None)
|
||||
about_action.connect("activate", self.on_about_menu_clicked)
|
||||
|
||||
shortcuts_action = Gio.SimpleAction.new("shortcuts", None)
|
||||
shortcuts_action.connect("activate", self.on_shortcuts_menu_clicked)
|
||||
|
||||
self.application.add_action(add_action)
|
||||
self.application.add_action(delete_action)
|
||||
self.application.add_action(settings_action)
|
||||
self.application.add_action(about_action)
|
||||
self.application.add_action(shortcuts_action)
|
||||
|
||||
def add_global_accelerators(self):
|
||||
self.application.set_accels_for_action("app.settings", ["<Control>p"])
|
||||
self.application.set_accels_for_action("app.add", ["<Control>plus"])
|
||||
|
||||
def apply_theme(self):
|
||||
gtk_settings = Gtk.Settings.get_default()
|
||||
|
||||
gtk_settings.set_property("gtk-application-prefer-dark-theme", mangascan.config_manager.get_dark_theme())
|
||||
|
||||
def assemble_window(self):
|
||||
window_size = mangascan.config_manager.get_window_size()
|
||||
self.set_default_size(window_size[0], window_size[1])
|
||||
|
||||
self.create_titlebar()
|
||||
self.create_library()
|
||||
|
||||
self.connect("delete-event", self.on_application_quit)
|
||||
self.connect("check-resize", self.responsive_listener)
|
||||
|
||||
self.custom_css()
|
||||
self.apply_theme()
|
||||
self.show_all()
|
||||
|
||||
def change_layout(self):
|
||||
pass
|
||||
|
||||
def create_first_start_screen(self):
|
||||
self.first_start_grid = self.builder.get_object("first_start_grid")
|
||||
|
||||
pix = Pixbuf.new_from_resource_at_scale("/com/gitlab/valos/MangaScan/images/logo.png", 256, 256, True)
|
||||
app_logo = self.builder.get_object("app_logo")
|
||||
app_logo.set_from_pixbuf(pix)
|
||||
|
||||
self.add(self.first_start_grid)
|
||||
|
||||
def create_library(self):
|
||||
root_path = os.path.join(str(Path.home()), 'MangaScan')
|
||||
mangas = os.listdir(root_path)
|
||||
|
||||
if not mangas:
|
||||
self.create_first_start_screen()
|
||||
return
|
||||
elif self.first_start_grid:
|
||||
self.first_start_grid.destroy()
|
||||
|
||||
flowbox = self.builder.get_object('library_page_flowbox')
|
||||
flowbox.connect("child-activated", self.on_manga_clicked)
|
||||
|
||||
self.populate_library()
|
||||
|
||||
self.add(self.stack)
|
||||
|
||||
def create_titlebar(self):
|
||||
self.titlebar = self.builder.get_object("titlebar")
|
||||
self.headerbar = self.builder.get_object('headerbar')
|
||||
|
||||
self.left_button = self.builder.get_object("left_button")
|
||||
self.left_button.connect("clicked", self.on_left_button_clicked, None)
|
||||
self.left_button_stack = self.builder.get_object("left_button_stack")
|
||||
|
||||
self.set_titlebar(self.titlebar)
|
||||
|
||||
if Gio.Application.get_default().development_mode is True:
|
||||
context = self.get_style_context()
|
||||
context.add_class("devel")
|
||||
|
||||
def custom_css(self):
|
||||
screen = Gdk.Screen.get_default()
|
||||
|
||||
css_provider = Gtk.CssProvider()
|
||||
css_provider_resource = Gio.File.new_for_uri("resource:///com/gitlab/valos/MangaScan/css/style.css")
|
||||
css_provider.load_from_file(css_provider_resource)
|
||||
|
||||
context = Gtk.StyleContext()
|
||||
context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
|
||||
|
||||
def on_about_menu_clicked(self, action, param):
|
||||
builder = Gtk.Builder()
|
||||
builder.add_from_resource("/com/gitlab/valos/MangaScan/about_dialog.ui")
|
||||
|
||||
about_dialog = builder.get_object("about_dialog")
|
||||
about_dialog.set_modal(True)
|
||||
about_dialog.set_transient_for(self)
|
||||
about_dialog.present()
|
||||
|
||||
def on_application_quit(self, window, event):
|
||||
self.save_window_size()
|
||||
|
||||
def on_chapter_clicked(self, listbox, row):
|
||||
self.reader.init(self.manga, row.chapter_id)
|
||||
|
||||
self.show_page('reader')
|
||||
|
||||
def on_delete_button_clicked(self, action, param):
|
||||
print('delete manga')
|
||||
self.manga.delete()
|
||||
self.populate_library()
|
||||
self.show_page('library')
|
||||
|
||||
def on_left_button_clicked(self, action, param):
|
||||
if self.page == 'library':
|
||||
AddDialog(self).open(action, param)
|
||||
elif self.page == 'manga':
|
||||
self.show_page('library')
|
||||
elif self.page == 'reader':
|
||||
self.show_page('manga')
|
||||
|
||||
def on_manga_clicked(self, flowbox, child):
|
||||
self.manga = Manga(child.get_children()[0].manga_id)
|
||||
|
||||
user_home_path = str(Path.home())
|
||||
root_path = os.path.join(user_home_path, 'MangaScan')
|
||||
manga_path = os.path.join(root_path, self.manga.id)
|
||||
cover_path = os.path.join(manga_path, 'cover.jpg')
|
||||
|
||||
pixbuf = Pixbuf.new_from_file_at_scale(cover_path, 180, -1, True)
|
||||
self.builder.get_object('cover_image').set_from_pixbuf(pixbuf)
|
||||
|
||||
self.builder.get_object('author_value_label').set_text(self.manga.data['author'] or '-')
|
||||
self.builder.get_object('type_value_label').set_text(self.manga.data['type'] or '-')
|
||||
self.builder.get_object('status_value_label').set_text(self.manga.data['status'] or '-')
|
||||
self.builder.get_object('server_value_label').set_text(
|
||||
'{0} ({1} chapters)'.format(self.manga.server.name, len(self.manga.data['chapters'])))
|
||||
|
||||
self.builder.get_object('synopsis_value_label').set_text(self.manga.data['synopsis'] or '-')
|
||||
|
||||
listbox = self.builder.get_object('chapters_listbox')
|
||||
listbox.connect("row-activated", self.on_chapter_clicked)
|
||||
|
||||
for child in listbox.get_children():
|
||||
child.destroy()
|
||||
|
||||
for id, chapter_data in self.manga.data['chapters'].items():
|
||||
row = Gtk.ListBoxRow()
|
||||
row.get_style_context().add_class('listboxrow-chapter')
|
||||
row.chapter_id = id
|
||||
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
|
||||
row.add(box)
|
||||
|
||||
# Chapter title
|
||||
label = Gtk.Label(xalign=0)
|
||||
label.set_line_wrap(True)
|
||||
label.set_text(chapter_data['title'])
|
||||
box.pack_start(label, True, True, 0)
|
||||
|
||||
listbox.add(row)
|
||||
|
||||
listbox.show_all()
|
||||
|
||||
self.show_page('manga')
|
||||
|
||||
def on_settings_menu_clicked(self, action, param):
|
||||
SettingsDialog(self).open(action, param)
|
||||
|
||||
def on_shortcuts_menu_clicked(self, action, param):
|
||||
builder = Gtk.Builder()
|
||||
builder.add_from_resource("/com/gitlab/valos/MangaScan/shortcuts_overview.ui")
|
||||
|
||||
shortcuts_overview = builder.get_object("shortcuts_overview")
|
||||
shortcuts_overview.set_modal(True)
|
||||
shortcuts_overview.set_transient_for(self)
|
||||
shortcuts_overview.present()
|
||||
|
||||
def populate_library(self):
|
||||
root_path = os.path.join(str(Path.home()), 'MangaScan')
|
||||
mangas = os.listdir(root_path)
|
||||
|
||||
flowbox = self.builder.get_object('library_page_flowbox')
|
||||
|
||||
for child in flowbox.get_children():
|
||||
flowbox.remove(child)
|
||||
child.destroy()
|
||||
|
||||
for manga_id in mangas:
|
||||
cover_path = os.path.join(root_path, manga_id, 'cover.jpg')
|
||||
if os.path.exists(cover_path):
|
||||
cover_image = Gtk.Image()
|
||||
pixbuf = Pixbuf.new_from_file_at_scale(cover_path, 180, -1, True)
|
||||
cover_image.set_from_pixbuf(pixbuf)
|
||||
cover_image.manga_id = manga_id
|
||||
|
||||
flowbox.insert(cover_image, -1)
|
||||
|
||||
flowbox.show_all()
|
||||
|
||||
def responsive_listener(self, window):
|
||||
if self.get_allocation().width < 700:
|
||||
if self.mobile_width is True:
|
||||
return
|
||||
|
||||
self.mobile_width = True
|
||||
self.change_layout()
|
||||
else:
|
||||
if self.mobile_width is True:
|
||||
self.mobile_width = False
|
||||
self.change_layout()
|
||||
|
||||
def save_window_size(self):
|
||||
window_size = [self.get_size().width, self.get_size().height]
|
||||
mangascan.config_manager.set_window_size(window_size)
|
||||
|
||||
def show_page(self, name):
|
||||
if name == 'library':
|
||||
self.headerbar.set_title('Manga Scan')
|
||||
self.builder.get_object('menubutton').set_popover(self.builder.get_object('menubutton_popover'))
|
||||
elif name == 'manga':
|
||||
self.headerbar.set_title(self.manga.data['name'])
|
||||
self.builder.get_object('menubutton').set_popover(self.builder.get_object('manga_page_menubutton_popover'))
|
||||
elif name == 'reader':
|
||||
pass
|
||||
|
||||
self.left_button_stack.set_visible_child_name(name)
|
||||
self.stack.set_visible_child_name(name)
|
||||
self.page = name
|
|
@ -0,0 +1,61 @@
|
|||
import importlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
|
||||
class Manga():
|
||||
data = None
|
||||
server = None
|
||||
|
||||
def __init__(self, id):
|
||||
self.id = id
|
||||
|
||||
data_path = os.path.join(self.resources_path, 'data.json')
|
||||
|
||||
with open(data_path) as fp:
|
||||
self.data = json.load(fp)
|
||||
|
||||
server_module = importlib.import_module('.' + self.data['server_id'], package="mangascan.servers")
|
||||
|
||||
self.server = getattr(server_module, self.data['server_id'].capitalize())()
|
||||
|
||||
@property
|
||||
def resources_path(self):
|
||||
return os.path.join(str(Path.home()), 'MangaScan', self.id)
|
||||
|
||||
def delete(self):
|
||||
shutil.rmtree(self.resources_path)
|
||||
|
||||
def get_chapter_page(self, chapter_id, page_index):
|
||||
chapter_path = os.path.join(self.resources_path, chapter_id)
|
||||
|
||||
if not os.path.exists(chapter_path):
|
||||
os.mkdir(chapter_path)
|
||||
|
||||
page = self.data['chapters'][chapter_id]['pages'][page_index]
|
||||
page_path = os.path.join(chapter_path, page)
|
||||
if os.path.exists(page_path):
|
||||
return page_path
|
||||
|
||||
data = self.server.get_manga_chapter_page_image(self.id, chapter_id, page)
|
||||
|
||||
if data:
|
||||
with open(page_path, 'wb') as fp:
|
||||
fp.write(data)
|
||||
|
||||
return page_path
|
||||
else:
|
||||
return None
|
||||
|
||||
def update_chapter_data(self, chapter_id):
|
||||
if self.data['chapters'][chapter_id].get('pages'):
|
||||
return
|
||||
|
||||
chapter_data = self.server.get_manga_chapter_data(self.id, chapter_id)
|
||||
print(chapter_data)
|
||||
self.data['chapters'][chapter_id].update(chapter_data)
|
||||
|
||||
with open(os.path.join(self.resources_path, 'data.json'), 'w') as fp:
|
||||
json.dump(self.data, fp)
|
|
@ -0,0 +1,96 @@
|
|||
import threading
|
||||
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gtk
|
||||
from gi.repository.GdkPixbuf import InterpType
|
||||
from gi.repository.GdkPixbuf import Pixbuf
|
||||
|
||||
|
||||
class Reader():
|
||||
def __init__(self, builder):
|
||||
self.builder = builder
|
||||
|
||||
self.viewport = self.builder.get_object('reader_page_viewport')
|
||||
self.scrolledwindow = self.viewport.get_parent()
|
||||
self.spinner_box = self.builder.get_object('spinner_box')
|
||||
self.image = Gtk.Image()
|
||||
|
||||
self.scrolledwindow.connect('button-press-event', self.on_button_press)
|
||||
|
||||
def show_spinner(self):
|
||||
self.clear()
|
||||
self.viewport.add(self.spinner_box)
|
||||
|
||||
def clear(self):
|
||||
for child in self.viewport.get_children():
|
||||
self.viewport.remove(child)
|
||||
|
||||
def init(self, manga, chapter_id):
|
||||
self.manga = manga
|
||||
self.chapter = self.manga.data['chapters'][chapter_id]
|
||||
self.page_index = None
|
||||
|
||||
# TODO: open last view page
|
||||
self.render_page(0)
|
||||
|
||||
def on_button_press(self, widget, event):
|
||||
if event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1:
|
||||
sw_width = self.scrolledwindow.get_allocated_width()
|
||||
|
||||
if event.x > sw_width / 2:
|
||||
index = self.page_index + 1
|
||||
else:
|
||||
index = self.page_index - 1
|
||||
|
||||
if index >= 0 and index < len(self.chapter['pages']):
|
||||
print(index)
|
||||
self.render_page(index)
|
||||
else:
|
||||
# TODO: next or prev chapter
|
||||
print('BEGIN or END')
|
||||
|
||||
def render_page(self, index):
|
||||
def get_page_image_path():
|
||||
print(self.chapter['id'])
|
||||
self.manga.update_chapter_data(self.chapter['id'])
|
||||
page_path = self.manga.get_chapter_page(self.chapter['id'], self.page_index)
|
||||
GLib.idle_add(set_page_image, page_path)
|
||||
|
||||
def set_page_image(page_path):
|
||||
if page_path is None:
|
||||
# TODO: Display not found page
|
||||
return False
|
||||
|
||||
pixbuf = Pixbuf.new_from_file(page_path)
|
||||
|
||||
sw_width = self.scrolledwindow.get_allocated_width()
|
||||
|
||||
sw_height = self.scrolledwindow.get_allocated_height()
|
||||
height = pixbuf.get_height()
|
||||
|
||||
pixbuf = pixbuf.scale_simple(
|
||||
sw_width,
|
||||
height / (height / sw_height),
|
||||
InterpType.BILINEAR
|
||||
)
|
||||
self.image.set_from_pixbuf(pixbuf)
|
||||
|
||||
self.clear()
|
||||
self.viewport.add(self.image)
|
||||
self.image.show()
|
||||
|
||||
# if width > sw_width:
|
||||
# vadj.set_value((width - sw_width) / 2)
|
||||
# if height > sw_height:
|
||||
# hadj.set_value((height - sw_height) / 2)
|
||||
|
||||
return False
|
||||
|
||||
self.page_index = index
|
||||
|
||||
self.show_spinner()
|
||||
|
||||
thread = threading.Thread(target=get_page_image_path)
|
||||
thread.daemon = True
|
||||
thread.start()
|
|
@ -0,0 +1,62 @@
|
|||
import glob
|
||||
import importlib
|
||||
import inspect
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_servers_list():
|
||||
sl = []
|
||||
current_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)))
|
||||
current_module_name = os.path.splitext(os.path.basename(current_dir))[0]
|
||||
|
||||
for file in glob.glob(current_dir + "/*.py"):
|
||||
name = os.path.splitext(os.path.basename(file))[0]
|
||||
|
||||
# Ignore __ files
|
||||
if name.startswith("__"):
|
||||
continue
|
||||
|
||||
module = importlib.import_module("." + name, package="mangascan." + current_module_name)
|
||||
|
||||
info = dict()
|
||||
for member in dir(module):
|
||||
attr = getattr(module, member)
|
||||
|
||||
if member == 'server_id':
|
||||
info['id'] = attr
|
||||
elif member == 'server_name':
|
||||
info['name'] = attr
|
||||
elif member == 'server_country':
|
||||
info['country'] = attr
|
||||
elif inspect.isclass(attr) and attr.__module__.startswith('mangascan.servers') and member != 'Server':
|
||||
info['class'] = attr
|
||||
|
||||
sl.append(info)
|
||||
|
||||
return sl
|
||||
|
||||
|
||||
class Server():
|
||||
def get_manga_cover(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_manga_data(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def save_manga_data_and_cover(self, data):
|
||||
resources_path = os.path.join(str(Path.home()), 'MangaScan', data['id'])
|
||||
|
||||
if not os.path.exists(resources_path):
|
||||
os.makedirs(resources_path)
|
||||
|
||||
with open(os.path.join(resources_path, 'data.json'), 'w') as fp:
|
||||
json.dump(data, fp)
|
||||
|
||||
cover_data = self.get_manga_cover_image(data['id'])
|
||||
with open(os.path.join(resources_path, 'cover.jpg'), 'wb') as fp:
|
||||
fp.write(cover_data)
|
||||
|
||||
def search(self):
|
||||
raise NotImplementedError
|
|
@ -0,0 +1,145 @@
|
|||
from bs4 import BeautifulSoup
|
||||
import cfscrape
|
||||
|
||||
from mangascan.servers import Server
|
||||
|
||||
server_id = 'japscan'
|
||||
server_name = 'JapScan'
|
||||
server_country = 'fr'
|
||||
|
||||
base_url = 'https://www.japscan.to'
|
||||
search_url = base_url + '/search/'
|
||||
manga_url = base_url + '/manga/{0}/'
|
||||
cover_url = base_url + '/imgs/mangas/{0}.jpg'
|
||||
chapter_url = base_url + '/lecture-en-ligne/{0}/{1}/'
|
||||
scan_url = 'https://c.japscan.to/lel/{0}/{1}/{2}'
|
||||
|
||||
|
||||
class Japscan(Server):
|
||||
__server_name__ = server_name
|
||||
|
||||
def __init__(self):
|
||||
self.session = cfscrape.create_scraper()
|
||||
# self.headers = {'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53'}
|
||||
# self.session.headers['user-agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0'
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return server_id
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.__server_name__
|
||||
|
||||
def get_manga_data(self, data):
|
||||
"""
|
||||
Returns manga data by scraping manga HTML page content
|
||||
"""
|
||||
r = self.session.get(manga_url.format(data['id']))
|
||||
# print(r.text)
|
||||
|
||||
soup = BeautifulSoup(r.text, 'html.parser')
|
||||
|
||||
data.update(dict(
|
||||
author=None,
|
||||
type=None,
|
||||
status=None,
|
||||
chapters=dict(),
|
||||
server_id=self.id,
|
||||
))
|
||||
|
||||
# Details
|
||||
card_element = soup.find_all('div', class_='card')[0]
|
||||
if not card_element.find_all('div', class_='d-flex'):
|
||||
# mobile version
|
||||
elements = card_element.find_all('div', class_='row')[0].find_all('p')
|
||||
else:
|
||||
# desktop version
|
||||
elements = card_element.find_all('div', class_='d-flex')[0].find_all('p', class_='mb-2')
|
||||
|
||||
for element in elements:
|
||||
label = element.span.text
|
||||
element.span.extract()
|
||||
value = element.text.strip()
|
||||
|
||||
if label.startswith('Auteur'):
|
||||
data['author'] = value
|
||||
elif label.startswith('Type'):
|
||||
data['type'] = value
|
||||
elif label.startswith('Statut'):
|
||||
data['status'] = value
|
||||
|
||||
# Synopsis
|
||||
data['synopsis'] = card_element.find('p', class_='list-group-item-primary').text.strip()
|
||||
|
||||
# Chapters
|
||||
elements = soup.find('div', id='chapters_list').find_all('div', class_='chapters_list')
|
||||
for element in elements:
|
||||
id = element.a.get('href').split('/')[3]
|
||||
if element.a.span:
|
||||
element.a.span.extract()
|
||||
|
||||
data['chapters'][id] = dict(
|
||||
id=id,
|
||||
date=element.span.text.strip(),
|
||||
title=element.a.text.strip(),
|
||||
)
|
||||
|
||||
return data
|
||||
|
||||
def get_manga_chapter_data(self, manga_id, chapter_id):
|
||||
"""
|
||||
Returns manga chapter data by scraping chapter HTML page content
|
||||
"""
|
||||
url = chapter_url.format(manga_id, chapter_id)
|
||||
r = self.session.get(url)
|
||||
|
||||
soup = BeautifulSoup(r.text, 'html.parser')
|
||||
# print(r.text)
|
||||
|
||||
pages_options = soup.find('select', id='pages').find_all('option')
|
||||
|
||||
data = dict(
|
||||
pages=[],
|
||||
)
|
||||
for option in pages_options:
|
||||
data['pages'].append(option.get('data-img'))
|
||||
|
||||
return data
|
||||
|
||||
def get_manga_chapter_page_image(self, manga_id, chapter_id, page):
|
||||
"""
|
||||
Returns chapter page scan (image) content
|
||||
"""
|
||||
manga_id = '-'.join(w.capitalize() for w in manga_id.split('-'))
|
||||
chapter_id = chapter_id.capitalize()
|
||||
|
||||
url = scan_url.format(manga_id, chapter_id, page)
|
||||
r = self.session.get(url)
|
||||
|
||||
return r.content if r.status_code == 200 else None
|
||||
|
||||
def get_manga_cover_image(self, manga_id):
|
||||
"""
|
||||
Returns manga cover (image) content
|
||||
"""
|
||||
manga_id = '-'.join(w.capitalize() for w in manga_id.split('-'))
|
||||
r = self.session.get(cover_url.format(manga_id))
|
||||
|
||||
return r.content
|
||||
|
||||
def search(self, term):
|
||||
r = self.session.post(search_url, data=dict(search=term))
|
||||
|
||||
# Returned data for each manga:
|
||||
# name: name of the manga
|
||||
# image: relative path of cover image
|
||||
# url: relative path of manga page
|
||||
results = r.json()
|
||||
|
||||
for result in results:
|
||||
# Extract id from url
|
||||
result['id'] = result.pop('url').split('/')[2]
|
||||
result.pop('image')
|
||||
|
||||
return results
|
|
@ -0,0 +1,135 @@
|
|||
from bs4 import BeautifulSoup
|
||||
import requests
|
||||
|
||||
from mangascan.servers import Server
|
||||
|
||||
server_id = 'submanga'
|
||||
server_name = 'Submanga'
|
||||
server_country = 'es'
|
||||
|
||||
base_url = 'https://submanga.online'
|
||||
search_url = base_url + '/search'
|
||||
manga_url = base_url + '/manga/{0}'
|
||||
cover_url = base_url + '/uploads/manga/{0}/cover/cover_250x350.jpg'
|
||||
chapter_url = base_url + '/manga/{0}/{1}'
|
||||
scan_url = base_url + '/uploads/manga/{0}/chapters/{1}/{2}'
|
||||
|
||||
|
||||
class Submanga(Server):
|
||||
__server_name__ = server_name
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return server_id
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.__server_name__
|
||||
|
||||
def get_manga_data(self, data):
|
||||
"""
|
||||
Returns manga data by scraping manga HTML page content
|
||||
"""
|
||||
r = requests.get(manga_url.format(data['id']))
|
||||
# print(r.text)
|
||||
|
||||
soup = BeautifulSoup(r.text, 'html.parser')
|
||||
|
||||
data.update(dict(
|
||||
author=None,
|
||||
type=None,
|
||||
status=None,
|
||||
synopsis=None,
|
||||
server_id=self.id,
|
||||
chapters=dict(),
|
||||
))
|
||||
|
||||
# Details
|
||||
elements = soup.find_all('span', class_='list-group-item')
|
||||
for element in elements:
|
||||
label = element.b.text
|
||||
element.b.extract()
|
||||
value = element.text.strip()
|
||||
|
||||
if label.startswith('Autor'):
|
||||
data['author'] = value
|
||||
elif label.startswith('Categorías'):
|
||||
data['type'] = ', '.join([t.strip() for t in value.split(',')])
|
||||
elif label.startswith('Estado'):
|
||||
data['status'] = value
|
||||
elif label.startswith('Resumen'):
|
||||
data['synopsis'] = value
|
||||
|
||||
# Chapters
|
||||
elements = soup.find('div', class_='capitulos-list').find('table').find_all('tr')
|
||||
for element in elements:
|
||||
tds = element.find_all('td')
|
||||
|
||||
td_link = tds[0]
|
||||
id = td_link.a.get('href').split('/')[-1]
|
||||
|
||||
td_date = tds[1]
|
||||
td_date.i.extract()
|
||||
td_date.span.extract()
|
||||
|
||||
data['chapters'][id] = dict(
|
||||
id=id,
|
||||
date=td_date.text.strip(),
|
||||
title=td_link.a.text.strip(),
|
||||
)
|
||||
|
||||
return data
|
||||
|
||||
def get_manga_chapter_data(self, manga_id, chapter_id):
|
||||
"""
|
||||
Returns manga chapter data by scraping chapter HTML page content
|
||||
"""
|
||||
url = chapter_url.format(manga_id, chapter_id)
|
||||
r = requests.get(url)
|
||||
|
||||
soup = BeautifulSoup(r.text, 'html.parser')
|
||||
# print(r.text)
|
||||
|
||||
pages_imgs = soup.find('div', id='all').find_all('img')
|
||||
|
||||
data = dict(
|
||||
pages=[],
|
||||
)
|
||||
for img in pages_imgs:
|
||||
data['pages'].append(img.get('data-src').strip().split('/')[-1])
|
||||
|
||||
return data
|
||||
|
||||
def get_manga_chapter_page_image(self, manga_id, chapter_id, page):
|
||||
"""
|
||||
Returns chapter page scan (image) content
|
||||
"""
|
||||
url = scan_url.format(manga_id, chapter_id, page)
|
||||
r = requests.get(url)
|
||||
|
||||
return r.content if r.status_code == 200 else None
|
||||
|
||||
def get_manga_cover_image(self, manga_id):
|
||||
"""
|
||||
Returns manga cover (image) content
|
||||
"""
|
||||
r = requests.get(cover_url.format(manga_id))
|
||||
|
||||
return r.content
|
||||
|
||||
def search(self, term):
|
||||
r = requests.get(search_url, params=dict(query=term))
|
||||
|
||||
# Returned data for each manga:
|
||||
# value: name of the manga
|
||||
# data: id of the manga
|
||||
results = r.json()['suggestions']
|
||||
|
||||
for result in results:
|
||||
result['id'] = result.pop('data')
|
||||
result['name'] = result.pop('value')
|
||||
|
||||
return results
|
|
@ -0,0 +1,37 @@
|
|||
from gi.repository import Gtk
|
||||
import mangascan.config_manager
|
||||
|
||||
|
||||
class SettingsDialog():
|
||||
window = NotImplemented
|
||||
builder = NotImplemented
|
||||
|
||||
def __init__(self, window):
|
||||
self.window = window
|
||||
self.builder = Gtk.Builder()
|
||||
self.builder.add_from_resource("/com/gitlab/valos/MangaScan/settings_dialog.ui")
|
||||
|
||||
def open(self, action, param):
|
||||
settings_dialog = self.builder.get_object("settings_dialog")
|
||||
|
||||
settings_dialog.set_modal(True)
|
||||
settings_dialog.set_transient_for(self.window)
|
||||
settings_dialog.present()
|
||||
|
||||
self.set_config_values()
|
||||
|
||||
def set_config_values(self):
|
||||
settings_theme_switch = self.builder.get_object("settings_theme_switch")
|
||||
settings_theme_switch.connect("notify::active", self.on_settings_theme_switch_switched)
|
||||
settings_theme_switch_value = mangascan.config_manager.get_dark_theme()
|
||||
settings_theme_switch.set_active(settings_theme_switch_value)
|
||||
|
||||
def on_settings_theme_switch_switched(self, switch_button, gparam):
|
||||
gtk_settings = Gtk.Settings.get_default()
|
||||
|
||||
if switch_button.get_active():
|
||||
mangascan.config_manager.set_dark_theme(True)
|
||||
gtk_settings.set_property("gtk-application-prefer-dark-theme", True)
|
||||
else:
|
||||
mangascan.config_manager.set_dark_theme(False)
|
||||
gtk_settings.set_property("gtk-application-prefer-dark-theme", False)
|
|
@ -0,0 +1,80 @@
|
|||
project('mangascan', 'c',
|
||||
version: '0.0.0',
|
||||
meson_version: '>= 0.46.0'
|
||||
)
|
||||
i18n = import('i18n')
|
||||
python = import('python3')
|
||||
project_id = 'com.gitlab.valos.MangaScan'
|
||||
contributors = '\n'.join(['Valéry Febvre <vfebvre@easter-eggs.com>'])
|
||||
|
||||
message('Looking for dependencies')
|
||||
python_bin = python.find_python()
|
||||
if not python_bin.found()
|
||||
error('No valid python3 binary found')
|
||||
else
|
||||
message('Found python3 binary')
|
||||
endif
|
||||
dependency('glib-2.0')
|
||||
dependency('gobject-introspection-1.0', version: '>=1.35.9')
|
||||
dependency('gtk+-3.0', version :'>=3.20')
|
||||
dependency('libhandy-0.0', version :'>=0.0.3')
|
||||
|
||||
env = environment()
|
||||
|
||||
python_dir = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
|
||||
LIBEXEC_DIR = join_paths(get_option('prefix'), get_option('libexecdir'))
|
||||
EXTENSION_DIR = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
|
||||
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
||||
message(DATA_DIR)
|
||||
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||
|
||||
# Profiles
|
||||
if get_option('profile') == 'development'
|
||||
profile = 'Devel'
|
||||
name_suffix = ' (Development)'
|
||||
else
|
||||
profile = ''
|
||||
name_suffix = ''
|
||||
endif
|
||||
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('PACKAGE_URL', 'https://gitlab.com/valos/MangaScan')
|
||||
conf.set('DATA_DIR', DATA_DIR)
|
||||
conf.set('EXTENSION_DIR', EXTENSION_DIR)
|
||||
conf.set('LOCALE_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
|
||||
conf.set('PYTHON_DIR', python_dir)
|
||||
conf.set('PYTHON_EXEC_DIR', join_paths(get_option('prefix'), python.sysconfig_path('stdlib')))
|
||||
conf.set('PYTHON', python_bin.path())
|
||||
conf.set('libexecdir', LIBEXEC_DIR)
|
||||
if get_option('profile') == 'development'
|
||||
conf.set('VERSION', ''.join([run_command(['git', 'describe', '--long', '--tags']).stdout(), get_option('profile')]))
|
||||
else
|
||||
conf.set('VERSION', meson.project_version())
|
||||
endif
|
||||
conf.set('CONTRIBUTORS', contributors)
|
||||
conf.set_quoted('PROFILE', profile)
|
||||
|
||||
application_id = 'com.gitlab.valos.MangaScan'
|
||||
if get_option('profile') == 'development'
|
||||
application_id = 'com.gitlab.valos.MangaScanDevel'
|
||||
endif
|
||||
conf.set('APPID', application_id)
|
||||
|
||||
subdir('data')
|
||||
subdir('po')
|
||||
|
||||
install_subdir(
|
||||
'mangascan',
|
||||
install_dir: python_dir
|
||||
)
|
||||
|
||||
message('Preparing init file')
|
||||
configure_file(
|
||||
input: 'mangascan.in',
|
||||
output: 'mangascan',
|
||||
configuration: conf,
|
||||
install_dir: bindir
|
||||
)
|
||||
|
||||
meson.add_install_script('meson_post_install.py')
|
|
@ -0,0 +1,9 @@
|
|||
option(
|
||||
'profile',
|
||||
type: 'combo',
|
||||
choices: [
|
||||
'default',
|
||||
'development'
|
||||
],
|
||||
value: 'default'
|
||||
)
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from os import environ, path
|
||||
from subprocess import call
|
||||
|
||||
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
|
||||
datadir = path.join(prefix, 'share')
|
||||
destdir = environ.get('DESTDIR', '')
|
||||
|
||||
if not destdir:
|
||||
print('Updating icon cache...')
|
||||
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
|
||||
print("Installing new Schemas")
|
||||
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0/schemas')])
|
|
@ -0,0 +1 @@
|
|||
fr
|
|
@ -0,0 +1,9 @@
|
|||
data/about_dialog.ui.in
|
||||
data/add_dialog.ui
|
||||
data/main_window.ui
|
||||
data/com.gitlab.valos.MangaScan.appdata.xml.in.in
|
||||
data/com.gitlab.valos.MangaScan.desktop.in.in
|
||||
data/com.gitlab.valos.MangaScan.gschema.xml
|
||||
data/settings_dialog.ui
|
||||
data/shortcuts_overview.ui
|
||||
mangascan/add_dialog.py
|
|
@ -0,0 +1,35 @@
|
|||
## Update pot files from source files
|
||||
```
|
||||
cd po
|
||||
|
||||
intltool-update --maintain
|
||||
|
||||
cd ..
|
||||
|
||||
find mangascan -iname "*.py" | xargs xgettext --language=Python --keyword=_ --output=po/mangascan-python.pot
|
||||
|
||||
find data -iname "*.ui" | xargs xgettext --output=po/mangascan-glade.pot -L Glade
|
||||
|
||||
msgcat --to-code=UTF-8 --use-first po/mangascan-glade.pot po/mangascan-python.pot > po/mangascan.pot
|
||||
|
||||
rm po/mangascan-glade.pot po/mangascan-python.pot
|
||||
```
|
||||
|
||||
## Generate po file for language
|
||||
```
|
||||
cd po
|
||||
|
||||
msginit --locale=xx --input=mangascan.pot
|
||||
```
|
||||
|
||||
## Update language po file
|
||||
```
|
||||
cd po
|
||||
|
||||
msgmerge -N xx.po mangascan.pot
|
||||
```
|
||||
|
||||
## Compile po file
|
||||
```
|
||||
msgfmt --output-file=xx.mo xx.po
|
||||
```
|
|
@ -0,0 +1,134 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-03-13 16:22+0100\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Valéry Febvre <vfebvre@easter-eggs.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.2.1\n"
|
||||
|
||||
#: data/add_dialog.ui:46
|
||||
msgid "Select a server"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:54
|
||||
msgid "servers"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:68
|
||||
msgid "search"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:82
|
||||
msgid "title"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:115 data/main_window.ui:177 data/main_window.ui:456
|
||||
msgid "manga"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:205 data/main_window.ui:303
|
||||
msgid "Author"
|
||||
msgstr "Auteur"
|
||||
|
||||
#: data/add_dialog.ui:232 data/main_window.ui:330
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:259 data/main_window.ui:357
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:286 data/main_window.ui:384
|
||||
msgid "Server"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:313 data/main_window.ui:411
|
||||
msgid "Synopsis"
|
||||
msgstr ""
|
||||
|
||||
#: data/shortcuts_overview.ui:14
|
||||
msgctxt "Shortcut window description"
|
||||
msgid "Application"
|
||||
msgstr ""
|
||||
|
||||
#: data/shortcuts_overview.ui:18
|
||||
msgctxt "Shortcut window description"
|
||||
msgid "Add manga"
|
||||
msgstr ""
|
||||
|
||||
#: data/shortcuts_overview.ui:25
|
||||
msgctxt "Shortcut window description"
|
||||
msgid "Open preferences"
|
||||
msgstr ""
|
||||
|
||||
#. Title of the settings dialog
|
||||
#: data/settings_dialog.ui:16
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:64
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:113
|
||||
msgid "Dark Theme"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:130
|
||||
msgid "Use dark GTK+ theme"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:196
|
||||
msgid "Hide First Start Screen"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:213
|
||||
msgid "Reopen last opened safe"
|
||||
msgstr ""
|
||||
|
||||
#. The umbrella sentence of the application on the first start screen
|
||||
#: data/main_window.ui:44 data/main_window.ui:145
|
||||
msgid "Manga Scan"
|
||||
msgstr ""
|
||||
|
||||
#. The subtitle of the umbrella sentence in the first start screen. This is a sentence which gives the user a starting point what he can do if he opens the application for the first time.
|
||||
#: data/main_window.ui:61
|
||||
msgid "An online / offline manga reader."
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:99
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:113
|
||||
msgid "Keyboard Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#. "Manga Scan" is the application name
|
||||
#: data/main_window.ui:127
|
||||
msgid "About"
|
||||
msgstr "À propos"
|
||||
|
||||
#: data/main_window.ui:166 data/main_window.ui:267
|
||||
msgid "library"
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:189 data/main_window.ui:479
|
||||
msgid "reader"
|
||||
msgstr ""
|
||||
|
||||
#: mangascan/add_dialog.py:89
|
||||
#, python-brace-format
|
||||
msgid "{0} manga added"
|
||||
msgstr ""
|
||||
|
||||
#: mangascan/add_dialog.py:170
|
||||
#, python-brace-format
|
||||
msgid "Search in {0}..."
|
||||
msgstr ""
|
|
@ -0,0 +1,139 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-03-13 16:22+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: data/add_dialog.ui:46
|
||||
msgid "Select a server"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:54
|
||||
msgid "servers"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:68
|
||||
msgid "search"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:82
|
||||
msgid "title"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:115 data/main_window.ui:177 data/main_window.ui:456
|
||||
msgid "manga"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:205 data/main_window.ui:303
|
||||
msgid "Author"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:232 data/main_window.ui:330
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:259 data/main_window.ui:357
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:286 data/main_window.ui:384
|
||||
msgid "Server"
|
||||
msgstr ""
|
||||
|
||||
#: data/add_dialog.ui:313 data/main_window.ui:411
|
||||
msgid "Synopsis"
|
||||
msgstr ""
|
||||
|
||||
#: data/shortcuts_overview.ui:14
|
||||
msgctxt "Shortcut window description"
|
||||
msgid "Application"
|
||||
msgstr ""
|
||||
|
||||
#: data/shortcuts_overview.ui:18
|
||||
msgctxt "Shortcut window description"
|
||||
msgid "Add manga"
|
||||
msgstr ""
|
||||
|
||||
#: data/shortcuts_overview.ui:25
|
||||
msgctxt "Shortcut window description"
|
||||
msgid "Open preferences"
|
||||
msgstr ""
|
||||
|
||||
#. Title of the settings dialog
|
||||
#: data/settings_dialog.ui:16
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:64
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:113
|
||||
msgid "Dark Theme"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:130
|
||||
msgid "Use dark GTK+ theme"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:196
|
||||
msgid "Hide First Start Screen"
|
||||
msgstr ""
|
||||
|
||||
#: data/settings_dialog.ui:213
|
||||
msgid "Reopen last opened safe"
|
||||
msgstr ""
|
||||
|
||||
#. The umbrella sentence of the application on the first start screen
|
||||
#: data/main_window.ui:44 data/main_window.ui:145
|
||||
msgid "Manga Scan"
|
||||
msgstr ""
|
||||
|
||||
#. The subtitle of the umbrella sentence in the first start screen. This is a sentence which gives the user a starting point what he can do if he opens the application for the first time.
|
||||
#: data/main_window.ui:61
|
||||
msgid "An online / offline manga reader."
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:99
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:113
|
||||
msgid "Keyboard Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#. "Manga Scan" is the application name
|
||||
#: data/main_window.ui:127
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:166 data/main_window.ui:267
|
||||
msgid "library"
|
||||
msgstr ""
|
||||
|
||||
#: data/main_window.ui:189 data/main_window.ui:479
|
||||
msgid "reader"
|
||||
msgstr ""
|
||||
|
||||
#: mangascan/add_dialog.py:89
|
||||
#, python-brace-format
|
||||
msgid "{0} manga added"
|
||||
msgstr ""
|
||||
|
||||
#: mangascan/add_dialog.py:170
|
||||
#, python-brace-format
|
||||
msgid "Search in {0}..."
|
||||
msgstr ""
|
|
@ -0,0 +1,4 @@
|
|||
i18n = import('i18n')
|
||||
|
||||
message('Update translations')
|
||||
i18n.gettext('mangascan', preset: 'glib')
|