diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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
+<https://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
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/Makefile b/Makefile
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+# Installation commands.
+INSTALL := install
+INSTALL_PROGRAM := $(INSTALL)
+INSTALL_DATA := $(INSTALL) -m 644
+
+# Target directories.
+PREFIX := /usr
+BINDIR := $(PREFIX)/bin
+DATADIR := $(PREFIX)/share
+LOCALEDIR := $(DATADIR)/locale
+MANDIR := $(DATADIR)/man
+
+# Deletes file $(2) from directory $(1), then deletes empty parent directories subsequently.
+delete_file_and_empty_dirs = if test -d '$(1)'; then rm -f '$(1)/$(2)' && rmdir -p --ignore-fail-on-non-empty '$(1)'; fi
+
+# Recursively installs manual pages to subdirectory $(1) of $(MANDIR).
+install_man = $(foreach f,$(notdir $(wildcard man/$(1)/*)),$(if $(shell test -d 'man/$(1)/$(f)' && echo "dir"),$(call install_man,$(1)/$(f)),$(INSTALL_DATA) -D -t '$(MANDIR)/$(1)' 'man/$(1)/$(f)';))
+
+# Recursively removes installed manual pages from subdirectory $(1) of $(MANDIR).
+uninstall_man = $(foreach f,$(notdir $(wildcard man/$(1)/*)),$(if $(shell test -d 'man/$(1)/$(f)' && echo "dir"),$(call uninstall_man,$(1)/$(f)),$(call delete_file_and_empty_dirs,$(MANDIR)/$(1),weatherhs.1);))
+
+.PHONY: help install uninstall
+
+help:
+	$(info VARIABLES)
+	$(info ========================================================================)
+	$(info PREFIX:      Target directories prefix.)
+	$(info BINDIR:      Executable installation directory.)
+	$(info DATADIR:     Data installation directory.)
+	$(info LOCALEDIR:   MO files installation directory.)
+	$(info MANDIR:      Manual pages installation directory.)
+	$(info )
+	$(info RULES)
+	$(info ========================================================================)
+	$(info help:        Display this help menu.)
+	$(info install:     Install the executable, its assets and its manual pages.)
+	$(info uninstall:   Uninstall the executable, its assets and its manual pages.)
+
+install: .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1/build/weatherhs/weatherhs po/*.po man/
+	$(INSTALL) -D -t '$(BINDIR)' '$<'
+	$(foreach lc,$(patsubst po/%.po,%,$(wildcard po/*.po)),mkdir -p '$(LOCALEDIR)/$(lc)/LC_MESSAGES' && msgfmt -o '$(LOCALEDIR)/$(lc)/LC_MESSAGES/weatherhs.mo' 'po/$(lc).po';)
+	$(call install_man)
+
+uninstall:
+	rm -f '$(BINDIR)/weatherhs'
+	$(foreach lc,$(patsubst po/%.po,%,$(wildcard po/*.po)),$(call delete_file_and_empty_dirs,$(LOCALEDIR)/$(lc)/LC_MESSAGES,weatherhs.mo);)
+	$(call uninstall_man)
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,73 @@
+# weatherhs
+
+## Description
+Command-line tool that retrieves and nicely outputs weather and related data from [Weather API](https://www.weatherapi.com/).
+
+Written in Haskell.
+
+## Dependencies
+
+#### Building & installing
++ stack
++ msgfmt
++ make
+
+#### Running
++ gettext
++ gpgme
++ pcre
+
+## Installation
+Use Stack to build and Make to install this project:
+Enter the project's root directory and run:
+
+```
+stack build weatherhs --ghc-options=-U__MESSAGE_CATALOG_DIR__
+make install
+```
+
+You'll need to change `__MESSAGE_CATALOG_DIR__` value to point to your locale directory; the default (when undefined externally) is "/usr/share/locale".
+
+You can pass `--ghc-options=-dynamic` to Stack to link with dynamic libraries; note that then you'll need to have those libraries installed to run the program.
+
+Run `make help` for more installation options.
+
+## Uninstallation
+Enter the project's root directory and run:
+
+```
+make uninstall
+```
+
+Make sure that Make variables are set to the values used for the installation.
+
+## Translations
+Default language of this program (in effect when `C` or `POSIX` is set as locale) is US English.  
+The following translations are available:
+
+| **Language**       | **Translator**                                           | **For versions** |
+|--------------------|----------------------------------------------------------|------------------|
+| Serbian (Cyrillic) | [Nikola Hadžić](mailto:nikola.hadzic.000@protonmail.com) | 1.0.0            |
+| Serbian (Latin)    | [Nikola Hadžić](mailto:nikola.hadzic.000@protonmail.com) | 1.0.0            |
+
+### Translation process
+This program is written to be easily translatable into multiple languages, and it achieves that through the use of [`gettext`](https://www.gnu.org/software/gettext/) library.
+Translations are located in `po` directory. Files in that directory contain translations, each PO file corresponding to one locale.
+
+To add a new or update existing translation, enter the project's `po` directory and run the following command:
+
+```
+make %.po  # Generate/update PO file; "%" should be replaced with a language code.
+```
+
+Afterwards, you can edit created/updated PO file (see [`gettext` manual](https://www.gnu.org/software/gettext/manual/gettext.html) for details),
+translating the program that way.
+
+You could also run `make messages.pot` to just generate the template file, but this will be done automatically by the previously described rule.
+
+**NOTE:** You need to have hgettext tool, msgcat and sed installed in order to generate the template file.
+
+**NOTE:** Make sure to use hgettext tool with this commit: <https://github.com/NH002/hgettext/commit/a7ba5f7bc2624b91ddbbeeff7846947f56605c45>.
+
+It would also be good to translate the manual page, you will find it in "man" project subdirectory.
+In that case also update .cabal file to include new manual page translation.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,3 @@
+import Distribution.Simple.I18N.GetText
+
+main = gettextDefaultMain   -- It seems that this doesn't do anything.
diff --git a/app/ArgParser.hs b/app/ArgParser.hs
new file mode 100644
--- /dev/null
+++ b/app/ArgParser.hs
@@ -0,0 +1,76 @@
+{-
+ - Copyright (C) 2022 Nikola Hadžić
+ -
+ - This file is part of weatherhs.
+ -
+ - weatherhs 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.
+ - 
+ - weatherhs 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 weatherhs.  If not, see <https://www.gnu.org/licenses/>.
+ -}
+
+module ArgParser where
+
+import              Data.List               (intercalate)
+import              Text.Read               (readMaybe)
+import              Text.Printf             (printf)
+import              Text.Regex.PCRE         ((=~))
+import              System.Environment      (getProgName)
+import qualified    System.Console.GetOpt   as GetOpt
+
+import GetText
+
+-- Command-line options flags.
+data Flag = Help | Version | NoPP | Mode String | AirQuality | Alerts | Days String | Date String | Format String | Unsafe | GetFile
+    deriving (Show, Eq)
+
+-- Command-line options definitions.
+options :: [GetOpt.OptDescr Flag]
+options = [ GetOpt.Option ['h']    ["help"]        (GetOpt.NoArg Help)                    (__ "Display this help menu and exit."),
+            GetOpt.Option ['v']    ["version"]     (GetOpt.NoArg Version)                 (__ "Display program version and exit."),
+            GetOpt.Option []       ["no-pp"]       (GetOpt.NoArg NoPP)                    (__ "Do not pretty-print data."),
+            GetOpt.Option ['m']    ["mode"]        (GetOpt.ReqArg Mode (__ "MODE"))       (__ "Information type mode. Can be \"timezone\", \"current\" (default), \"forecast\" or \"astronomy\"."),
+            GetOpt.Option ['a']    ["air-quality"] (GetOpt.NoArg AirQuality)              (__ "Also get air quaility data. Only meaningful if the information type mode is \"current\" or \"forecast\"."),
+            GetOpt.Option ['w']    ["alerts"]      (GetOpt.NoArg Alerts)                  (__ "Also get weather alerts data. Only meaningful if the information type mode is \"forecast\"."),
+            GetOpt.Option ['d']    ["days"]        (GetOpt.ReqArg Days (__ "INTEGER≥1"))  (__ "Number of days to retrieve data for. Only meaningful if the information type mode is \"forecast\". The default is 3."),
+            GetOpt.Option ['t']    ["date"]        (GetOpt.ReqArg Date (__ "yyyy-MM-dd")) (__ "Date to retrieve the data for. Only meaningful if the information type mode is \"astronomy\". The default is current date."),
+            GetOpt.Option []       ["format"]      (GetOpt.ReqArg Format (__ "FORMAT"))   (__ "Format to request data in from the server. Either \"json\" (default) or \"xml\"."),
+            GetOpt.Option []       ["unsafe"]      (GetOpt.NoArg Unsafe)                  (__ "Use HTTP instead of HTTPS for communication with the server."),
+            GetOpt.Option []       ["get-file"]    (GetOpt.NoArg GetFile)                 (__ "Just print the retrieved data file.") ]
+
+-- Help menu string.
+helpMenu :: IO String
+helpMenu = do
+    progName <- getProgName
+    return ((GetOpt.usageInfo (printf (__ "Usage: %s [OPTION…]\n\nOptions:") progName) options) ++ "\n" ++ __ "See weatherhs(1) for more information.")
+
+-- Tests the validity of the given command-line options values.
+testFlags :: [Flag] -> [String]
+testFlags flags = foldr
+    (\flag invs -> case flag of
+                    Mode str    -> if str == "timezone" || str == "current" || str == "forecast" || str == "astronomy" then invs else "-m/--mode" : invs
+                    Days str    -> case (readMaybe str :: Maybe Int) of
+                                    Nothing     -> "-d/--days" : invs
+                                    Just int    -> if (int <= 0) then "-d/--days" : invs else invs
+                    Date str    -> if str =~ "^\\d{4,}-\\d{1,2}-\\d{1,2}$" then invs else "-t/--date" : invs
+                    Format str  -> if str == "json" || str == "xml" then invs else "--format" : invs
+                    _           -> invs) [] flags
+
+-- Parses the given command-line arguments.
+-- Returns the parsed command-line arguments as flags.
+-- Exits the program on invalid input.
+parseArgs :: [String] -> IO [Flag]
+parseArgs argv = case GetOpt.getOpt' GetOpt.RequireOrder options argv of
+                    (flags, [], [], [])             -> case testFlags flags of
+                                                        []      -> return flags
+                                                        invs    -> fail (printf (__ "Invalid option values for: %s") (intercalate ", " invs))
+                    (_, nonoptions, unknowns, [])   -> fail (printf (__ "Unrecognized options: %s") (intercalate ", " (nonoptions ++ unknowns)))
+                    (_, _, _, errs)                 -> fail (printf (__ "Errors: %s") (intercalate "; " errs))
diff --git a/app/DateTime.hs b/app/DateTime.hs
new file mode 100644
--- /dev/null
+++ b/app/DateTime.hs
@@ -0,0 +1,27 @@
+{-
+ - Copyright (C) 2022 Nikola Hadžić
+ -
+ - This file is part of weatherhs.
+ -
+ - weatherhs 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.
+ - 
+ - weatherhs 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 weatherhs.  If not, see <https://www.gnu.org/licenses/>.
+ -}
+
+module DateTime where
+
+import  Data.Time.Clock         (getCurrentTime, utctDay)
+import  Data.Time.Calendar      (toGregorian)
+
+-- Get current date as a triple of year, month and day.
+getCurrentDate :: IO (Integer, Int, Int)
+getCurrentDate = getCurrentTime >>= return . toGregorian . utctDay
diff --git a/app/Draw.hs b/app/Draw.hs
new file mode 100644
--- /dev/null
+++ b/app/Draw.hs
@@ -0,0 +1,85 @@
+{-
+ - Copyright (C) 2022 Nikola Hadžić
+ -
+ - This file is part of weatherhs.
+ -
+ - weatherhs 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.
+ - 
+ - weatherhs 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 weatherhs.  If not, see <https://www.gnu.org/licenses/>.
+ -}
+
+module Draw where
+
+import  Data.List.Extra (dropEnd)
+import  Text.Printf     (printf)
+
+minTermWidth :: Word
+minTermWidth = 5
+
+-- Header nesting level.
+data HeaderStrength = H1 | H2 | H3
+
+-- Draws table header.
+drawHeader :: Word -> HeaderStrength -> String -> String
+drawHeader termWidth headStrength text
+    | termWidth < minTermWidth  = error (printf "Minimum terminal width for drawing not satisfied: %u < %u" termWidth minTermWidth)
+    | otherwise                 = do
+        let textLength = fromIntegral (length text) :: Word
+        let textSpace = termWidth - (minTermWidth - 1)
+        let excess = if textLength > textSpace then textLength - textSpace else 0
+        let position = (termWidth `div` 2 + 1) - ((textLength - excess) `div` 2)
+
+        let sepTopLeft = case headStrength of
+                            H1  -> '┏'
+                            _   -> '┠'
+        let sepTopRight = case headStrength of
+                            H1  -> '┓'
+                            _   -> '┨'
+        let sepHor  = case headStrength of
+                        H1  -> '━'
+                        H2  -> '─'
+                        H3  -> '╌'
+        let sepVer = '┃'
+        let sepBotLeft = case headStrength of
+                            H1  -> '┣'
+                            _   -> '┠'
+        let sepBotRight = case headStrength of
+                            H1  -> '┫'
+                            _   -> '┨'
+
+        printf "%s\n%c \o33[%uG%s%s\o33[0m\o33[%uG %c\n%s" (sepTopLeft : (replicate (fromIntegral (termWidth - 2) :: Int) sepHor) ++ [sepTopRight]) sepVer position (case headStrength of
+                                                                                                                                                                    H1  -> "\o33[1m\o33[3m"
+                                                                                                                                                                    H2  -> "\o33[1m"
+                                                                                                                                                                    H3  -> "\o33[3m") ((if excess == 0 then id else (++ "…") . (dropEnd ((fromIntegral excess :: Int) + 1))) text) (termWidth - 1) sepVer (sepBotLeft : (replicate (fromIntegral (termWidth - 2) :: Int) sepHor) ++ [sepBotRight])
+
+-- Draws table field.
+drawField :: Word -> String -> String -> String
+drawField termWidth name value
+    | termWidth < minTermWidth  = error (printf "Minimum terminal width for drawing not satisfied: %u < %u" termWidth minTermWidth)
+    | otherwise                 = do
+        let nameLength = fromIntegral (length name) :: Word
+        let valueLength = fromIntegral (length value) :: Word
+        let textLength = nameLength + valueLength + 2
+        let textSpace = termWidth - (minTermWidth - 1)
+        let excess = if textLength > textSpace then textLength - textSpace else 0
+        let inter = if excess == 0 then textSpace - textLength else 0
+
+        let sep = '┃'
+
+        let field = printf "%s: %s%s" name (replicate (fromIntegral inter :: Int) ' ') value
+        printf "%c %s %c" sep ((if excess == 0 then id else (++ "…") . (dropEnd ((fromIntegral excess :: Int) + 1))) field) sep
+
+-- Draws table footer.
+drawFooter :: Word -> String
+drawFooter termWidth
+    | termWidth < minTermWidth  = error (printf "Minimum terminal width for drawing not satisfied: %u < %u" termWidth minTermWidth)
+    | otherwise                 = '┗' : (replicate (fromIntegral (termWidth - 2) :: Int) '━') ++ "┛"
diff --git a/app/FormatWeather.hs b/app/FormatWeather.hs
new file mode 100644
--- /dev/null
+++ b/app/FormatWeather.hs
@@ -0,0 +1,214 @@
+{-
+ - Copyright (C) 2022 Nikola Hadžić
+ -
+ - This file is part of weatherhs.
+ -
+ - weatherhs 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.
+ - 
+ - weatherhs 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 weatherhs.  If not, see <https://www.gnu.org/licenses/>.
+ -}
+
+module FormatWeather where
+
+import  Data.List   (intercalate)
+import  Text.Printf (printf)
+
+import GetText
+import Draw
+
+{- Weather data formatting functions. -}
+
+formatWeatherTimeZone :: Word -> Bool -> String -> String -> String -> (Double, Double) -> String -> String -> String
+formatWeatherTimeZone termWidth pp name region country gcs tz localtime =
+    if pp then
+        intercalate "\n"
+            [drawHeader termWidth H1 (printf (__ "Time zone information for %s, %s, %s") name region country),
+            drawField termWidth (__ "Name") name,
+            drawField termWidth (__ "Region") region,
+            drawField termWidth (__ "Country") country,
+            drawField termWidth (__ "Coordinates") (printf "%.2f,%.2f" (fst gcs) (snd gcs)),
+            drawField termWidth (__ "Time zone") tz,
+            drawField termWidth (__ "Local time") localtime,
+            drawFooter termWidth]
+    else
+        printf (__ "Time zone information for %s, %s, %s:\nName: %s\nRegion: %s\nCountry: %s\nCoordinates: %.2f,%.2f\nTime zone: %s\nLocal time: %s")
+            name region country name region country (fst gcs) (snd gcs) tz localtime
+
+data FormatWeatherAirQuality = FormatWeatherAirQuality {
+    co          :: Double,
+    o3          :: Double,
+    no2         :: Double,
+    so2         :: Double,
+    pm2_5       :: Double,
+    pm10        :: Double,
+    us_epa      :: Word,
+    gb_defra    :: Word
+} deriving (Show)
+
+formatWeatherAirQuality :: Word -> Bool -> FormatWeatherAirQuality -> String
+formatWeatherAirQuality termWidth pp aqi =
+    if pp then
+        intercalate "\n"
+            ['\n' : (drawField termWidth (__ "Carbon monoxide") (printf "%f μg/m3" (co aqi))),
+            drawField termWidth (__ "Ozone") (printf "%f μg/m3" (o3 aqi)),
+            drawField termWidth (__ "Nitrogen dioxide") (printf "%f μg/m3" (no2 aqi)),
+            drawField termWidth (__ "Sulphur dioxide") (printf "%f μg/m3" (so2 aqi)),
+            drawField termWidth (__ "PM2.5") (printf "%f μg/m3" (pm2_5 aqi)),
+            drawField termWidth (__ "PM10") (printf "%f μg/m3" (pm10 aqi)),
+            drawField termWidth (__ "US-EPA index") (printf "%d" (us_epa aqi)),
+            drawField termWidth (__ "UK-DEFRA index") (printf "%d" (gb_defra aqi))]
+    else
+        printf (__ "\nCarbon monoxide: %f μg/m3\nOzone: %f μg/m3\nNitrogen dioxide: %f μg/m3\nSulphur dioxide: %f μg/m3\nPM2.5: %f μg/m3\nPM10: %f μg/m3\nUS-EPA index: %d\nUK-DEFRA index: %d")
+            (co aqi) (o3 aqi) (no2 aqi) (so2 aqi) (pm2_5 aqi) (pm10 aqi) (us_epa aqi) (gb_defra aqi)
+
+formatWeatherCurrent :: Word -> Bool -> String -> String -> String -> String -> Double -> Double -> Double -> Double -> String  -> Double -> Double -> Word -> String -> Double -> Double -> Double -> Double -> Word -> Word -> Double -> Double -> Double -> Maybe FormatWeatherAirQuality -> String
+formatWeatherCurrent termWidth pp name region country last_updated temp_c temp_f feelslike_c feelslike_f condition wind_kph wind_mph wind_degree wind_dir pressure_mb pressure_in precip_mm precip_in humidity cloud uv gust_kph gust_mph mAqi = do
+    (if pp then
+        intercalate "\n"
+            [drawHeader termWidth H1 (printf (__ "Current weather information for %s, %s, %s") name region country),
+            drawField termWidth (__ "Last updated") last_updated,
+            drawField termWidth (__ "Condition") condition,
+            drawField termWidth (__ "Temperature") (printf (__ "%f°C (feels like: %f°C) / %f°F (feels like: %f°F)") temp_c feelslike_c temp_f feelslike_f),
+            drawField termWidth (__ "Wind speed") (printf "%f kph / %f mph" wind_kph wind_mph),
+            drawField termWidth (__ "Wind direction") (printf "%u° (%s)" wind_degree wind_dir),
+            drawField termWidth (__ "Pressure") (printf "%f mb / %f in" pressure_mb pressure_in),
+            drawField termWidth (__ "Precipicity") (printf "%f mm / %f in" precip_mm precip_in),
+            drawField termWidth (__ "Humidity") (printf "%u%%" humidity),
+            drawField termWidth (__ "Clouds") (printf "%u%%" cloud),
+            drawField termWidth (__ "UV index") (printf "%f" uv),
+            drawField termWidth (__ "Gust speed") (printf "%f kph / %f mph" gust_kph gust_mph)]
+    else
+        printf (__ "Current weather information for %s, %s, %s:\nLast updated: %s\nCondition: %s\nTemperature: %f°C (feels like: %f°C) / %f°F (feels like: %f°F)\nWind speed: %f kph / %f mph\nWind direction: %u° (%s)\nPressure: %f mb / %f in\nPrecipicity: %f mm / %f in\nHumidity: %u%%\nClouds: %u%%\nUV index: %f\nGust speed: %f kph / %f mph")
+            name region country last_updated condition temp_c feelslike_c temp_f feelslike_f wind_kph wind_mph wind_degree wind_dir pressure_mb pressure_in precip_mm precip_in humidity cloud uv gust_kph gust_mph)
+    ++ (case mAqi of
+        Nothing     -> ""
+        Just aqi    -> (if pp then '\n' : (drawHeader termWidth H2 (__ "Air quality")) else (__ "\n\nAir quality:")) ++ formatWeatherAirQuality termWidth pp aqi)
+    ++ if pp then '\n' : (drawFooter termWidth) else ""
+
+data FormatWeatherAlert = FormatWeatherAlert {
+    headline    :: String,
+    msgtype     :: String,
+    severity    :: String,
+    urgency     :: String,
+    areas       :: String,
+    category    :: String,
+    certainty   :: String,
+    event       :: String,
+    note        :: String,
+    effective   :: String,
+    expires     :: String,
+    desc        :: String,
+    instruction :: String
+} deriving (Show)
+
+formatWeatherAlert :: Word -> Bool -> FormatWeatherAlert -> String
+formatWeatherAlert termWidth pp alert =
+    if pp then
+        intercalate "\n"
+            ['\n' : (drawHeader termWidth H3 (printf (__ "[Severity: %s] - [Urgency: %s] | (Type: %s): %s") (severity alert) (urgency alert) (msgtype alert) (headline alert))),
+            drawField termWidth (__ "Areas") (areas alert),
+            drawField termWidth (__ "Category") (category alert),
+            drawField termWidth (__ "Certainty") (certainty alert),
+            drawField termWidth (__ "Event") (event alert),
+            drawField termWidth (__ "Notes") (note alert),
+            drawField termWidth (__ "Effective since") (effective alert),
+            drawField termWidth (__ "Expires") (expires alert),
+            drawField termWidth (__ "Description") (desc alert),
+            drawField termWidth (__ "Instructions") (instruction alert)]
+    else
+        printf (__ "\n\n[Severity: %s] - [Urgency: %s] | (Type: %s): %s\nAreas: %s\nCategory: %s\nCertainty: %s\nEvent: %s\nNotes: %s\nEffective since: %s\nExpires: %s\nDescription: %s\nInstructions: %s")
+            (severity alert) (urgency alert) (msgtype alert) (headline alert) (areas alert) (category alert) (certainty alert) (event alert) (note alert) (effective alert) (expires alert) (desc alert) (instruction alert)
+
+data FormatWeatherDay = FormatWeatherDay {
+    maxtemp_c               :: Double,
+    maxtemp_f               :: Double,
+    mintemp_c               :: Double,
+    mintemp_f               :: Double,
+    avgtemp_c               :: Double,
+    avgtemp_f               :: Double,
+    maxwind_kph             :: Double,
+    maxwind_mph             :: Double,
+    totalprecip_mm          :: Double,
+    totalprecip_in          :: Double,
+    avgvis_km               :: Double,
+    avgvis_miles            :: Double,
+    avghumidity             :: Word,
+    condition               :: String,
+    uv                      :: Double,
+    daily_chance_of_rain    :: Word,
+    daily_chance_of_snow    :: Word
+} deriving (Show)
+
+formatWeatherDay :: Word -> Bool -> String -> FormatWeatherDay -> String
+formatWeatherDay termWidth pp date day =
+    if pp then
+        intercalate "\n"
+            ['\n' : (drawHeader termWidth H3 date),
+            drawField termWidth (__ "Condition") (condition day),
+            drawField termWidth (__ "Temperature")  (printf (__ "Maximum: %f°C / %f°F | Minimum: %f°C / %f°F | Average: %f°C / %f°F") (maxtemp_c day) (maxtemp_f day) (mintemp_c day) (mintemp_f day) (avgtemp_c day) (avgtemp_f day)),
+            drawField termWidth (__ "Maximum wind speed") (printf "%f kph / %f mph" (maxwind_kph day) (maxwind_mph day)),
+            drawField termWidth (__ "Total precipicity") (printf "%f mm / %f in" (totalprecip_mm day) (totalprecip_in day)),
+            drawField termWidth (__ "Average visibility") (printf "%f km / %f mi" (avgvis_km day) (avgvis_miles day)),
+            drawField termWidth (__ "Average humidity") (printf "%u%%" (avghumidity day)),
+            drawField termWidth (__ "UV index") (printf "%f" (uv day)),
+            drawField termWidth (__ "Chance of rain") (printf "%u%%" (daily_chance_of_rain day)),
+            drawField termWidth (__ "Chance of snow") (printf "%u%%" (daily_chance_of_snow day))]
+    else
+        printf (__ "\n\n%s:\nCondition: %s\nTemperature:\n\tMaximum: %f°C / %f°F\n\tMinimum: %f°C / %f°F\n\tAverage: %f°C / %f°F\nMaximum wind speed: %f kph / %f mph\nTotal precipicity: %f mm / %f in\nAverage visibility: %f km / %f mi\nAverage humidity: %u%%\nUV index: %f\nChance of rain: %u%%\nChance of snow: %u%%")
+            date (condition day) (maxtemp_c day) (maxtemp_f day) (mintemp_c day) (mintemp_f day) (avgtemp_c day) (avgtemp_f day) (maxwind_kph day) (maxwind_mph day) (totalprecip_mm day) (totalprecip_in day) (avgvis_km day) (avgvis_miles day) (avghumidity day) (uv day) (daily_chance_of_rain day) (daily_chance_of_snow day)
+
+data FormatWeatherAstro = FormatWeatherAstro {
+    sunrise             :: String,
+    sunset              :: String,
+    moonrise            :: String,
+    moonset             :: String,
+    moon_phase          :: String,
+    moon_illumination   :: Word
+} deriving (Show)
+
+formatWeatherAstro :: Word -> Bool -> FormatWeatherAstro -> String
+formatWeatherAstro termWidth pp astro =
+    if pp then
+        intercalate "\n"
+            ['\n' : (drawField termWidth (__ "Sunrise") (sunrise astro)),
+            drawField termWidth (__ "Sunset") (sunset astro),
+            drawField termWidth (__ "Moonrise") (moonrise astro),
+            drawField termWidth (__ "Moonset") (moonset astro),
+            drawField termWidth (__ "Moon phase") (moon_phase astro),
+            drawField termWidth (__ "Moon illumination") (printf "%u%%" (moon_illumination astro))]
+    else
+        printf (__ "\nSunrise: %s\nSunset: %s\nMoonrise: %s\nMoonset: %s\nMoon phase: %s\nMoon illumination: %u%%")
+            (sunrise astro) (sunset astro) (moonrise astro) (moonset astro) (moon_phase astro) (moon_illumination astro)
+                                                                                                                                                                            
+
+formatWeatherForecast :: Word -> Bool -> String -> String -> String -> Maybe [FormatWeatherAlert] -> [(String, FormatWeatherDay, FormatWeatherAstro)] -> String
+formatWeatherForecast termWidth pp name region country mAlerts days = do
+    let alerts = case mAlerts of
+                    Nothing     -> ""
+                    Just alerts ->  (if pp then '\n' : (drawHeader termWidth H2 (__ "Alerts")) else (__ "\n\nAlerts:"))
+                                    ++ (concatMap (formatWeatherAlert termWidth pp) alerts)
+                                    ++ (if pp then '\n' : (drawHeader termWidth H2 (__ "Forecast")) else (__ "\n\nForecast:"))
+
+    let forecast = concatMap (\day -> case day of (date, day, astro) -> (formatWeatherDay termWidth pp date day) ++ (formatWeatherAstro termWidth pp astro)) days
+
+    (if pp then do
+        drawHeader termWidth H1 (printf (__ "Weather forecast for %s, %s, %s") name region country)
+    else
+        printf (__ "Weather forecast for %s, %s, %s:")
+            name region country) ++ alerts ++ forecast ++ if pp then '\n' : (drawFooter termWidth) else ""
+formatWeatherAstronomy :: Word -> Bool -> String -> String -> String -> FormatWeatherAstro -> String
+formatWeatherAstronomy termWidth pp name region country astro =
+    (if pp then do
+        drawHeader termWidth H1 (printf (__ "Astronomy information for %s, %s, %s") name region country)
+    else
+        printf (__ "Astronomy information for %s, %s, %s:")
+            name region country) ++ (formatWeatherAstro termWidth pp astro) ++ if pp then '\n' : (drawFooter termWidth) else ""
diff --git a/app/GetText.hs b/app/GetText.hs
new file mode 100644
--- /dev/null
+++ b/app/GetText.hs
@@ -0,0 +1,27 @@
+{-
+ - Copyright (C) 2022 Nikola Hadžić
+ -
+ - This file is part of weatherhs.
+ -
+ - weatherhs 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.
+ - 
+ - weatherhs 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 weatherhs.  If not, see <https://www.gnu.org/licenses/>.
+ -}
+
+module GetText where
+
+import  Text.I18N.GetText   (getText)
+import  System.IO.Unsafe    (unsafePerformIO)
+
+-- Performs string translation using GetText library.
+__ :: String -> String
+__ = unsafePerformIO . getText
diff --git a/app/Main.hs b/app/Main.hs
new file mode 100644
--- /dev/null
+++ b/app/Main.hs
@@ -0,0 +1,576 @@
+{-
+ - Copyright (C) 2022 Nikola Hadžić
+ -
+ - This file is part of weatherhs.
+ -
+ - weatherhs 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.
+ - 
+ - weatherhs 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 weatherhs.  If not, see <https://www.gnu.org/licenses/>.
+ -}
+
+{-# LANGUAGE CPP, OverloadedStrings #-}
+
+module Main where
+
+import qualified    Paths_weatherhs                 as Paths
+import              Control.Exception
+import              Data.Maybe
+import              Data.Version                    (showVersion)
+import qualified    Data.ByteString.Char8           as BSC8
+import qualified    Data.ByteString.Lazy            as BSL
+import              Text.Printf                     (printf)
+import              Text.I18N.GetText               (bindTextDomain, textDomain)
+import              Text.Regex.PCRE                 ((=~))
+import              System.IO                       (stderr, hPutStrLn)
+import              System.Locale.SetLocale         (Category(LC_ALL), setLocale)
+import              System.Environment              (getArgs, lookupEnv)
+import              System.Exit                     (ExitCode(ExitFailure), exitWith)
+import qualified    System.Console.Terminal.Size    as TermSize
+import qualified    Network.HTTP.Types.Status       as HTTPStatus
+import qualified    Network.HTTP.Client             as HTTPClient
+import qualified    Network.HTTP.Client.TLS         as HTTPClientTLS
+
+import GetText
+import DateTime
+import ArgParser
+import Draw
+
+#ifdef FLAG_ENCRYPTION
+import qualified    Data.ByteString     as BS
+import              System.Directory    (getHomeDirectory)
+import qualified    Crypto.Gpgme
+#endif
+
+#ifndef FLAG_NOJSON
+import qualified    Data.Scientific     as Scientific
+import qualified    Data.Text           as Text
+import qualified    Data.Aeson.Types    as JSONTypes
+import qualified    Data.Aeson          as JSON
+import              Data.Aeson          ((.:))
+#endif
+
+#ifndef FLAG_NOXML
+import              Data.Text.Lazy.Encoding as TextEncLazy
+import              Text.Read               (readMaybe)
+import              Data.List               (find)
+import qualified    Text.XML.Light.Types    as XMLTypes
+import qualified    Text.XML.Light.Proc     as XMLProc
+import qualified    Text.XML.Light.Input    as XMLInput
+#endif
+
+#if !defined(FLAG_NOJSON) || !defined(FLAG_NOXML)
+import FormatWeather
+#endif
+
+-- Default macro values.
+#ifndef __MESSAGE_CATALOG_DOMAIN__
+#define __MESSAGE_CATALOG_DOMAIN__  "weatherhs"
+#endif
+#ifndef __MESSAGE_CATALOG_DIR__
+#define __MESSAGE_CATALOG_DIR__     "/usr/share/locale/"
+#endif
+
+-- Program exit codes.
+#define EXIT_CODE_SUCCESS           0
+#define EXIT_CODE_BAD_ENVIRONMENT   1
+#define EXIT_CODE_SYSTEM_ERROR      2 
+#define EXIT_CODE_NETWORK_ERROR     3
+#define EXIT_CODE_PARSING_ERROR     4
+
+#ifdef FLAG_ENCRYPTION
+-- Decrypts and returns the API key needed to retrieve the data from the server.
+getAPIKeyEnc :: IO (Either Crypto.Gpgme.DecryptError (Maybe String))
+getAPIKeyEnc = do
+    mKeyEncPath <- lookupEnv("WEATHERHS_API_KEY_ENC")
+    case mKeyEncPath of
+            Nothing         -> return (Right Nothing)
+            Just keyEncPath ->
+                if (length keyEncPath) == 0 then
+                    return (Right Nothing)
+                else do
+                    locale <- setLocale LC_ALL Nothing
+                    homedir <- lookupEnv("GNUPGHOME") >>= \mHomedir -> case mHomedir of
+                                                                        Nothing         -> fmap (++ "/.gnupg/") getHomeDirectory
+                                                                        Just homedir    -> return homedir
+                    Crypto.Gpgme.withCtx homedir (fromMaybe "C" locale) Crypto.Gpgme.OpenPGP (\context -> do
+                            file <- BS.readFile keyEncPath
+                            decrypted <- Crypto.Gpgme.decrypt context file
+                            return (case decrypted of
+                                        Left err    -> Left err
+                                        Right plain -> Right (if plain =~ ("^[0-9a-fA-F]+$" :: String) then Just (BSC8.unpack plain) else Nothing)))
+#endif
+
+-- Returns the unencrypted API key needed to retrieve the data from the server.
+getAPIKey :: IO (Maybe String)
+getAPIKey = do
+    mKey <- lookupEnv("WEATHERHS_API_KEY")
+    return (case mKey of
+                Nothing     -> Nothing
+                Just key    -> if key =~ ("^[0-9a-fA-F]+$" :: String) then mKey else Nothing)
+
+-- Returns the location to query the data for.
+getLocation :: IO (Maybe String)
+getLocation = do
+    mLocation <- lookupEnv("WEATHERHS_LOCATION")
+    return (case mLocation of
+                Nothing         -> Nothing
+                Just location   -> if location =~ ("^[ ,.[:alnum:]]+$" :: String) then mLocation else Nothing)
+
+-- Returns the language in which to request data.
+getLanguage :: IO String
+getLanguage = do
+    mLanguage <- lookupEnv("WEATHERHS_LANGUAGE")
+    return (case mLanguage of
+                Nothing         -> "en"
+                Just language   -> if language =~ ("^[a-z_]+$" :: String) then language else "en")
+
+-- Returns the data request URL.
+getRequestURL :: String -> String -> String -> String -> String -> Bool -> Bool -> Int -> String -> Bool -> String
+getRequestURL mode format key language location aqi alerts days date safe = (printf "http%s://api.weatherapi.com/v1/%s.%s?key=%s&lang=%s&q=%s" ((if safe then "s" else "") :: String) mode format key language location) ++
+    case mode of
+        "timezone"  -> ""
+        "current"   -> printf "&aqi=%s" ((if aqi then "yes" else "no") :: String)
+        "forecast"  -> printf "&aqi=%s&alerts=%s&days=%d" ((if aqi then "yes" else "no") :: String) ((if alerts then "yes" else "no") :: String) days
+        "astronomy" -> printf "&dt=%s" date
+        _           -> error ("Unknown information type mode: " ++ mode)
+
+-- Parses the given JSON weather data and returns the appropriate output according to the given options.
+parseWeatherDataJSON :: Word -> Bool -> String -> Bool -> Bool -> BSL.ByteString -> Either String String
+#ifndef FLAG_NOJSON
+parseWeatherDataJSON termWidth pp mode aqi alerts input = do
+    case JSON.decode input of
+        Nothing     -> Left (__ "Failed decoding JSON data input.")
+        Just result -> do
+            output <- case mode of
+                        "timezone"  -> flip JSONTypes.parseEither result $ \obj -> do
+                            location <- obj .: "location" :: JSONTypes.Parser JSON.Object
+                            name <- fmap Text.unpack (location .: "name" :: JSONTypes.Parser Text.Text)
+                            region <- fmap Text.unpack (location .: "region" :: JSONTypes.Parser Text.Text)
+                            country <- fmap Text.unpack (location .: "country" :: JSONTypes.Parser Text.Text)
+                            lat <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (location .: "lat" :: JSONTypes.Parser Scientific.Scientific)
+                            lon <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (location .: "lon" :: JSONTypes.Parser Scientific.Scientific)
+                            tz_id <- fmap Text.unpack (location .: "tz_id" :: JSONTypes.Parser Text.Text)
+                            localtime <- fmap Text.unpack (location .: "localtime" :: JSONTypes.Parser Text.Text)
+
+                            return (formatWeatherTimeZone termWidth pp name region country (lat, lon) tz_id localtime)
+                        "current"   -> flip JSONTypes.parseEither result $ \obj -> do
+                            location <- obj .: "location" :: JSONTypes.Parser JSON.Object
+                            name <- fmap Text.unpack (location .: "name" :: JSONTypes.Parser Text.Text)
+                            region <- fmap Text.unpack (location .: "region" :: JSONTypes.Parser Text.Text)
+                            country <- fmap Text.unpack (location .: "country" :: JSONTypes.Parser Text.Text)
+
+                            current <- obj .: "current" :: JSONTypes.Parser JSON.Object
+                            last_updated <- fmap Text.unpack (current .: "last_updated" :: JSONTypes.Parser Text.Text)
+                            temp_c <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "temp_c" :: JSONTypes.Parser Scientific.Scientific)
+                            temp_f <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "temp_f" :: JSONTypes.Parser Scientific.Scientific)
+                            feelslike_c <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "feelslike_c" :: JSONTypes.Parser Scientific.Scientific)
+                            feelslike_f <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "feelslike_f" :: JSONTypes.Parser Scientific.Scientific)
+                            wind_kph <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "wind_kph" :: JSONTypes.Parser Scientific.Scientific)
+                            wind_mph <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "wind_mph" :: JSONTypes.Parser Scientific.Scientific)
+                            wind_degree <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (current .: "wind_degree" :: JSONTypes.Parser Scientific.Scientific)
+                            wind_dir <- fmap Text.unpack (current .: "wind_dir" :: JSONTypes.Parser Text.Text)
+                            pressure_mb <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "pressure_mb" :: JSONTypes.Parser Scientific.Scientific)
+                            pressure_in <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "pressure_in" :: JSONTypes.Parser Scientific.Scientific)
+                            precip_mm <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "precip_mm" :: JSONTypes.Parser Scientific.Scientific)
+                            precip_in <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "precip_in" :: JSONTypes.Parser Scientific.Scientific)
+                            humidity <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (current .: "humidity" :: JSONTypes.Parser Scientific.Scientific)
+                            cloud <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (current .: "cloud" :: JSONTypes.Parser Scientific.Scientific)
+                            uv <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "uv" :: JSONTypes.Parser Scientific.Scientific)
+                            gust_kph <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "gust_kph" :: JSONTypes.Parser Scientific.Scientific)
+                            gust_mph <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (current .: "gust_mph" :: JSONTypes.Parser Scientific.Scientific)
+
+                            condition <- current .: "condition" :: JSONTypes.Parser JSON.Object
+                            condition_text <- fmap Text.unpack (condition .: "text" :: JSONTypes.Parser Text.Text)
+
+                            mAqi <- if aqi then do
+                                        air_quality <- current .: "air_quality" :: JSONTypes.Parser JSON.Object
+                                        co <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (air_quality .: "co" :: JSONTypes.Parser Scientific.Scientific)
+                                        o3 <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (air_quality .: "o3" :: JSONTypes.Parser Scientific.Scientific)
+                                        no2 <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (air_quality .: "no2" :: JSONTypes.Parser Scientific.Scientific)
+                                        so2 <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (air_quality .: "so2" :: JSONTypes.Parser Scientific.Scientific)
+                                        pm2_5 <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (air_quality .: "pm2_5" :: JSONTypes.Parser Scientific.Scientific)
+                                        pm10 <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (air_quality .: "pm10" :: JSONTypes.Parser Scientific.Scientific)
+                                        us_epa_index <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (air_quality .: "us-epa-index" :: JSONTypes.Parser Scientific.Scientific)
+                                        gb_defra_index <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (air_quality .: "gb-defra-index" :: JSONTypes.Parser Scientific.Scientific)
+
+                                        return (Just (FormatWeatherAirQuality co o3 no2 so2 pm2_5 pm10 us_epa_index gb_defra_index))
+                                    else
+                                        return Nothing
+
+                            return (formatWeatherCurrent termWidth pp name region country last_updated temp_c temp_f feelslike_c feelslike_f condition_text wind_kph wind_mph wind_degree wind_dir pressure_mb pressure_in precip_mm precip_in humidity cloud uv gust_kph gust_mph mAqi)
+                        "forecast"  -> flip JSONTypes.parseEither result $ \obj -> do
+                            location <- obj .: "location" :: JSONTypes.Parser JSON.Object
+                            name <- fmap Text.unpack (location .: "name" :: JSONTypes.Parser Text.Text)
+                            region <- fmap Text.unpack (location .: "region" :: JSONTypes.Parser Text.Text)
+                            country <- fmap Text.unpack (location .: "country" :: JSONTypes.Parser Text.Text)
+
+                            mAlerts <-  if alerts then do
+                                            alerts <- obj .: "alerts" :: JSONTypes.Parser JSON.Object
+                                            alert <- alerts .: "alert" :: JSONTypes.Parser JSON.Array
+
+                                            result <- foldr (\one accu -> case one of
+                                                                            JSON.Object obj -> do
+                                                                                headline <- fmap Text.unpack (obj .: "headline" :: JSONTypes.Parser Text.Text)
+                                                                                msgtype <- fmap Text.unpack (obj .: "msgtype" :: JSONTypes.Parser Text.Text)
+                                                                                severity <- fmap Text.unpack (obj .: "severity" :: JSONTypes.Parser Text.Text)
+                                                                                urgency <- fmap Text.unpack (obj .: "urgency" :: JSONTypes.Parser Text.Text)
+                                                                                areas <- fmap Text.unpack (obj .: "areas" :: JSONTypes.Parser Text.Text)
+                                                                                category <- fmap Text.unpack (obj .: "category" :: JSONTypes.Parser Text.Text)
+                                                                                certainty <- fmap Text.unpack (obj .: "certainty" :: JSONTypes.Parser Text.Text)
+                                                                                event <- fmap Text.unpack (obj .: "event" :: JSONTypes.Parser Text.Text)
+                                                                                note <- fmap Text.unpack (obj .: "note" :: JSONTypes.Parser Text.Text)
+                                                                                effective <- fmap Text.unpack (obj .: "effective" :: JSONTypes.Parser Text.Text)
+                                                                                expires <- fmap Text.unpack (obj .: "expires" :: JSONTypes.Parser Text.Text)
+                                                                                desc <- fmap Text.unpack (obj .: "desc" :: JSONTypes.Parser Text.Text)
+                                                                                instruction <- fmap Text.unpack (obj .: "instruction" :: JSONTypes.Parser Text.Text)
+
+                                                                                fmap ((:) (FormatWeatherAlert headline msgtype severity urgency areas category certainty event note effective expires desc instruction)) accu
+                                                                            _               -> accu) (return []) alert
+
+                                            return (Just result)
+                                        else
+                                            return Nothing
+
+                            forecast <- obj .: "forecast" :: JSONTypes.Parser JSON.Object
+                            forecastday <- forecast .: "forecastday" :: JSONTypes.Parser JSON.Array
+
+                            days <- foldr (\one accu -> case one of
+                                                            JSON.Object obj -> do
+                                                                date <- fmap Text.unpack (obj .: "date" :: JSONTypes.Parser Text.Text)
+
+                                                                day <- obj .: "day" :: JSONTypes.Parser JSON.Object
+                                                                maxtemp_c <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "maxtemp_c" :: JSONTypes.Parser Scientific.Scientific)
+                                                                maxtemp_f <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "maxtemp_f" :: JSONTypes.Parser Scientific.Scientific)
+                                                                mintemp_c <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "mintemp_c" :: JSONTypes.Parser Scientific.Scientific)
+                                                                mintemp_f <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "mintemp_f" :: JSONTypes.Parser Scientific.Scientific)
+                                                                avgtemp_c <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "avgtemp_c" :: JSONTypes.Parser Scientific.Scientific)
+                                                                avgtemp_f <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "avgtemp_f" :: JSONTypes.Parser Scientific.Scientific)
+                                                                maxwind_kph <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "maxwind_kph" :: JSONTypes.Parser Scientific.Scientific)
+                                                                maxwind_mph <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "maxwind_mph" :: JSONTypes.Parser Scientific.Scientific)
+                                                                totalprecip_mm <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "totalprecip_mm" :: JSONTypes.Parser Scientific.Scientific)
+                                                                totalprecip_in <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "totalprecip_in" :: JSONTypes.Parser Scientific.Scientific)
+                                                                avgvis_km <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "avgvis_km" :: JSONTypes.Parser Scientific.Scientific)
+                                                                avgvis_miles <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "avgvis_miles" :: JSONTypes.Parser Scientific.Scientific)
+                                                                avghumidity <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (day .: "avghumidity" :: JSONTypes.Parser Scientific.Scientific)
+                                                                uv <- fmap (Scientific.toRealFloat :: Scientific.Scientific -> Double) (day .: "uv" :: JSONTypes.Parser Scientific.Scientific)
+                                                                daily_chance_of_rain <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (day .: "daily_chance_of_rain" :: JSONTypes.Parser Scientific.Scientific)
+                                                                daily_chance_of_snow <- fmap ((fromMaybe 0) . (Scientific.toBoundedInteger :: Scientific.Scientific -> Maybe Word)) (day .: "daily_chance_of_snow" :: JSONTypes.Parser Scientific.Scientific)
+
+                                                                condition <- day .: "condition" :: JSONTypes.Parser JSON.Object
+                                                                condition_text <- fmap Text.unpack (condition .: "text" :: JSONTypes.Parser Text.Text)
+
+                                                                astro <- obj .: "astro" :: JSONTypes.Parser JSON.Object
+                                                                sunrise <- fmap Text.unpack (astro .: "sunrise" :: JSONTypes.Parser Text.Text)
+                                                                sunset <- fmap Text.unpack (astro .: "sunset" :: JSONTypes.Parser Text.Text)
+                                                                moonrise <- fmap Text.unpack (astro .: "moonrise" :: JSONTypes.Parser Text.Text)
+                                                                moonset <- fmap Text.unpack (astro .: "moonset" :: JSONTypes.Parser Text.Text)
+                                                                moon_phase <- fmap Text.unpack (astro .: "moon_phase" :: JSONTypes.Parser Text.Text)
+                                                                moon_illumination <- fmap ((read :: String -> Word) . Text.unpack) (astro .: "moon_illumination" :: JSONTypes.Parser Text.Text)
+
+                                                                fmap ((:) (date, FormatWeatherDay maxtemp_c maxtemp_f mintemp_c mintemp_f avgtemp_c avgtemp_f maxwind_kph maxwind_mph totalprecip_mm totalprecip_in avgvis_km avgvis_miles avghumidity condition_text uv daily_chance_of_rain daily_chance_of_snow, FormatWeatherAstro sunrise sunset moonrise moonset moon_phase moon_illumination)) accu
+                                                            _               -> accu) (return []) forecastday
+
+                            return (formatWeatherForecast termWidth pp name region country mAlerts days)
+                        "astronomy" -> flip JSONTypes.parseEither result $ \obj -> do
+                            location <- obj .: "location" :: JSONTypes.Parser JSON.Object
+                            name <- fmap Text.unpack (location .: "name" :: JSONTypes.Parser Text.Text)
+                            region <- fmap Text.unpack (location .: "region" :: JSONTypes.Parser Text.Text)
+                            country <- fmap Text.unpack (location .: "country" :: JSONTypes.Parser Text.Text)
+
+                            astronomy <- obj .: "astronomy" :: JSONTypes.Parser JSON.Object
+                            astro <- astronomy .: "astro" :: JSONTypes.Parser JSON.Object
+                            sunrise <- fmap Text.unpack (astro .: "sunrise" :: JSONTypes.Parser Text.Text)
+                            sunset <- fmap Text.unpack (astro .: "sunset" :: JSONTypes.Parser Text.Text)
+                            moonrise <- fmap Text.unpack (astro .: "moonrise" :: JSONTypes.Parser Text.Text)
+                            moonset <- fmap Text.unpack (astro .: "moonset" :: JSONTypes.Parser Text.Text)
+                            moon_phase <- fmap Text.unpack (astro .: "moon_phase" :: JSONTypes.Parser Text.Text)
+                            moon_illumination <- fmap ((read :: String -> Word) . Text.unpack) (astro .: "moon_illumination" :: JSONTypes.Parser Text.Text)
+
+                            return (formatWeatherAstronomy termWidth pp name region country (FormatWeatherAstro sunrise sunset moonrise moonset moon_phase moon_illumination))
+                        _           -> error ("Unknown information type mode: " ++ mode)
+
+            Right output
+#else
+parseWeatherDataJSON _ _ _ _ _ _ = Left (__ "Support for JSON was disabled during compilation! Try another format.")
+#endif
+
+-- Parses the given XML weather data and returns the appropriate output according to the given options.
+parseWeatherDataXML :: Word -> Bool -> String -> Bool -> Bool -> BSL.ByteString -> Either String String
+#ifndef FLAG_NOXML
+parseWeatherDataXML termWidth pp mode aqi alerts input = do
+    let root = fromMaybe (error "No valid root element found.") (find (\element -> case XMLTypes.elName element of
+                                                                                XMLTypes.QName "root" Nothing Nothing   -> True
+                                                                                _                                       -> False) (XMLProc.onlyElems (XMLInput.parseXML (TextEncLazy.decodeUtf8 input))))
+
+    let getTextField = \parent name converter def errstr -> fromMaybe def (converter (XMLTypes.cdData (fromMaybe (XMLTypes.CData XMLTypes.CDataText "" Nothing) (find (\cdata -> case XMLTypes.cdVerbatim cdata of
+                                                                                                                                                                                            XMLTypes.CDataText  -> True
+                                                                                                                                                                                            _                   -> False) (XMLProc.onlyText (XMLTypes.elContent (fromMaybe (error errstr) (XMLProc.findElement (XMLTypes.QName name Nothing Nothing) parent))))))))
+
+    output <- case mode of
+                "timezone"  -> do
+                    let location = fromMaybe (error "No root/location element found.") (XMLProc.findElement (XMLTypes.QName "location" Nothing Nothing) root)
+                    let name = getTextField location "name" (Just . id) "" "No root/location/name element found."
+                    let region = getTextField location "region" (Just . id) "" "No root/location/region element found."
+                    let country = getTextField location "country" (Just . id) "" "No root/location/country element found."
+                    let lat = getTextField location "lat" (readMaybe :: String -> Maybe Double) 0.0 "No root/location/lat element found."
+                    let lon = getTextField location "lon" (readMaybe :: String -> Maybe Double) 0.0 "No root/location/lon element found."
+                    let tz_id = getTextField location "tz_id" (Just . id) "" "No root/location/tz_id element found."
+                    let localtime = getTextField location "localtime" (Just . id) "" "No root/location/localtime element found."
+
+                    return (formatWeatherTimeZone termWidth pp name region country (lat, lon) tz_id localtime)
+                "current"   -> do
+                    let location = fromMaybe (error "No root/location element found.") (XMLProc.findElement (XMLTypes.QName "location" Nothing Nothing) root)
+                    let name = getTextField location "name" (Just . id) "" "No root/location/name element found."
+                    let region = getTextField location "region" (Just . id) "" "No root/location/region element found."
+                    let country = getTextField location "country" (Just . id) "" "No root/location/country element found."
+
+                    let current = fromMaybe (error "No root/current element found.") (XMLProc.findElement (XMLTypes.QName "current" Nothing Nothing) root)
+                    let last_updated = getTextField current "last_updated" (Just . id) "" "No root/current/last_updated element found."
+                    let temp_c = getTextField current "temp_c" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/temp_c element found."
+                    let temp_f = getTextField current "temp_f" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/temp_f element found."
+                    let feelslike_c = getTextField current "feelslike_c" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/feelslike_c element found."
+                    let feelslike_f = getTextField current "feelslike_f" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/feelslike_f element found."
+                    let wind_kph = getTextField current "wind_kph" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/wind_kph element found."
+                    let wind_mph = getTextField current "wind_mph" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/wind_mph element found."
+                    let wind_degree = getTextField current "wind_degree" (readMaybe :: String -> Maybe Word) 0 "No root/current/wind_degree element found."
+                    let wind_dir = getTextField current "wind_dir" (Just . id) "" "No root/current/wind_dir element found."
+                    let pressure_mb = getTextField current "pressure_mb" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/pressure_mb element found."
+                    let pressure_in = getTextField current "pressure_in" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/pressure_in element found."
+                    let precip_mm = getTextField current "precip_mm" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/precip_mm element found."
+                    let precip_in = getTextField current "precip_in" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/precip_in element found."
+                    let humidity = getTextField current "humidity" (readMaybe :: String -> Maybe Word) 0 "No root/current/humidity element found."
+                    let cloud = getTextField current "cloud" (readMaybe :: String -> Maybe Word) 0 "No root/current/cloud element found."
+                    let uv = getTextField current "uv" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/uv element found."
+                    let gust_kph = getTextField current "gust_kph" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/gust_kph element found."
+                    let gust_mph = getTextField current "gust_mph" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/gust_mph element found."
+
+                    let condition = fromMaybe (error "No root/current/condition element found.") (XMLProc.findElement (XMLTypes.QName "condition" Nothing Nothing) current)
+                    let condition_text = getTextField condition "text" (Just . id) "" "No root/current/condition/text element found."
+
+                    mAqi <- if aqi then do
+                                let air_quality = fromMaybe (error "No root/current/air_quality element found.") (XMLProc.findElement (XMLTypes.QName "air_quality" Nothing Nothing) current)
+                                let co = getTextField air_quality "co" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/air_quality/co element found."
+                                let o3 = getTextField air_quality "o3" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/air_quality/o3 element found."
+                                let no2 = getTextField air_quality "no2" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/air_quality/no2 element found."
+                                let so2 = getTextField air_quality "so2" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/air_quality/so2 element found."
+                                let pm2_5 = getTextField air_quality "pm2_5" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/air_quality/pm2_5 element found."
+                                let pm10 = getTextField air_quality "pm10" (readMaybe :: String -> Maybe Double) 0.0 "No root/current/air_quality/pm10 element found."
+                                let us_epa_index = getTextField air_quality "us-epa-index" (readMaybe :: String -> Maybe Word) 0 "No root/current/air_quality/us-epa-index element found."
+                                let gb_defra_index = getTextField air_quality "gb-defra-index" (readMaybe :: String -> Maybe Word) 0 "No root/current/air_quality/gb-defra-index element found."
+
+                                return (Just (FormatWeatherAirQuality co o3 no2 so2 pm2_5 pm10 us_epa_index gb_defra_index))
+                            else
+                                return Nothing
+
+                    return (formatWeatherCurrent termWidth pp name region country last_updated temp_c temp_f feelslike_c feelslike_f condition_text wind_kph wind_mph wind_degree wind_dir pressure_mb pressure_in precip_mm precip_in humidity cloud uv gust_kph gust_mph mAqi)
+                "forecast"  -> do
+                    let location = fromMaybe (error "No root/location element found.") (XMLProc.findElement (XMLTypes.QName "location" Nothing Nothing) root)
+                    let name = getTextField location "name" (Just . id) "" "No root/location/name element found."
+                    let region = getTextField location "region" (Just . id) "" "No root/location/region element found."
+                    let country = getTextField location "country" (Just . id) "" "No root/location/country element found."
+
+                    mAlerts <-  if alerts then do
+                                    let alerts = XMLProc.onlyElems (XMLTypes.elContent (fromMaybe (error "No root/alerts element found.") (XMLProc.findElement (XMLTypes.QName "alerts" Nothing Nothing) root)))
+
+                                    let result = foldr (\alert accu -> case alert of
+                                                                        XMLTypes.Element (XMLTypes.QName "alert" Nothing Nothing) _ _ _ -> do
+                                                                            let headline = getTextField alert "headline" (Just . id) "" "No root/alerts/alert/headline alert found."
+                                                                            let msgtype = getTextField alert "msgtype" (Just . id) "" "No root/alerts/alert/msgtype alert found."
+                                                                            let severity = getTextField alert "severity" (Just . id) "" "No root/alerts/alert/severity alert found."
+                                                                            let urgency = getTextField alert "urgency" (Just . id) "" "No root/alerts/alert/urgency alert found."
+                                                                            let areas = getTextField alert "areas" (Just . id) "" "No root/alerts/alert/areas alert found."
+                                                                            let category = getTextField alert "category" (Just . id) "" "No root/alerts/alert/category alert found."
+                                                                            let certainty = getTextField alert "certainty" (Just . id) "" "No root/alerts/alert/certainty alert found."
+                                                                            let event = getTextField alert "event" (Just . id) "" "No root/alerts/alert/event alert found."
+                                                                            let note = getTextField alert "note" (Just . id) "" "No root/alerts/alert/note alert found."
+                                                                            let effective = getTextField alert "effective" (Just . id) "" "No root/alerts/alert/effective alert found."
+                                                                            let expires = getTextField alert "expires" (Just . id) "" "No root/alerts/alert/expires alert found."
+                                                                            let desc = getTextField alert "desc" (Just . id) "" "No root/alerts/alert/desc alert found."
+                                                                            let instruction = getTextField alert "instruction" (Just . id) "" "No root/alerts/alert/instruction alert found."
+
+                                                                            (FormatWeatherAlert headline msgtype severity urgency areas category certainty event note effective expires desc instruction) : accu
+                                                                        _                       -> accu) [] alerts
+
+                                    return (Just result)
+                                else
+                                    return Nothing
+
+                    let forecast = XMLProc.onlyElems (XMLTypes.elContent (fromMaybe (error "No root/forecast element found.") (XMLProc.findElement (XMLTypes.QName "forecast" Nothing Nothing) root)))
+
+                    let days = foldr (\one accu -> case one of
+                                                    XMLTypes.Element (XMLTypes.QName "forecastday" Nothing Nothing) _ _ _ -> do
+                                                        let date = getTextField one "date" (Just . id) "" "No root/forecast/forecastday/date element found."
+
+                                                        let day = fromMaybe (error "No root/forecast/forecastday/day element found.") (XMLProc.findElement (XMLTypes.QName "day" Nothing Nothing) one)
+                                                        let maxtemp_c = getTextField day "maxtemp_c" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/maxtemp_c element found."
+                                                        let maxtemp_f = getTextField day "maxtemp_f" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/maxtemp_f element found."
+                                                        let mintemp_c = getTextField day "mintemp_c" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/mintemp_c element found."
+                                                        let mintemp_f = getTextField day "mintemp_f" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/mintemp_f element found."
+                                                        let avgtemp_c = getTextField day "avgtemp_c" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/avgtemp_c element found."
+                                                        let avgtemp_f = getTextField day "avgtemp_f" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/avgtemp_f element found."
+                                                        let maxwind_kph = getTextField day "maxwind_kph" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/maxwind_kph element found."
+                                                        let maxwind_mph = getTextField day "maxwind_mph" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/maxwind_mph element found."
+                                                        let totalprecip_mm = getTextField day "totalprecip_mm" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/totalprecip_mm element found."
+                                                        let totalprecip_in = getTextField day "totalprecip_in" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/totalprecip_in element found."
+                                                        let avgvis_km = getTextField day "avgvis_km" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/avgvis_km element found."
+                                                        let avgvis_miles = getTextField day "avgvis_miles" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/avgvis_miles element found."
+                                                        let avghumidity = getTextField day "avghumidity" (readMaybe :: String -> Maybe Word) 0 "No root/forecast/forecastday/day/avghumidity element found."
+                                                        let uv = getTextField day "uv" (readMaybe :: String -> Maybe Double) 0.0 "No root/forecast/forecastday/day/uv element found."
+                                                        let daily_chance_of_rain = getTextField day "daily_chance_of_rain" (readMaybe :: String -> Maybe Word) 0 "No root/forecast/forecastday/day/daily_chance_of_rain element found."
+                                                        let daily_chance_of_snow = getTextField day "daily_chance_of_snow" (readMaybe :: String -> Maybe Word) 0 "No root/forecast/forecastday/day/daily_chance_of_snow element found."
+
+                                                        let condition = fromMaybe (error "No root/forecast/forecastday/day/condition element found.") (XMLProc.findElement (XMLTypes.QName "condition" Nothing Nothing) day)
+                                                        let condition_text = getTextField condition "text" (Just . id) "" "No root/forecast/forecastday/day/condition/text element found."
+
+                                                        let astro = fromMaybe (error "No root/forecast/forecastday/astro element found.") (XMLProc.findElement (XMLTypes.QName "astro" Nothing Nothing) one)
+                                                        let sunrise = getTextField astro "sunrise" (Just . id) "" "No root/forecast/forecastday/astro/sunrise element found."
+                                                        let sunset = getTextField astro "sunset" (Just . id) "" "No root/forecast/forecastday/astro/sunset element found."
+                                                        let moonrise = getTextField astro "moonrise" (Just . id) "" "No root/forecast/forecastday/astro/moonrise element found."
+                                                        let moonset = getTextField astro "moonset" (Just . id) "" "No root/forecast/forecastday/astro/moonset element found."
+                                                        let moon_phase = getTextField astro "moon_phase" (Just . id) "" "No root/forecast/forecastday/astro/moon_phase element found."
+                                                        let moon_illumination = getTextField astro "moon_illumination" (readMaybe :: String -> Maybe Word) 0 "No root/forecast/forecastday/astro/moon_illumination element found."
+
+                                                        (date, FormatWeatherDay maxtemp_c maxtemp_f mintemp_c mintemp_f avgtemp_c avgtemp_f maxwind_kph maxwind_mph totalprecip_mm totalprecip_in avgvis_km avgvis_miles avghumidity condition_text uv daily_chance_of_rain daily_chance_of_snow, FormatWeatherAstro sunrise sunset moonrise moonset moon_phase moon_illumination) : accu
+                                                    _                       -> accu) [] forecast
+
+                    return (formatWeatherForecast termWidth pp name region country mAlerts days)
+                "astronomy" -> do
+                    let location = fromMaybe (error "No root/location element found.") (XMLProc.findElement (XMLTypes.QName "location" Nothing Nothing) root)
+                    let name = getTextField location "name" (Just . id) "" "No root/location/name element found."
+                    let region = getTextField location "region" (Just . id) "" "No root/location/region element found."
+                    let country = getTextField location "country" (Just . id) "" "No root/location/country element found."
+
+                    let astronomy = fromMaybe (error "No root/astronomy element found.") (XMLProc.findElement (XMLTypes.QName "astronomy" Nothing Nothing) root)
+                    let astro = fromMaybe (error "No root/astronomy/astro element found.") (XMLProc.findElement (XMLTypes.QName "astro" Nothing Nothing) astronomy)
+                    let sunrise = getTextField astro "sunrise" (Just . id) "" "No root/astronomy/astro/sunrise element found."
+                    let sunset = getTextField astro "sunset" (Just . id) "" "No root/astronomy/astro/sunset element found."
+                    let moonrise = getTextField astro "moonrise" (Just . id) "" "No root/astronomy/astro/moonrise element found."
+                    let moonset = getTextField astro "moonset" (Just . id) "" "No root/astronomy/astro/moonset element found."
+                    let moon_phase = getTextField astro "moon_phase" (Just . id) "" "No root/astronomy/astro/moon_phase element found."
+                    let moon_illumination = getTextField astro "moon_illumination" (readMaybe :: String -> Maybe Word) 0 "No root/astronomy/astro/moon_illumination element found."
+
+                    return (formatWeatherAstronomy termWidth pp name region country (FormatWeatherAstro sunrise sunset moonrise moonset moon_phase moon_illumination))
+                _           -> error ("Unknown information type mode: " ++ mode)
+
+    Right output
+#else
+parseWeatherDataXML _ _ _ _ _ _ = Left (__ "Support for XML was disabled during compilation! Try another format.")
+#endif
+
+-- Does the main work of the program:
+--  Retrieves the data file from the server, prints it unparsed if Unsafe flag is set,
+--  or parses it and displays it using the appropriate formatting if not.
+mainWork :: String -> [Flag] -> IO ()
+mainWork key flags = do
+    -- Get location to query the data for.
+    mLocation <- getLocation
+    case mLocation of
+        Just location   -> do
+                            -- Extract values from value-taking flags.
+                            let mode = foldr (\flag res -> case flag of
+                                                            Mode str  -> str
+                                                            _         -> res) "current" flags
+                            let days = foldr (\flag res -> case flag of
+                                                            Days str  -> read str :: Int
+                                                            _         -> res) 3 flags
+                            currentDate <- getCurrentDate >>= (\date -> case date of (year, month, day) -> return (printf "%d-%d-%d" year month day))
+                            let date = foldr (\flag res -> case flag of
+                                                            Date str  -> str
+                                                            _         -> res) currentDate flags
+                            let format = foldr (\flag res -> case flag of
+                                                                Format str    -> str
+                                                                _             -> res) "json" flags
+
+                            manager <- HTTPClient.newManager (if elem Unsafe flags then HTTPClient.defaultManagerSettings else HTTPClientTLS.tlsManagerSettings)
+                            language <- getLanguage
+                            request <- HTTPClient.parseRequest (getRequestURL mode format key language location (elem AirQuality flags) (elem Alerts flags) days date (notElem Unsafe flags))
+
+                            mResponse <- try (HTTPClient.httpLbs request manager) :: IO (Either HTTPClient.HttpException (HTTPClient.Response BSL.ByteString))
+                            case mResponse of
+                                Left _          -> do
+                                    hPutStrLn stderr (__ "Error getting the server response.")
+                                    exitWith (ExitFailure EXIT_CODE_NETWORK_ERROR)
+                                Right response  -> do
+                                    let status = HTTPClient.responseStatus response
+                                    let code = HTTPStatus.statusCode status
+
+                                    if code < 200 || code > 299 then do
+                                        hPutStrLn stderr (printf (__ "HTTP error %d: %s") code (BSC8.unpack (HTTPStatus.statusMessage status)))
+                                        exitWith (ExitFailure EXIT_CODE_NETWORK_ERROR)
+                                    else if elem GetFile flags then
+                                        BSC8.putStrLn (BSL.toStrict (HTTPClient.responseBody response))
+                                    else do
+                                        mTermSize <- TermSize.size :: IO (Maybe (TermSize.Window Word))
+                                        case mTermSize of
+                                            Nothing         -> do
+                                                hPutStrLn stderr (__ "Failed to get terminal size.")
+                                                exitWith (ExitFailure EXIT_CODE_SYSTEM_ERROR)
+                                            Just termSize   ->
+                                                if (TermSize.width termSize) < minTermWidth then do
+                                                    hPutStrLn stderr (printf (__ "Terminal width is lower than required: %u < %u") (TermSize.width termSize) minTermWidth)
+                                                    exitWith (ExitFailure EXIT_CODE_SYSTEM_ERROR)
+                                                else do
+                                                    let eWeatherData = (case format of
+                                                                        "json"  -> parseWeatherDataJSON
+                                                                        "xml"   -> parseWeatherDataXML
+                                                                        _       -> error ("Unknown data format: " ++ format)) (TermSize.width termSize) (notElem NoPP flags) mode (elem AirQuality flags) (elem Alerts flags) (HTTPClient.responseBody response)
+
+                                                    case eWeatherData of
+                                                        Left err            -> do
+                                                            hPutStrLn stderr (printf (__ "Failed to parse retrieved weather data: %s") err)
+                                                            exitWith (ExitFailure EXIT_CODE_PARSING_ERROR)
+                                                        Right weatherData   -> putStrLn weatherData
+        Nothing         -> fail (__ "Location to query the data for unspecified; make sure that WEATHERHS_LOCATION is set and non-empty.")
+
+    return ()
+
+main :: IO ()
+main = do
+    -- Setup I18N.
+    _ <- setLocale LC_ALL (Just "")
+    _ <- bindTextDomain __MESSAGE_CATALOG_DOMAIN__ (Just __MESSAGE_CATALOG_DIR__)
+    _ <- textDomain (Just __MESSAGE_CATALOG_DOMAIN__)
+
+    -- Parse command-line arguments.
+    args <- getArgs >>= parseArgs
+
+    -- Handle exit-now command-line options.
+    if elem Help args then
+        helpMenu >>= putStrLn
+    else if elem Version args then
+        putStrLn (showVersion Paths.version)
+    else do
+#ifdef FLAG_ENCRYPTION
+        -- Attempt to get the encrypted API key first and try to decrypt it.
+        -- In case that there is no encrypted API key attempt to get the unencrypted API key.
+        -- On success retrieve and print weather and related data.
+        mKeyEnc <- getAPIKeyEnc
+        case mKeyEnc of
+            Left err            -> fail (__ (printf "Failed to decrypt API key: %s" (case err of
+                                                                                        Crypto.Gpgme.NoData              -> (__ "No data to decrypt.")
+                                                                                        Crypto.Gpgme.Failed              -> (__ "Not a valid cipher.")
+                                                                                        Crypto.Gpgme.BadPass             -> (__ "Wrong passphrase.")
+                                                                                        Crypto.Gpgme.Unknown errGpgme    -> (Crypto.Gpgme.errorString errGpgme) ++ " " ++ (printf (__ "(source: %s)") (Crypto.Gpgme.sourceString errGpgme)))))
+            Right Nothing       -> do
+                mKey <- getAPIKey 
+                case mKey of
+                    Nothing     -> fail (__ "No API key found; make sure that either WEATHERHS_API_KEY_ENC or WEATHERHS_API_KEY is set and non-empty.")
+                    Just key    -> mainWork key args
+            Right (Just key)    -> mainWork key args
+#else
+        -- Attempt to get the API key.
+        -- On success retrieve and print weather and related data.
+        mKey <- getAPIKey 
+        case mKey of
+            Nothing     -> fail (__ "No API key found; make sure that WEATHERHS_API_KEY is set and non-empty.")
+            Just key    -> mainWork key args
+#endif
diff --git a/man/man1/weatherhs.1 b/man/man1/weatherhs.1
new file mode 100644
--- /dev/null
+++ b/man/man1/weatherhs.1
@@ -0,0 +1,144 @@
+.\" Man page for weatherhs
+.TH "WEATHERHS" 1 "13 August 2022" "1.0.0" "Man page for weatherhs"
+.SH NAME
+weatherhs \- weather and related data info command-line tool
+.SH SYNOPSIS
+.B weatherhs
+.RB [ -h ]
+.RB [ -v ]
+.RB [ --no-pp ]
+.RB [ -m
+.IR MODE ]
+.RB [ -a ]
+.RB [ -w ]
+.RB [ -d
+.IR INTEGER≥1 ]
+.RB [ -t
+.IR yyyy-MM-dd ]
+.RB [ --format
+.IR FORMAT ]
+.RB [ --unsafe ]
+.RB [ --get-file ]
+.SH DESCRIPTION
+This is a command-line utility that retrieves and nicely outputs ("pretty-prints") weather and related data ("data") from WeatherAPI server ("the server"), in the table form.
+.SH ENVIRONMENT
+All environment variables specific to this program start with "WEATHERHS_".
+.TP
+.B WEATHERHS_API_KEY
+API key to retrieve data from the server.
+You can get one by registering on WeatherAPI website.
+.IP
+Must match
+.BR pcre (3)
+pattern "^[0-9a-fA-F]+$" in order to be taken into consideration.
+.TP
+.B WEATHERHS_API_KEY_ENC
+Path to the file where
+.BR gpg (1)-encrypted
+API key to retrieve data from the server is stored.
+You will need to authenticate yourself in order for the program to decrypt the file and by that get the API key.
+.IP
+Must be set and non-empty and when its target is decrypted its content must be of the
+.BR pcre (3)
+pattern "^[0-9a-fA-F]+$" in order to be taken into consideration.
+.IP
+This environment variable will only be effective if the program was compiled with encryption support ("encryption" compile flag).
+.P
+Of
+.B WEATHERHS_API_KEY
+and
+.B WEATHERHS_API_KEY_ENC
+the latter one takes precedence, and one of them must be properly set for the main function of the program to work.
+.TP
+.B WEATHERHS_LOCATION
+Location to retrieve the data for.
+It is directly passed as the query parameter value to the server.
+.IP
+Must match
+.BR pcre (3)
+pattern "^[ .,[:alnum:]]+$" in order for the main function of the program to work.
+.TP
+.B WEATHERHS_LANGUAGE
+Language code signifying in which language should be retrieved data strings.
+The default is "en".
+.IP
+Must match
+.BR pcre (3)
+pattern "^[a-z_]+$" in order to be taken into consideration.
+.SH OPTIONS
+Without any option given, the program will send request only for the current weather data (which means without air quality) to the server for the location specified in
+.B WEATHERHS_LOCATION
+environment variable, and pretty-print it to the user on success.
+.TP
+.BR -h ", " --help
+Display the program help menu and exit.
+.TP
+.BR -v ", " --version
+Display the program version and exit.
+.TP
+.B --no-pp
+Do not pretty-print data.
+.TP
+.BI -m " MODE\fR, " --mode " MODE"
+Mode for information type.
+The allowed values and their corresponding information types are:
+.TS
+lb l.
+timezone	Location and time zone.
+current	Current weather.
+forecast	Forecast for the specific number of days.
+astronomy	Astronomical data.
+.TE
+.IP
+The default is "current".
+.TP
+.BR -a ", " --air-quality
+Along with weather data retrieve and print air quality data.
+.IP
+Meaningful only if the information type mode is "current" or "forecast".
+.TP
+.BR -w ", " --alerts
+Along with weather data retrieve and print weather alerts.
+.IP
+Meaningful only if the information type mode is "forecast".
+.TP
+.BI -d " INTEGER≥1\fR, " --days " INTEGER≥1"
+Number of days to retrieve the data for when the information type mode is "forecast".
+The default is 3.
+.TP
+.BI -t " yyyy-MM-dd\fR, " --date " yyyy-MM-dd"
+Date to retrieve the data for when the information type mode is "astronomy".
+The default is current date.
+.TP
+.BI -f " FORMAT\fR, " --format " FORMAT"
+Format to request the data in from the server.
+Either "json" (default) or "xml".
+.TP
+.B --unsafe
+Use HTTP instead of HTTPS for communication with the server.
+.TP
+.B --get-file
+Just print the retrieved data file.
+.SH RETURN VALUE
+.TS
+r l.
+0	No errors.
+1	Invalid command-line arguments or environment.
+2	System error.
+3	Network error.
+4	Data parsing error.
+.TE
+.SH LINKS
+.TS
+lb ci.
+WeatherAPI	https://weatherapi.com/
+.TE
+.SH NOTES
+If using
+.B WEATHERHS_API_KEY_ENC
+make sure that the decrypted API key does not contain the ending newline, as then it will not match the verifying pattern.
+.P
+Behavior of the tool described here is based on the behavior of WeatherAPI service at the time of writing, thus it may be different at the time when you use it.
+.SH SEE ALSO
+.BR pcre (3),
+.BR gpg (1)
diff --git a/man/sr/man1/weatherhs.1 b/man/sr/man1/weatherhs.1
new file mode 100644
--- /dev/null
+++ b/man/sr/man1/weatherhs.1
@@ -0,0 +1,144 @@
+.\" Страница приручника за weatherhs -- превод на српски језик (Никола Хаџић <nikola.hadzic.000@protonmail.com>)
+.TH "WEATHERHS" 1 "13. август 2022." "1.0.0" "Страница приручника за weatherhs"
+.SH ИМЕ
+weatherhs \- алатка командне линије за временске и сродне информације
+.SH УВОД
+.B weatherhs
+.RB [ -h ]
+.RB [ -v ]
+.RB [ --no-pp ]
+.RB [ -m
+.IR РЕЖИМ ]
+.RB [ -a ]
+.RB [ -w ]
+.RB [ -d
+.IR "ЦЕО БРОЈ≥1" ]
+.RB [ -t
+.IR гггг-ММ-дд ]
+.RB [ --format
+.IR ФОРМАТ ]
+.RB [ --unsafe ]
+.RB [ --get-file ]
+.SH ОПИС
+Ово је алатка командне линије која преузима и представља на леп начин („прети-принтује“) временске и сродне податке („податке“) са WeatherAPI сервера („сервера“), у форми табеле.
+.SH ОКРУЖЕЊЕ
+Све променљиве окружења специфичне овом програму почињу са „WEATHERHS_“.
+.TP
+.B WEATHERHS_API_KEY
+API кључ за преузимање података са сервера.
+Можете добити један регистрацијом на WeatherAPI сајту.
+.IP
+Мора одговарати
+.BR pcre (3)
+обрасцу „^[0-9a-fA-F]+$“ да би била узета у обзир.
+.TP
+.B WEATHERHS_API_KEY_ENC
+Путања до датотеке где
+.BR gpg (1)-ом
+енкриптован API кључ за преузимање података са сервера је сачуван.
+Мораћете да се аутентификујете да би програм декриптовао датотеку и тиме добио API кључ.
+.IP
+Мора бити постављена и испуњена и када је њена мета декриптована њен садржај мора бити од
+.BR pcre (3)
+обрасца „^[0-9a-fA-F]+$“ да би била узета у обзир.
+.IP
+Ова променљива окружења ће само бити ефективна ако је програм био компајлиран са подршком за енкрипцију („encryption“ компајлерска застава).
+.P
+Од
+.B WEATHERHS_API_KEY
+и
+.B WEATHERHS_API_KEY_ENC
+ова друга има предност, и једна од њих мора бити исправно постављена да би главна функција програма радила.
+.TP
+.B WEATHERHS_LOCATION
+Локација за коју преузети податке.
+Директно је прослеђена као вредност за упитни параметар серверу.
+.IP
+Мора одговарати
+.BR pcre (3)
+обрасцу „^[ .,[:alnum:]]+$“ да би главна функција програма радила.
+.TP
+.B WEATHERHS_LANGUAGE
+Језички код који означава у којем језику би требале бити преузете ниске података.
+Подразумевано је „en“.
+.IP
+Мора одговарати
+.BR pcre (3)
+обрасцу „^[a-z_]+$“ да би била узета у обзир.
+.SH ОПЦИЈЕ
+Без иједне дате опције, програм ће послати захтев за податке о тренутном времену (што значи без квалитета ваздуха) серверу за локацију наведену у
+.B WEATHERHS_LOCATION
+променљиви окружења, и прети-принтоваће их кориснику у случају успеха.
+.TP
+.BR -h ", " --help
+Прикажи помоћни мени програма и изађи.
+.TP
+.BR -v ", " --version
+Прикажи верзију програма и изађи.
+.TP
+.B --no-pp
+Немој прети-принтовати податке.
+.TP
+.BI -m " РЕЖИМ\fR, " --mode " РЕЖИМ"
+Режим за тип информација.
+Дозвољене вредности и њихови кореспондирајући типови информација су:
+.TS
+lb l.
+timezone	Локација и временска зона.
+current	Тренутно време.
+forecast	Прогноза за наведени број дана.
+astronomy	Астрономиски подаци.
+.TE
+.IP
+Подразумевана вредност је „current“.
+.TP
+.BR -a ", " --air-quality
+Заједно са временским подацима преузми и испиши податке о квалитету ваздуха.
+.IP
+Има смисла само ако је режим за тип информација „current“ или „forecast“.
+.TP
+.BR -w ", " --alerts
+Заједно са временским подацима преузми и испиши податке о временским упозорењима.
+.IP
+Има смисла само ако је режим за тип информација „forecast“.
+.TP
+.BI -d " ЦЕО БРОЈ≥1\fR, " --days " ЦЕО БРОЈ≥1"
+Број дана за који преузети податке када је режим за тип информација „forecast“.
+Подразумевана вредност је 3.
+.TP
+.BI -t " гггг-ММ-дд\fR, " --date " гггг-ММ-дд"
+Датум за који преузети податке када је режим за тип информација „astronomy“.
+Подразумевана вредност је тренутни датум.
+.TP
+.BI -f " ФОРМАТ\fR, " --format " ФОРМАТ"
+Формат у којем захтевати податке са сервера.
+Или „json“ (подразумевано) или „XML“.
+.TP
+.B --unsafe
+Користи HTTP уместо HTTPS-а за комуникацију са сервером.
+.TP
+.B --get-file
+Само испиши преузету датотеку података.
+.SH ПОВРАТНА ВРЕДНОСТ
+.TS
+r l.
+0	Нема грешака.
+1	Неисправни аргументи командне линије или неисправно окружење.
+2	Системска грешка.
+3	Мрежна грешка.
+4	Грешка рашчлањивања података.
+.TE
+.SH ВЕЗЕ
+.TS
+lb ci.
+WeatherAPI	https://weatherapi.com/
+.TE
+.SH НАПОМЕНЕ
+Ако користите
+.B WEATHERHS_API_KEY_ENC
+пазите да декриптован API кључ не садржи завршну нову линију, јер онда неће одговарати обрасцу за верификовање.
+.P
+Понашање алатке описано овде се заснива на понашању WeatherAPI услуге у време писања, и према томе оно може бити другачије у време када је Ви користите.
+.SH ВИДЕТИ ТАКОЂЕ
+.BR pcre (3),
+.BR gpg (1)
diff --git a/man/sr_RS@latin/man1/weatherhs.1 b/man/sr_RS@latin/man1/weatherhs.1
new file mode 100644
--- /dev/null
+++ b/man/sr_RS@latin/man1/weatherhs.1
@@ -0,0 +1,144 @@
+.\" Stranica priručnika za weatherhs -- prevod na srpski jezik (Nikola Hadžić <nikola.hadzic.000@protonmail.com>)
+.TH "WEATHERHS" 1 "13. avgust 2022." "1.0.0" "Stranica priručnika za weatherhs"
+.SH IME
+weatherhs \- alatka komandne linije za vremenske i srodne informacije
+.SH UVOD
+.B weatherhs
+.RB [ -h ]
+.RB [ -v ]
+.RB [ --no-pp ]
+.RB [ -m
+.IR REŽIM ]
+.RB [ -a ]
+.RB [ -w ]
+.RB [ -d
+.IR "CEO BROJ≥1" ]
+.RB [ -t
+.IR gggg-MM-dd ]
+.RB [ --format
+.IR FORMAT ]
+.RB [ --unsafe ]
+.RB [ --get-file ]
+.SH OPIS
+Ovo je alatka komandne linije koja preuzima i predstavlja na lep način („preti-printuje“) vremenske i srodne podatke („podatke“) sa WeatherAPI servera („servera“), u formi tabele.
+.SH OKRUŽENJE
+Sve promenljive okruženja specifične ovom programu počinju sa „WEATHERHS_“.
+.TP
+.B WEATHERHS_API_KEY
+API ključ za preuzimanje podataka sa servera.
+Možete dobiti jedan registracijom na WeatherAPI sajtu.
+.IP
+Mora odgovarati
+.BR pcre (3)                                                                       
+obrascu „^[0-9a-fA-F]+$“ da bi bila uzeta u obzir.
+.TP
+.B WEATHERHS_API_KEY_ENC
+Putanja do datoteke gde
+.BR gpg (1)-om
+enkriptovan API ključ za preuzimanje podataka sa servera je sačuvan.
+Moraćete da se autentifikujete da bi program dekriptovao datoteku i time dobio API ključ.
+.IP
+Mora biti postavljena i ispunjena i kada je njena meta dekriptovana njen sadržaj mora biti od
+.BR pcre (3)
+obrasca „^[0-9a-fA-F]+$“ da bi bila uzeta u obzir.
+.IP
+Ova promenljiva okruženja će samo biti efektivna ako je program bio kompajliran sa podrškom za enkripciju („encryption“ kompajlerska zastava).
+.P
+Od
+.B WEATHERHS_API_KEY
+i
+.B WEATHERHS_API_KEY_ENC
+ova druga ima prednost, i jedna od njih mora biti ispravno postavljena da bi glavna funkcija programa radila.
+.TP
+.B WEATHERHS_LOCATION
+Lokacija za koju preuzeti podatke.
+Direktno je prosleđena kao vrednost za upitni parametar serveru.
+.IP
+Mora odgovarati
+.BR pcre (3)
+obrascu „^[ .,[:alnum:]]+$“ da bi glavna funkcija programa radila.
+.TP
+.B WEATHERHS_LANGUAGE
+Jezički kod koji označava u kojem jeziku bi trebale biti preuzete niske podataka.
+Podrazumevano je „en“.
+.IP
+Mora odgovarati
+.BR pcre (3)
+obrascu „^[a-z_]+$“ da bi bila uzeta u obzir.
+.SH OPCIJE
+Bez ijedne date opcije, program će poslati zahtev za podatke o trenutnom vremenu (što znači bez kvaliteta vazduha) serveru za lokaciju navedenu u
+.B WEATHERHS_LOCATION
+promenljivi okruženja, i preti-printovaće ih korisniku u slučaju uspeha.
+.TP
+.BR -h ", " --help
+Prikaži pomoćni meni programa i izađi.
+.TP
+.BR -v ", " --version
+Prikaži verziju programa i izađi.
+.TP
+.B --no-pp
+Nemoj preti-printovati podatke.
+.TP
+.BI -m " REŽIM\fR, " --mode " REŽIM"
+Režim za tip informacija.
+Dozvoljene vrednosti i njihovi korespondirajući tipovi informacija su:
+.TS
+lb l.
+timezone	Lokacija i vremenska zona.
+current	Trenutno vreme.
+forecast	Prognoza za navedeni broj dana.
+astronomy	Astronomski podaci.
+.TE
+.IP
+Podrazumevana vrednost je „current“.
+.TP
+.BR -a ", " --air-quality
+Zajedno sa vremenskim podacima preuzmi i ispiši podatke o kvalitetu vazduha.
+.IP
+Ima smisla samo ako je režim za tip informacija „current“ ili „forecast“.
+.TP
+.BR -w ", " --alerts
+Zajedno sa vremenskim podacima preuzmi i ispiši podatke o vremenskim upozorenjima.
+.IP 
+Ima smisla samo ako je režim za tip informacija „forecast“.
+.TP
+.BI -d " CEO BROJ≥1\fR, " --days " CEO BROJ≥1"
+Broj dana za koji preuzeti podatke kada je režim za tip informacija „forecast“.
+Podrazumevana vrednost je 3.
+.TP
+.BI -t " gggg-MM-dd\fR, " --date " gggg-MM-dd"
+Datum za koji preuzeti podatke kada je režim za tip informacija „astronomy“.
+Podrazumevana vrednost je trenutni datum.
+.TP
+.BI -f " FORMAT\fR, " --format " FORMAT"
+Format u kojem zahtevati podatke sa servera.
+Ili „json“ (podrazumevano) ili „XML“.
+.TP
+.B --unsafe
+Koristi HTTP umesto HTTPS-a za komunikaciju sa serverom.
+.TP
+.B --get-file
+Samo ispiši preuzetu datoteku podataka.
+.SH POVRATNA VREDNOST
+.TS
+r l.
+0	Nema grešaka.
+1	Neispravni argumenti komandne linije ili neispravno okruženje.
+2	Sistemska greška.
+3	Mrežna greška.
+4	Greška raščlanjivanja podataka.
+.TE
+.SH VEZE
+.TS
+lb ci.
+WeatherAPI	https://weatherapi.com/
+.TE
+.SH NAPOMENE
+Ako koristite
+.B WEATHERHS_API_KEY_ENC
+pazite da dekriptovan API ključ ne sadrži završnu novu liniju, jer onda neće odgovarati obrascu za verifikovanje.
+.P
+Ponašanje alatke opisano ovde se zasniva na ponašanju WeatherAPI usluge u vreme pisanja, i prema tome ono može biti drugačije u vreme kada je Vi koristite.
+.SH VIDETI TAKOĐE
+.BR pcre (3),
+.BR gpg (1)
diff --git a/po/Makefile b/po/Makefile
new file mode 100644
--- /dev/null
+++ b/po/Makefile
@@ -0,0 +1,46 @@
+XGETTEXT := hgettext
+APPDIR := ../app
+AUTHOR := Nikola Hadžić
+PACKAGE := weatherhs
+VERSION := 1.0.0
+BUGS_ADDRESS := nikola.hadzic.000@protonmail.com
+MERGE_BACKUP := simple
+
+.PHONY: help clean
+
+help:
+	$(info VARIABLES)
+	$(info =================================================================================)
+	$(info XGETTEXT:        xgettext tool to use (you probably want hgettext).)
+	$(info APPDIR:          Application code directory.)
+	$(info AUTHOR:          Package author's name.)
+	$(info PACKAGE:         Package's name.)
+	$(info VERSION:         Package's version.)
+	$(info BUGS_ADDRESS:    E-mail address to report the program bugs to (usually author's).)
+	$(info MERGE_BACKUP:    Merge backup option; see msgmerge(1).)
+	$(info )
+	$(info RULES)
+	$(info =================================================================================)
+	$(info help:           Display this help menu.)
+	$(info messages.pot:   Build POT file.)
+	$(info %.po:           Generate PO file.)
+	$(info clean:          Remove unnecessary generated files.)
+
+messages.pot: $(APPDIR)/*.hs
+	$(warning Since you probably use hgettext for string extraction, make sure that it has this commit: https://github.com/NH002/hgettext/commit/a7ba5f7bc2624b91ddbbeeff7846947f56605c45)
+	$(XGETTEXT) -o '1-$@' -k __ $(patsubst %,'%',$^) --cpp --cpp-defs=FLAG_ENCRYPTION
+	$(XGETTEXT) -o '2-$@' -k __ $(patsubst %,'%',$^) --cpp --cpp-defs=FLAG_NOJSON,FLAG_NOXML
+	msgcat --no-wrap -o '$@' '1-$@' '2-$@'
+	rm '1-$@' '2-$@'
+	sed -i                                                      \
+	    -e '6s/PACKAGE VERSION/$(PACKAGE) $(VERSION)/'          \
+	    -e '7s/.\{23\}/&$(BUGS_ADDRESS)/'                       \
+	    -e '8s/\(.\{20\}\).\{21\}/\1$(shell date '+%F %R%z')/'  \
+	    '$@'
+
+%.po: messages.pot
+	$(if $(wildcard $@),msgmerge --backup '$(MERGE_BACKUP)' -U --no-wrap '$@' '$<',msginit --no-wrap -l $(patsubst %.po,'%',$@))
+
+clean:
+	$(info Cleaning directory...)
+	@rm -f *-messages.pot messages.pot *.po~
diff --git a/po/sr.po b/po/sr.po
new file mode 100644
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,570 @@
+# Translation file
+msgid ""
+msgstr ""
+"Project-Id-Version: weatherhs 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-01-13 06:05-0800\n"
+"PO-Revision-Date: 2022-08-13 19:01+0200\n"
+"Last-Translator: Никола Хаџић <nikola.hadzic.000@protonmail.com>\n"
+"Language-Team: Serbian <(nothing)>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../app/FormatWeather.hs:166
+msgid ""
+"\n"
+"\n"
+"%s:\n"
+"Condition: %s\n"
+"Temperature:\n"
+"\tMaximum: %f°C / %f°F\n"
+"\tMinimum: %f°C / %f°F\n"
+"\tAverage: %f°C / %f°F\n"
+"Maximum wind speed: %f kph / %f mph\n"
+"Total precipicity: %f mm / %f in\n"
+"Average visibility: %f km / %f mi\n"
+"Average humidity: %u%%\n"
+"UV index: %f\n"
+"Chance of rain: %u%%\n"
+"Chance of snow: %u%%"
+msgstr ""
+"\n"
+"\n"
+"%s:\n"
+"Стање: %s\n"
+"Температура:\n"
+"\tНајвиша: %f°C / %f°F\n"
+"\tНајмања: %f°C / %f°F\n"
+"\tПросечна: %f°C / %f°F\n"
+"Највиша брзина ветра: %f kph / %f mph\n"
+"Укупна преципичност: %f mm / %f in\n"
+"Просечна видљивост: %f km / %f mi\n"
+"Просечна влажност: %u%%\n"
+"UV индекс: %f\n"
+"Шансе за кишу: %u%%\n"
+"Шансе за снег: %u%%"
+
+#: ../app/FormatWeather.hs:94
+msgid ""
+"\n"
+"\n"
+"Air quality:"
+msgstr ""
+"\n"
+"\n"
+"Квалитет ваздуха:"
+
+#: ../app/FormatWeather.hs:197
+msgid ""
+"\n"
+"\n"
+"Alerts:"
+msgstr ""
+"\n"
+"\n"
+"Упозорења:"
+
+#: ../app/FormatWeather.hs:199
+msgid ""
+"\n"
+"\n"
+"Forecast:"
+msgstr ""
+"\n"
+"\n"
+"Прогноза:"
+
+#: ../app/FormatWeather.hs:128
+msgid ""
+"\n"
+"\n"
+"[Severity: %s] - [Urgency: %s] | (Type: %s): %s\n"
+"Areas: %s\n"
+"Category: %s\n"
+"Certainty: %s\n"
+"Event: %s\n"
+"Notes: %s\n"
+"Effective since: %s\n"
+"Expires: %s\n"
+"Description: %s\n"
+"Instructions: %s"
+msgstr ""
+"\n"
+"\n"
+"[Озбиљност: %s] - [Хитност: %s] | (Тип: %s): %s\n"
+"Области: %s\n"
+"Категорија: %s\n"
+"Вероватноћа: %s\n"
+"Догађај: %s\n"
+"Напомене: %s\n"
+"На снази од: %s\n"
+"Истиче: %s\n"
+"Опис: %s\n"
+"Инструкције: %s"
+
+#: ../app/FormatWeather.hs:70
+msgid ""
+"\n"
+"Carbon monoxide: %f μg/m3\n"
+"Ozone: %f μg/m3\n"
+"Nitrogen dioxide: %f μg/m3\n"
+"Sulphur dioxide: %f μg/m3\n"
+"PM2.5: %f μg/m3\n"
+"PM10: %f μg/m3\n"
+"US-EPA index: %d\n"
+"UK-DEFRA index: %d"
+msgstr ""
+"\n"
+"Угљен моноксид: %f μg/m3\n"
+"Озон: %f μg/m3\n"
+"Нитроген диоксид: %f μg/m3\n"
+"Сумпор диоксид: %f μg/m3\n"
+"PM2.5: %f μg/m3\n"
+"PM10: %f μg/m3\n"
+"US-EPA индекс: %d\n"
+"UK-DEFRA индекс: %d"
+
+#: ../app/FormatWeather.hs:189
+msgid ""
+"\n"
+"Sunrise: %s\n"
+"Sunset: %s\n"
+"Moonrise: %s\n"
+"Moonset: %s\n"
+"Moon phase: %s\n"
+"Moon illumination: %u%%"
+msgstr ""
+"\n"
+"Излазак сунца: %s\n"
+"Залазак сунца: %s\n"
+"Излазак месеца: %s\n"
+"Залазак месеца: %s\n"
+"Месечева мена: %s\n"
+"Осветљење месеца: %u%%"
+
+#: ../app/FormatWeather.hs:80
+msgid "%f°C (feels like: %f°C) / %f°F (feels like: %f°F)"
+msgstr "%f°C (осећај као: %f°C) / %f°F (осећај као: %f°F)"
+
+#: ../app/Main.hs:562
+msgid "(source: %s)"
+msgstr "(извор: %s)"
+
+#: ../app/FormatWeather.hs:94
+msgid "Air quality"
+msgstr "Квалитет ваздуха"
+
+#: ../app/FormatWeather.hs:197
+msgid "Alerts"
+msgstr "Упозорења"
+
+#: ../app/ArgParser.hs:41
+msgid "Also get air quaility data. Only meaningful if the information type mode is \"current\" or \"forecast\"."
+msgstr "Такође преузми податке о квалитету ваздуха. Има смисла само ако је режим за тип информација „current“ или „forecast“."
+
+#: ../app/ArgParser.hs:42
+msgid "Also get weather alerts data. Only meaningful if the information type mode is \"forecast\"."
+msgstr "Такође преузми податке о временским упозорењима. Има смисла само ако је режим за тип информација „forecast“."
+
+#: ../app/FormatWeather.hs:118
+msgid "Areas"
+msgstr "Области"
+
+#: ../app/FormatWeather.hs:211
+msgid "Astronomy information for %s, %s, %s"
+msgstr "Астрономске информације за %s, %s, %s"
+
+#: ../app/FormatWeather.hs:213
+msgid "Astronomy information for %s, %s, %s:"
+msgstr "Астрономске информације за %s, %s, %s:"
+
+#: ../app/FormatWeather.hs:161
+msgid "Average humidity"
+msgstr "Просечна влажност"
+
+#: ../app/FormatWeather.hs:160
+msgid "Average visibility"
+msgstr "Просечна видљивост"
+
+#: ../app/FormatWeather.hs:61
+msgid "Carbon monoxide"
+msgstr "Угљен моноксид"
+
+#: ../app/FormatWeather.hs:119
+msgid "Category"
+msgstr "Категорија"
+
+#: ../app/FormatWeather.hs:120
+msgid "Certainty"
+msgstr "Вероватноћа"
+
+#: ../app/FormatWeather.hs:163
+msgid "Chance of rain"
+msgstr "Шансе за кишу"
+
+#: ../app/FormatWeather.hs:164
+msgid "Chance of snow"
+msgstr "Шансе за снег"
+
+#: ../app/FormatWeather.hs:86
+msgid "Clouds"
+msgstr "Облаци"
+
+#: ../app/FormatWeather.hs:79 ../app/FormatWeather.hs:156
+msgid "Condition"
+msgstr "Стање"
+
+#: ../app/FormatWeather.hs:38
+msgid "Coordinates"
+msgstr "Координате"
+
+#: ../app/FormatWeather.hs:37
+msgid "Country"
+msgstr "Држава"
+
+#: ../app/FormatWeather.hs:77
+msgid "Current weather information for %s, %s, %s"
+msgstr "Информације о тренутном времену за %s, %s, %s"
+
+#: ../app/FormatWeather.hs:90
+msgid ""
+"Current weather information for %s, %s, %s:\n"
+"Last updated: %s\n"
+"Condition: %s\n"
+"Temperature: %f°C (feels like: %f°C) / %f°F (feels like: %f°F)\n"
+"Wind speed: %f kph / %f mph\n"
+"Wind direction: %u° (%s)\n"
+"Pressure: %f mb / %f in\n"
+"Precipicity: %f mm / %f in\n"
+"Humidity: %u%%\n"
+"Clouds: %u%%\n"
+"UV index: %f\n"
+"Gust speed: %f kph / %f mph"
+msgstr ""
+"Информације о тренутном времену за %s, %s, %s:\n"
+"Последњи пут ажурирано: %s\n"
+"Стање: %s\n"
+"Температура: %f°C (осећај као: %f°C) / %f°F (осећај као: %f°F)\n"
+"Брзина ветра: %f kph / %f mph\n"
+"Смер ветра: %u° (%s)\n"
+"Притисак: %f mb / %f in\n"
+"Преципичност: %f mm / %f in\n"
+"Влажност: %u%%\n"
+"Облаци: %u%%\n"
+"UV индекс: %f\n"
+"Брзина налета ветра: %f kph / %f mph"
+
+#: ../app/ArgParser.hs:44
+msgid "Date to retrieve the data for. Only meaningful if the information type mode is \"astronomy\". The default is current date."
+msgstr "Датум за који преузети податке. Има смисла само ако је режим за тип информација „astronomy“. Подразумевана вредност је тренутни датум."
+
+#: ../app/FormatWeather.hs:125
+msgid "Description"
+msgstr "Опис"
+
+#: ../app/ArgParser.hs:38
+msgid "Display program version and exit."
+msgstr "Прикажи верзију програма и изађи."
+
+#: ../app/ArgParser.hs:37
+msgid "Display this help menu and exit."
+msgstr "Прикажи овај помоћни мени и изађи."
+
+#: ../app/ArgParser.hs:39
+msgid "Do not pretty-print data."
+msgstr "Немој прети-принтовати податке."
+
+#: ../app/FormatWeather.hs:123
+msgid "Effective since"
+msgstr "На снази од"
+
+#: ../app/Main.hs:500
+msgid "Error getting the server response."
+msgstr "Грешка у добијању одговора од сервера."
+
+#: ../app/ArgParser.hs:76
+msgid "Errors: %s"
+msgstr "Грешке: %s"
+
+#: ../app/FormatWeather.hs:121
+msgid "Event"
+msgstr "Догађај"
+
+#: ../app/FormatWeather.hs:124
+msgid "Expires"
+msgstr "Истиче"
+
+#: ../app/ArgParser.hs:45
+msgid "FORMAT"
+msgstr "ФОРМАТ"
+
+#: ../app/Main.hs:151
+msgid "Failed decoding JSON data input."
+msgstr "Неуспело декодирање JSON улазних података."
+
+#: ../app/Main.hs:515
+msgid "Failed to get terminal size."
+msgstr "Неуспело добијање величине терминала."
+
+#: ../app/Main.hs:529
+msgid "Failed to parse retrieved weather data: %s"
+msgstr "Неуспело рашчлањавање преузетих временских података: %s"
+
+#: ../app/FormatWeather.hs:199
+msgid "Forecast"
+msgstr "Прогноза"
+
+#: ../app/ArgParser.hs:45
+msgid "Format to request data in from the server. Either \"json\" (default) or \"xml\"."
+msgstr "Формат у коме захтевати податке од сервера. Или „json“ (подразумевано) или „xml“."
+
+#: ../app/FormatWeather.hs:88
+msgid "Gust speed"
+msgstr "Брзина налета ветра"
+
+#: ../app/Main.hs:507
+msgid "HTTP error %d: %s"
+msgstr "HTTP грешка %d: %s"
+
+#: ../app/FormatWeather.hs:85
+msgid "Humidity"
+msgstr "Влажност"
+
+#: ../app/ArgParser.hs:43
+msgid "INTEGER≥1"
+msgstr "ЦЕО БРОЈ≥1"
+
+#: ../app/ArgParser.hs:40
+msgid "Information type mode. Can be \"timezone\", \"current\" (default), \"forecast\" or \"astronomy\"."
+msgstr "Режим за тип информација. Може бити „timezone“, „current“ (подразумевано), „forecast“ или „astronomy“."
+
+#: ../app/FormatWeather.hs:126
+msgid "Instructions"
+msgstr "Инструкције"
+
+#: ../app/ArgParser.hs:74
+msgid "Invalid option values for: %s"
+msgstr "Неисправне вредности опција за: %s"
+
+#: ../app/ArgParser.hs:47
+msgid "Just print the retrieved data file."
+msgstr "Само испиши преузету датотеку података."
+
+#: ../app/FormatWeather.hs:78
+msgid "Last updated"
+msgstr "Последњи пут ажурирано"
+
+#: ../app/FormatWeather.hs:40
+msgid "Local time"
+msgstr "Локално време"
+
+#: ../app/Main.hs:532
+msgid "Location to query the data for unspecified; make sure that WEATHERHS_LOCATION is set and non-empty."
+msgstr "Локација за коју преузети податке није наведена; проверите да ли је WEATHERHS_LOCATION постављена и није празна."
+
+#: ../app/ArgParser.hs:40
+msgid "MODE"
+msgstr "РЕЖИМ"
+
+#: ../app/FormatWeather.hs:158
+msgid "Maximum wind speed"
+msgstr "Највиша брзина ветра"
+
+#: ../app/FormatWeather.hs:157
+msgid "Maximum: %f°C / %f°F | Minimum: %f°C / %f°F | Average: %f°C / %f°F"
+msgstr "Највиша: %f°C / %f°F | Најмања: %f°C / %f°F | Просечна: %f°C / %f°F"
+
+#: ../app/FormatWeather.hs:187
+msgid "Moon illumination"
+msgstr "Осветљење месеца"
+
+#: ../app/FormatWeather.hs:186
+msgid "Moon phase"
+msgstr "Месечева мена"
+
+#: ../app/FormatWeather.hs:184
+msgid "Moonrise"
+msgstr "Излазак месеца"
+
+#: ../app/FormatWeather.hs:185
+msgid "Moonset"
+msgstr "Залазак месеца"
+
+#: ../app/FormatWeather.hs:35
+msgid "Name"
+msgstr "Име"
+
+#: ../app/FormatWeather.hs:63
+msgid "Nitrogen dioxide"
+msgstr "Нитроген диоксид"
+
+#: ../app/Main.hs:566
+msgid "No API key found; make sure that either WEATHERHS_API_KEY_ENC or WEATHERHS_API_KEY is set and non-empty."
+msgstr "API кључ није пронађен; проверите да ли је WEATHERHS_API_KEY_ENC или WEATHERHS_API_KEY постављена и није празна."
+
+#: ../app/Main.hs:559
+msgid "No data to decrypt."
+msgstr "Нема података за декрипцију."
+
+#: ../app/Main.hs:560
+msgid "Not a valid cipher."
+msgstr "Неисправна шифра."
+
+#: ../app/FormatWeather.hs:122
+msgid "Notes"
+msgstr "Напомене"
+
+#: ../app/ArgParser.hs:43
+msgid "Number of days to retrieve data for. Only meaningful if the information type mode is \"forecast\". The default is 3."
+msgstr "Број дана за који преузети податке. Има смисла само ако је режим за тип информација „forecast“. Подразумевана вредност је 3."
+
+#: ../app/FormatWeather.hs:62
+msgid "Ozone"
+msgstr "Озон"
+
+#: ../app/FormatWeather.hs:66
+msgid "PM10"
+msgstr "PM10"
+
+#: ../app/FormatWeather.hs:65
+msgid "PM2.5"
+msgstr "PM2.5"
+
+#: ../app/FormatWeather.hs:84
+msgid "Precipicity"
+msgstr "Преципичност"
+
+#: ../app/FormatWeather.hs:83
+msgid "Pressure"
+msgstr "Притисак"
+
+#: ../app/FormatWeather.hs:36
+msgid "Region"
+msgstr "Регион"
+
+#: ../app/ArgParser.hs:53
+msgid "See weatherhs(1) for more information."
+msgstr "Видите weatherhs(1) за више информација."
+
+#: ../app/FormatWeather.hs:64
+msgid "Sulphur dioxide"
+msgstr "Сумпор диоксид"
+
+#: ../app/FormatWeather.hs:182
+msgid "Sunrise"
+msgstr "Излазак сунца"
+
+#: ../app/FormatWeather.hs:183
+msgid "Sunset"
+msgstr "Залазак сунца"
+
+#: ../app/FormatWeather.hs:80 ../app/FormatWeather.hs:157
+msgid "Temperature"
+msgstr "Температура"
+
+#: ../app/Main.hs:519
+msgid "Terminal width is lower than required: %u < %u"
+msgstr "Ширина терминала је мања него што је неопходно: %u < %u"
+
+#: ../app/FormatWeather.hs:39
+msgid "Time zone"
+msgstr "Временска зона"
+
+#: ../app/FormatWeather.hs:34
+msgid "Time zone information for %s, %s, %s"
+msgstr "Информације о временској зони за %s, %s, %s"
+
+#: ../app/FormatWeather.hs:43
+msgid ""
+"Time zone information for %s, %s, %s:\n"
+"Name: %s\n"
+"Region: %s\n"
+"Country: %s\n"
+"Coordinates: %.2f,%.2f\n"
+"Time zone: %s\n"
+"Local time: %s"
+msgstr ""
+"Информације о временској зони за %s, %s, %s:\n"
+"Име: %s\n"
+"Регион: %s\n"
+"Држава: %s\n"
+"Координате: %.2f,%.2f\n"
+"Временска зона: %s\n"
+"Локално време: %s"
+
+#: ../app/FormatWeather.hs:159
+msgid "Total precipicity"
+msgstr "Укупна преципичност"
+
+#: ../app/FormatWeather.hs:68
+msgid "UK-DEFRA index"
+msgstr "UK-DEFRA индекс"
+
+#: ../app/FormatWeather.hs:67
+msgid "US-EPA index"
+msgstr "US-EPA индекс"
+
+#: ../app/FormatWeather.hs:87 ../app/FormatWeather.hs:162
+msgid "UV index"
+msgstr "UV индекс"
+
+#: ../app/ArgParser.hs:75
+msgid "Unrecognized options: %s"
+msgstr "Непрепознате опције: %s"
+
+#: ../app/ArgParser.hs:53
+msgid ""
+"Usage: %s [OPTION…]\n"
+"\n"
+"Options:"
+msgstr ""
+"Употреба: %s [ОПЦИЈА…]\n"
+"\n"
+"Опције:"
+
+#: ../app/ArgParser.hs:46
+msgid "Use HTTP instead of HTTPS for communication with the server."
+msgstr "Користи HTTP уместо HTTPS-а за комуникацију са сервером."
+
+#: ../app/FormatWeather.hs:204
+msgid "Weather forecast for %s, %s, %s"
+msgstr "Временска прогноза за %s, %s, %s"
+
+#: ../app/FormatWeather.hs:206
+msgid "Weather forecast for %s, %s, %s:"
+msgstr "Временска прогноза за %s, %s, %s:"
+
+#: ../app/FormatWeather.hs:82
+msgid "Wind direction"
+msgstr "Смер ветра"
+
+#: ../app/FormatWeather.hs:81
+msgid "Wind speed"
+msgstr "Брзина ветра"
+
+#: ../app/Main.hs:561
+msgid "Wrong passphrase."
+msgstr "Погрешна лозинка."
+
+#: ../app/FormatWeather.hs:117
+msgid "[Severity: %s] - [Urgency: %s] | (Type: %s): %s"
+msgstr "[Озбиљност: %s] - [Хитност: %s] | (Тип: %s): %s"
+
+#: ../app/ArgParser.hs:44
+msgid "yyyy-MM-dd"
+msgstr "гггг-ММ-дд"
+
+#: ../app/Main.hs:574
+msgid "No API key found; make sure that WEATHERHS_API_KEY is set and non-empty."
+msgstr "API кључ није пронађен; проверите да ли је WEATHERHS_API_KEY постављена и није празна."
+
+#: ../app/Main.hs:303
+msgid "Support for JSON was disabled during compilation! Try another format."
+msgstr "Подршка за JSON је била искључена за време компајлирања! Пробајте неки други формат."
+
+#: ../app/Main.hs:466
+msgid "Support for XML was disabled during compilation! Try another format."
+msgstr "Подршка за XML је била искључена за време компајлирања! Пробајте неки други формат."
diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po
new file mode 100644
--- /dev/null
+++ b/po/sr_RS@latin.po
@@ -0,0 +1,570 @@
+# Translation file
+msgid ""
+msgstr ""
+"Project-Id-Version: weatherhs 1.0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-01-13 06:05-0800\n"
+"PO-Revision-Date: 2022-08-13 19:56+0200\n"
+"Last-Translator: Nikola Hadžić <nikola.hadzic.000@protonmail.com>\n"
+"Language-Team: Serbian <(nothing)>\n"
+"Language: sr_RS@latin\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../app/FormatWeather.hs:166
+msgid ""
+"\n"
+"\n"
+"%s:\n"
+"Condition: %s\n"
+"Temperature:\n"
+"\tMaximum: %f°C / %f°F\n"
+"\tMinimum: %f°C / %f°F\n"
+"\tAverage: %f°C / %f°F\n"
+"Maximum wind speed: %f kph / %f mph\n"
+"Total precipicity: %f mm / %f in\n"
+"Average visibility: %f km / %f mi\n"
+"Average humidity: %u%%\n"
+"UV index: %f\n"
+"Chance of rain: %u%%\n"
+"Chance of snow: %u%%"
+msgstr ""
+"\n"
+"\n"
+"%s:\n"
+"Stanje: %s\n"
+"Temperatura:\n"
+"\tNajviša: %f°C / %f°F\n"
+"\tNajmanja: %f°C / %f°F\n"
+"\tProsečna: %f°C / %f°F\n"
+"Najviša brzina vetra: %f kph / %f mph\n"
+"Ukupna precipičnost: %f mm / %f in\n"
+"Prosečna vidljivost: %f km / %f mi\n"
+"Prosečna vlažnost: %u%%\n"
+"UV indeks: %f\n"
+"Šanse za kišu: %u%%\n"
+"Šanse za sneg: %u%%"
+
+#: ../app/FormatWeather.hs:94
+msgid ""
+"\n"
+"\n"
+"Air quality:"
+msgstr ""
+"\n"
+"\n"
+"Kvalitet vazduha:"
+
+#: ../app/FormatWeather.hs:197
+msgid ""
+"\n"
+"\n"
+"Alerts:"
+msgstr ""
+"\n"
+"\n"
+"Upozorenja:"
+
+#: ../app/FormatWeather.hs:199
+msgid ""
+"\n"
+"\n"
+"Forecast:"
+msgstr ""
+"\n"
+"\n"
+"Prognoza:"
+
+#: ../app/FormatWeather.hs:128
+msgid ""
+"\n"
+"\n"
+"[Severity: %s] - [Urgency: %s] | (Type: %s): %s\n"
+"Areas: %s\n"
+"Category: %s\n"
+"Certainty: %s\n"
+"Event: %s\n"
+"Notes: %s\n"
+"Effective since: %s\n"
+"Expires: %s\n"
+"Description: %s\n"
+"Instructions: %s"
+msgstr ""
+"\n"
+"\n"
+"[Ozbiljnost: %s] - [Hitnost: %s] | (Tip: %s): %s\n"
+"Oblasti: %s\n"
+"Kategorija: %s\n"
+"Verovatnoća: %s\n"
+"Događaj: %s\n"
+"Napomene: %s\n"
+"Na snazi od: %s\n"
+"Ističe: %s\n"
+"Opis: %s\n"
+"Instrukcije: %s"
+
+#: ../app/FormatWeather.hs:70
+msgid ""
+"\n"
+"Carbon monoxide: %f μg/m3\n"
+"Ozone: %f μg/m3\n"
+"Nitrogen dioxide: %f μg/m3\n"
+"Sulphur dioxide: %f μg/m3\n"
+"PM2.5: %f μg/m3\n"
+"PM10: %f μg/m3\n"
+"US-EPA index: %d\n"
+"UK-DEFRA index: %d"
+msgstr ""
+"\n"
+"Ugljen monoksid: %f μg/m3\n"
+"Ozon: %f μg/m3\n"
+"Nitrogen dioksid: %f μg/m3\n"
+"Sumpor dioksid: %f μg/m3\n"
+"PM2.5: %f μg/m3\n"
+"PM10: %f μg/m3\n"
+"US-EPA indeks: %d\n"
+"UK-DEFRA indeks: %d"
+
+#: ../app/FormatWeather.hs:189
+msgid ""
+"\n"
+"Sunrise: %s\n"
+"Sunset: %s\n"
+"Moonrise: %s\n"
+"Moonset: %s\n"
+"Moon phase: %s\n"
+"Moon illumination: %u%%"
+msgstr ""
+"\n"
+"Izlazak sunca: %s\n"
+"Zalazak sunca: %s\n"
+"Izlazak meseca: %s\n"
+"Zalazak meseca: %s\n"
+"Mesečeva mena: %s\n"
+"Osvetljenje meseca: %u%%"
+
+#: ../app/FormatWeather.hs:80
+msgid "%f°C (feels like: %f°C) / %f°F (feels like: %f°F)"
+msgstr "%f°C (osećaj kao: %f°C) / %f°F (osećaj kao: %f°F)"
+
+#: ../app/Main.hs:562
+msgid "(source: %s)"
+msgstr "(izvor: %s)"
+
+#: ../app/FormatWeather.hs:94
+msgid "Air quality"
+msgstr "Kvalitet vazduha"
+
+#: ../app/FormatWeather.hs:197
+msgid "Alerts"
+msgstr "Upozorenja"
+
+#: ../app/ArgParser.hs:41
+msgid "Also get air quaility data. Only meaningful if the information type mode is \"current\" or \"forecast\"."
+msgstr "Takođe preuzmi podatke o kvalitetu vazduha. Ima smisla samo ako je režim za tip informacija „current“ ili „forecast“."
+
+#: ../app/ArgParser.hs:42
+msgid "Also get weather alerts data. Only meaningful if the information type mode is \"forecast\"."
+msgstr "Takođe preuzmi podatke o vremenskim upozorenjima. Ima smisla samo ako je režim za tip informacija „forecast“."
+
+#: ../app/FormatWeather.hs:118
+msgid "Areas"
+msgstr "Oblasti"
+
+#: ../app/FormatWeather.hs:211
+msgid "Astronomy information for %s, %s, %s"
+msgstr "Astronomske informacije za %s, %s, %s"
+
+#: ../app/FormatWeather.hs:213
+msgid "Astronomy information for %s, %s, %s:"
+msgstr "Astronomske informacije za %s, %s, %s:"
+
+#: ../app/FormatWeather.hs:161
+msgid "Average humidity"
+msgstr "Prosečna vlažnost"
+
+#: ../app/FormatWeather.hs:160
+msgid "Average visibility"
+msgstr "Prosečna vidljivost"
+
+#: ../app/FormatWeather.hs:61
+msgid "Carbon monoxide"
+msgstr "Ugljen monoksid"
+
+#: ../app/FormatWeather.hs:119
+msgid "Category"
+msgstr "Kategorija"
+
+#: ../app/FormatWeather.hs:120
+msgid "Certainty"
+msgstr "Verovatnoća"
+
+#: ../app/FormatWeather.hs:163
+msgid "Chance of rain"
+msgstr "Šanse za kišu"
+
+#: ../app/FormatWeather.hs:164
+msgid "Chance of snow"
+msgstr "Šanse za sneg"
+
+#: ../app/FormatWeather.hs:86
+msgid "Clouds"
+msgstr "Oblaci"
+
+#: ../app/FormatWeather.hs:79 ../app/FormatWeather.hs:156
+msgid "Condition"
+msgstr "Stanje"
+
+#: ../app/FormatWeather.hs:38
+msgid "Coordinates"
+msgstr "Koordinate"
+
+#: ../app/FormatWeather.hs:37
+msgid "Country"
+msgstr "Država"
+
+#: ../app/FormatWeather.hs:77
+msgid "Current weather information for %s, %s, %s"
+msgstr "Informacije o trenutnom vremenu za %s, %s, %s"
+
+#: ../app/FormatWeather.hs:90
+msgid ""
+"Current weather information for %s, %s, %s:\n"
+"Last updated: %s\n"
+"Condition: %s\n"
+"Temperature: %f°C (feels like: %f°C) / %f°F (feels like: %f°F)\n"
+"Wind speed: %f kph / %f mph\n"
+"Wind direction: %u° (%s)\n"
+"Pressure: %f mb / %f in\n"
+"Precipicity: %f mm / %f in\n"
+"Humidity: %u%%\n"
+"Clouds: %u%%\n"
+"UV index: %f\n"
+"Gust speed: %f kph / %f mph"
+msgstr ""
+"Informacije o trenutnom vremenu za %s, %s, %s:\n"
+"Poslednji put ažurirano: %s\n"
+"Stanje: %s\n"
+"Temperatura: %f°C (osećaj kao: %f°C) / %f°F (osećaj kao: %f°F)\n"
+"Brzina vetra: %f kph / %f mph\n"
+"Smer vetra: %u° (%s)\n"
+"Pritisak: %f mb / %f in\n"
+"Precipičnost: %f mm / %f in\n"
+"Vlažnost: %u%%\n"
+"Oblaci: %u%%\n"
+"UV indeks: %f\n"
+"Brzina naleta vetra: %f kph / %f mph"
+
+#: ../app/ArgParser.hs:44
+msgid "Date to retrieve the data for. Only meaningful if the information type mode is \"astronomy\". The default is current date."
+msgstr "Datum za koji preuzeti podatke. Ima smisla samo ako je režim za tip informacija „astronomy“. Podrazumevana vrednost je trenutni datum."
+
+#: ../app/FormatWeather.hs:125
+msgid "Description"
+msgstr "Opis"
+
+#: ../app/ArgParser.hs:38
+msgid "Display program version and exit."
+msgstr "Prikaži verziju programa i izađi."
+
+#: ../app/ArgParser.hs:37
+msgid "Display this help menu and exit."
+msgstr "Prikaži ovaj pomoćni meni i izađi."
+
+#: ../app/ArgParser.hs:39
+msgid "Do not pretty-print data."
+msgstr "Nemoj preti-printovati podatke."
+
+#: ../app/FormatWeather.hs:123
+msgid "Effective since"
+msgstr "Na snazi od"
+
+#: ../app/Main.hs:500
+msgid "Error getting the server response."
+msgstr "Greška u dobijanju odgovora od servera."
+
+#: ../app/ArgParser.hs:76
+msgid "Errors: %s"
+msgstr "Greške: %s"
+
+#: ../app/FormatWeather.hs:121
+msgid "Event"
+msgstr "Događaj"
+
+#: ../app/FormatWeather.hs:124
+msgid "Expires"
+msgstr "Ističe"
+
+#: ../app/ArgParser.hs:45
+msgid "FORMAT"
+msgstr "FORMAT"
+
+#: ../app/Main.hs:151
+msgid "Failed decoding JSON data input."
+msgstr "Neuspelo dekodiranje JSON ulaznih podataka."
+
+#: ../app/Main.hs:515
+msgid "Failed to get terminal size."
+msgstr "Neuspelo dobijanje veličine terminala."
+
+#: ../app/Main.hs:529
+msgid "Failed to parse retrieved weather data: %s"
+msgstr "Neuspelo raščlanjavanje preuzetih vremenskih podataka: %s"
+
+#: ../app/FormatWeather.hs:199
+msgid "Forecast"
+msgstr "Prognoza"
+
+#: ../app/ArgParser.hs:45
+msgid "Format to request data in from the server. Either \"json\" (default) or \"xml\"."
+msgstr "Format u kome zahtevati podatke od servera. Ili „json“ (podrazumevano) ili „xml“."
+
+#: ../app/FormatWeather.hs:88
+msgid "Gust speed"
+msgstr "Brzina naleta vetra"
+
+#: ../app/Main.hs:507
+msgid "HTTP error %d: %s"
+msgstr "HTTP greška %d: %s"
+
+#: ../app/FormatWeather.hs:85
+msgid "Humidity"
+msgstr "Vlažnost"
+
+#: ../app/ArgParser.hs:43
+msgid "INTEGER≥1"
+msgstr "CEO BROJ≥1"
+
+#: ../app/ArgParser.hs:40
+msgid "Information type mode. Can be \"timezone\", \"current\" (default), \"forecast\" or \"astronomy\"."
+msgstr "Režim za tip informacija. Može biti „timezone“, „current“ (podrazumevano), „forecast“ ili „astronomy“."
+
+#: ../app/FormatWeather.hs:126
+msgid "Instructions"
+msgstr "Instrukcije"
+
+#: ../app/ArgParser.hs:74
+msgid "Invalid option values for: %s"
+msgstr "Neispravne vrednosti opcija za: %s"
+
+#: ../app/ArgParser.hs:47
+msgid "Just print the retrieved data file."
+msgstr "Samo ispiši preuzetu datoteku podataka."
+
+#: ../app/FormatWeather.hs:78
+msgid "Last updated"
+msgstr "Poslednji put ažurirano"
+
+#: ../app/FormatWeather.hs:40
+msgid "Local time"
+msgstr "Lokalno vreme"
+
+#: ../app/Main.hs:532
+msgid "Location to query the data for unspecified; make sure that WEATHERHS_LOCATION is set and non-empty."
+msgstr "Lokacija za koju preuzeti podatke nije navedena; proverite da li je WEATHERHS_LOCATION postavljena i nije prazna."
+
+#: ../app/ArgParser.hs:40
+msgid "MODE"
+msgstr "REŽIM"
+
+#: ../app/FormatWeather.hs:158
+msgid "Maximum wind speed"
+msgstr "Najviša brzina vetra"
+
+#: ../app/FormatWeather.hs:157
+msgid "Maximum: %f°C / %f°F | Minimum: %f°C / %f°F | Average: %f°C / %f°F"
+msgstr "Najviša: %f°C / %f°F | Najmanja: %f°C / %f°F | Prosečna: %f°C / %f°F"
+
+#: ../app/FormatWeather.hs:187
+msgid "Moon illumination"
+msgstr "Osvetljenje meseca"
+
+#: ../app/FormatWeather.hs:186
+msgid "Moon phase"
+msgstr "Mesečeva mena"
+
+#: ../app/FormatWeather.hs:184
+msgid "Moonrise"
+msgstr "Izlazak meseca"
+
+#: ../app/FormatWeather.hs:185
+msgid "Moonset"
+msgstr "Zalazak meseca"
+
+#: ../app/FormatWeather.hs:35
+msgid "Name"
+msgstr "Ime"
+
+#: ../app/FormatWeather.hs:63
+msgid "Nitrogen dioxide"
+msgstr "Nitrogen dioksid"
+
+#: ../app/Main.hs:566
+msgid "No API key found; make sure that either WEATHERHS_API_KEY_ENC or WEATHERHS_API_KEY is set and non-empty."
+msgstr "API ključ nije pronađen; proverite da li je WEATHERHS_API_KEY_ENC ili WEATHERHS_API_KEY postavljena i nije prazna."
+
+#: ../app/Main.hs:559
+msgid "No data to decrypt."
+msgstr "Nema podataka za dekripciju."
+
+#: ../app/Main.hs:560
+msgid "Not a valid cipher."
+msgstr "Neispravna šifra."
+
+#: ../app/FormatWeather.hs:122
+msgid "Notes"
+msgstr "Napomene"
+
+#: ../app/ArgParser.hs:43
+msgid "Number of days to retrieve data for. Only meaningful if the information type mode is \"forecast\". The default is 3."
+msgstr "Broj dana za koji preuzeti podatke. Ima smisla samo ako je režim za tip informacija „forecast“. Podrazumevana vrednost je 3."
+
+#: ../app/FormatWeather.hs:62
+msgid "Ozone"
+msgstr "Ozon"
+
+#: ../app/FormatWeather.hs:66
+msgid "PM10"
+msgstr "PM10"
+
+#: ../app/FormatWeather.hs:65
+msgid "PM2.5"
+msgstr "PM2.5"
+
+#: ../app/FormatWeather.hs:84
+msgid "Precipicity"
+msgstr "Precipičnost"
+
+#: ../app/FormatWeather.hs:83
+msgid "Pressure"
+msgstr "Pritisak"
+
+#: ../app/FormatWeather.hs:36
+msgid "Region"
+msgstr "Region"
+
+#: ../app/ArgParser.hs:53
+msgid "See weatherhs(1) for more information."
+msgstr "Vidite weatherhs(1) za više informacija."
+
+#: ../app/FormatWeather.hs:64
+msgid "Sulphur dioxide"
+msgstr "Sumpor dioksid"
+
+#: ../app/FormatWeather.hs:182
+msgid "Sunrise"
+msgstr "Izlazak sunca"
+
+#: ../app/FormatWeather.hs:183
+msgid "Sunset"
+msgstr "Zalazak sunca"
+
+#: ../app/FormatWeather.hs:80 ../app/FormatWeather.hs:157
+msgid "Temperature"
+msgstr "Temperatura"
+
+#: ../app/Main.hs:519
+msgid "Terminal width is lower than required: %u < %u"
+msgstr "Širina terminala je manja nego što je neophodno: %u < %u"
+
+#: ../app/FormatWeather.hs:39
+msgid "Time zone"
+msgstr "Vremenska zona"
+
+#: ../app/FormatWeather.hs:34
+msgid "Time zone information for %s, %s, %s"
+msgstr "Informacije o vremenskoj zoni za %s, %s, %s"
+
+#: ../app/FormatWeather.hs:43
+msgid ""
+"Time zone information for %s, %s, %s:\n"
+"Name: %s\n"
+"Region: %s\n"
+"Country: %s\n"
+"Coordinates: %.2f,%.2f\n"
+"Time zone: %s\n"
+"Local time: %s"
+msgstr ""
+"Informacije o vremenskoj zoni za %s, %s, %s:\n"
+"Ime: %s\n"
+"Region: %s\n"
+"Država: %s\n"
+"Koordinate: %.2f,%.2f\n"
+"Vremenska zona: %s\n"
+"Lokalno vreme: %s"
+
+#: ../app/FormatWeather.hs:159
+msgid "Total precipicity"
+msgstr "Ukupna precipičnost"
+
+#: ../app/FormatWeather.hs:68
+msgid "UK-DEFRA index"
+msgstr "UK-DEFRA indeks"
+
+#: ../app/FormatWeather.hs:67
+msgid "US-EPA index"
+msgstr "US-EPA indeks"
+
+#: ../app/FormatWeather.hs:87 ../app/FormatWeather.hs:162
+msgid "UV index"
+msgstr "UV indeks"
+
+#: ../app/ArgParser.hs:75
+msgid "Unrecognized options: %s"
+msgstr "Neprepoznate opcije: %s"
+
+#: ../app/ArgParser.hs:53
+msgid ""
+"Usage: %s [OPTION…]\n"
+"\n"
+"Options:"
+msgstr ""
+"Upotreba: %s [OPCIJA…]\n"
+"\n"
+"Opcije:"
+
+#: ../app/ArgParser.hs:46
+msgid "Use HTTP instead of HTTPS for communication with the server."
+msgstr "Koristi HTTP umesto HTTPS-a za komunikaciju sa serverom."
+
+#: ../app/FormatWeather.hs:204
+msgid "Weather forecast for %s, %s, %s"
+msgstr "Vremenska prognoza za %s, %s, %s"
+
+#: ../app/FormatWeather.hs:206
+msgid "Weather forecast for %s, %s, %s:"
+msgstr "Vremenska prognoza za %s, %s, %s:"
+
+#: ../app/FormatWeather.hs:82
+msgid "Wind direction"
+msgstr "Smer vetra"
+
+#: ../app/FormatWeather.hs:81
+msgid "Wind speed"
+msgstr "Brzina vetra"
+
+#: ../app/Main.hs:561
+msgid "Wrong passphrase."
+msgstr "Pogrešna lozinka."
+
+#: ../app/FormatWeather.hs:117
+msgid "[Severity: %s] - [Urgency: %s] | (Type: %s): %s"
+msgstr "[Ozbiljnost: %s] - [Hitnost: %s] | (Tip: %s): %s"
+
+#: ../app/ArgParser.hs:44
+msgid "yyyy-MM-dd"
+msgstr "gggg-MM-dd"
+
+#: ../app/Main.hs:574
+msgid "No API key found; make sure that WEATHERHS_API_KEY is set and non-empty."
+msgstr "API ključ nije pronađen; proverite da li je WEATHERHS_API_KEY postavljena i nije prazna."
+
+#: ../app/Main.hs:303
+msgid "Support for JSON was disabled during compilation! Try another format."
+msgstr "Podrška za JSON je bila isključena za vreme kompajliranja! Probajte neki drugi format."
+
+#: ../app/Main.hs:466
+msgid "Support for XML was disabled during compilation! Try another format."
+msgstr "Podrška za XML je bila isključena za vreme kompajliranja! Probajte neki drugi format."
diff --git a/screenshots/generic.jpeg b/screenshots/generic.jpeg
new file mode 100644
Binary files /dev/null and b/screenshots/generic.jpeg differ
diff --git a/screenshots/pretty.jpeg b/screenshots/pretty.jpeg
new file mode 100644
Binary files /dev/null and b/screenshots/pretty.jpeg differ
diff --git a/weatherhs.cabal b/weatherhs.cabal
new file mode 100644
--- /dev/null
+++ b/weatherhs.cabal
@@ -0,0 +1,69 @@
+cabal-version:          2.2
+name:                   weatherhs
+version:                1.0.0
+synopsis:               Weather and related data info command-line tool
+description:            Command-line tool that retrieves and nicely outputs weather and related data from [Weather API](https://www.weatherapi.com/), in the table form.
+license:                GPL-3.0-or-later
+license-file:           LICENSE
+copyright:              (C) 2022 Nikola Hadžić
+homepage:               https://gitlab.com/NH000/weatherhs#readme
+bug-reports:            https://gitlab.com/NH000/weatherhs/issues
+stability:              stable
+author:                 Nikola Hadžić
+maintainer:             nikola.hadzic.000@protonmail.com
+category:               Application, Command Line Tool
+tested-with:            GHC == 8.4.4
+extra-source-files:     README.md,
+                        po/Makefile, po/*.po,
+                        man/man1/weatherhs.1, man/sr/man1/weatherhs.1, man/sr_RS@latin/man1/weatherhs.1,
+                        Makefile,
+                        screenshots/*.jpeg
+build-type:             Custom
+
+source-repository head
+    type:       git
+    location:   https://gitlab.com/NH000/weatherhs.git
+
+custom-setup
+    setup-depends:  base, Cabal ^>= 2.2.0.1, hgettext
+
+flag encryption
+    description:    Support for encryption/decryption.
+                    Currently only used for decryption of the encrypted API key.
+    default:        True
+    manual:         True
+
+flag noJSON
+    description:    Disable JSON support.
+    default:        False
+    manual:         True
+
+flag noXML
+    description:    Disable XML support.
+    default:        False
+    manual:         True
+
+executable weatherhs
+    hs-source-dirs:     app
+    main-is:            Main.hs
+    build-depends:      base ^>= 4.11.1.0, scientific ^>= 0.3.6.2, text ^>= 1.2.3.1, bytestring ^>= 0.10.8.2, regex-pcre ^>= 0.94.4, time ^>= 1.8.0.2, setlocale ^>= 1.0.0.8, hgettext ^>= 0.1.31.0, http-types ^>= 0.12.2, http-client ^>= 0.5.14, http-client-tls ^>= 0.3.5.3, terminal-size ^>= 0.3.2.1, extra ^>= 1.6.14
+    autogen-modules:    Paths_weatherhs
+    other-modules:      Paths_weatherhs, GetText, DateTime, ArgParser, FormatWeather, Draw
+    ghc-options:        -Wall -fno-warn-name-shadowing
+    default-language:   Haskell2010
+
+    x-gettext-po-files: po/*.po
+
+    if flag(encryption)
+        build-depends:  h-gpgme ^>= 0.5.1.0, directory ^>= 1.3.1.5
+        cpp-options:    -DFLAG_ENCRYPTION
+
+    if flag(noJSON)
+        cpp-options:    -DFLAG_NOJSON
+    else
+        build-depends:  aeson ^>= 1.3.1.1
+
+    if flag(noXML)
+        cpp-options:    -DFLAG_NOXML
+    else
+        build-depends:  xml ^>= 1.3.14
