From 59f1e0afdc5fd89a2c6c783f2bad6b4ba79ff3ba Mon Sep 17 00:00:00 2001 From: Amit Chaudhary Date: Sun, 11 Jun 2023 12:12:02 +0530 Subject: [PATCH] initial commit --- COPYING | 675 ++++++++++++++++++ README.md | 3 + com.github.amit9838.json | 42 ++ com.github.amit9838.json~ | 42 ++ data/com.github.amit9838.appdata.xml.in | 9 + data/com.github.amit9838.desktop.in | 8 + data/com.github.amit9838.gschema.xml | 30 + data/dependencies/python3-requests.json | 34 + .../scalable/apps/com.github.amit9838.png | Bin 0 -> 12547 bytes .../scalable/apps/com.github.amit9838.svg | 68 ++ .../apps/com.github.amit9838-symbolic.png | Bin 0 -> 12547 bytes .../apps/com.github.amit9838-symbolic.svg | 68 ++ data/icons/meson.build | 13 + data/meson.build | 39 + meson.build | 25 + po/LINGUAS | 0 po/POTFILES | 6 + po/meson.build | 1 + src/__init__.py | 0 src/backend_current_w.py | 56 ++ src/backend_forecast_w.py | 23 + src/constants.py | 64 ++ src/css.py | 140 ++++ src/css/style.css | 0 src/main.py | 76 ++ src/meson.build | 45 ++ src/tempCodeRunnerFile.py | 1 + src/ui_current_w.py | 204 ++++++ src/ui_forecast_w.py | 113 +++ src/weather.gresource.xml | 7 + src/weather.in | 46 ++ src/weather.py | 183 +++++ src/windows.py | 207 ++++++ 33 files changed, 2228 insertions(+) create mode 100644 COPYING create mode 100644 README.md create mode 100644 com.github.amit9838.json create mode 100644 com.github.amit9838.json~ create mode 100644 data/com.github.amit9838.appdata.xml.in create mode 100644 data/com.github.amit9838.desktop.in create mode 100644 data/com.github.amit9838.gschema.xml create mode 100644 data/dependencies/python3-requests.json create mode 100644 data/icons/hicolor/scalable/apps/com.github.amit9838.png create mode 100644 data/icons/hicolor/scalable/apps/com.github.amit9838.svg create mode 100644 data/icons/hicolor/symbolic/apps/com.github.amit9838-symbolic.png create mode 100644 data/icons/hicolor/symbolic/apps/com.github.amit9838-symbolic.svg create mode 100644 data/icons/meson.build create mode 100644 data/meson.build create mode 100644 meson.build create mode 100644 po/LINGUAS create mode 100644 po/POTFILES create mode 100644 po/meson.build create mode 100644 src/__init__.py create mode 100644 src/backend_current_w.py create mode 100644 src/backend_forecast_w.py create mode 100644 src/constants.py create mode 100644 src/css.py create mode 100644 src/css/style.css create mode 100644 src/main.py create mode 100644 src/meson.build create mode 100644 src/tempCodeRunnerFile.py create mode 100644 src/ui_current_w.py create mode 100644 src/ui_forecast_w.py create mode 100644 src/weather.gresource.xml create mode 100755 src/weather.in create mode 100644 src/weather.py create mode 100644 src/windows.py diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..10926e8 --- /dev/null +++ b/COPYING @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..294f85e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# weather + +A description of this project. diff --git a/com.github.amit9838.json b/com.github.amit9838.json new file mode 100644 index 0000000..8aca4a3 --- /dev/null +++ b/com.github.amit9838.json @@ -0,0 +1,42 @@ +{ + "app-id" : "com.github.amit9838", + "runtime" : "org.gnome.Platform", + "runtime-version" : "44", + "sdk" : "org.gnome.Sdk", + "command" : "weather", + "finish-args" : [ + "--share=network", + "--share=ipc", + "--socket=fallback-x11", + "--device=dri", + "--socket=wayland" + ], + "cleanup" : [ + "/include", + "/lib/pkgconfig", + "/man", + "/share/doc", + "/share/gtk-doc", + "/share/man", + "/share/pkgconfig", + "*.la", + "*.a" + ], + "modules" : [ + "data/dependencies/python3-requests.json", + { + "name" : "weather", + "builddir" : true, + "buildsystem" : "meson", + "sources" : [ + { + "type" : "git", + "url" : "file:///home/amit/Projects" + } + ] + } + ], + "build-options" : { + "env" : { } + } +} diff --git a/com.github.amit9838.json~ b/com.github.amit9838.json~ new file mode 100644 index 0000000..b8b6785 --- /dev/null +++ b/com.github.amit9838.json~ @@ -0,0 +1,42 @@ +{ + "app-id" : "com.github.amit9838", + "runtime" : "org.gnome.Platform", + "runtime-version" : "43", + "sdk" : "org.gnome.Sdk", + "command" : "weather", + "finish-args" : [ + "--share=network", + "--share=ipc", + "--socket=fallback-x11", + "--device=dri", + "--socket=wayland" + ], + "cleanup" : [ + "/include", + "/lib/pkgconfig", + "/man", + "/share/doc", + "/share/gtk-doc", + "/share/man", + "/share/pkgconfig", + "*.la", + "*.a" + ], + "modules" : [ + "data/dependencies/python3-requests.json", + { + "name" : "weather", + "builddir" : true, + "buildsystem" : "meson", + "sources" : [ + { + "type" : "git", + "url" : "file:///home/amit/Projects" + } + ] + } + ], + "build-options" : { + "env" : { } + } +} diff --git a/data/com.github.amit9838.appdata.xml.in b/data/com.github.amit9838.appdata.xml.in new file mode 100644 index 0000000..9456c9f --- /dev/null +++ b/data/com.github.amit9838.appdata.xml.in @@ -0,0 +1,9 @@ + + + com.github.amit9838.desktop + CC0-1.0 + GPL-3.0-or-later + +

No description

+
+
diff --git a/data/com.github.amit9838.desktop.in b/data/com.github.amit9838.desktop.in new file mode 100644 index 0000000..6f91b71 --- /dev/null +++ b/data/com.github.amit9838.desktop.in @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=weather +Exec=weather +Icon=com.github.amit9838 +Terminal=false +Type=Application +Categories=GTK; +StartupNotify=true diff --git a/data/com.github.amit9838.gschema.xml b/data/com.github.amit9838.gschema.xml new file mode 100644 index 0000000..e35fdee --- /dev/null +++ b/data/com.github.amit9838.gschema.xml @@ -0,0 +1,30 @@ + + + + + "b93e61109a102e0424bb8b1b073c3b2c" + Default api + Default api + + + ['Delhi,IN,28.6517178,77.2219388'] + List of cities and their co-ordinates. + Stores locations added by user in json stringified string format in string + + + 0 + Selected city + Selected city name + + + true + Use Gradient Background + Apply gradient background on main window corresponding to weather condition + + + "2023-06-10 01:01:18.716371" + Last Updated + last updated time + + + diff --git a/data/dependencies/python3-requests.json b/data/dependencies/python3-requests.json new file mode 100644 index 0000000..457466a --- /dev/null +++ b/data/dependencies/python3-requests.json @@ -0,0 +1,34 @@ +{ + "name": "python3-requests", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests\" --no-build-isolation" + ], + "sources": [ + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/9d/19/59961b522e6757f0c9097e4493fa906031b95b3ebe9360b2c3083561a6b4/certifi-2023.5.7-py3-none-any.whl", + "sha256": "c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/ff/d7/8d757f8bd45be079d76309248845a04f09619a7b17d6dfc8c9ff6433cac2/charset-normalizer-3.1.0.tar.gz", + "sha256": "34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl", + "sha256": "90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/96/80/034ffeca15c0f4e01b7b9c6ad0fb704b44e190cde4e757edbd60be404c41/requests-2.30.0-py3-none-any.whl", + "sha256": "10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/4b/1d/f8383ef593114755429c307449e7717b87044b3bcd5f7860b89b1f759e34/urllib3-2.0.2-py3-none-any.whl", + "sha256": "d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e" + } + ] +} \ No newline at end of file diff --git a/data/icons/hicolor/scalable/apps/com.github.amit9838.png b/data/icons/hicolor/scalable/apps/com.github.amit9838.png new file mode 100644 index 0000000000000000000000000000000000000000..fb3729b58cade97b0c9a6676e1650e19214c1342 GIT binary patch literal 12547 zcmV+eG5pSnP)EX>4Tx04R}tkv&MmKp2MKwrWLM9PA+CkfAzR5G&$Xt5Adrp;lbWHa-`5n`d##c~(3vY`@B6Gs(QqkMnP zWrgz=XSG^q?R)YUh6>usGS_L1B85dPL4*JqbyQG=g&6G`DJC*>p7ijKIDU~_GPx>X zmKj!@9x{bHSPZW0MM9n%+38(T>t<824YJ`L;(K)y#NIH%+;v?000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2j>O`4K@LreHm5&000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}001BWNklw(RpMv)zE|@&x14|PsseC5KobRCi!xvn0QS;NqWkt=GfcZ#D&Nn% zCk3ETz9*FL&1p8JJW=vmYD}*qHpLrT2ty$NrEn7${j=}?*h^nJln;Vpkg0i`Q!dnt z61Y;Jm4ZqDguAzj-g};~f{n|}K&Z(SmSq@b&=kV3%wVVwtOh`4uh4YM%m%Kk&+Kau zuB&93Zl)A|YQjlG2bAZgy>!BJ({V2yA9Z7wPIzZ_{(agR*{8|`PL&DcRR>SpAlQn2 zwOZDSWw-vC*|zdNE6~tpn|56&5Nz6PSfO>&u-0J6E+LFnKm%Z1<q8Il%iP1#j@>%D?kyo9O54U-K{9Hb`%7Lzw`z;tcu~AgE(H+F=qV8aSK+8w&rb~IgKePzE*Lyz1w#2kP2Z1VSzM%Ygl9fn1Lu48j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~1tqUqz zi^SC&<#{9S@bC{Wzxd*xo&Wpq?T^0jLPA}GH8UuZ9<4pb}MzA z-)UVR(3Bcij&m?IF!0pHZQH&v{Jrm{4>%`J zJ~Os!*UJ;{yfYDd?KMXY534-jlslkZ3^?-Sab@4!3xzHpd=e0H`EuFt&_ltxTW_te z+puA))!Ff&42SO#f(RMs)8VGp6}cHoC6!V!e|+NY@6tZdlI$>FXPx?=gA0Ho;bl=Tlh5D4G2E)?!vu{^kX^;UC9+XEtCuNDwSh=5*m zr&T6oX_QJSr4lNYJenRl|7v{yfgSN<$IrwL97rbKeACGmL{tILisf&r%mPV4*yiJK z3xTd2@TSiR1!Z9KCL?nD?RIeG%3!dgqbIa__1$J`%RMp_+5m(AGwXZ?LKr&ttLZS& z1-$H6S1FQyEVkbr9@!B;cyMR(+_|&KV zk|@@ou8HezAEyy z5OjVC02ktDs@%_DUWLXHd0v-eDSjTfRGy#tMO=~+;AyC;8^%JQQHDD$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/icons/hicolor/symbolic/apps/com.github.amit9838-symbolic.png b/data/icons/hicolor/symbolic/apps/com.github.amit9838-symbolic.png new file mode 100644 index 0000000000000000000000000000000000000000..fb3729b58cade97b0c9a6676e1650e19214c1342 GIT binary patch literal 12547 zcmV+eG5pSnP)EX>4Tx04R}tkv&MmKp2MKwrWLM9PA+CkfAzR5G&$Xt5Adrp;lbWHa-`5n`d##c~(3vY`@B6Gs(QqkMnP zWrgz=XSG^q?R)YUh6>usGS_L1B85dPL4*JqbyQG=g&6G`DJC*>p7ijKIDU~_GPx>X zmKj!@9x{bHSPZW0MM9n%+38(T>t<824YJ`L;(K)y#NIH%+;v?000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2j>O`4K@LreHm5&000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}001BWNklw(RpMv)zE|@&x14|PsseC5KobRCi!xvn0QS;NqWkt=Gf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QbV~sG49)vJ-&!>;7KTwVrkG(y*?fEB%p8D%y|J+%>NcdPVhocOaoAK2f8pN}# zc&Ml6wAtFaSxC_aLKjiAs=G+yqz+H)*#0L&-+TI4df#5RK;EVbg_HS!ql~I0C?%XT zr+rs4Vt2M5G@F_?2`O6iQ01IK+&sbRalfLImea43Nm9p;`>yYg*zN6y%$64Ibo!_^XFELc_Vzy*`p)0&iNE@agOgHa zg60=0notBfQN-!UI-N)j4EUZ>BlgnvgIVaB5W>{mqgDkwTgrD*N3+g030on+ykeC} za%OLp0*)d>1=FunNm2s?p6mM;0!x-0Fq@k?glV)R21VKY60iR4s3w!vRxd6a%i@e6A3Ps7sebZ2$grYIO9BG>kXR))rp`>~0~1tqUqz zi^SC&<#{9S@bC{Wzxd*xo&Wpq?T^0jLPA}GH8UuZ9<4pb}MzA z-)UVR(3Bcij&m?IF!0pHZQH&v{Jrm{4>%`J zJ~Os!*UJ;{yfYDd?KMXY534-jlslkZ3^?-Sab@4!3xzHpd=e0H`EuFt&_ltxTW_te z+puA))!Ff&42SO#f(RMs)8VGp6}cHoC6!V!e|+NY@6tZdlI$>FXPx?=gA0Ho;bl=Tlh5D4G2E)?!vu{^kX^;UC9+XEtCuNDwSh=5*m zr&T6oX_QJSr4lNYJenRl|7v{yfgSN<$IrwL97rbKeACGmL{tILisf&r%mPV4*yiJK z3xTd2@TSiR1!Z9KCL?nD?RIeG%3!dgqbIa__1$J`%RMp_+5m(AGwXZ?LKr&ttLZS& z1-$H6S1FQyEVkbr9@!B;cyMR(+_|&KV zk|@@ou8HezAEyy z5OjVC02ktDs@%_DUWLXHd0v-eDSjTfRGy#tMO=~+;AyC;8^%JQQHDD$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 0000000..029cc8e --- /dev/null +++ b/data/icons/meson.build @@ -0,0 +1,13 @@ +application_id = 'com.github.amit9838' + +scalable_dir = join_paths('hicolor', 'scalable', 'apps') +install_data( + join_paths(scalable_dir, ('@0@.png').format(application_id)), + install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir) +) + +symbolic_dir = join_paths('hicolor', 'symbolic', 'apps') +install_data( + join_paths(symbolic_dir, ('@0@-symbolic.png').format(application_id)), + install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir) +) diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..c3ccd86 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,39 @@ +desktop_file = i18n.merge_file( + input: 'com.github.amit9838.desktop.in', + output: 'com.github.amit9838.desktop', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +desktop_utils = find_program('desktop-file-validate', required: false) +if desktop_utils.found() + test('Validate desktop file', desktop_utils, args: [desktop_file]) +endif + +appstream_file = i18n.merge_file( + input: 'com.github.amit9838.appdata.xml.in', + output: 'com.github.amit9838.appdata.xml', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'appdata') +) + +appstream_util = find_program('appstream-util', required: false) +if appstream_util.found() + test('Validate appstream file', appstream_util, args: ['validate', appstream_file]) +endif + +install_data('com.github.amit9838.gschema.xml', + install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') +) + +compile_schemas = find_program('glib-compile-schemas', required: false) +if compile_schemas.found() + test('Validate schema file', + compile_schemas, + args: ['--strict', '--dry-run', meson.current_source_dir()]) +endif + +subdir('icons') diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..8c21e6d --- /dev/null +++ b/meson.build @@ -0,0 +1,25 @@ +project('weather', + version: '0.1.0', + meson_version: '>= 0.62.0', + default_options: [ 'warning_level=2', 'werror=false', ], +) + +i18n = import('i18n') +gnome = import('gnome') + + + +subdir('data') +subdir('src') +subdir('po') + + + + +install_subdir('data/weather_icons', install_dir: '/app/share/icons/hicolor/scalable') + +gnome.post_install( + glib_compile_schemas: true, + gtk_update_icon_cache: true, + update_desktop_database: true, +) diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/po/POTFILES b/po/POTFILES new file mode 100644 index 0000000..b678712 --- /dev/null +++ b/po/POTFILES @@ -0,0 +1,6 @@ +data/com.github.amit9838.desktop.in +data/com.github.amit9838.appdata.xml.in +data/com.github.amit9838.gschema.xml +src/main.py +src/window.py +src/window.ui diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..bfaf5f6 --- /dev/null +++ b/po/meson.build @@ -0,0 +1 @@ +i18n.gettext('weather', preset: 'glib') diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/backend_current_w.py b/src/backend_current_w.py new file mode 100644 index 0000000..a95ae87 --- /dev/null +++ b/src/backend_current_w.py @@ -0,0 +1,56 @@ +import requests + + + +def fetch_weather(api_key, latitude, longitude): + base_url = "http://api.openweathermap.org/data/2.5/weather" + params = { + "lat": latitude, + "lon": longitude, + "appid": api_key, + "units": "metric" # You can change the units to "imperial" for Fahrenheit + } + + print(latitude,longitude) + + + try: + response = requests.get(base_url, params=params) + response.raise_for_status() # Raise an exception if request was unsuccessful + weather_data = response.json() + # print(weather_data) + return weather_data + + except requests.exceptions.RequestException as e: + print(f"Error: {e}") + return None + + +# data = {'coord': {'lon': 77.3272, 'lat': 28.5706}, +# 'weather': [{'id': 804, 'main': 'Clouds', 'description': 'overcast clouds', 'icon': '04n'}], +# 'base': 'stations', +# 'main': {'temp': 29.18, 'feels_like': 27.6, 'temp_min': 29.18, 'temp_max': 29.18, 'pressure': 1005, 'humidity': 20, 'sea_level': 1005, 'grnd_level': 982},'visibility': 10000, +# 'wind': {'speed': 2.68, 'deg': 341, 'gust': 4.59}, +# 'clouds': {'all': 91}, +# 'dt': 1685818745, +# 'sys': {'type': 1, 'id': 9165, 'country': 'IN', 'sunrise': 1685836384, 'sunset': 1685886305}, +# 'timezone': 19800, 'id': 7279746, 'name': 'Noida', 'cod': 200} + + + +def fetch_city_info(api_key, city): + base_url = "http://api.openweathermap.org/geo/1.0/direct" + params = { + "q": city, + "limit": 5, + "appid": api_key + } + + try: + response = requests.get(base_url, params=params) + response.raise_for_status() # Raise an exception if the request was unsuccessful + return response.json() + + except requests.exceptions.RequestException as e: + print(f"Error: {e}") + diff --git a/src/backend_forecast_w.py b/src/backend_forecast_w.py new file mode 100644 index 0000000..e092528 --- /dev/null +++ b/src/backend_forecast_w.py @@ -0,0 +1,23 @@ +import requests +import json + +def fetch_forecast(api_key,latitude, longitude, days=1): + base_url = "http://api.openweathermap.org/data/2.5/forecast" + params = { + "lat": latitude, + "lon": longitude, + "appid": api_key, + "units": "metric", # You can change the units to "imperial" for Fahrenheit + "cnt": days * 8 # Each day has 8 forecast intervals (3-hour intervals) + } + + try: + response = requests.get(base_url, params=params) + response.raise_for_status() # Raise an exception if the request was unsuccessful + forecast_data = response.json() + return forecast_data + + + except requests.exceptions.RequestException as e: + print(f"Error: {e}") + return None diff --git a/src/constants.py b/src/constants.py new file mode 100644 index 0000000..1bcff0b --- /dev/null +++ b/src/constants.py @@ -0,0 +1,64 @@ +API_KEY = 'b93e61109a102e0424bb8b1b073c3b2c' + + +icons = {'01d':"weather-clear-symbolic", + '02d':"weather-few-clouds-symbolic", + '03d':"weather-few-clouds-symbolic", + '04d':"weather-few-clouds-symbolic", + '09d':"weather-showers-scattered-symbolic", + '10d':"weather-showers-symbolic", + '11d':"weather-storm-symbolic", + '13d':"weather-snow-symbolic", + '50d':"weather-fog-symbolic", + + '01n':"weather-clear-night-symbolic", + '02n':"weather-few-clouds-night-symbolic", + '03n':"weather-few-clouds-night-symbolic", + '04n':"weather-few-clouds-night-symbolic", + '09n':"weather-showers-scattered-symbolic", + '10n':"weather-showers-symbolic", + '11n':"weather-storm-symbolic", + '13n':"weather-snow-symbolic", + '50n':"weather-fog-symbolic", + } + +bg_css ={'01d':"clear_sky", + '02d':"few_clouds", + '03d':"overcast", + '04d':"overcast", + '09d':"showers_scattered", + '10d':"showers_large", + '11d':"storm", + '13d':"snow", + '50d':"fog", + + '01n':"clear_sky_night", + '02n':"few_clouds_night", + '03n':"overcast_night", + '04n':"showers_scattered_night", + '09n':"showers_large_night", + '10n':"showers_large_night", + '11n':"storm_night", + '13n':"snow_night", + '50n':"fog_night", + } + +# 01d: Clear sky (day) +# 01n: Clear sky (night) +# 02d: Few clouds (day) +# 02n: Few clouds (night) +# 03d: Scattered clouds (day) +# 03n: Scattered clouds (night) +# 04d: Broken clouds (day) +# 04n: Broken clouds (night) +# 09d: Shower rain (day) +# 09n: Shower rain (night) +# 10d: Rain (day) +# 10n: Rain (night) +# 11d: Thunderstorm (day) +# 11n: Thunderstorm (night) +# 13d: Snow (day) +# 13n: Snow (night) +# 50d: Mist (day) +# 50n: Mist (night) + diff --git a/src/css.py b/src/css.py new file mode 100644 index 0000000..9bdb4c2 --- /dev/null +++ b/src/css.py @@ -0,0 +1,140 @@ +css = """ +.condition_label { + font-size: 20px; + font-weight: bold; + opacity:.8; + } +.temp_label { + font-size: 48px; + font-weight: bold; + } +.f_box { + background-color:rgba(255, 255, 255, 0.08); + border-radius: 5px; + border : 1px solid rgba(150, 150, 150,.2); + + } +.forecast_box { + border-radius: 5px; + } + + +.forecast_temp_label { + font-size: 18px; + font-weight: bold; + } + +.city_label { + font-size: 18px; + font-weight: bold; +} + +.bold{ + font-weight:500; +} + +.secondary{ + opacity:.6; +} + +.secondary-light{ + opacity:.8; +} + +.error_label { + font-size: 26px; + font-weight: bold; +} + + +.updated_at{ + font-size:.9rem; + opacity:.6; +} + +.grey_bg { + background-color:rgba(100, 100, 100, 0.1); + } + + +.main_window{ + border-radius:13px; + border : 1px solid rgba(100, 100, 100,.3); +} + +.clear_sky, .few_clouds { + + background: linear-gradient(127deg, alpha(rgb(197, 198, 189), 1), alpha(rgb(0, 134, 218), 0) 100%), + linear-gradient(217deg, alpha(rgb(197, 198, 189), 1), alpha(rgb(0, 134, 218), 1) 100%), + linear-gradient(336deg, alpha(rgb(197, 198, 189), 1), alpha(rgb(0, 134, 218), 1) 100%); + +} .overcast, .showers_scattered{ + + background: linear-gradient(127deg, alpha(rgb(155, 155, 155), 1), alpha(rgb(0, 134, 215), 0) 100%), + linear-gradient(217deg, alpha(rgb(155, 155, 155), 1), alpha(rgb(0, 134, 215), 1) 100%), + linear-gradient(336deg, alpha(rgb(155, 155, 155), 1), alpha(rgb(0, 134, 218), 1) 100%); + +} .showers_large { + + background: linear-gradient(127deg, alpha(rgb(134, 137, 154), 1), alpha(rgb(134, 137, 154), 0) 100%), + linear-gradient(217deg, alpha(rgb(134, 137, 154), 1), alpha(rgb(0, 134, 218), 1) 100%), + linear-gradient(336deg, alpha(rgb(134, 137, 154), 1), alpha(rgb(0, 134, 218), 1) 100%); + +} .storm{ + + background: linear-gradient(127deg, alpha(rgba(108,123,152,1), 1), alpha(rgba(92,92,92,1), 1) 100%), + linear-gradient(217deg, alpha(rgba(108,123,152,1), 1), alpha(rgba(92,92,92,1), 1) 100%), + linear-gradient(336deg, alpha(rgba(108,123,152,1), 1), alpha(rgba(92,92,92,1), 1) 100%); + +} .snow{ + + background: linear-gradient(127deg, alpha(rgb(126, 126, 126), 1), alpha(rgba(92,92,92,1), 1) 100%), + linear-gradient(217deg, alpha(rgb(126, 126, 126), 1), alpha(rgba(92,92,92,1), 1) 100%), + linear-gradient(336deg, alpha(rgb(126, 126, 126), 1), alpha(rgba(92,92,92,1), 1) 100%); + +} .fog{ + + background: linear-gradient(127deg, alpha(rgb(126, 126, 126), 1), alpha(rgb(126, 126, 126), 1) 100%), + linear-gradient(217deg, alpha(rgb(126, 126, 126), 1), alpha(rgb(126, 126, 126), 1) 100%), + linear-gradient(336deg, alpha(rgb(126, 126, 126), 1), alpha(rgb(126, 126, 126), 1) 100%); + +} + +/* ------------- night --------------- */ + +.clear_sky_night, .few_clouds_night{ + + background: linear-gradient(127deg, alpha(rgb(45, 48, 72), 1), alpha(rgb(23, 27, 60), 0) 100%), + linear-gradient(217deg, alpha(rgb(45, 48, 72), 1), alpha(rgb(23, 27, 60), 1) 100%); + +} .overcast_night, .showers_scattered_night { + + background: linear-gradient(127deg, alpha(rgb(27, 29, 40), 1), alpha(rgb(23, 27, 60), 0) 100%), + linear-gradient(217deg, alpha(rgb(27, 29, 40), 1), alpha(rgb(46, 46, 46), 1) 100%); + +} .showers_large_night { + + background: linear-gradient(127deg, alpha(rgb(27, 29, 40), 1), alpha(rgb(23, 27, 60), 0) 100%), + linear-gradient(237deg, alpha(rgb(27, 29, 40), 1), alpha(rgb(46, 46, 46), 1) 100%); + +} .storm_night{ + + background: linear-gradient(127deg, alpha(rgba(50,50,50,1), 1), alpha(rgba(54,55,37,1), 1) 100%), + linear-gradient(237deg, alpha(rgba(50,50,50,1), 1), alpha(rgba(54,55,37,1), 1) 100%); + +} .snow_night{ + + background: linear-gradient(127deg, alpha(rgba(50,50,50,1), 1), alpha(rgba(98,98,98,1), 1) 100%), + linear-gradient(217deg, alpha(rgba(50,50,50,1), 1), alpha(rgba(98,98,98,1), 1) 100%), + linear-gradient(336deg, alpha(rgba(50,50,50,1), 1), alpha(rgba(98,98,98,1), 1) 100%); + +} .fog_night{ + + background: linear-gradient(127deg, alpha(rgb(28, 27, 38), 1), alpha(rgb(50,50,50), 0) 100%), + linear-gradient(217deg, alpha(rgb(50,50,50), 1), alpha(rgb(28, 27, 38), 1) 100%); + +} + +""" + +# Thanks to https://github.com/SalaniLeo for this beautiful gradients collection diff --git a/src/css/style.css b/src/css/style.css new file mode 100644 index 0000000..e69de29 diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..c81670d --- /dev/null +++ b/src/main.py @@ -0,0 +1,76 @@ +# main.py +# +# Copyright 2023 Amit +# +# 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 . +# +# SPDX-License-Identifier: GPL-3.0-or-later + +import sys +import gi + +gi.require_version('Gtk', '4.0') +gi.require_version('Adw', '1') + + +from gi.repository import Gtk, Gio,Adw,Gdk +from .weather import WeatherWindow +from .css import css + +class WeatherApplication(Adw.Application): + """The main application singleton class.""" + + def __init__(self): + super().__init__(application_id='com.github.amit9838', + flags=Gio.ApplicationFlags.DEFAULT_FLAGS) + self.create_action('quit', lambda *_: self.quit(), ['q']) + self.main_window = None + + def do_activate(self): + + win = self.props.active_window + global css_provider + + css_provider = Gtk.CssProvider() + + css_provider.load_from_data(css,len(css)) + Gtk.StyleContext.add_provider_for_display(Gdk.Display.get_default(), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) + + + if not win: + win = WeatherWindow(application=self) + win.present() + + + def create_action(self, name, callback, shortcuts=None): + """Add an application action. + + Args: + name: the name of the action + callback: the function to be called when the action is + activated + shortcuts: an optional list of accelerators + """ + action = Gio.SimpleAction.new(name, None) + action.connect("activate", callback) + self.add_action(action) + if shortcuts: + self.set_accels_for_action(f"app.{name}", shortcuts) + + +def main(version): + """The application's entry point.""" + app = WeatherApplication() + return app.run(sys.argv) + diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..1eec8b9 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,45 @@ +pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) +moduledir = join_paths(pkgdatadir, 'weather') +gnome = import('gnome') + +gnome.compile_resources('weather', + 'weather.gresource.xml', + gresource_bundle: true, + install: true, + install_dir: pkgdatadir, +) + +python = import('python') + +conf = configuration_data() +conf.set('PYTHON', python.find_installation('python3').path()) +conf.set('VERSION', meson.project_version()) +conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir'))) +conf.set('pkgdatadir', pkgdatadir) + +configure_file( + input: 'weather.in', + output: 'weather', + configuration: conf, + install: true, + install_dir: get_option('bindir'), + install_mode: 'r-xr--r--' +) + + +weather_sources = [ + '__init__.py', + 'main.py', + 'weather.py', + 'windows.py', + 'ui_current_w.py', + 'ui_forecast_w.py', + 'backend_current_w.py', + 'backend_forecast_w.py', + 'constants.py', + 'css.py', +] + + + +install_data(weather_sources, install_dir: moduledir) diff --git a/src/tempCodeRunnerFile.py b/src/tempCodeRunnerFile.py new file mode 100644 index 0000000..fac8f28 --- /dev/null +++ b/src/tempCodeRunnerFile.py @@ -0,0 +1 @@ +2023-01-1T17:35:19.818 \ No newline at end of file diff --git a/src/ui_current_w.py b/src/ui_current_w.py new file mode 100644 index 0000000..ff219be --- /dev/null +++ b/src/ui_current_w.py @@ -0,0 +1,204 @@ +import gi +import json +import datetime +gi.require_version('Gtk', '4.0') +gi.require_version('Adw', '1') +from gi.repository import Gtk,Gio,GLib +# from backend.curr_weather import fetch_weather + +from .constants import icons,API_KEY,bg_css +from .backend_current_w import fetch_weather,fetch_city_info +from .backend_forecast_w import fetch_forecast +from .ui_forecast_w import forecast_weather + +def current_weather(main_window,upper_row,middle_row,data): + global g_upper_row,g_middle_row,g_main_window,selected_city,settings,added_cities,cities,use_gradient + + settings = Gio.Settings.new("com.github.amit9838") + selected_city = int(str(settings.get_value('selected-city'))) + added_cities = list(settings.get_value('added-cities')) + cities = [f"{x.split(',')[0]},{x.split(',')[1]}" for x in added_cities] + settings.set_value("updated-at",GLib.Variant("s",str(datetime.datetime.now()))) + + + g_upper_row = upper_row + g_middle_row = middle_row + g_main_window = main_window + use_gradient = settings.get_boolean('use-gradient-bg') + + # Add a grid in upper row to place left and right section + condition_grid = Gtk.Grid() + condition_grid.set_row_spacing(10) + condition_grid.set_column_spacing(10) + condition_grid.set_halign(Gtk.Align.CENTER) + condition_grid.set_margin_top(10) + condition_grid.set_hexpand(True) + + upper_row.append(condition_grid) + + left_section = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + # left_section.set_margin_start(10) + left_section.set_size_request(500,100) + + condition_grid.attach(left_section, 0, 1, 1, 1) + + + # Main info box, contains weather icon, temp info + info_box_main = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,valign=Gtk.Align.CENTER) + info_box_main.set_margin_start(10) + left_section.append(info_box_main) + + icon_box_main = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + icon_box_main.set_size_request(92, 92) + info_box_main.append(icon_box_main) + + icon_main = Gtk.Image() + icon_main.set_from_icon_name(icons.get(data['weather'][0]['icon'])) # Set the icon name and size + icon_main.set_pixel_size(92) + icon_box_main.append(icon_main) + + if use_gradient: + main_window.set_css_classes(['main_window',bg_css.get(data['weather'][0]['icon'])]) + + # Condition box contains weather type (cloudy, rain), temps,feels like, min-max temp + cond_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + cond_box.set_margin_start(20) + info_box_main.append(cond_box) + + condition_label = Gtk.Label(label=data['weather'][0]['description'].capitalize()) + condition_label.set_margin_start(5) + condition_label.set_halign(Gtk.Align.START) + condition_label.set_css_classes(['condition_label']) + cond_box.append(condition_label) + + + # Temp box contains temp,feels like, min-max temp + temp_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + cond_box.append(temp_box) + + temp_box_l = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + temp_box.append(temp_box_l) + + temp_label = Gtk.Label(label=f"{data['main']['temp']:.0f}°C") + temp_label.set_halign(Gtk.Align.START) + temp_label.set_css_classes(['temp_label']) + temp_box_l.append(temp_label) + + feels_like_label = Gtk.Label(label=f"Feels like {data['main']['feels_like']:.0f}°C") + feels_like_label.set_margin_start(5) + feels_like_label.set_halign(Gtk.Align.START) + temp_box_l.append(feels_like_label) + + temp_box_r = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + temp_box_r.set_margin_start(10) + temp_box.append(temp_box_r) + + temp_max_label = Gtk.Label(label = f"↑ {data['main']['temp_max']:.1f}°") + temp_min_label = Gtk.Label(label = f"↓ {data['main']['temp_min']:.1f}°") + temp_max_label.set_margin_top(10) + temp_max_label.set_margin_bottom(30) + temp_box_r.append(temp_max_label) + temp_box_r.append(temp_min_label) + + + right_section = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + right_section.set_size_request(300,100) + # right_section.set_margin_end(20) + + right_section.set_css_classes(['right_section']) + + box_city = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + box_city.set_margin_bottom(5) + + list_store = Gtk.ListStore(str) + for city in cities: + list_store.append([city]) + + + combo_box = Gtk.ComboBox.new_with_model(list_store) + combo_box.connect("changed", on_city_combo_changed) + combo_box.set_model(list_store) + renderer_text = Gtk.CellRendererText() + combo_box.pack_start(renderer_text, True) + combo_box.add_attribute(renderer_text, "text", 0) + + combo_box.set_active(selected_city) # + box_city.append(combo_box) + + weather_data = [] + + sunrise_time = datetime.datetime.fromtimestamp(data['sys']['sunrise']) + sunset_time = datetime.datetime.fromtimestamp(data['sys']['sunset']) + visibility = data['visibility']//1000 if data['visibility'] > 1000 else data['visibility'] + vis_dist_unit = "km" if data['visibility'] > 1000 else "m" + + weather_data.append(["Rain",f"{data['clouds']['all']}%"]) + weather_data.append(["Humidity", f"{data['main']['humidity']}%"]) + weather_data.append(["Pressure",f"{data['main']['pressure']} mmHg"]) + weather_data.append(["Wind speed",f"{data['wind']['speed']}km/h {wind_dir(data['wind']['deg'])}"]) + weather_data.append(["Visibility", f"{visibility} {vis_dist_unit}"]) + # weather_data.append(["Sunrise", f"{sunrise_time.hour}:{sunrise_time.minute} AM"]) + # weather_data.append(["Sunset", f"{sunset_time.hour-12}:{sunset_time.minute} PM"]) + + label_grid = Gtk.Grid() + label_grid.set_row_spacing(2) + label_grid.set_column_spacing(10) + for i,disc in enumerate(weather_data): + key_label = Gtk.Label(label=disc[0]) + disc_label = Gtk.Label(label = disc[1]) + key_label.set_halign(Gtk.Align.START) + disc_label.set_halign(Gtk.Align.START) + key_label.set_css_classes(['bolds','secondary']) + disc_label.set_css_classes(['bold','secondary-light']) + label_grid.attach(key_label,0,i,1,1) + label_grid.attach(disc_label,1,i,1,1) + + right_section.append(box_city) + right_section.append(label_grid) + condition_grid.attach(right_section, 1, 1, 1, 1) + +application = None +def on_city_combo_changed(combo): + global cities,selected_city, g_upper_row,g_middle_row,g_main_window + tree_iter = combo.get_active_iter() + s_city = cities[selected_city] + + if tree_iter is not None: + # global selected_city + model = combo.get_model() + city = model[tree_iter][0] + if s_city != city: + selected_city = cities.index(city) + settings.set_value("selected-city",GLib.Variant("i",selected_city)) + + cit = [f"{x.split(',')[0]},{x.split(',')[1]}" for x in added_cities] + city_loc = added_cities[cit.index(city)] + city_loc = city_loc.split(',') + lat = float(city_loc[-2]) + lon = float(city_loc[-1]) + + # Fetch Weather data + w_data = fetch_weather(API_KEY,lat,lon) + f_data = fetch_forecast(API_KEY, lat, lon) + + # repaint upper and middle rows if successfully fetched + if w_data is not None: + f = g_upper_row.get_first_child() + m = g_middle_row.get_first_child() + g_upper_row.remove(f) + current_weather(g_main_window,g_upper_row,g_middle_row,w_data) + if m is not None: + g_middle_row.remove(m) + forecast_weather(g_middle_row,f_data) + + + +# converts wind degrees to direction +def wind_dir(angle): + directions = [ + "N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", + "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW", + ] + index = round(angle / (360.0 / len(directions))) % len(directions) + return directions[index] + diff --git a/src/ui_forecast_w.py b/src/ui_forecast_w.py new file mode 100644 index 0000000..4992166 --- /dev/null +++ b/src/ui_forecast_w.py @@ -0,0 +1,113 @@ +import gi +import datetime +gi.require_version('Gtk', '4.0') +gi.require_version('Adw', '1') +from gi.repository import Gtk,Gio + +# from backend.curr_weather import fetch_weather +from .constants import icons + + +def forecast_weather(middle_row,f_data): + + scrolled_container = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + scrolled_container.set_name("forecast_row") + scrolled_container.set_size_request(800,200) + + scrolled_window = Gtk.ScrolledWindow() + scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.NEVER) # Enable automatic scrolling + scrolled_window.set_min_content_height(190) + scrolled_window.set_margin_bottom(5) + scrolled_window.set_margin_top(5) + scrolled_window.set_kinetic_scrolling(True) + scrolled_window.set_halign(Gtk.Align.CENTER) + scrolled_container.append(scrolled_window) + scrolled_window.set_size_request(800,190) + middle_row.append(scrolled_container) + + forecast_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + forecast_box.set_css_classes(['forecast_box']) + + scrolled_window.set_child(forecast_box) + + # f_data = [{'dt': 1685491200, 'main': {'temp': 24.2, 'feels_like': 24.76, 'temp_min': 24.2, 'temp_max': 26.51, 'pressure': 1007, 'sea_level': 1007, 'grnd_level': 982, 'humidity': 80, 'temp_kf': -2.31}, 'weather': [{'id': 803, 'main': 'Clouds', 'description': 'broken clouds', 'icon': '04d'}], 'clouds': {'all': 61}, 'wind': {'speed': 3.41, 'deg': 274, 'gust': 4.37}, 'visibility': 10000, 'pop': 0.62, 'sys': {'pod': 'd'}, 'dt_txt': '2023-05-31 00:00:00'}, + # {'dt': 1685566800, 'main': {'temp': 29.55, 'feels_like': 29.18, 'temp_min': 29.55, 'temp_max': 29.55, 'pressure': 1005, 'sea_level': 1005, 'grnd_level': 981, 'humidity': 40, 'temp_kf': 0}, 'weather': [{'id': 800, 'main': 'Clear', 'description': 'clear sky', 'icon': '01n'}], 'clouds': {'all': 0}, 'wind': {'speed': 4.36, 'deg': 345, 'gust': 7.02}, 'visibility': 10000, 'pop': 0, 'sys': {'pod': 'n'}, 'dt_txt': '2023-05-31 21:00:00'}] + + for data in f_data.get('list'): + forecast_item = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + forecast_item.set_margin_start(2) + forecast_item.set_margin_end(2) + forecast_content = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + forecast_content.set_halign(Gtk.Align.CENTER) + forecast_item.set_size_request(110,160) + + forecast_item.set_css_classes(['f_box']) + forecast_content.set_css_classes(['f_box_t']) + forecast_content.set_margin_top(10) + forecast_content.set_margin_bottom(10) + forecast_content.set_margin_start(10) + forecast_content.set_margin_end(10) + # forecast_content.set_vexpand(True) + + # date_time = data.get('dt_txt') + date_time = datetime.datetime.fromtimestamp(data['dt']) + + hr = date_time.hour + tpe = "AM" + if date_time.hour > 12: + hr = date_time.hour - 12 + tpe = "PM" + + time = f"{hr}:{date_time.minute} {tpe}" + + + forecast_time = Gtk.Label(label=f"{time}") + forecast_time.set_halign(Gtk.Align.CENTER) + forecast_content.append(forecast_time) + forecast_item.append(forecast_content) + forecast_box.append(forecast_item) + + + forecast_icon = Gtk.Image() + forecast_icon.set_from_icon_name(icons.get(data['weather'][0]['icon'])) # Set the icon name and size + # icon.set_hexpand(True) + forecast_icon.set_pixel_size(36) + forecast_icon.set_margin_top(15) + forecast_icon.set_margin_bottom(10) + forecast_content.append(forecast_icon) + + + grid = Gtk.Grid() + grid.set_row_spacing(5) + grid.set_column_spacing(10) + grid.set_margin_top(20) + forecast_content.append(grid) + + prec_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + rain_icon = Gtk.Image() + rain_icon.set_from_icon_name("weather-showers-scattered-symbolic") # Set the icon name and size + rain_icon.set_pixel_size(16) + rain_icon.set_margin_end(5) + prec_box.append(rain_icon) + prec_label = Gtk.Label(label=f"{data['clouds']['all']}%") + prec_box.append(prec_label) + grid.attach(prec_box, 0, 0, 1, 1) + + wind_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + # weather-windy-symbolic + wind_icon = Gtk.Image() + wind_icon.set_from_icon_name("weather-windy-symbolic") # Set the icon name and size + # icon.set_hexpand(True) + wind_icon.set_pixel_size(16) + wind_icon.set_margin_end(5) + wind_box.append(wind_icon) + + + wind_label = Gtk.Label(label=f"{data['wind']['speed']} km/h") + wind_box.append(wind_label) + grid.attach(wind_box, 0, 1, 1, 1) + + temp_label = Gtk.Label(label=f"{data['main']['temp']:.0f}°") + temp_label.set_css_classes(['forecast_temp_label']) + temp_label.set_margin_top(10) + forecast_content.append(temp_label) diff --git a/src/weather.gresource.xml b/src/weather.gresource.xml new file mode 100644 index 0000000..c4453cb --- /dev/null +++ b/src/weather.gresource.xml @@ -0,0 +1,7 @@ + + + + css/style.css + + + diff --git a/src/weather.in b/src/weather.in new file mode 100755 index 0000000..ad5d32c --- /dev/null +++ b/src/weather.in @@ -0,0 +1,46 @@ +#!@PYTHON@ + +# weather.in +# +# Copyright 2023 Amit +# +# 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 . +# +# SPDX-License-Identifier: GPL-3.0-or-later + +import os +import sys +import signal +import locale +import gettext + +VERSION = '@VERSION@' +pkgdatadir = '@pkgdatadir@' +localedir = '@localedir@' + +sys.path.insert(1, pkgdatadir) +signal.signal(signal.SIGINT, signal.SIG_DFL) +locale.bindtextdomain('weather', localedir) +locale.textdomain('weather') +gettext.install('weather', localedir) + +if __name__ == '__main__': + import gi + + from gi.repository import Gio + resource = Gio.Resource.load(os.path.join(pkgdatadir, 'weather.gresource')) + resource._register() + + from weather import main + sys.exit(main.main(VERSION)) diff --git a/src/weather.py b/src/weather.py new file mode 100644 index 0000000..fcf3fb2 --- /dev/null +++ b/src/weather.py @@ -0,0 +1,183 @@ +import gi +import datetime +gi.require_version('Gtk', '4.0') +gi.require_version('Adw', '1') +from gi.repository import Gtk, Adw,Gdk,Gio + +from .constants import API_KEY +from .windows import AboutWindow,WeatherPreferences +from .ui_current_w import current_weather +from .ui_forecast_w import forecast_weather + +from .backend_current_w import fetch_weather +from .backend_forecast_w import fetch_forecast + +settings = Gio.Settings.new("com.github.amit9838") +selected_city = int(str(settings.get_value('selected-city'))) + +api_key = str(settings.get_value('api-key')) +added_cities = list(settings.get_value('added-cities')) +cities = [x.split(',')[0] for x in added_cities] + + +# @Gtk.Template(resource_path='/com/github/amit9838/window.ui') +class WeatherWindow(Gtk.ApplicationWindow): + __gtype_name__ = 'WeatherWindow' + + label = Gtk.Template.Child() + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + global application + self.set_default_size(800, 400) + self.set_title("Weather") + + self.main_window = application = self + + # Adding a button into header + main_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + + main_grid = Gtk.Grid() + main_grid.set_hexpand(True) + main_box.append(main_grid) + + self.upper_row = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,valign=Gtk.Align.CENTER) + self.upper_row.set_hexpand(True) + self.upper_row.set_size_request(800,160) + main_grid.attach(self.upper_row,0,0,1,1) + + self.middle_row = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,valign=Gtk.Align.CENTER) + self.middle_row.set_hexpand(True) + self.middle_row.set_size_request(800,200) + main_grid.attach(self.middle_row,0,1,1,1) + + self.set_child(main_box) + + main_box.set_hexpand(True) + main_box.set_vexpand(True) + + # Adding a button into header + self.header = Adw.HeaderBar() + self.header.add_css_class(css_class='flat') + self.set_titlebar(self.header) + self.open_button = Gtk.Button(label="refresh") + self.header.pack_start(self.open_button) + self.open_button.set_icon_name("view-refresh-symbolic") + self.open_button.connect('clicked',self.refresh_weather) + + + # Create a popover + menu = Gio.Menu.new() + self.popover = Gtk.PopoverMenu() # Create a new popover menu + self.popover.set_menu_model(menu) + + # Create a menu button + self.hamburger = Gtk.MenuButton() + self.hamburger.set_popover(self.popover) + self.hamburger.set_icon_name("open-menu-symbolic") # Give it a nice icon + self.header.pack_end(self.hamburger) + + # Create a new action + action = Gio.SimpleAction.new("preferences", None) + action.connect("activate", self.show_preferences) + self.add_action(action) + menu.append("Preferences", "win.preferences") + + # menu.append("Help", "help") + + action = Gio.SimpleAction.new("about", None) + action.connect("activate", AboutWindow) + self.add_action(action) + menu.append("About", "win.about") + + self.fetch_weather_data() + + footer_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + footer_box.set_halign(Gtk.Align.CENTER) + footer_box.set_size_request(800,10) + footer_box.set_margin_bottom(0) + + + # updated_at_label = Gtk.Label(label="Weather data from OpenWeather.com") + # updated_at_label.set_halign(Gtk.Align.START) + # updated_at_label.set_css_classes(['updated_at']) + # footer_box.append(updated_at_label) + main_box.append(footer_box) + + def refresh_weather(self,widget): + settings = Gio.Settings.new("com.github.amit9838") + updated_at = str(settings.get_value('updated-at')) + + + date_time = datetime.datetime.now() + d_t = updated_at.split(" ") + + # Time + tm = d_t[1] + t_arr = tm.split(":") + + t_min = int(t_arr[1]) + + # Ignore fetching weather within 1 min + if datetime.datetime.now().minute - t_min < 1: + return + + upper_child = self.upper_row.get_first_child() + if upper_child is not None: + self.upper_row.remove(upper_child) + + middle_child = self.middle_row.get_first_child() + if middle_child is not None: + self.middle_row.remove(middle_child) + + + self.set_css_classes(['main_window']) + self.fetch_weather_data() + + def fetch_weather_data(self): + settings = Gio.Settings.new("com.github.amit9838") + selected_city = int(str(settings.get_value('selected-city'))) + added_cities = list(settings.get_value('added-cities')) + cities = [f"{x.split(',')[0]},{x.split(',')[1]}" for x in added_cities] + + city_loc = added_cities[selected_city] + city_loc = city_loc.split(',') + + latitude = (city_loc[-2]) + longitude = (city_loc[-1]) + + w_data = fetch_weather(API_KEY,latitude,longitude) + f_data = fetch_forecast(API_KEY,latitude,longitude) + + if w_data is None and f_data is None: + + error_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,halign=Gtk.Align.CENTER) + error_box.set_margin_top(50) + label = Gtk.Label(label = "Failed to load Weather Data") + label.set_css_classes(['error_label']) + + icon = Gtk.Image() + icon.set_from_icon_name("network-error-symbolic") # Set the icon name and size + icon.set_pixel_size(36) + icon.set_margin_end(10) + error_box.append(icon) + error_box.append(label) + self.upper_row.append(error_box) + else: + print("Plot data...") + upper_child = self.upper_row.get_first_child() + middle_child = self.middle_row.get_first_child() + if upper_child is not None and middle_child is not None: + self.upper_row.remove(upper_child) + self.middle_row.remove(middle_child) + current_weather(self.main_window,self.upper_row,self.middle_row,w_data) + forecast_weather(self.middle_row,f_data) + + + def show_preferences(self, action, param): + adw_preferences_window = WeatherPreferences(application) + adw_preferences_window.show() + + + \ No newline at end of file diff --git a/src/windows.py b/src/windows.py new file mode 100644 index 0000000..9c25ab7 --- /dev/null +++ b/src/windows.py @@ -0,0 +1,207 @@ +import gi +gi.require_version('Gtk', '4.0') +gi.require_version('Adw', '1') +from gi.repository import Gtk, Adw,Gio,GLib + +from .constants import API_KEY +from .backend_current_w import fetch_city_info + +def AboutWindow(self, action,*args): + dialog = Adw.AboutWindow() + dialog.set_application_name("Weather") + dialog.set_application_icon("com.github.amit9838") + dialog.set_version("1.0") + dialog.set_developer_name("Amit Chaudhary") + dialog.set_license_type(Gtk.License(Gtk.License.GPL_3_0)) + dialog.set_comments("Beautiful and light weight weather app build using Gtk and python.") + dialog.set_website("") + dialog.set_issue_url("") + # dialog.add_credit_section("Contributors", ["name url"]) + # dialog.set_translator_credits("Name1 url") + dialog.set_copyright("© 2023 developer") + dialog.set_developers(["Amit Chaudhary"]) + dialog.show() + +class WeatherPreferences(Adw.PreferencesWindow): + def __init__(self, parent, **kwargs): + super().__init__(**kwargs) + self.parent = parent + self.set_transient_for(parent) + self.set_default_size(600, 500) + + global selected_city,settings,added_cities,cities + settings = Gio.Settings.new("com.github.amit9838") + selected_city = int(str(settings.get_value('selected-city'))) + added_cities = list(settings.get_value('added-cities')) + use_gradient = settings.get_boolean('use-gradient-bg') + + cities = [x.split(',')[0] for x in added_cities] + + appearance_page = Adw.PreferencesPage(); + appearance_page.set_title("Appearance") + appearance_page.set_icon_name('applications-graphics-symbolic') + self.add(appearance_page); + + + self.appearance_grp = Adw.PreferencesGroup(); + appearance_page.add(self.appearance_grp); + + gradient_row = Adw.ActionRow.new() + gradient_row.set_activatable(True) + gradient_row.set_title("Use Dynamic Background") + gradient_row.set_subtitle("Background Changes based on weather conditions (Reastart required)") + + self.g_switch_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,valign=Gtk.Align.CENTER) + self.gradient_switch = Gtk.Switch() + self.gradient_switch.set_active(use_gradient) + self.gradient_switch.connect("state-set",self.use_gradient_bg) + self.g_switch_box.append(self.gradient_switch) + gradient_row.add_suffix(self.g_switch_box) + self.appearance_grp.add(gradient_row) + + location_page = Adw.PreferencesPage() + location_page.set_title("Locations") + location_page.set_icon_name('mark-location-symbolic') + + self.add(location_page); + self.location_grp = Adw.PreferencesGroup() + self.location_grp.set_title("Locations") + location_page.add(self.location_grp); + + add_loc_btn = Gtk.Button() + add_loc_btn_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,valign=Gtk.Align.CENTER,spacing=4) + # Create a label + label = Gtk.Label(label="Add") + add_loc_btn_box.append(label) + # Create an icon + add_icon = Gtk.Image.new_from_icon_name("list-add-symbolic") + add_icon.set_pixel_size(14) + add_loc_btn_box.append(add_icon) + add_loc_btn.set_child(add_loc_btn_box) + add_loc_btn.connect('clicked',self.add_location_dialog) + + self.location_grp.set_header_suffix(add_loc_btn) + + self.location_rows = [] + self.refresh_cities_list(added_cities) + + + def refresh_cities_list(self,data): + if len(self.location_rows)>0: + for action_row in self.location_rows: + self.location_grp.remove(action_row) + + for city in added_cities: + button = Gtk.Button() + button.set_icon_name("edit-delete-symbolic") + button.set_tooltip_text("Remove location") + button.set_has_frame(False) + box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,valign=Gtk.Align.CENTER) + if added_cities[selected_city] == city: + check_icon = Gtk.Image() + check_icon.set_from_icon_name("emblem-ok-symbolic") # Set the icon name and size + # icon.set_hexpand(True) + check_icon.set_pixel_size(18) + check_icon.set_margin_end(15) + box.append(check_icon) + box.append(button) + + location_row = Adw.ActionRow.new() + location_row.set_activatable(True) + location_row.set_title(f"{city.split(',')[0]},{city.split(',')[1]}") + location_row.set_subtitle(f"{city.split(',')[-2]},{city.split(',')[-1]}") + location_row.add_suffix(box) + self.location_rows.append(location_row) + self.location_grp.add(location_row); + button.connect("clicked", self.remove_city,location_row) + + def add_location_dialog(self,parent): + self._dialog = Adw.PreferencesWindow() + self._dialog.set_search_enabled(False) + self._dialog.set_title(title='Add new location') + self._dialog.set_transient_for(self) + self._dialog.set_default_size(300, 500) + + self._dialog.page = Adw.PreferencesPage() + self._dialog.add(self._dialog.page) + + self._dialog.group = Adw.PreferencesGroup() + self._dialog.page.add(self._dialog.group) + + search_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,valign=Gtk.Align.CENTER, spacing = 6) + search_box.set_hexpand(True) + search_box.set_margin_bottom(10) + self._dialog.group.add(search_box) + + self.search_entry = Gtk.Entry() + self.search_entry.set_placeholder_text("Search for a city") + self.search_entry.set_hexpand(True) + search_box.append(self.search_entry) + + button = Gtk.Button(label="Search") + search_box.append(button) + + self._dialog.serach_res_grp = Adw.PreferencesGroup() + self._dialog.serach_res_grp.set_hexpand(True) + self._dialog.group.add(self._dialog.serach_res_grp) + + button.connect("clicked", self.find_city) + self._dialog.search_results = [] + + self._dialog.show() + + def find_city(self,widget): + text = self.search_entry.get_text() + city_data = fetch_city_info(API_KEY,text) + + if len(self._dialog.search_results)>0: + for action_row in self._dialog.search_results: + self._dialog.serach_res_grp.remove(action_row) + + for i,loc in enumerate(city_data): + res_row = Adw.ActionRow.new() + res_row.set_activatable(True) + title = f"{loc['name']},{loc['country']}" + res_row.set_title(title) + res_row.connect("activated", self.add_city) + res_row.set_subtitle(f"{loc['lat']},{loc['lon']}") + self._dialog.search_results.append(res_row) + self._dialog.serach_res_grp.add(res_row); + + + def add_city(self,widget): + loc_city = f"{widget.get_title()},{widget.get_subtitle()}" + if loc_city not in added_cities: + added_cities.append(loc_city) + settings.set_value("added-cities",GLib.Variant("as",added_cities)) + self.refresh_cities_list(added_cities) + self.parent.fetch_weather_data() + + def remove_city(self,btn,widget): + global selected_city + city = f"{widget.get_title()},{widget.get_subtitle()}" + s_city = added_cities[selected_city] + added_cities.remove(city) + try: + selected_city = added_cities.index(s_city) + except: + selected_city = 0 + settings.set_value("selected-city",GLib.Variant("i",selected_city)) + settings.set_value("added-cities",GLib.Variant("as",added_cities)) + self.refresh_cities_list(added_cities) + self.parent.fetch_weather_data() + + + def use_gradient_bg(self,widget,state): + print(state) + settings.set_value("use-gradient-bg",GLib.Variant("b",state)) + + +# data = [{'name': 'Delhi', +# 'local_names': {'ko': '델리', 'he': 'דלהי', 'fa': 'دهلی', 'pa': 'ਦਿੱਲੀ', 'kn': 'ದೆಹಲಿ', 'el': 'Δελχί', 'en': 'Delhi', 'ta': 'தில்லி', 'hi': 'दिल्ली', 'th': 'เดลี', 'bn': 'দিল্লি', 'fr': 'Delhi', 'ja': 'デリー', 'ru': 'Дели', 'ur': 'دہلی', 'uk': 'Делі', 'de': 'Delhi', 'cs': 'Dillí', 'oc': 'Delhi', 'eo': 'Delhio', 'es': 'Delhi', 'ms': 'Delhi', 'ml': 'ഡെൽഹി', 'pt': 'Deli', 'te': 'ఢిల్లీ', 'ku': 'Delhî', 'ne': 'दिल्ली', 'ar': 'دلهي', 'my': 'ဒေလီမြို့', 'zh': '德里', 'lv': 'Deli'}, +# 'lat': 28.6517178, 'lon': 77.2219388, 'country': 'IN', 'state': 'Delhi'}, + +# {'name': 'Del', 'lat': 7.8280947, 'lon': 35.8220579, 'country': 'ET'}, +# {'name': 'Del', 'lat': 45.7692659, 'lon': 7.5569758, 'country': 'IT', 'state': 'Aosta Valley'}, +# {'name': 'Del', 'lat': 43.1167167, 'lon': -8.4662065, 'country': 'ES', 'state': 'Galicia'}, +# {'name': 'Del', 'lat': 46.6390735, 'lon': 9.567217, 'country': 'CH', 'state': 'Grisons'}]