diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,4 +33,3 @@ install( DIRECTORY image/breeze DESTINATION ${ICON_INSTALL_DIR}) install( DIRECTORY image/breeze-dark DESTINATION ${ICON_INSTALL_DIR}) -install( DIRECTORY mycroft DESTINATION /opt ) diff --git a/PACKAGING.readme b/PACKAGING.readme --- a/PACKAGING.readme +++ b/PACKAGING.readme @@ -8,17 +8,22 @@ qml-module-qtwebsockets qml-module-qt-websockets qtdeclarative5-qtquick2-plugin -qtdeclarative5-models-plugin +qtdeclarative5-models-plugin +gettext cmake cmake-extras cmake-data qml-module-qtquick-layouts libkf5plasma-dev extra-cmake-modules qtdeclarative5-dev - -(Plasma Mycroft Skills) Debian Packaging Requirements: - +qml-module-qtwebkit +libqt5webkit5-qmlwebkitplugin +libqt5webkit5 +libqt5webkit5-dev +libkf5i18n-data +libkf5i18n-dev +libkf5i18n5 python-dbus python-pyqt5 pyqt5-dev diff --git a/Readme.md b/Readme.md --- a/Readme.md +++ b/Readme.md @@ -7,9 +7,9 @@ + Download / Clone Mycroft Plasmoid from this REPO. + Unzip to folder if Downloaded - + For KDE NEON / (Kubuntu 16.10 not Supported does not have required packages even in backports, Upgrade to 17.04): sudo apt-get install libkf5notifications-data libkf5notifications-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qtwebsockets qml-module-qt-websockets qtdeclarative5-qtquick2-plugin qtdeclarative5-models-plugin cmake cmake-extras cmake-data qml-module-qtquick-layouts libkf5plasma-dev extra-cmake-modules qtdeclarative5-dev + + For KDE NEON / (Kubuntu 16.10 not Supported does not have required packages even in backports, Upgrade to 17.04): sudo apt-get install libkf5notifications-data libkf5notifications-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qtwebsockets qml-module-qt-websockets qtdeclarative5-qtquick2-plugin qtdeclarative5-models-plugin cmake cmake-extras cmake-data qml-module-qtquick-layouts libkf5plasma-dev extra-cmake-modules qtdeclarative5-dev build-essential g++ gettext libqt5webkit5-qmlwebkitplugin libqt5webkit5 libqt5webkit5-dev libkf5i18n-data libkf5i18n-dev libkf5i18n5 -y - + For Fedora 25: sudo dnf install kf5-knotifications-devel qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtquick1-devel qt5-qtquickcontrols qt5-qtquickcontrols2 qt5-qtwebsockets cmake extra-cmake-modules kf5-plasma-devel + + For Fedora 25: sudo dnf install kf5-knotifications-devel qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtquick1-devel qt5-qtquickcontrols qt5-qtquickcontrols2 qt5-qtwebsockets cmake extra-cmake-modules kf5-plasma-devel kf5-i18n-devel qt5-qtwebkit qt5-qtwebkit-devel 2. Installation Instructions [Go To Downloaded Plasmoid Folder and run the following commands] @@ -27,14 +27,23 @@ Note: This plasmoids default find location for mycroft-core services is /home/$USER/mycroft-core/. This can be changed as per your installation path of mycroft-core in the settings tab. -3. Skills Dependency Requirements + +3. Skills Installation + + + For Krunner Skill: Install from Plasmoid (Follow Dependency Installation Below). Skill Name: Krunner-Search-Skill + + For Activities Skill: Install from Plasmoid (Follow Dependency Installation Below). Skill Name: Plasma-Activities-Skill + + For User Control Skill: Install from Plasmoid (Follow Dependency Installation Below). Skill Name: Plasma-User-Control-Skill + + For Wallpaper Change Skill: Install from Plasmoid (Follow Dependency Installation Below). Skill Name: Unsplash-Wallpaper-Plasma-Skill + + For Image Recognition Skill: Follow Instructions at: https://github.com/AIIX/clarifai-image-recognition-skill + +4. Skills Dependency Requirements + For Skills (KDE Neon): sudo apt install python-dbus, python-pyqt5 pyqt5-dev, python-sip, python-sip-dev + From Konsole: cp -R /usr/lib/python2.7/dist-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ + From Konsole: cp /usr/lib/python2.7/dist-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ + From Konsole: cp -R /usr/lib/python2.7/dist-packages/PyQt5* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ + From Konsole: cp /usr/lib/python2.7/dist-packages/sip* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -4. Skills Dependency for Other Distributions +5. Skills Dependency for Other Distributions Python Dbus, PyQT5 and SIP package is required and copying the Python Dbus, Python QT folder and SIP libs from your system python install over to /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/. diff --git a/image/breeze-dark/apps/16/mycroft-plasma-appicon.svg b/image/breeze-dark/apps/16/mycroft-plasma-appicon.svg --- a/image/breeze-dark/apps/16/mycroft-plasma-appicon.svg +++ b/image/breeze-dark/apps/16/mycroft-plasma-appicon.svg @@ -1,4 +1,6 @@ + + + inkscape:version="0.91 r13725" + width="16" + height="16" + viewBox="0 0 16 16" + sodipodi:docname="mycroft-plasma-appicon-16.svg"> + id="metadata3814"> @@ -25,6 +29,8 @@ + - - - - - - - + inkscape:current-layer="svg3808" /> + - + id="g3818"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/image/breeze-dark/apps/32/mycroft-plasma-appicon.svg b/image/breeze-dark/apps/32/mycroft-plasma-appicon.svg --- a/image/breeze-dark/apps/32/mycroft-plasma-appicon.svg +++ b/image/breeze-dark/apps/32/mycroft-plasma-appicon.svg @@ -10,13 +10,27 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="32" + id="svg3397" version="1.1" + inkscape:version="0.91 r13725" + width="32" height="32" - id="svg20" - sodipodi:docname="mycroft-plasma-appicon.svg" viewBox="0 0 32 32" - inkscape:version="0.92pre3 r"> + sodipodi:docname="mycroft-plasma-appicon.svg"> + + + + image/svg+xml + + + + + + - - - - - image/svg+xml - - - - - + inkscape:current-layer="svg3397" /> + - + id="g3730"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/image/breeze/apps/16/mycroft-plasma-appicon.svg b/image/breeze/apps/16/mycroft-plasma-appicon.svg --- a/image/breeze/apps/16/mycroft-plasma-appicon.svg +++ b/image/breeze/apps/16/mycroft-plasma-appicon.svg @@ -1,4 +1,6 @@ + + + inkscape:version="0.91 r13725" + width="16" + height="16" + viewBox="0 0 16 16" + sodipodi:docname="mycroft-plasma-appicon-16.svg"> + id="metadata3814"> @@ -25,6 +29,8 @@ + - - - - - - - + inkscape:current-layer="svg3808" /> + - + id="g3818"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/image/breeze/apps/32/mycroft-plasma-appicon.svg b/image/breeze/apps/32/mycroft-plasma-appicon.svg --- a/image/breeze/apps/32/mycroft-plasma-appicon.svg +++ b/image/breeze/apps/32/mycroft-plasma-appicon.svg @@ -10,13 +10,27 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="32" + id="svg3397" version="1.1" + inkscape:version="0.91 r13725" + width="32" height="32" - id="svg20" - sodipodi:docname="mycroft-plasma-appicon.svg" viewBox="0 0 32 32" - inkscape:version="0.92pre3 r"> + sodipodi:docname="mycroft-plasma-appicon.svg"> + + + + image/svg+xml + + + + + + - - - - - image/svg+xml - - - - - + inkscape:current-layer="svg3397" /> + - + id="g3730"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mycroft/skills/mycroft-activities-plasma-skill/.directory b/mycroft/skills/mycroft-activities-plasma-skill/.directory deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/.directory +++ /dev/null @@ -1,6 +0,0 @@ -[Dolphin] -Timestamp=2017,2,21,5,6,50 -Version=3 - -[Settings] -HiddenFilesShown=true diff --git a/mycroft/skills/mycroft-activities-plasma-skill/LICENSE b/mycroft/skills/mycroft-activities-plasma-skill/LICENSE deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - 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. - - {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 . - -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: - - {project} Copyright (C) {year} {fullname} - 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/mycroft/skills/mycroft-activities-plasma-skill/README.md b/mycroft/skills/mycroft-activities-plasma-skill/README.md deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# mycroft-activities-plasma-skill -This skill integrates Plasma 5 Activities with Mycroft which enables users to create activities and display activities via Mycroft. - -#### Installation of skill: -* Download or Clone Git -* Create /opt/mycroft/skills folder if it does not exist -* Extract Downloaded Skill into a folder. "mycroft-activites-plasma-skill". (Clone does not require this step) -* Copy the mycroft-activities-plasma-skill folder to /opt/mycroft/skills/ folder - -#### Installation of requirements: -##### Fedora: -- sudo dnf install dbus-python -- From terminal: cp -R /usr/lib64/python2.7/site-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib64/python2.7/site-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -##### Kubuntu / KDE Neon: -- sudo apt install python-dbus -- From terminal: cp -R /usr/lib/python2.7/dist-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib/python2.7/dist-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -* For other distributions: -- Python Dbus package is required and copying the Python Dbus folder and lib from your system python install over to /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/. - -##### How To Use: -###### Create Activities -- "Hey Mycroft, create a new activity 'Activity Name'" -- "Hey Mycroft, create activity 'Activity Name' " - -###### Display Activities -- "Hey Mycroft, show current activities " -- "Hey Mycroft, display activities " - -## Current state - -Working features: -* Create Activities -* Show Activities - -Known issues: -* None - -TODO: -* Stop Activity -* Remove Activity -* Switch Activity diff --git a/mycroft/skills/mycroft-activities-plasma-skill/__init__.py b/mycroft/skills/mycroft-activities-plasma-skill/__init__.py deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -import sys -import dbus -import glib -from traceback import print_exc -from os.path import dirname -from adapt.intent import IntentBuilder -from mycroft.skills.core import MycroftSkill -from mycroft.util.log import getLogger - -__author__ = 'aix' -catchInput = " " - -LOGGER = getLogger(__name__) - -class ActivitiesPlasmaDesktopSkill(MycroftSkill): - - # The constructor of the skill, which calls MycroftSkill's constructor - def __init__(self): - super(ActivitiesPlasmaDesktopSkill, self).__init__(name="ActivitiesPlasmaDesktopSkill") - - # This method loads the files needed for the skill's functioning, and - # creates and registers each intent that the skill uses - def initialize(self): - self.load_data_files(dirname(__file__)) - - activities_create_plasma_skill_intent = IntentBuilder("ActivitiesKeywordIntent").\ - require("ActivitiesCreateKeyword").build() - self.register_intent(activities_create_plasma_skill_intent, self.handle_activities_create_plasma_skill_intent) - - activities_show_plasma_skill_intent = IntentBuilder("ShowActivitiesIntent").\ - require("ActivitiesShowKeyword").build() - self.register_intent(activities_show_plasma_skill_intent, self.handle_activities_show_plasma_skill_intent) - - activities_remove_plasma_skill_intent = IntentBuilder("RemoveActivitiesIntent").\ - require("ActivitiesRemoveKeyword").build() - self.register_intent(activities_remove_plasma_skill_intent, self.handle_activities_remove_plasma_skill_intent) - - activities_stop_plasma_skill_intent = IntentBuilder("StopActivitiesIntent").\ - require("ActivitiesStopKeyword").build() - self.register_intent(activities_stop_plasma_skill_intent, self.handle_activities_stop_plasma_skill_intent) - - activities_switch_plasma_skill_intent = IntentBuilder("SwitchActivitiesIntent").\ - require("ActivitiesSwitchKeyword").build() - self.register_intent(activities_switch_plasma_skill_intent, self.handle_activities_switch_plasma_skill_intent) - - def handle_activities_create_plasma_skill_intent(self, message): - utterance = message.data.get('utterance').lower() - utterance = utterance.replace( - message.data.get('ActivitiesCreateKeyword'), '') - searchString = utterance - - bus = dbus.SessionBus() - remote_object = bus.get_object("org.kde.ActivityManager","/ActivityManager/Activities") - remote_object.AddActivity(searchString, dbus_interface = "org.kde.ActivityManager.Activities") - remote_object2 = bus.get_object("org.kde.plasmashell", "/PlasmaShell") - remote_object2.toggleActivityManager(dbus_interface = "org.kde.PlasmaShell") - - self.speak_dialog("activities.create", data={'CreateActivityName': searchString}) - - def handle_activities_show_plasma_skill_intent(self, message): - bus = dbus.SessionBus() - remote_object2 = bus.get_object("org.kde.plasmashell", "/PlasmaShell") - remote_object2.toggleActivityManager(dbus_interface = "org.kde.PlasmaShell") - - self.speak_dialog("activities.show") - - def handle_activities_remove_plasma_skill_intent(self, message): - searchString = "Not Implemented WIP" - self.speak_dialog("activities.remove", data={'RemoveActivityName': searchString}) - - def handle_activities_stop_plasma_skill_intent(self, message): - searchString = "Not Implemented WIP" - self.speak_dialog("activities.stop", data={'StopActivityName': searchString}) - - def handle_activities_switch_plasma_skill_intent(self, message): - searchString = "Not Implemented WIP" - self.speak_dialog("activities.switch", data={'SwitchActivityName': searchString}) - - def stop(self): - pass - -# The "create_skill()" method is used to create an instance of the skill. -# Note that it's outside the class itself. -def create_skill(): - return ActivitiesPlasmaDesktopSkill() diff --git a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.create.dialog b/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.create.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.create.dialog +++ /dev/null @@ -1 +0,0 @@ -Your Activity {{ ActivityName }} Has Been Created diff --git a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.remove.dialog b/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.remove.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.remove.dialog +++ /dev/null @@ -1 +0,0 @@ -Activity has been removed diff --git a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.show.dialog b/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.show.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.show.dialog +++ /dev/null @@ -1 +0,0 @@ -Displaying Activities diff --git a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.stop.dialog b/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.stop.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.stop.dialog +++ /dev/null @@ -1 +0,0 @@ -{{ StopActivityName }} activity has been stopped diff --git a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.switch.dialog b/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.switch.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/dialog/en-us/activities.switch.dialog +++ /dev/null @@ -1 +0,0 @@ -{{ SwitchActivityName }} has been activated diff --git a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample1.intent.json b/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample1.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample1.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "create", - "intent_type": "ActivitiesKeywordIntent", - "intent": { - "ActivitiesCreateKeyword": "a new activity" - } -} diff --git a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample2.intent.json b/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample2.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample2.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "show current", - "intent_type": "ShowActivitiesIntent", - "intent": { - "ActivitiesShowKeyword": "activity" - } -} diff --git a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample3.intent.json b/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample3.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample3.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "remove", - "intent_type": "RemoveActivitiesIntent", - "intent": { - "ActivitiesRemoveKeyword": "activity" - } -} diff --git a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample4.intent.json b/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample4.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample4.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "stop current", - "intent_type": "StopActivitiesIntent", - "intent": { - "ActivitiesStopKeyword": "activity" - } -} diff --git a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample5.intent.json b/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample5.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/test/intent/sample5.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "switch current", - "intent_type": "SwitchActivitiesIntent", - "intent": { - "ActivitiesSwitchKeyword": "activity" - } -} diff --git a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesCreateKeyword.voc b/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesCreateKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesCreateKeyword.voc +++ /dev/null @@ -1,9 +0,0 @@ -create a new activity -create new activity -create activity -start a new activity -create new activities -start new activities -create activities -new activity -new activities diff --git a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesRemoveKeyword.voc b/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesRemoveKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesRemoveKeyword.voc +++ /dev/null @@ -1,4 +0,0 @@ -remove activity -remove the activity -delete activity -delete the activity diff --git a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesShowKeyword.voc b/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesShowKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesShowKeyword.voc +++ /dev/null @@ -1,5 +0,0 @@ -show current activities -show activities -activities -display current activities -display activities diff --git a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesStopKeyword.voc b/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesStopKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesStopKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -stop current activity -stop activity diff --git a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesSwitchKeyword.voc b/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesSwitchKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-activities-plasma-skill/vocab/en-us/ActivitiesSwitchKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -switch current activity -switch activity diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/LICENSE b/mycroft/skills/mycroft-amarok-player-plasma-skill/LICENSE deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - 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. - - {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 . - -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: - - {project} Copyright (C) {year} {fullname} - 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/mycroft/skills/mycroft-amarok-player-plasma-skill/README.md b/mycroft/skills/mycroft-amarok-player-plasma-skill/README.md deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# mycroft-amarok-player-plasma-skill -This skill integrates Amarok Music Player with Mycroft which enables users to Play Local Music. - -#### Installation of skill: -* Download or Clone Git -* Create /opt/mycroft/skills folder if it does not exist -* Extract Downloaded Skill into a folder. "mycroft-amarok-player-plasma-skill". (Clone does not require this step) -* Copy the mycroft-internals-plasma-skill folder to /opt/mycroft/skills/ folder - -#### Installation of requirements: -##### Fedora: -- sudo dnf install dbus-python -- sudo dnf install python-psutil -- From terminal: cp -R /usr/lib64/python2.7/site-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib64/python2.7/site-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -##### Kubuntu / KDE Neon: -- sudo apt install python-psutil -- sudo apt install python-dbus -- From terminal: cp -R /usr/lib/python2.7/dist-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib/python2.7/dist-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -* For other distributions: -- Python Dbus and Python Psutil package is required and copying the Python Dbus folder and lib from your system python install over to /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/. - -##### How To Use: -###### Play Music/Song -- "Hey Mycroft, amarock play music" -- "Hey Mycroft, amarock play song" - -###### Pause Music/Song -- "Hey Mycroft, amarock pause music" -- "Hey Mycroft, amarock pause song" - -###### Stop Music/Song -- "Hey Mycroft, amarock stop music" -- "Hey Mycroft, amarock stop song" - -###### Next Song -- "Hey Mycroft, amarock next song" - -###### Previous Song -- "Hey Mycroft, amarock previous song" - -## Current state - -Working features: -* Play Music -* Pause Music -* Stop Music -* Next Song -* Previous Song - -Known issues: -* None - -TODO: -* None diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/__init__.py b/mycroft/skills/mycroft-amarok-player-plasma-skill/__init__.py deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/__init__.py +++ /dev/null @@ -1,109 +0,0 @@ -import sys -import dbus -import glib -import os -import psutil -from traceback import print_exc -from os.path import dirname -from adapt.intent import IntentBuilder -from mycroft.skills.core import MycroftSkill -from mycroft.util.log import getLogger - -__author__ = 'aix' - -LOGGER = getLogger(__name__) - -class AmarokMusicPlayerSkill(MycroftSkill): - - # The constructor of the skill, which calls MycroftSkill's constructor - def __init__(self): - super(AmarokMusicPlayerSkill, self).__init__(name="AmarokMusicPlayerSkill") - - # This method loads the files needed for the skill's functioning, and - # creates and registers each intent that the skill uses - def initialize(self): - self.load_data_files(dirname(__file__)) - - internals_amarok_play_skill_intent = IntentBuilder("AmarokPlayKeywordIntent").\ - require("AmarokPlayKeyword").build() - self.register_intent(internals_amarok_play_skill_intent, self.handle_internals_amarok_play_skill_intent) - - internals_amarok_stop_skill_intent = IntentBuilder("AmarokStopKeywordIntent").\ - require("AmarokStopKeyword").build() - self.register_intent(internals_amarok_stop_skill_intent, self.handle_internals_amarok_stop_skill_intent) - - internals_amarok_next_skill_intent = IntentBuilder("AmarokNextKeywordIntent").\ - require("AmarokNextKeyword").build() - self.register_intent(internals_amarok_next_skill_intent, self.handle_internals_amarok_next_skill_intent) - - internals_amarok_previous_skill_intent = IntentBuilder("AmarokPreviousKeywordIntent").\ - require("AmarokPreviousKeyword").build() - self.register_intent(internals_amarok_previous_skill_intent, self.handle_internals_amarok_previous_skill_intent) - - internals_amarok_pause_skill_intent = IntentBuilder("AmarokPauseKeywordIntent").\ - require("AmarokPauseKeyword").build() - self.register_intent(internals_amarok_pause_skill_intent, self.handle_internals_amarok_pause_skill_intent) - - - def handle_internals_amarok_play_skill_intent(self, message): - self.speak_dialog("amarok.play") - amarokRunning = False - - for proc in psutil.process_iter(): - pinfo = proc.as_dict(attrs=['pid', 'name']) - if pinfo['name'] == 'amarok': - amarokRunning = True - - if amarokRunning: - #print('yes') - def runplay(): - bus = dbus.SessionBus() - remote_object = bus.get_object("org.mpris.MediaPlayer2.amarok","/org/mpris/MediaPlayer2") - remote_object.Play(dbus_interface = "org.mpris.MediaPlayer2.Player") - runplay() - - else: - def runprocandplay(): - os.system("amarok") - bus = dbus.SessionBus() - remote_object = bus.get_object("org.mpris.MediaPlayer2.amarok","/org/mpris/MediaPlayer2") - remote_object.Play(dbus_interface = "org.mpris.MediaPlayer2.Player") - runprocandplay() - - def handle_internals_amarok_stop_skill_intent(self, message): - bus = dbus.SessionBus() - remote_object = bus.get_object("org.mpris.MediaPlayer2.amarok","/org/mpris/MediaPlayer2") - remote_object.Stop(dbus_interface = "org.mpris.MediaPlayer2.Player") - - self.speak_dialog("amarok.stop") - - def handle_internals_amarok_next_skill_intent(self, message): - bus = dbus.SessionBus() - remote_object = bus.get_object("org.mpris.MediaPlayer2.amarok","/org/mpris/MediaPlayer2") - remote_object.Next(dbus_interface = "org.mpris.MediaPlayer2.Player") - - self.speak_dialog("amarok.next") - - def handle_internals_amarok_previous_skill_intent(self, message): - - bus = dbus.SessionBus() - remote_object = bus.get_object("org.mpris.MediaPlayer2.amarok","/org/mpris/MediaPlayer2") - remote_object.Previous(dbus_interface = "org.mpris.MediaPlayer2.Player") - - self.speak_dialog("amarok.previous") - - def handle_internals_amarok_pause_skill_intent(self, message): - - bus = dbus.SessionBus() - remote_object = bus.get_object("org.mpris.MediaPlayer2.amarok","/org/mpris/MediaPlayer2") - remote_object.Pause(dbus_interface = "org.mpris.MediaPlayer2.Player") - - self.speak_dialog("amarok.pause") - - def stop(self): - pass - -# The "create_skill()" method is used to create an instance of the skill. -# Note that it's outside the class itself. -def create_skill(): - return AmarokMusicPlayerSkill() diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.next.dialog b/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.next.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.next.dialog +++ /dev/null @@ -1 +0,0 @@ -Playing Next Song diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.pause.dialog b/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.pause.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.pause.dialog +++ /dev/null @@ -1 +0,0 @@ -Song Paused diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.play.dialog b/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.play.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.play.dialog +++ /dev/null @@ -1 +0,0 @@ -Playing Music diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.previous.dialog b/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.previous.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.previous.dialog +++ /dev/null @@ -1 +0,0 @@ -Playing Previous Song diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.stop.dialog b/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.stop.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/dialog/en-us/amarok.stop.dialog +++ /dev/null @@ -1 +0,0 @@ -Music Stopped diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample1.intent.json b/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample1.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample1.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "amarok play", - "intent_type": "AmarokPlayKeywordIntent", - "intent": { - "AmarokPlayKeyword": "music" - } -} diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample2.intent.json b/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample2.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample2.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "amarok stop", - "intent_type": "AmarokStopKeywordIntent", - "intent": { - "AmarokStopKeyword": "music" - } -} diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample3.intent.json b/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample3.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample3.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "amarok next", - "intent_type": "AmarokNextKeywordIntent", - "intent": { - "AmarokNextKeyword": "song" - } -} diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample4.intent.json b/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample4.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample4.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "amarok previous", - "intent_type": "AmarokPreviousKeywordIntent", - "intent": { - "AmarokPreviousKeyword": "song" - } -} diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample5.intent.json b/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample5.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/test/intent/sample5.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "amarok pause", - "intent_type": "AmarokPauseKeywordIntent", - "intent": { - "AmarokPauseKeyword": "song" - } -} diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokNextKeyword.voc b/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokNextKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokNextKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -next song -next music diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPauseKeyword.voc b/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPauseKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPauseKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -pause song -pause music diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPlayKeyword.voc b/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPlayKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPlayKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -play song -play music diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPreviousKeyword.voc b/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPreviousKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokPreviousKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -previous song -previous music diff --git a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokStopKeyword.voc b/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokStopKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-amarok-player-plasma-skill/vocab/en-us/AmarokStopKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -stop song -stop music diff --git a/mycroft/skills/mycroft-internals-plasma-skill/.directory b/mycroft/skills/mycroft-internals-plasma-skill/.directory deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/.directory +++ /dev/null @@ -1,6 +0,0 @@ -[Dolphin] -Timestamp=2017,2,21,5,7,7 -Version=3 - -[Settings] -HiddenFilesShown=true diff --git a/mycroft/skills/mycroft-internals-plasma-skill/LICENSE b/mycroft/skills/mycroft-internals-plasma-skill/LICENSE deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - 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. - - {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 . - -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: - - {project} Copyright (C) {year} {fullname} - 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/mycroft/skills/mycroft-internals-plasma-skill/README.md b/mycroft/skills/mycroft-internals-plasma-skill/README.md deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# mycroft-internals-plasma-skill -This skill integrates Plasma 5 Desktop Internals with Mycroft which enables users to Lock Screen, Switch Users and Logout of the Desktop. - -#### Installation of skill: -* Download or Clone Git -* Create /opt/mycroft/skills folder if it does not exist -* Extract Downloaded Skill into a folder. "mycroft-internals-plasma-skill". (Clone does not require this step) -* Copy the mycroft-internals-plasma-skill folder to /opt/mycroft/skills/ folder - -#### Installation of requirements: -##### Fedora: -- sudo dnf install dbus-python -- From terminal: cp -R /usr/lib64/python2.7/site-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib64/python2.7/site-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -##### Kubuntu / KDE Neon: -- sudo apt install python-dbus -- From terminal: cp -R /usr/lib/python2.7/dist-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib/python2.7/dist-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -* For other distributions: -- Python Dbus package is required and copying the Python Dbus folder and lib from your system python install over to /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/. - -##### How To Use: -###### Lockscreen -- "Hey Mycroft, lock the screen" -- "Hey Mycroft, lock screen " - -###### Switch Users -- "Hey Mycroft, switch current user " -- "Hey Mycroft, switch user " - -###### Logout Users -- "Hey Mycroft, logout of the current session " -- "Hey Mycroft, logout session " - -## Current state - -Working features: -* Lock Screen -* Switch Users -* Logout - -Known issues: -* None - -TODO: -* None diff --git a/mycroft/skills/mycroft-internals-plasma-skill/__init__.py b/mycroft/skills/mycroft-internals-plasma-skill/__init__.py deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/__init__.py +++ /dev/null @@ -1,65 +0,0 @@ -import sys -import dbus -import glib -from traceback import print_exc -from os.path import dirname -from adapt.intent import IntentBuilder -from mycroft.skills.core import MycroftSkill -from mycroft.util.log import getLogger - -__author__ = 'aix' - -LOGGER = getLogger(__name__) - -class InternalsPlasmaDesktopSkill(MycroftSkill): - - # The constructor of the skill, which calls MycroftSkill's constructor - def __init__(self): - super(InternalsPlasmaDesktopSkill, self).__init__(name="InternalsPlasmaDesktopSkill") - - # This method loads the files needed for the skill's functioning, and - # creates and registers each intent that the skill uses - def initialize(self): - self.load_data_files(dirname(__file__)) - - internals_switchuser_plasma_skill_intent = IntentBuilder("SwitchUserKeywordIntent").\ - require("InternalSwitchUserKeyword").build() - self.register_intent(internals_switchuser_plasma_skill_intent, self.handle_internals_switchuser_plasma_skill_intent) - - internals_lock_plasma_skill_intent = IntentBuilder("LockKeywordIntent").\ - require("InternalLockDesktopKeyword").build() - self.register_intent(internals_lock_plasma_skill_intent, self.handle_internals_lock_plasma_skill_intent) - - internals_logout_plasma_skill_intent = IntentBuilder("LogoutKeywordIntent").\ - require("InternalLogoutDesktopKeyword").build() - self.register_intent(internals_logout_plasma_skill_intent, self.handle_internals_logout_plasma_skill_intent) - - def handle_internals_switchuser_plasma_skill_intent(self, message): - - bus = dbus.SessionBus() - remote_object = bus.get_object("org.kde.ksmserver","/KSMServer") - remote_object.openSwitchUserDialog(dbus_interface = "org.kde.KSMServerInterface") - - self.speak_dialog("internals.switchuser") - - def handle_internals_logout_plasma_skill_intent(self, message): - bus = dbus.SessionBus() - remote_object = bus.get_object("org.kde.ksmserver","/KSMServer") - remote_object.logout(1, 0, 0, dbus_interface = "org.kde.KSMServerInterface") - - self.speak_dialog("internals.logout") - - def handle_internals_lock_plasma_skill_intent(self, message): - bus = dbus.SessionBus() - remote_object = bus.get_object("org.kde.ksmserver","/ScreenSaver") - remote_object.Lock(dbus_interface = "org.freedesktop.ScreenSaver") - - self.speak_dialog("internals.lock") - - def stop(self): - pass - -# The "create_skill()" method is used to create an instance of the skill. -# Note that it's outside the class itself. -def create_skill(): - return InternalsPlasmaDesktopSkill() diff --git a/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.lock.dialog b/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.lock.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.lock.dialog +++ /dev/null @@ -1 +0,0 @@ -Screen Locked diff --git a/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.logout.dialog b/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.logout.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.logout.dialog +++ /dev/null @@ -1 +0,0 @@ -Logging Out diff --git a/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.switchuser.dialog b/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.switchuser.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/dialog/en-us/internals.switchuser.dialog +++ /dev/null @@ -1 +0,0 @@ -Displaying Switch User Dialog diff --git a/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample1.intent.json b/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample1.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample1.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "lock", - "intent_type": "LockKeywordIntent", - "intent": { - "InternalLockDesktopKeyword": "screen" - } -} diff --git a/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample2.intent.json b/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample2.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample2.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "logout", - "intent_type": "LogoutKeywordIntent", - "intent": { - "InternalLogoutDesktopKeyword": "of the current session" - } -} diff --git a/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample3.intent.json b/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample3.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/test/intent/sample3.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "switch", - "intent_type": "SwitchUserKeywordIntent", - "intent": { - "InternalSwitchUserKeyword": "current user" - } -} diff --git a/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalLockDesktopKeyword.voc b/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalLockDesktopKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalLockDesktopKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -lock the screen -lock screen diff --git a/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalLogoutDesktopKeyword.voc b/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalLogoutDesktopKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalLogoutDesktopKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -logout of the current session -logout session diff --git a/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalSwitchUserKeyword.voc b/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalSwitchUserKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-internals-plasma-skill/vocab/en-us/InternalSwitchUserKeyword.voc +++ /dev/null @@ -1,2 +0,0 @@ -switch current user -switch user diff --git a/mycroft/skills/mycroft-krunner-skill/.directory b/mycroft/skills/mycroft-krunner-skill/.directory deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/.directory +++ /dev/null @@ -1,6 +0,0 @@ -[Dolphin] -Timestamp=2017,2,21,5,7,15 -Version=3 - -[Settings] -HiddenFilesShown=true diff --git a/mycroft/skills/mycroft-krunner-skill/LICENSE b/mycroft/skills/mycroft-krunner-skill/LICENSE deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - 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. - - {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 . - -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: - - {project} Copyright (C) {year} {fullname} - 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/mycroft/skills/mycroft-krunner-skill/README.md b/mycroft/skills/mycroft-krunner-skill/README.md deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# mycroft-krunner-skill -This skill integrates Plasma 5 Krunner with Mycroft which enables users to search their local desktop for files, images, recent documents, bookmarks and utilize other krunner plugins. - -#### Installation of skill: -* Download or Clone Git -* Create /opt/mycroft/skills folder if it does not exist -* Extract Downloaded Skill into a folder. "mycroft-krunner-skill". (Clone does not require this step) -* Copy the mycroft-krunner-skill folder to /opt/mycroft/skills/ folder - -#### Installation of requirements: -##### Fedora: -- sudo dnf install dbus-python -- From terminal: cp -R /usr/lib64/python2.7/site-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib64/python2.7/site-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -##### Kubuntu / KDE Neon: -- sudo apt install python-dbus -- From terminal: cp -R /usr/lib/python2.7/dist-packages/dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib/python2.7/dist-packages/_dbus* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -* For other distributions: -- Python Dbus package is required and copying the Python Dbus folder and lib from your system python install over to /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/. - -##### How To Use: -###### General Search -- "Hey Mycroft, search this computer for 'Your Filename' " -- "Hey Mycroft, find file 'Your Filename' " - -###### Recent Documents -- "Hey Mycroft, display recent documents " -- "Hey Mycroft, display recent files " - -###### Bookmarks -- "Hey Mycroft, search the computer for bookmarks " - -## Current state - -Working features: -Search the KDE Plasma 5 Desktop Environment for: -* Files -* Documents -* Bookmarks -* Recent Documents / Recent Files -* Images - -Known issues: -* None - -TODO: -* Seperate image search from File Search -* Narrow down integration to specific individual runners -* Add ability to select a specific file from search list and exec through mycroft diff --git a/mycroft/skills/mycroft-krunner-skill/__init__.py b/mycroft/skills/mycroft-krunner-skill/__init__.py deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/__init__.py +++ /dev/null @@ -1,59 +0,0 @@ -import sys -import dbus -from traceback import print_exc -from os.path import dirname -from adapt.intent import IntentBuilder -from mycroft.skills.core import MycroftSkill -from mycroft.util.log import getLogger - -__author__ = 'aix' - -LOGGER = getLogger(__name__) - - -class KrunnerPlasmaDesktopSkill(MycroftSkill): - - # The constructor of the skill, which calls MycroftSkill's constructor - def __init__(self): - super(KrunnerPlasmaDesktopSkill, self).__init__(name="KrunnerPlasmaDesktopSkill") - - # This method loads the files needed for the skill's functioning, and - # creates and registers each intent that the skill uses - def initialize(self): - self.load_data_files(dirname(__file__)) - - krunner_plasma_desktopskill_intent = IntentBuilder("KrunnerKeywordIntent").\ - require("KrunnerPlasmaDesktopSkillKeyword").build() - self.register_intent(krunner_plasma_desktopskill_intent, self.handle_krunner_plasma_desktopskill_intent) - - krunner_plasma_recentskill_intent = IntentBuilder("RecentFilesIntent").\ - require("RecentFileKeyword").build() - self.register_intent(krunner_plasma_recentskill_intent, self.handle_krunner_plasma_recentskill_intent) - - def handle_krunner_plasma_desktopskill_intent(self, message): - utterance = message.data.get('utterance').lower() - utterance = utterance.replace( - message.data.get('KrunnerPlasmaDesktopSkillKeyword'), '') - searchString = utterance - - bus = dbus.SessionBus() - remote_object = bus.get_object("org.kde.krunner","/App") - remote_object.query(searchString + ' ', dbus_interface = "org.kde.krunner.App") - - self.speak_dialog("krunner.search", data={'Query': searchString}) - - - def handle_krunner_plasma_recentskill_intent(self, message): - bus = dbus.SessionBus() - remote_object = bus.get_object("org.kde.krunner","/App") - remote_object.query('recent' + ' ', dbus_interface = "org.kde.krunner.App") - - self.speak_dialog("krunner.recent") - - def stop(self): - pass - -# The "create_skill()" method is used to create an instance of the skill. -# Note that it's outside the class itself. -def create_skill(): - return KrunnerPlasmaDesktopSkill() diff --git a/mycroft/skills/mycroft-krunner-skill/dialog/en-us/krunner.recent.dialog b/mycroft/skills/mycroft-krunner-skill/dialog/en-us/krunner.recent.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/dialog/en-us/krunner.recent.dialog +++ /dev/null @@ -1 +0,0 @@ -Displaying your recent files diff --git a/mycroft/skills/mycroft-krunner-skill/dialog/en-us/krunner.search.dialog b/mycroft/skills/mycroft-krunner-skill/dialog/en-us/krunner.search.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/dialog/en-us/krunner.search.dialog +++ /dev/null @@ -1 +0,0 @@ -I am searching locally for {{ Query }} diff --git a/mycroft/skills/mycroft-krunner-skill/test/intent/sample1.intent.json b/mycroft/skills/mycroft-krunner-skill/test/intent/sample1.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/test/intent/sample1.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "search", - "intent_type": "KrunnerKeywordIntent", - "intent": { - "KrunnerPlasmaDesktopSkillKeyword": "this computer for" - } -} diff --git a/mycroft/skills/mycroft-krunner-skill/test/intent/sample2.intent.json b/mycroft/skills/mycroft-krunner-skill/test/intent/sample2.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/test/intent/sample2.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "display", - "intent_type": "RecentFilesIntent", - "intent": { - "RecentFileKeyword": "recent" - } -} diff --git a/mycroft/skills/mycroft-krunner-skill/vocab/en-us/KrunnerPlasmaDesktopSkillKeyword.voc b/mycroft/skills/mycroft-krunner-skill/vocab/en-us/KrunnerPlasmaDesktopSkillKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/vocab/en-us/KrunnerPlasmaDesktopSkillKeyword.voc +++ /dev/null @@ -1,13 +0,0 @@ -search this computer for -search this -search computer for -search file -search filename -search the computer for -search system -system -system search -system search file -find file -search file - diff --git a/mycroft/skills/mycroft-krunner-skill/vocab/en-us/RecentFileKeyword.voc b/mycroft/skills/mycroft-krunner-skill/vocab/en-us/RecentFileKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-krunner-skill/vocab/en-us/RecentFileKeyword.voc +++ /dev/null @@ -1,6 +0,0 @@ -display recent -display recent files -display recent documents -recent documents -recent files - diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/.directory b/mycroft/skills/mycroft-sendSMS-plasma-skill/.directory deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/.directory +++ /dev/null @@ -1,6 +0,0 @@ -[Dolphin] -Timestamp=2017,2,21,5,7,25 -Version=3 - -[Settings] -HiddenFilesShown=true diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/LICENSE b/mycroft/skills/mycroft-sendSMS-plasma-skill/LICENSE deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - 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. - - {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 . - -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: - - {project} Copyright (C) {year} {fullname} - 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/mycroft/skills/mycroft-sendSMS-plasma-skill/README.md b/mycroft/skills/mycroft-sendSMS-plasma-skill/README.md deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# mycroft-sendSMS-plasma-skill -This skill integrates KDE Connect with Mycroft to enable users to send SMS from their Desktop. - -#### Installation of skill: -* Download or Clone Git -* Create /opt/mycroft/skills folder if it does not exist -* Extract Downloaded Skill into a folder. "mycroft-sendSMS-plasma-skill". (Clone does not require this step) (Follow the Folder Name [Important]) -* Copy the mycroft-sendSMS-plasma-skill folder to /opt/mycroft/skills/ folder - -#### Installation of requirements: -##### Fedora: -- sudo dnf install PyQt5 -- sudo dnf install SIP -- From terminal: cp -R /usr/lib64/python2.7/site-packages/PyQt5* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib64/python2.7/site-packages/sip* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -##### Kubuntu / KDE Neon: -- sudo apt install python-pyqt5 pyqt5-dev -- sudo apt install python-sip python-sip-dev -- From terminal: cp -R /usr/lib/python2.7/dist-packages/PyQt5* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ -- From terminal: cp /usr/lib/python2.7/dist-packages/sip* /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/ - -* For other distributions: -- PyQT5 and SIP package is required and copying the Python QT folder and SIP libs from your system python install over to /home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/. - -##### How To Use: -###### Send SMS -- "Hey Mycroft, send SMS'" -- "Hey Mycroft, send a SMS' " - -## Current state - -Working features: -* Sending SMS - -Known issues: -* None - -TODO: -* None diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/__init__.py b/mycroft/skills/mycroft-sendSMS-plasma-skill/__init__.py deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -import sys -import os -import dbus -from traceback import print_exc -from os.path import dirname -from adapt.intent import IntentBuilder -from mycroft.skills.core import MycroftSkill -from mycroft.util.log import getLogger - -__author__ = 'aix' - -LOGGER = getLogger(__name__) - - -class SendSMSPlasmaDesktopSkill(MycroftSkill): - - # The constructor of the skill, which calls MycroftSkill's constructor - def __init__(self): - super(SendSMSPlasmaDesktopSkill, self).__init__(name="SendSMSPlasmaDesktopSkill") - - # This method loads the files needed for the skill's functioning, and - # creates and registers each intent that the skill uses - def initialize(self): - self.load_data_files(dirname(__file__)) - - sendsms_plasma_desktopskill_intent = IntentBuilder("SendSMSKeywordIntent").\ - require("SendSMSPlasmaDesktopSkillKeyword").build() - self.register_intent(sendsms_plasma_desktopskill_intent, self.handle_sendsms_plasma_desktopskill_intent) - - def handle_sendsms_plasma_desktopskill_intent(self, message): - self.speak_dialog("sendSMS.state") - os.system("python /opt/mycroft/skills/mycroft-sendSMS-plasma-desktop/sendSMS.py") - - - def stop(self): - pass - -# The "create_skill()" method is used to create an instance of the skill. -# Note that it's outside the class itself. -def create_skill(): - return SendSMSPlasmaDesktopSkill() diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/dialog/en-us/sendSMS.state.dialog b/mycroft/skills/mycroft-sendSMS-plasma-skill/dialog/en-us/sendSMS.state.dialog deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/dialog/en-us/sendSMS.state.dialog +++ /dev/null @@ -1 +0,0 @@ -Opening SMS Dialog diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/sendSMS.py b/mycroft/skills/mycroft-sendSMS-plasma-skill/sendSMS.py deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/sendSMS.py +++ /dev/null @@ -1,94 +0,0 @@ -from PyQt5 import QtCore, QtGui, QtWidgets -import sys -import subprocess -import argparse - -num = " " -smsg = " " -devid = " " - -def getDeviceID(): - dres = subprocess.check_output(('kdeconnect-cli', '-l', '--id-only')) - msgBody(dres) - -def msgBody(devid): - devnum = devid.strip() - res = subprocess.call(('kdeconnect-cli', '--device', devnum, '--destination', num, '--send-sms', smsg)) - #print devnum - #print num - #print smsg - -class Ui_MainWindow(object): - - def setupUi(self, MainWindow): - MainWindow.setObjectName("MainWindow") - MainWindow.resize(429, 112) - self.centralWidget = QtWidgets.QWidget(MainWindow) - self.centralWidget.setObjectName("centralWidget") - self.label = QtWidgets.QLabel(self.centralWidget) - self.label.setGeometry(QtCore.QRect(0, 10, 121, 16)) - self.label.setObjectName("label") - self.lineEdit = QtWidgets.QLineEdit(self.centralWidget) - self.lineEdit.setGeometry(QtCore.QRect(110, 10, 201, 21)) - self.lineEdit.setObjectName("lineEdit") - self.my_regex = QtCore.QRegExp("([0-9]|[\-+#])+") - self.validator = QtGui.QRegExpValidator(self.my_regex) - self.lineEdit.setValidator(self.validator) - self.label_2 = QtWidgets.QLabel(self.centralWidget) - self.label_2.setGeometry(QtCore.QRect(0, 60, 64, 15)) - self.label_2.setObjectName("label_2") - self.plainTextEdit = QtWidgets.QPlainTextEdit(self.centralWidget) - self.plainTextEdit.setGeometry(QtCore.QRect(60, 40, 251, 61)) - #self.plainTextEdit.setFrameShape(QtWidgets.QFrame.Box) - self.plainTextEdit.setObjectName("plainTextEdit") - self.label_3 = QtWidgets.QLabel(self.centralWidget) - self.label_3.setGeometry(QtCore.QRect(0, 95, 121, 16)) - self.label_3.setObjectName("label_3") - self.pushButton = QtWidgets.QPushButton(self.centralWidget) - self.pushButton.setGeometry(QtCore.QRect(330, 20, 91, 31)) - self.pushButton.setObjectName("pushButton") - self.pushButton_2 = QtWidgets.QPushButton(self.centralWidget) - self.pushButton_2.setGeometry(QtCore.QRect(330, 60, 91, 31)) - self.pushButton_2.setObjectName("pushButton_2") - #MainWindow.setCentralWidget(self.centralWidget) - - self.lineEdit.textChanged.connect(self.number_edit_text_changed) - self.plainTextEdit.textChanged.connect(self.msg_edit_text_changed) - self.plainTextEdit.textChanged.connect(self.updateCounter) - self.retranslateUi(MainWindow) - QtCore.QMetaObject.connectSlotsByName(MainWindow) - self.pushButton.clicked.connect(getDeviceID) - self.pushButton_2.clicked.connect(self.plainTextEdit.clear) - - def retranslateUi(self, MainWindow): - _translate = QtCore.QCoreApplication.translate - MainWindow.setWindowTitle(_translate("MainWindow", "Send SMS")) - self.label.setText(_translate("MainWindow", "Phone Number")) - self.lineEdit.setToolTip(_translate("MainWindow", "Phone Number")) - self.lineEdit.setPlaceholderText(_translate("MainWindow", "Contact Phone Number")) - self.label_2.setText(_translate("MainWindow", "Message")) - self.plainTextEdit.setPlaceholderText(_translate("MainWindow", "Message")) - self.pushButton.setText(_translate("MainWindow", "Send")) - self.pushButton_2.setText(_translate("MainWindow", "Clear")) - - def number_edit_text_changed(self, text): - global num - num = text - - def msg_edit_text_changed(self): - global smsg - smsg = self.plainTextEdit.toPlainText() - - def updateCounter(self): - strlen = len(self.plainTextEdit.toPlainText()) - countr = str(strlen) - self.label_3.setText(countr) - -if __name__ == "__main__": - app = QtWidgets.QApplication(sys.argv) - MainWindow = QtWidgets.QDialog() - ui = Ui_MainWindow() - ui.setupUi(MainWindow) - MainWindow.show() - sys.exit(app.exec_()) - diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/test/intent/sample1.intent.json b/mycroft/skills/mycroft-sendSMS-plasma-skill/test/intent/sample1.intent.json deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/test/intent/sample1.intent.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "utterance": "send", - "intent_type": "SendSMSKeywordIntent", - "intent": { - "SendSMSPlasmaDesktopSkillKeyword": "SMS" - } -} diff --git a/mycroft/skills/mycroft-sendSMS-plasma-skill/vocab/en-us/SendSMSPlasmaDesktopSkillKeyword.voc b/mycroft/skills/mycroft-sendSMS-plasma-skill/vocab/en-us/SendSMSPlasmaDesktopSkillKeyword.voc deleted file mode 100644 --- a/mycroft/skills/mycroft-sendSMS-plasma-skill/vocab/en-us/SendSMSPlasmaDesktopSkillKeyword.voc +++ /dev/null @@ -1,3 +0,0 @@ -send SMS -send a SMS -SMS diff --git a/plasmoid/contents/code/msm.sh b/plasmoid/contents/code/msm.sh new file mode 100644 --- /dev/null +++ b/plasmoid/contents/code/msm.sh @@ -0,0 +1,122 @@ +#!/bin/bash + +# Copyright 2016 Mycroft AI, Inc. +# +# This file is part of Mycroft Core. +# +# Mycroft Core 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. +# +# Mycroft Core 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 Mycroft Core. If not, see . + + +# @author Augusto Monteiro +# +# This script assists in the installation and management of +# skills loaded from Github. + +mycroft_skill_folder="/opt/mycroft/skills" +mycroft_virtualenv=~/.virtualenvs/mycroft/bin/activate + +echo "####### Mycroft Skill Manager #######" + +function help() { + echo "msm: Mycroft Skill Manager" + echo -e " Copyright (c) 2017 Mycroft AI, Inc. All rights reserved.\n" + echo "usage: msm install or " + echo " Installs the given Skill into the /opt/mycroft/skills directory" + echo " where is the address of the skill in Github." + echo -e "example: msm install https://github.com/ethanaward/demo_skill.git\n" +} + +function install() { + cd $mycroft_skill_folder + if [ -z "$2" ]; then + echo "You must pass the git url or skill name" + exit 1 + fi + if [[ "$2" == "git@"* || "$2" == "https://"* || "$2" == "http://"* ]]; then + repo=$2 + else + skill_list="`curl -s "https://raw.githubusercontent.com/MycroftAI/mycroft-skills/master/.gitmodules"`" + skills=`echo "$skill_list" | grep -n 'submodule' | sed 's/[[:space:]]//g' | sed 's/\[submodule"//g' | sed 's/"\]//g'` + exact_match=`echo "$skills" | grep -i ".*:$2$"` + skill=`echo "$skills" | grep -i ".*:.*$2.*"` + if [ ! -z $exact_match ]; then + skill=$exact_match + fi + git_line=`echo "$skill" | sed 's/\:.*//'` + + if [[ $skill == *$'\n'* ]]; then + echo -e "Your search has multiple choices\n\n$skill" | sed 's/.*://g' + exit 2 + else + if [ -z $git_line ]; then + echo "Skill not found" + exit 3 + fi + repo_line=$(($git_line + 2)) + repo=`echo "$skill_list" | sed -n $repo_line'{p;q;}' | sed 's/[[:space:]]//g' | sed 's/url=//g'` + fi + fi + git_name=`echo "$repo" | sed 's/.*\///'` + name=`echo "$git_name" | sed 's/.git//'` + echo "Cloning repository" + git clone $repo >> /dev/null + cd $name + if [ -f "requirements.txt" ]; then + echo "Installing libraries requirements" + pip install -r requirements.txt + fi + echo "Skill installed!" +} + +function update() { + cd $mycroft_skill_folder + for d in *; do + if git -C "$d" rev-parse --git-dir > /dev/null 2>&1; then + cd $d + git fetch + git reset --hard origin/master + cd .. + fi + done +} + +function install_defaults() { + skills=( "alarm" "audio-record" "configuration" "date-time" "desktop-launcher" "ip" "joke" "hello-world" "media" "npr-news" "naptime" "pairing" "personal" "reminder" "installer" "speak" "spelling" "stop" "stock" "volume" "weather" "wiki" "wolfram-alpha" ) + for i in "${skills[@]}" + do + if [ ! -d "$mycroft_skill_folder/skill-$i" ]; then + install "" "https://github.com/MycroftAI/skill-$i.git" + fi + done + update + echo "Installed!" +} + +function list() { + curl -s "https://raw.githubusercontent.com/MycroftAI/mycroft-skills/master/.gitmodules" | grep 'submodule "' | sed 's/\[submodule "//g'| sed 's/"\]//g' +} + +if [ "$1" = "install" ]; then + install $* +elif [ "$1" = "list" ]; then + echo -e "Searching...\n" + list +elif [ "$1" = "update" ]; then + update +elif [ "$1" = "default" ]; then + install_defaults +else + help +fi + diff --git a/plasmoid/contents/images/Color-Palette_1.gif b/plasmoid/contents/images/Color-Palette_1.gif new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@ + sodipodi:docname="mycroft-plasma-appicon.svg"> + + + + image/svg+xml + + + + + + - - - - - image/svg+xml - - - - - + inkscape:current-layer="svg3397" /> + - + id="g3730"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plasmoid/contents/ui/CurrentWeatherType.qml b/plasmoid/contents/ui/CurrentWeatherType.qml new file mode 100644 --- /dev/null +++ b/plasmoid/contents/ui/CurrentWeatherType.qml @@ -0,0 +1,332 @@ +import QtQuick 2.0 +import QtQuick.Window 2.2 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.0 +import QtQml.Models 2.2 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.plasmoid 2.0 +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras + +Column { + spacing: 6 + + property var scttemp: metacontent.currenttemp + property var slttemp: metacontent.mintemp + property var shttemp: metacontent.maxtemp + property var ssum: metacontent.sum + property var sloc: metacontent.loc + + Row { + id: messageRow + spacing: 6 + + Rectangle{ + id: messageWrapper + width: cbwidth + height: weathbgImg.height + color: theme.backgroundColor + + Image{ + id: weathbgImg + width: cbwidth + height: messageRect.height + + Component.onCompleted: { + if(metacontent.sum.indexOf("scattered") !== -1 && metacontent.sum.indexOf("clouds") !== -1 || metacontent.sum.indexOf("clear") !== -1 || metacontent.sum.indexOf("clouds") !== -1 ){ + weathbgImg.source = "../images/climatesc.jpg" + } + else if(metacontent.sum.indexOf("rain") !== -1){ + weathbgImg.source = "../images/rain.gif" + } + else if(metacontent.sum.indexOf("snow") !== -1){ + weathbgImg.source = "../images/snow.gif" + } + else if(metacontent.sum.indexOf("snow") !== -1){ + weathbgImg.source = "../images/snow.gif" + } + else if(metacontent.sum.indexOf("haze") !== -1){ + weathbgImg.source = "../images/haze.gif" + } + else { + weathbgImg.source = "" + } + } + + Rectangle { + id: messageRect + width: cbwidth + height: 150 + color: "#00000000" + + Rectangle { + id: weatherinfoBar + width: messageRect + color: theme.backgroundColor + height: units.gridUnit * 2 + anchors.top: parent.top + anchors.topMargin: units.gridUnit * 0.5 + anchors.left: parent.left + anchors.right: parent.right + + PlasmaComponents.Label { + id: todayweather + //text: qsTr(metacontent.loc) + anchors.left: parent.left + anchors.leftMargin: 8 + //font.family: "Courier" + font.italic: false + font.bold: true + font.pixelSize: 15 + + Component.onCompleted: { + todayweather.text = sloc + } + } + + PlasmaComponents.Label { + id: weathersum + //text: qsTr(metacontent.sum) + anchors.right: parent.right + anchors.rightMargin: 8 + font.italic: true + font.bold: true + font.pixelSize: 10 + + Component.onCompleted: { + weathersum.text = ssum + } + } + } + + PlasmaCore.SvgItem { + anchors { + left: messageRect.left + right: messageRect.right + top: rectanglectt.top + } + width: 1 + height: horlinewthrtopSvg.elementSize("horizontal-line").height + + elementId: "horizontal-line" + z: 110 + svg: PlasmaCore.Svg { + id: horlinewthrtopSvg; + imagePath: "widgets/line" + } + } + + Rectangle { + id: rectanglectt + width: 125 + anchors.left: parent.left + height: 75 + color: theme.backgroundColor + anchors.top: weatherinfoBar.bottom + anchors.topMargin: 5 + + PlasmaComponents.Label { + id: currenttemplable + text: "Current" + font.pointSize: 12 + //font.family: "Courier" + font.bold: true + anchors.top: parent.top + anchors.topMargin: 8 + //anchors.verticalCenter: currenttempaniimage.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 15 + } + + PlasmaComponents.Label { + id: currenttempitem + x: 73 + y: 38 + //text: metacontent.currenttemp + anchors.horizontalCenter: currenttemplable.horizontalCenter + anchors.top: currenttemplable.bottom + anchors.topMargin: 10 + + Component.onCompleted: { + currenttempitem.text = scttemp + } + } + + PlasmaComponents.Label { + id: weatherwidgetcurrenttempdegrees + text: qsTr("°") + anchors.verticalCenterOffset: -5 + anchors.verticalCenter: currenttempitem.verticalCenter + anchors.left: currenttempitem.right + anchors.leftMargin: 5 + font.pixelSize: 12 + } + + + } + + PlasmaCore.SvgItem { + anchors { + right: rectanglectt.right + rightMargin: units.gridUnit * 0.25 + top: rectanglectt.top + topMargin: 5 + bottom: rectanglectt.bottom + bottomMargin: 0 + } + + width: linecttSvg.elementSize("vertical-line").width + z: 110 + elementId: "vertical-line" + + svg: PlasmaCore.Svg { + id: linecttSvg; + imagePath: "widgets/line" + } + } + + Rectangle { + id: rectangleltt + //width: 100 + height: 75 + color: theme.backgroundColor + anchors.top: weatherinfoBar.bottom + anchors.topMargin: 5 + anchors.left: rectanglectt.right + anchors.right: rectanglehtt.left + anchors.leftMargin: 0 + + PlasmaComponents.Label { + id: lowtemplable + anchors.left: parent.left + //anchors.verticalCenter: lowtempaniimage.verticalCenter + text: "Low" + //font.family: "Courier" + font.pointSize: 12 + font.bold: true + anchors.top: parent.top + anchors.topMargin: 8 + anchors.leftMargin: 30 + } + + PlasmaComponents.Label { + id: lowtempitem + x: 63 + y: 33 + anchors.top: lowtemplable.bottom + //text: metacontent.mintemp + anchors.horizontalCenter: lowtemplable.horizontalCenter + anchors.topMargin: 10 + + Component.onCompleted: { + lowtempitem.text = slttemp + } + } + + PlasmaComponents.Label { + id: weatherwidgetlowtempdegree + text: qsTr("°") + anchors.verticalCenterOffset: -5 + anchors.verticalCenter: lowtempitem.verticalCenter + anchors.left: lowtempitem.right + anchors.leftMargin: 5 + font.pixelSize: 12 + } + + + } + + PlasmaCore.SvgItem { + anchors { + right: rectangleltt.right + rightMargin: units.gridUnit * 0.25 + top: rectangleltt.top + topMargin: 5 + bottom: rectanglectt.bottom + bottomMargin: 0 + } + + width: linelttSvg.elementSize("vertical-line").width + z: 110 + elementId: "vertical-line" + + svg: PlasmaCore.Svg { + id: linelttSvg; + imagePath: "widgets/line" + } + } + + Rectangle { + id: rectanglehtt + width: 125 + height: 75 + color: theme.backgroundColor + anchors.top: weatherinfoBar.bottom + anchors.topMargin: 5 + anchors.right: parent.right + anchors.leftMargin: 0 + + PlasmaComponents.Label { + id: hightempitem + x: 65 + y: 70 + anchors.top: hightemplable.bottom + //text: metacontent.maxtemp + anchors.topMargin: 10 + anchors.horizontalCenter: hightemplable.horizontalCenter + + Component.onCompleted: { + hightempitem.text = shttemp + } + + } + + PlasmaComponents.Label { + id: hightemplable + anchors.left: parent.left + text: "High" + font.pointSize: 12 + font.bold: true + //font.family: "Courier" + anchors.top: parent.top + anchors.topMargin: 8 + //anchors.verticalCenter: hightempaniimage.verticalCenter + anchors.leftMargin: 30 + } + + PlasmaComponents.Label { + id: weatherwidgethightempdegree + text: qsTr("°") + anchors.verticalCenterOffset: -5 + anchors.verticalCenter: hightempitem.verticalCenter + anchors.left: hightempitem.right + anchors.leftMargin: 5 + font.pixelSize: 12 + } + + + } + + PlasmaCore.SvgItem { + anchors { + left: messageRect.left + right: messageRect.right + top: rectanglectt.bottom + topMargin: 2 + } + width: 1 + height: horlinewthrbotSvg.elementSize("horizontal-line").height + + elementId: "horizontal-line" + z: 110 + svg: PlasmaCore.Svg { + id: horlinewthrbotSvg; + imagePath: "widgets/line" + } + } + + } + } + } + } +} diff --git a/plasmoid/contents/ui/MessageBox.qml b/plasmoid/contents/ui/ImgRecogType.qml rename from plasmoid/contents/ui/MessageBox.qml rename to plasmoid/contents/ui/ImgRecogType.qml --- a/plasmoid/contents/ui/MessageBox.qml +++ b/plasmoid/contents/ui/ImgRecogType.qml @@ -1,34 +1,35 @@ import QtQuick 2.0 -import QtQml.Models 2.2 import QtQuick.Controls 2.0 -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras Column { + id: colmsg spacing: 6 anchors.right: parent.right readonly property bool sentByMe: model.recipient !== "User" - property alias mssg: messageText.text - + //property alias mssg: messageText.text + Row { id: messageRow spacing: 6 - + Rectangle { id: messageRect width: cbwidth radius: 2 - height: messageText.implicitHeight + 24 - color: theme.backgroundColor + height: messageText.implicitHeight + color: "#222" - PlasmaComponents.Label { + Image { id: messageText - text: model.InputQuery anchors.fill: parent - anchors.margins: 12 - wrapMode: Label.Wrap + anchors.margins: 5 + fillMode: Image.PreserveAspectCrop + source: model.InputQuery + sourceSize.width: cbwidth + sourceSize.height: units.gridUnit * 10 } } } } + diff --git a/plasmoid/contents/ui/LeftBarAnim.qml b/plasmoid/contents/ui/LeftBarAnim.qml new file mode 100644 --- /dev/null +++ b/plasmoid/contents/ui/LeftBarAnim.qml @@ -0,0 +1,530 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.0 +import QtQuick.Layouts 1.3 + +Item { + + //anchors.fill: parent + + property bool wsocketMsg: false + function wsocmsganimtoggle() { onreadyanim.running = true; } + + SequentialAnimation { + id: onconanim + ParallelAnimation{ + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: 0 + to: 9 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: -13 + to: -9 + duration: 300 + } + } + + ParallelAnimation{ + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: 9 + to: 10.5 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: -9 + to: -6 + duration: 300 + } + } + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: 10.5 + to: 11.5 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: -6 + to: 6 + duration: 300 + } + } + + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: 11.5 + to: 10.5 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: 6 + to: 9 + duration: 300 + } + } + + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: 10.5 + to: 0 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: 9 + to: 13 + duration: 300 + } + } + + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: 0 + to: -9 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: 13 + to: 9 + duration: 300 + } + } + + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: -9 + to: -10.5 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: 9 + to: 6 + duration: 300 + } + } + + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: -10.5 + to: -11.5 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: 6 + to: -6 + duration: 300 + } + } + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: -11.5 + to: -10.5 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: -6 + to: -9 + duration: 300 + } + } + ParallelAnimation{ + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.horizontalCenterOffset" + from: -10.5 + to: 0 + duration: 300 + } + + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: -9 + to: -13 + duration: 300 + } + } + } + + SequentialAnimation { + id: onreadyanim + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: -8 + to: 0 + duration: 200 + } + + ParallelAnimation { + PropertyAnimation { + target: canvascenterhalfgraphic; + property: "mpie"; + from: 3 + to: 4 + duration: 600 + } + + PropertyAnimation { + target: canvascentersmallgraphic; + property: "mpie"; + from: 1 + to: 6 + duration: 600 + } + + RotationAnimator { + target: canvascenterbiggraphic; + from: 0; + to: 720; + duration: 2000 + } + + RotationAnimator { + target: canvascenterbggraphic; + from: 0; + to: 90; + duration: 1000 + } + } + + ParallelAnimation{ + PropertyAnimation { + target: canvascentersmallgraphic + property: "anchors.verticalCenterOffset" + from: 0 + to: -8 + duration: 200 + } + PropertyAnimation { + target: canvascentersmallgraphic; + property: "mpie"; + from: 6 + to: 1 + duration: 200 + } + + PropertyAnimation { + target: canvascenterhalfgraphic; + property: "mpie"; + from: 4 + to: 3 + duration: 600 + } + + RotationAnimator { + target: canvascenterbggraphic; + from: 90; + to: 0; + duration: 1000 + } + + } + } + + + + Canvas { + id:canvascenterbggraphic + width: parent.width + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + + property color strokeStyle: Qt.darker(fillStyle, 1.5) + property color fillStyle: Qt.darker("deepskyblue", 1.1) + property real lineWidth: 1.6 + property bool fill: true + property bool stroke: false + property real alpha: 1.0 + property real scale : 1 + property real rotate : 0 + antialiasing: true + smooth: true + + onLineWidthChanged:requestPaint(); + onFillChanged:requestPaint(); + onStrokeChanged:requestPaint(); + //onScaleChanged:requestPaint(); + onRotateChanged:requestPaint(); + + renderTarget: Canvas.FramebufferObject + renderStrategy: Canvas.Cooperative + + + onPaint: { + var ctxside = canvascenterbggraphic.getContext('2d'); + var hCenter = width * 0.5 + var vCenter = height * 0.5 + var numberOfSides = 6 + var size = 12 + + ctxside.save(); + ctxside.clearRect(0, 0, canvascenterbggraphic.width, canvascenterbggraphic.height); + ctxside.globalAlpha = canvascenterbggraphic.alpha; + ctxside.strokeStyle = canvascenterbggraphic.strokeStyle; + ctxside.fillStyle = canvascenterbggraphic.fillStyle; + ctxside.lineWidth = canvascenterbggraphic.lineWidth; + ctxside.scale(canvascenterbggraphic.scale, canvascenterbggraphic.scale); + ctxside.rotate(canvascenterbggraphic.rotate); + ctxside.lineJoin = "round"; + ctxside.lineCap = "round"; + + ctxside.beginPath(); + ctxside.moveTo(hCenter + size * Math.sin(0), vCenter + size * Math.cos(0)); + + for (var i = 1; i <= numberOfSides;i += 1) { + ctxside.lineTo(hCenter + size * Math.sin(i * 2 * Math.PI / numberOfSides), vCenter + size * Math.cos(i * 2 * Math.PI / numberOfSides)); + } + ctxside.closePath(); + ctxside.fill(); + ctxside.stroke(); + + if (canvascenterbggraphic.fill) + ctxside.fill(); + if (canvascenterbggraphic.stroke) + ctxside.stroke(); + ctxside.restore(); + } + } + + Canvas { + id:canvascenterbiggraphic + width: parent.width + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: 0; + anchors.verticalCenterOffset: 0; + transformOrigin: Item.Center + //anchors.left: canvasleftline.left + + //property real viewScale: base.parent.scale + + property color strokeStyle: "white"//Qt.darker("white", 1.4) + property color fillStyle: "lightsteelblue" // red + property real lineWidth: 1.2 + property bool fill: false + property bool stroke: false + property real alpha: 1.0 + property real scale : 1 + property real rotate : 0 + property real mpie: 5 + antialiasing: true + smooth: true + + onLineWidthChanged:requestPaint(); + onFillChanged:requestPaint(); + onStrokeChanged:requestPaint(); + onScaleChanged:requestPaint(); + onRotateChanged:requestPaint(); + onFillStyleChanged:requestPaint(); + + renderTarget: Canvas.FramebufferObject + renderStrategy: Canvas.Cooperative + + + onPaint: { + var ctxcircle = canvascenterbiggraphic.getContext('2d'); + var offleftcenter = width * 0.50 + var offrightcenter = width * 0.50 + var vCenter = height * 0.5 + var vDelta = height / 6 + + ctxcircle.save(); + ctxcircle.clearRect(0, 0, canvascenterbiggraphic.width, canvascenterbiggraphic.height); + ctxcircle.globalAlpha = canvascenterbiggraphic.alpha; + ctxcircle.strokeStyle = canvascenterbiggraphic.strokeStyle; + ctxcircle.fillStyle = canvascenterbiggraphic.fillStyle; + ctxcircle.lineWidth = canvascenterbiggraphic.lineWidth; + ctxcircle.scale(canvascenterbiggraphic.scale, canvascenterbiggraphic.scale); + ctxcircle.rotate(canvascenterbiggraphic.rotate) + + ctxcircle.beginPath(); + ctxcircle.arc(offleftcenter, vCenter, mpie, 10 * Math.PI, false); + ctxcircle.stroke(); + + if (canvascenterbiggraphic.stroke) + ctxcircle.stroke(); + ctxcircle.restore(); + + } + } + Canvas { + id:canvascenterhalfgraphic + width: parent.width + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: 0; + anchors.verticalCenterOffset: 0; + //anchors.left: canvasleftline.left + + //property real viewScale: base.parent.scale + + property color strokeStyle: "white"//Qt.darker("white", 1.4) + property color fillStyle: "white" // red + property real lineWidth: 1.2 + property bool fill: false + property bool stroke: false + property real alpha: 1.0 + property real scale : 1 + property real rotate : 0 + property real mpie: 3 + antialiasing: true + smooth: true + + onLineWidthChanged:requestPaint(); + onFillChanged:requestPaint(); + onStrokeChanged:requestPaint(); + onScaleChanged:requestPaint(); + onRotateChanged:requestPaint(); + onFillStyleChanged:requestPaint(); + onMpieChanged: requestPaint(); + + renderTarget: Canvas.FramebufferObject + renderStrategy: Canvas.Cooperative + + + onPaint: { + var ctxcircle = canvascenterhalfgraphic.getContext('2d'); + var offleftcenter = width * 0.50 + var offrightcenter = width * 0.50 + var vCenter = height * 0.5 + var vDelta = height / 6 + + ctxcircle.save(); + ctxcircle.clearRect(0, 0, canvascenterhalfgraphic.width, canvascenterhalfgraphic.height); + ctxcircle.globalAlpha = canvascenterhalfgraphic.alpha; + ctxcircle.strokeStyle = canvascenterhalfgraphic.strokeStyle; + ctxcircle.fillStyle = canvascenterhalfgraphic.fillStyle; + ctxcircle.lineWidth = canvascenterhalfgraphic.lineWidth; + ctxcircle.scale(canvascenterhalfgraphic.scale, canvascenterhalfgraphic.scale); + ctxcircle.rotate(canvascenterhalfgraphic.rotate); + + ctxcircle.beginPath(); + ctxcircle.arc(offleftcenter, vCenter, mpie, 2.5 * Math.PI, 3.5 * Math.PI , false); + ctxcircle.fill(); + ctxcircle.closePath(); + ctxcircle.stroke(); + + if (canvascenterhalfgraphic.stroke) + ctxcircle.stroke(); + ctxcircle.restore(); + } + } + + Canvas { + id:canvascentersmallgraphic + width: parent.width + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: 0; + anchors.verticalCenterOffset: -8; + //anchors.left: canvasleftline.left + + //property real viewScale: base.parent.scale + + property color strokeStyle: "white"//Qt.darker("white", 1.4) + property color fillStyle: "white" // red + property real lineWidth: 0.4 + property bool fill: false + property bool stroke: false + property real alpha: 1.0 + property real scale : 1 + property real rotate : 0 + property real mpie: 1 + antialiasing: true + + onLineWidthChanged:requestPaint(); + onFillChanged:requestPaint(); + onStrokeChanged:requestPaint(); + onScaleChanged:requestPaint(); + onRotateChanged:requestPaint(); + onFillStyleChanged:requestPaint(); + onMpieChanged: requestPaint(); + + renderTarget: Canvas.FramebufferObject + renderStrategy: Canvas.Cooperative + + + onPaint: { + var ctxcircle = canvascentersmallgraphic.getContext('2d'); + var offleftcenter = width * 0.50 + var offrightcenter = width * 0.50 + var vCenter = height * 0.5 + var vDelta = height / 6 + + ctxcircle.save(); + ctxcircle.clearRect(0, 0, canvascentersmallgraphic.width, canvascentersmallgraphic.height); + ctxcircle.globalAlpha = canvascentersmallgraphic.alpha; + ctxcircle.strokeStyle = canvascentersmallgraphic.strokeStyle; + ctxcircle.fillStyle = canvascentersmallgraphic.fillStyle; + ctxcircle.lineWidth = canvascentersmallgraphic.lineWidth; + ctxcircle.scale(canvascentersmallgraphic.scale, canvascentersmallgraphic.scale); + ctxcircle.rotate(canvascentersmallgraphic.rotate); + + ctxcircle.beginPath(); + ctxcircle.arc(offleftcenter, vCenter, mpie, 10 * Math.PI , false); + ctxcircle.fill(); + ctxcircle.closePath(); + ctxcircle.stroke(); + + if (canvascentersmallgraphic.stroke) + ctxcircle.stroke(); + ctxcircle.restore(); + } + } + } diff --git a/plasmoid/contents/ui/MsmView.qml b/plasmoid/contents/ui/MsmView.qml new file mode 100644 --- /dev/null +++ b/plasmoid/contents/ui/MsmView.qml @@ -0,0 +1,119 @@ +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Styles 1.4 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.plasmoid 2.0 +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.private.mycroftplasmoid 1.0 as PlasmaLa +import Qt.labs.settings 1.0 + +Rectangle { + id: skillcontent + Layout.fillWidth: true; + anchors { left: parent.left; right: parent.right } + height: 60 + border.width: 0 + border.color: "lightsteelblue" + radius: 2 + color: theme.backgroundColor + + PlasmaLa.MsmApp{ + id: launchinstaller + } + + Component.onCompleted: { + getSkillInfoLocal() + msmSkillInstallProgBar.visible = false; + } + + function getSkillInfoLocal() { + var customFold = '/opt/mycroft/skills/' + var skillPath = customFold + model.name +'/__init__.py' + if(PlasmaLa.FileReader.file_exists_local(skillPath)){ + //msminstllbtn.visible = false + instlabel.color = "Green" + instlabel.text = "Installed" + } + else { + instlabel.text = "Not Installed" + } + } + + function exec(msmparam) { + var bscrpt = "/usr/share/plasma/plasmoids/org.kde.plasma.mycroftplasmoid/contents/code/msm.sh" + return launchinstaller.msmapp("bash " + bscrpt + " install " + model.url) + } + + Column { + id: skillcolumn + width: parent.width / 80 + + PlasmaComponents.Label { + font.capitalization: Font.AllUppercase + wrapMode: Text.WordWrap + text: model.name + } + + PlasmaComponents.Label { + font.pointSize: 8 + wrapMode: Text.WordWrap + width: units.gridUnit * 14 + text: model.url + } + } + + PlasmaComponents.Label { + id: instlabel + font.pointSize: 8 + wrapMode: Text.WordWrap + anchors.right: msminstllbtn.left + anchors.rightMargin: 5 + text: "" + } + + PlasmaComponents.ToolButton { + anchors.right: parent.right + id: msminstllbtn + visible: true + iconSource: "download" + flat: true + checked: false + focus: false + width: Math.round(units.gridUnit * 2) + height: width + + onClicked: { + console.log(model.url) + var msmprogress = exec() + var getcurrentprogress = msmprogress.split("\n") + console.log(getcurrentprogress); + if(getcurrentprogress.indexOf("Cloning repository") != -1) + { + msmSkillInstallProgBar.visible = true; + msmSkillInstallProgBar.indeterminate = true; + } + if(getcurrentprogress.indexOf("Skill installed!") != -1) + { + msmSkillInstallProgBar.indeterminate = false; + msmSkillInstallProgBar.value = 100; + instlabel.color = "Green" + instlabel.text = "Installed" + } + } + + } + + PlasmaComponents.ProgressBar { + anchors.right: parent.right + anchors.rightMargin: units.gridUnit * 1 + anchors.bottom: parent.bottom + width: units.gridUnit * 4 + id: msmSkillInstallProgBar + visible: false + indeterminate: false + } + + } + diff --git a/plasmoid/contents/ui/MessageBox.qml b/plasmoid/contents/ui/SimpleMessageType.qml rename from plasmoid/contents/ui/MessageBox.qml rename to plasmoid/contents/ui/SimpleMessageType.qml --- a/plasmoid/contents/ui/MessageBox.qml +++ b/plasmoid/contents/ui/SimpleMessageType.qml @@ -21,13 +21,14 @@ radius: 2 height: messageText.implicitHeight + 24 color: theme.backgroundColor - + PlasmaComponents.Label { id: messageText text: model.InputQuery anchors.fill: parent anchors.margins: 12 wrapMode: Label.Wrap + } } } diff --git a/plasmoid/contents/ui/Suggestions.qml b/plasmoid/contents/ui/Suggestions.qml --- a/plasmoid/contents/ui/Suggestions.qml +++ b/plasmoid/contents/ui/Suggestions.qml @@ -2,160 +2,144 @@ import QtQuick.Controls 2.0 import org.kde.plasma.components 2.0 as PlasmaComponents -Item { +Rectangle { id: suggestionsmainitem + color: "#00000000" + anchors.fill: parent property alias suggest1: suggestiontext1.text property alias suggest2: suggestiontext2.text property alias suggest3: suggestiontext3.text -Flickable { - width: parent.width - height: parent.height - contentWidth: units.gridUnit * 5 - contentHeight: parent.height - interactive: true; - Rectangle { id: suggestionbutton1 - width: suggestiontext1.contentWidth + 10 - height: 30 color: "#00000000" - radius: 5 - border.width: 1 - border.color: "#ffffff" + anchors.top: parent.top + anchors.topMargin: 0 + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + border.width: 0.2 + border.color: theme.textColor anchors.left: parent.left anchors.leftMargin: 0 + width: suggestionsmainitem.width / 3 MouseArea { id: mouseArea1 anchors.fill: parent hoverEnabled: true onEntered: { - suggestionbutton1.color = "#2b2b2b" - suggestionbutton1.border.color = "#f2f22f" + suggestionbutton1.color = theme.textColor + suggestiontext1.color = theme.backgroundColor } onExited: { suggestionbutton1.color = "#00000000" - suggestionbutton1.border.color = "grey" + suggestiontext1.color = theme.textColor } onClicked: { - suggst.visible = true - conversationInputList.append({"InputQuery": suggestiontext1.text}); - inputlistView.positionViewAtEnd(); - var socketmessage = {}; - socketmessage.type = "recognizer_loop:utterance"; - socketmessage.data = {}; - socketmessage.data.utterances = [suggestiontext1.text]; - socket.sendTextMessage(JSON.stringify(socketmessage)); - qinput.text = suggestiontext1.text + var suggest1 = qinput.text + var lastIndex = suggest1.lastIndexOf(" "); + qinput.text = suggest1.substring(0, lastIndex) + " " + suggestiontext1.text + " " } } - PlasmaComponents.Label { + PlasmaComponents.Label { id: suggestiontext1 - text: qsTr("Text") - anchors.verticalCenter: parent.verticalCenter + text: i18n("") anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter font.pixelSize: 12 } } Rectangle { id: suggestionbutton2 - width: suggestiontext2.contentWidth + 10 - height: 30 color: "#00000000" - radius: 5 - border.color: "#ffffff" + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + anchors.top: parent.top + anchors.topMargin: 0 + anchors.right: suggestionbutton3.left + anchors.rightMargin: 0 + border.width: 0.2 anchors.left: suggestionbutton1.right - anchors.leftMargin: 20 + anchors.leftMargin: 0 + border.color: theme.textColor MouseArea { id: mouseArea2 - height: 200 anchors.fill: parent hoverEnabled: true onEntered: { - suggestionbutton2.color = "#2b2b2b" - suggestionbutton2.border.color = "#f2f22f" + suggestionbutton2.color = theme.textColor + suggestiontext2.color = theme.backgroundColor } onExited: { suggestionbutton2.color = "#00000000" - suggestionbutton2.border.color = "grey" + suggestiontext2.color = theme.textColor } onClicked: { - suggst.visible = true - conversationInputList.append({"InputQuery": suggestiontext2.text}); - inputlistView.positionViewAtEnd(); - var socketmessage = {}; - socketmessage.type = "recognizer_loop:utterance"; - socketmessage.data = {}; - socketmessage.data.utterances = [suggestiontext2.text]; - socket.sendTextMessage(JSON.stringify(socketmessage)); - qinput.text = suggestiontext1.text + var suggest2 = qinput.text + var lastIndex = suggest2.lastIndexOf(" "); + qinput.text = suggest2.substring(0, lastIndex) + " " + suggestiontext2.text + " " } } PlasmaComponents.Label { id: suggestiontext2 - text: qsTr("Text") + text: i18n("") anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } Rectangle { id: suggestionbutton3 - width: suggestiontext3.contentWidth + 10 - height: 30 color: "#00000000" - radius: 5 - border.color: "#ffffff" - anchors.left: suggestionbutton2.right - anchors.leftMargin: 20 + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + anchors.top: parent.top + border.color: theme.textColor + anchors.topMargin: 0 + anchors.right: parent.right + anchors.rightMargin: 0 + border.width: 0.2 + width: parent.width / 3 MouseArea { id: mouseArea3 anchors.fill: parent hoverEnabled: true onEntered: { - suggestionbutton3.color = "#2b2b2b" - suggestionbutton3.border.color = "#f2f22f" + suggestionbutton3.color = theme.textColor + suggestiontext3.color = theme.backgroundColor } onExited: { suggestionbutton3.color = "#00000000" - suggestionbutton3.border.color = "grey" + suggestiontext3.color = theme.textColor } onClicked: { - suggst.visible = true - conversationInputList.append({"InputQuery": suggestiontext3.text}); - inputlistView.positionViewAtEnd(); - var socketmessage = {}; - socketmessage.type = "recognizer_loop:utterance"; - socketmessage.data = {}; - socketmessage.data.utterances = [suggestiontext3.text]; - socket.sendTextMessage(JSON.stringify(socketmessage)); - qinput.text = suggestiontext1.text + var suggest3 = qinput.text + var lastIndex = suggest3.lastIndexOf(" "); + qinput.text = suggest3.substring(0, lastIndex) + " " + suggestiontext3.text + " " } } - PlasmaComponents.Label { + PlasmaComponents.Label { id: suggestiontext3 - text: qsTr("Text") + text: i18n("") anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } - } } diff --git a/plasmoid/contents/ui/SwitchButton.qml b/plasmoid/contents/ui/SwitchButton.qml new file mode 100644 --- /dev/null +++ b/plasmoid/contents/ui/SwitchButton.qml @@ -0,0 +1,86 @@ +import QtQuick 2.7 +import QtQuick.Templates 2.1 as T +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras + + +T.Switch { + id: control + + implicitWidth: indicator.implicitWidth + implicitHeight: switchHandle.implicitHeight + + property alias circolour: rectangle.color + + indicator: Rectangle { + id: switchHandle + implicitWidth: 6 * 4.8 + implicitHeight: 6 * 2.6 + x: control.leftPadding + anchors.verticalCenter: parent.verticalCenter + radius: 6 * 1.3 + color: Qt.darker(theme.textColor, 1.2) + border.color: theme.backgroundColor + + Rectangle { + id: rectangle + + width: 6 * 2.6 + height: 6 * 2.6 + radius: 10 * 1.3 + color: Qt.lighter(theme.backgroundColor, 1.5) + border.color: theme.textColor + } + + states: [ + State { + name: "off" + when: !control.checked && !control.down + }, + State { + name: "on" + when: control.checked && !control.down + + PropertyChanges { + target: switchHandle + color: Qt.lighter(theme.backgroundColor, 1.5) + border.color: theme.textColor + } + + PropertyChanges { + target: rectangle + x: parent.width - width + + } + }, + State { + name: "off_down" + when: !control.checked && control.down + + PropertyChanges { + target: rectangle + color: theme.textColor + } + + }, + State { + name: "on_down" + extend: "off_down" + when: control.checked && control.down + + PropertyChanges { + target: rectangle + x: parent.width - width + color: theme.textColor + } + + PropertyChanges { + target: switchHandle + color: theme.backgroundColor + border.color: theme.backgroundColor + } + } + ] + } +} diff --git a/plasmoid/contents/ui/TomoWeather.qml b/plasmoid/contents/ui/TomorrowWeatherType.qml rename from plasmoid/contents/ui/TomoWeather.qml rename to plasmoid/contents/ui/TomorrowWeatherType.qml diff --git a/plasmoid/contents/ui/TopBarAnim.qml b/plasmoid/contents/ui/TopBarAnim.qml --- a/plasmoid/contents/ui/TopBarAnim.qml +++ b/plasmoid/contents/ui/TopBarAnim.qml @@ -2,674 +2,207 @@ Item { - anchors.fill: parent - - property bool arrowFormState: false - function toggle() { arrowFormState = !arrowFormState } - - property bool wsocketRunning: false - function wsocrunninganimtoggle() { wsocketRunning = !wsocketRunning, - onrunninanim.running = true; } - - property bool wsocketError: false - function wsocerroranimtoggle() { wsocketError = !wsocketError, - onerroranim.running = true; } + property alias topanimrun: seqrun.running + + //anchors.fill: parent + function wsistalking() { + if(statusId.visible == true){ + numanimtest.running = true + seqrun.running = false + } + else if(statusId.visible == false){ + seqrun.running = true + canvasmiddlegraphics.visible = !canvasmiddlegraphics.visible + } +} - property bool wsocketClosed: false - function wsocclosedanimtoggle() { wsocketClosed = !wsocketClosed } - - property bool wsocketMsg: false - function wsocmsganimtoggle() { onmsganim.running = true; } + function showstatsId() { + canvasmiddlegraphics.opacity = 0 + statusId.visible = true + } + + SequentialAnimation{ + id: numanimtest + SequentialAnimation { + + PropertyAnimation { + id: n1test + target: statusId + property: "opacity" + from: 1; + to: 0; + duration: 3000 + } - StateGroup { - id: lineanimstategrp - states: [ - State { - name: "runninganimstate" - when: wsocketRunning - PropertyChanges { anchors.leftMargin: -50; target: canvasleftline } - PropertyChanges { anchors.rightMargin: -50; target: canvasrightline } - }, - - State { - name: "erroranimstate" - when: wsocketError - PropertyChanges { anchors.leftMargin: -50; target: canvasleftline } - PropertyChanges { anchors.rightMargin: -50; target: canvasrightline } - }, - - State { - name: "closedanimstate" - when: wsocketClosed - PropertyChanges { anchors.leftMargin: 0; target: canvasleftline } - PropertyChanges { anchors.rightMargin: 0; target: canvasrightline } - }, - - State { - name: "msganimstate" - when: wsocketMsg - PropertyChanges { anchors.leftMargin: -50; target: canvasleftline } - PropertyChanges { anchors.rightMargin: -50; target: canvasrightline } - } - ] - - transitions: Transition { - PropertyAnimation { - property: "anchors.leftMargin" - easing.type: Easing.Linear - duration: 500 - } - PropertyAnimation { - property: "anchors.rightMargin" - easing.type: Easing.Linear - duration: 500 - } - - onRunningChanged:{ - if( running === false) { - lineanimstategrp.state = "closedanimstate" - } - } - - } + PropertyAnimation { + id: n1testr + target: statusId + property: "visible" + from: true; + to: false; + duration: 2000 } - SequentialAnimation { - id: onrunninanim - PropertyAnimation { - target: canvascentergraphic - property: "fillStyle" - to: "green" - duration: 1 - } - PropertyAnimation { - target: canvascentergraphic - property: "fillStyle" - to: "grey" - duration: 1000 - } - } + PropertyAnimation { + id: n1testn + target: statusId + property: "opacity" + from: 0; + to: 1; + duration: 20 + } + } + + NumberAnimation{ + id: n2testop + target: canvasmiddlegraphics + property: "opacity" + from: 0; + to: 1; + duration: 300 + } +} + + SequentialAnimation { + id: seqrun - SequentialAnimation { - id: onerroranim - PropertyAnimation { - target: canvascentergraphic - property: "fillStyle" - to: "red" - duration: 1 - } - PropertyAnimation { - target: canvascentergraphic - property: "fillStyle" - to: "grey" - duration: 500 - } + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "i" + from: -50 + to: -70 + duration: 200 } - + SequentialAnimation { - id: onmsganim - ParallelAnimation{ - PropertyAnimation { - target: canvasleftline - property: "anchors.leftMargin" - from: 0 - to: -50 - duration: 200 - } - - PropertyAnimation { - target: canvasrightline - property: "anchors.rightMargin" - from: 0 - to: -50 - duration: 200 - } - - PropertyAnimation { - target: canvascentergraphic - property: "fillStyle" - to: "blue" - duration: 10 + loops: 10 + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 0 + to: 10 + Math.floor(Math.random() * 6) + 1 + duration: 12 } - } - - ParallelAnimation{ - PropertyAnimation { - target: canvasleftline - property: "anchors.leftMargin" - from: - 50 - to: 0 - duration: 200 } - - PropertyAnimation { - target: canvasrightline - property: "anchors.rightMargin" - from: - 50 - to: 0 - duration: 200 - } - - PropertyAnimation { - target: canvascentergraphic - property: "fillStyle" - to: "grey" - duration: 1000 + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 10 + to: 16 + Math.floor(Math.random() * 2) + 1 + duration: 12 + } } - } - - Canvas { - id:canvasleftline - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - - property color strokeStyle: Qt.darker(fillStyle, 1.4) - property color fillStyle: "lightgrey" // red - property int lineWidth: 1 - property bool fill: false - property bool stroke: false - property real alpha: 1.0 - property real scale : 1 - property real rotate : 0 - antialiasing: true - - onLineWidthChanged:requestPaint(); - onFillChanged:requestPaint(); - onStrokeChanged:requestPaint(); - onScaleChanged:requestPaint(); - onRotateChanged:requestPaint(); - - renderTarget: Canvas.FramebufferObject - renderStrategy: Canvas.Cooperative - - - onPaint: { - var ctxside = canvasleftline.getContext('2d'); - var left = 0 - var right = width / 2 - var offleftcenter = width * 0.30 - var offrightcenter = width * 0.58 - var vCenter = height * 0.5 - var vDelta = height / 2 - ctxside.save(); - ctxside.clearRect(0, 0, canvasleftline.width, canvasleftline.height); - ctxside.globalAlpha = canvasleftline.alpha; - ctxside.strokeStyle = canvasleftline.strokeStyle; - ctxside.fillStyle = canvasleftline.fillStyle; - ctxside.lineWidth = canvasleftline.lineWidth; - ctxside.scale(canvasleftline.scale, canvasleftline.scale); - ctxside.rotate(canvasleftline.rotate); - - //Left Line - ctxside.beginPath() - ctxside.moveTo(offleftcenter, vCenter) - ctxside.lineTo(left, vCenter) - ctxside.stroke() - - if (canvasleftline.fill) - ctxside.fill(); - if (canvasleftline.stroke) - ctxside.stroke(); - ctxside.restore(); + ParallelAnimation{ + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 16 + Math.floor(Math.random() * 2) + 1 + to: 10 + Math.floor(Math.random() * 6) + 1 + duration: 12 } - } - - Canvas { - id:canvasrightline - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - - property color strokeStyle: Qt.darker(fillStyle, 1.4) - property color fillStyle: "lightgrey" // red - property int lineWidth: 1 - property bool fill: false - property bool stroke: false - property real alpha: 1.0 - property real scale : 1 - property real rotate : 0 - antialiasing: true - - onLineWidthChanged:requestPaint(); - onFillChanged:requestPaint(); - onStrokeChanged:requestPaint(); - onScaleChanged:requestPaint(); - onRotateChanged:requestPaint(); - - renderTarget: Canvas.FramebufferObject - renderStrategy: Canvas.Cooperative - - - onPaint: { - var ctxside = canvasrightline.getContext('2d'); - var left = 0 - var right = width - var offleftcenter = width * 0.30 - var offrightcenter = width / 1.65 - var vCenter = height * 0.5 - var vDelta = height / 6 - - ctxside.save(); - ctxside.clearRect(0, 0, canvasrightline.width, canvasrightline.height); - ctxside.globalAlpha = canvasrightline.alpha; - ctxside.strokeStyle = canvasrightline.strokeStyle; - ctxside.fillStyle = canvasrightline.fillStyle; - ctxside.lineWidth = canvasrightline.lineWidth; - ctxside.scale(canvasrightline.scale, canvasrightline.scale); - ctxside.rotate(canvasrightline.rotate); - - //Right Line - ctxside.beginPath() - ctxside.moveTo(offrightcenter, vCenter) - ctxside.lineTo(right, vCenter) - ctxside.stroke() + } + + ParallelAnimation { + NumberAnimation{ + target: canvasmiddlegraphics + property: "amplitude" + from: 10 + Math.floor(Math.random() / 6) + 1 + to: 0 + duration: 12 + } - if (canvasrightline.fill) - ctxside.fill(); - if (canvasrightline.stroke) - ctxside.stroke(); - ctxside.restore(); } - } - - Canvas { - id:canvasleftgraphic - width: 100 - height: 150 - anchors.verticalCenter: canvasleftline.verticalCenter - anchors.horizontalCenter: canvasleftline.horizontalCenter - anchors.horizontalCenterOffset: -35; - anchors.verticalCenterOffset: 0; - //anchors.left: canvasleftline.left - - property color strokeStyle: Qt.darker(fillStyle, 1.4) - property color fillStyle: "lightgrey" // red - property int lineWidth: 1 - property bool fill: false - property bool stroke: false - property real alpha: 1.0 - property real scale : 1 - property real rotate : 0 - antialiasing: true - - onLineWidthChanged:requestPaint(); - onFillChanged:requestPaint(); - onStrokeChanged:requestPaint(); - onScaleChanged:requestPaint(); - onRotateChanged:requestPaint(); - - renderTarget: Canvas.FramebufferObject - renderStrategy: Canvas.Cooperative - - - onPaint: { - var ctxside = canvasleftgraphic.getContext('2d'); - var offleftcenter = width * 0.27 - var offrightcenter = width * 0.58 - var vCenter = height * 0.5 - var vDelta = height / 6 - - ctxside.save(); - ctxside.clearRect(0, 0, canvasleftgraphic.width, canvasleftgraphic.height); - ctxside.globalAlpha = canvasleftgraphic.alpha; - ctxside.strokeStyle = canvasleftgraphic.strokeStyle; - ctxside.fillStyle = canvasleftgraphic.fillStyle; - ctxside.lineWidth = canvasleftgraphic.lineWidth; - ctxside.scale(canvasleftgraphic.scale, canvasleftgraphic.scale); - ctxside.rotate(canvasleftgraphic.rotate); - ctxside.lineJoin = "bevel"; - - //Left Logo - ctxside.beginPath(); - ctxside.moveTo(offleftcenter + 20, vCenter - 30); - ctxside.lineTo(offleftcenter + 0, vCenter); - ctxside.lineTo(offleftcenter + 20, vCenter + 30); - ctxside.lineTo(offleftcenter + 20, vCenter + 30); - ctxside.lineTo(offleftcenter + 05, vCenter); - ctxside.lineTo(offleftcenter + 20, vCenter - 30); - ctxside.closePath(); - ctxside.fill(); - ctxside.stroke(); - - ctxside.beginPath(); - ctxside.moveTo(offleftcenter + 20, vCenter + 30); - ctxside.lineTo(offleftcenter + 30, vCenter + 30); - ctxside.moveTo(offleftcenter + 20, vCenter - 30); - ctxside.lineTo(offleftcenter + 30, vCenter - 30); - ctxside.stroke(); - - if (canvasleftgraphic.fill) - ctxside.fill(); - if (canvasleftgraphic.stroke) - ctxside.stroke(); - ctxside.restore(); } - } - - Canvas { - id:canvasrightgraphic - width: 300 - height: 150 - anchors.verticalCenter: canvasrightline.verticalCenter - anchors.horizontalCenter: canvasrightline.horizontalCenter - anchors.horizontalCenterOffset: 0; - anchors.verticalCenterOffset: 0; - //anchors.left: canvasleftline.left - - property color strokeStyle: Qt.darker(fillStyle, 1.4) - property color fillStyle: "lightgrey" // red - property int lineWidth: 1 - property bool fill: true - property bool stroke: true - property real alpha: 1.0 - property real scale : 1 - property real rotate : 0 - antialiasing: true - - onLineWidthChanged:requestPaint(); - onFillChanged:requestPaint(); - onStrokeChanged:requestPaint(); - onScaleChanged:requestPaint(); - onRotateChanged:requestPaint(); - - renderTarget: Canvas.FramebufferObject - renderStrategy: Canvas.Cooperative - - - onPaint: { - var ctxside = canvasrightgraphic.getContext('2d'); - var offleftcenter = width * 0.30 - var offrightcenter = width * 0.58 - var vCenter = height * 0.5 - var vDelta = height / 6 - - ctxside.save(); - ctxside.clearRect(0, 0, canvasrightgraphic.width, canvasrightgraphic.height); - ctxside.globalAlpha = canvasrightgraphic.alpha; - ctxside.strokeStyle = canvasrightgraphic.strokeStyle; - ctxside.fillStyle = canvasrightgraphic.fillStyle; - ctxside.lineWidth = canvasrightgraphic.lineWidth; - ctxside.scale(canvasrightgraphic.scale, canvasrightgraphic.scale); - ctxside.rotate(canvasrightgraphic.rotate); - ctxside.lineJoin = "bevel"; - - //Right Logo - ctxside.beginPath(); - ctxside.moveTo(offleftcenter + 70, vCenter - 30); - ctxside.lineTo(offleftcenter + 90, vCenter); - ctxside.lineTo(offleftcenter + 70, vCenter + 30); - ctxside.lineTo(offleftcenter + 70, vCenter + 30); - ctxside.lineTo(offleftcenter + 85, vCenter); - ctxside.lineTo(offleftcenter + 70, vCenter - 30); - ctxside.closePath(); - ctxside.fill(); - ctxside.stroke(); - - ctxside.beginPath(); - ctxside.moveTo(offleftcenter + 70, vCenter + 30); - ctxside.lineTo(offleftcenter + 60, vCenter + 30); - ctxside.moveTo(offleftcenter + 70, vCenter - 30); - ctxside.lineTo(offleftcenter + 60, vCenter - 30); - ctxside.fill(); - ctxside.stroke(); + } - if (canvasrightgraphic.fill) - ctxside.fill(); - if (canvasrightgraphic.stroke) - ctxside.stroke(); - ctxside.restore(); + ParallelAnimation { + + PropertyAnimation { + target: canvasmiddlegraphics + property: "visible" + from: true + to: false + duration: 20 } - } - - Canvas { - id:canvascentergraphic - width: parent.width - height: parent.height - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - anchors.horizontalCenterOffset: 0; - anchors.verticalCenterOffset: 0; - //anchors.left: canvasleftline.left - - property color strokeStyle: Qt.darker(fillStyle, 1.4) - property color fillStyle: "lightgrey" // red - property int lineWidth: 1 - property bool fill: false - property bool stroke: false - property real alpha: 1.0 - property real scale : 1 - property real rotate : 0 - antialiasing: true + } + } - onLineWidthChanged:requestPaint(); - onFillChanged:requestPaint(); - onStrokeChanged:requestPaint(); - onScaleChanged:requestPaint(); - onRotateChanged:requestPaint(); - onFillStyleChanged:requestPaint(); - - renderTarget: Canvas.FramebufferObject - renderStrategy: Canvas.Cooperative - - - onPaint: { - var ctxcircle = canvascentergraphic.getContext('2d'); - var offleftcenter = width / 2 - var offrightcenter = width / 2 - var vCenter = height * 0.5 - var vDelta = height / 6 - - ctxcircle.save(); - ctxcircle.clearRect(0, 0, canvascentergraphic.width, canvascentergraphic.height); - ctxcircle.globalAlpha = canvascentergraphic.alpha; - ctxcircle.strokeStyle = canvascentergraphic.strokeStyle; - ctxcircle.fillStyle = canvascentergraphic.fillStyle; - ctxcircle.lineWidth = canvascentergraphic.lineWidth; - ctxcircle.scale(canvascentergraphic.scale, canvascentergraphic.scale); - ctxcircle.rotate(canvascentergraphic.rotate); - - //Top Row - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter - 30, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter - 30, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - //Second Row - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 30, vCenter - 20, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter - 20, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter - 20, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 0, vCenter - 20, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - //Third Row - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 40, vCenter - 10, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 30, vCenter - 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter - 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter - 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter, vCenter - 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter + 10, vCenter - 10, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - //Fourth Row - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 45, vCenter - 0, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 30, vCenter - 0, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter - 0, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter - 0, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 0, vCenter - 0, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter + 15, vCenter - 0, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - //Fifth Row - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 40, vCenter + 10, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 30, vCenter + 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter + 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter + 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 0, vCenter + 10, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter + 10, vCenter + 10, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - //Sixth Row - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 30, vCenter + 20, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter + 20, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter + 20, 2, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter, vCenter + 20, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - //Last Row - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 20, vCenter + 30, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - ctxcircle.beginPath(); - ctxcircle.arc(offleftcenter - 10, vCenter + 30, 1, 10 * Math.PI, false); - ctxcircle.fill(); - ctxcircle.closePath(); - ctxcircle.stroke(); - - - if (canvascentergraphic.fill) - ctxcircle.fill(); - if (canvascentergraphic.stroke) - ctxcircle.stroke(); - ctxcircle.restore(); - } - } + Canvas { + id:canvasmiddlegraphics + width: parent.width + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + visible: true + opacity: 0 + + property color strokeStyle: Qt.darker(fillStyle, 1.5) + property color fillStyle: Qt.darker("deepskyblue", 1.1) + property real lineWidth: 1.6 + property bool fill: true + property bool stroke: false + property real alpha: 1.0 + property real scale : 1 + property real rotate : 0 + property real i: -50 + property real waveSpeed: 10 + property real amplitude: 0 + antialiasing: true + smooth: true + + onLineWidthChanged:requestPaint(); + onFillChanged:requestPaint(); + onStrokeChanged:requestPaint(); + onScaleChanged:requestPaint(); + onRotateChanged:requestPaint(); + onIChanged: requestPaint(); + + renderTarget: Canvas.FramebufferObject + renderStrategy: Canvas.Cooperative + + + onPaint: { + var ctxside = canvasmiddlegraphics.getContext('2d'); + var hCenter = width * 0.5 + var vCenter = height * 0.5 + var size = 12 + var period = 15; + var dotSpeed = 5; + + function draw_line(i){ + var oStartx=10; + var oStarty=( height / 2 ) + ctxside.beginPath(); + ctxside.moveTo( oStartx, oStarty + amplitude * Math.sin( x / period + ( i / 5 ) ) ); + ctxside.lineWidth = 1; + ctxside.strokeStyle = 'steelblue'; + + for(var Vx = oStartx; Vx < width * 0.8; Vx++) { + + var Vy = amplitude * Math.sin( Vx / period + ( i / 5 + Math.floor(Math.random() * 2) + 0)); + ctxside.lineTo( oStartx + Vx, oStarty + Vy); + } + + ctxside.stroke(); + } + + function render(){ + var st = i + ctxside.clearRect(0, 0, width, height); + draw_line(st) + + } + render(); + } + + } + } diff --git a/plasmoid/contents/ui/Weather.qml b/plasmoid/contents/ui/Weather.qml deleted file mode 100644 --- a/plasmoid/contents/ui/Weather.qml +++ /dev/null @@ -1,191 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Window 2.2 -import QtQuick.Layouts 1.3 -import QtQuick.Controls 2.0 -import QtQml.Models 2.2 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.plasmoid 2.0 -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras - -Column { - spacing: 6 - //anchors.right: parent.right - //anchors.left: parent.left - - //readonly property bool sentByMe: model.recipient !== "Me" - property alias cttemp: currenttempitem.text - property alias lttemp: lowtempitem.text - property alias httemp: hightempitem.text - - Row { - id: messageRow - spacing: 6 - - Rectangle{ - id: messageWrapper - width: cbwidth - height: messageRect.height - color: theme.backgroundColor - - Rectangle { - id: messageRect - width: cbwidth / 1.1 - height: 100 - //anchors.right: avatar.right - color: theme.backgroundColor - - Rectangle { - id: rectanglectt - width: 100 - height: 60 - color: "#00000000" - anchors.top: todayweather.bottom - anchors.topMargin: 5 - - PlasmaComponents.Label { - id: currenttemplable - text: "Current" - font.pointSize: 12 - //font.family: "Courier" - font.bold: true - anchors.top: parent.top - anchors.topMargin: 8 - anchors.verticalCenter: currenttempaniimage.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 15 - } - - PlasmaComponents.Label { - id: currenttempitem - x: 73 - y: 38 - text: "100 " - anchors.horizontalCenter: currenttemplable.horizontalCenter - anchors.top: currenttemplable.bottom - anchors.topMargin: 10 - } - - PlasmaComponents.Label { - id: weatherwidgetcurrenttempdegrees - text: qsTr("°") - anchors.verticalCenterOffset: -5 - anchors.verticalCenter: currenttempitem.verticalCenter - anchors.left: currenttempitem.right - anchors.leftMargin: 5 - font.pixelSize: 12 - } - - - } - - Rectangle { - id: rectangleltt - width: 100 - height: 60 - color: "#00000000" - anchors.top: todayweather.bottom - anchors.topMargin: 5 - anchors.left: rectanglectt.right - anchors.leftMargin: 0 - - PlasmaComponents.Label { - id: lowtemplable - anchors.left: parent.left - anchors.verticalCenter: lowtempaniimage.verticalCenter - text: "Low" - //font.family: "Courier" - font.pointSize: 12 - font.bold: true - anchors.top: parent.top - anchors.topMargin: 8 - anchors.leftMargin: 30 - } - - PlasmaComponents.Label { - id: lowtempitem - x: 63 - y: 33 - anchors.top: lowtemplable.bottom - text: "100" - anchors.horizontalCenter: lowtemplable.horizontalCenter - anchors.topMargin: 10 - } - - PlasmaComponents.Label { - id: weatherwidgetlowtempdegree - text: qsTr("°") - anchors.verticalCenterOffset: -5 - anchors.verticalCenter: lowtempitem.verticalCenter - anchors.left: lowtempitem.right - anchors.leftMargin: 5 - font.pixelSize: 12 - } - - - } - - Rectangle { - id: rectanglehtt - width: 100 - height: 60 - color: "#00000000" - anchors.top: todayweather.bottom - anchors.topMargin: 5 - anchors.left: rectangleltt.right - anchors.leftMargin: 0 - - PlasmaComponents.Label { - id: hightempitem - x: 65 - y: 70 - anchors.top: hightemplable.bottom - text: "100" - anchors.topMargin: 10 - anchors.horizontalCenter: hightemplable.horizontalCenter - } - - PlasmaComponents.Label { - id: hightemplable - anchors.left: parent.left - text: "High" - font.pointSize: 12 - font.bold: true - //font.family: "Courier" - anchors.top: parent.top - anchors.topMargin: 8 - anchors.verticalCenter: hightempaniimage.verticalCenter - anchors.leftMargin: 30 - } - - PlasmaComponents.Label { - id: weatherwidgethightempdegree - text: qsTr("°") - anchors.verticalCenterOffset: -5 - anchors.verticalCenter: hightempitem.verticalCenter - anchors.left: hightempitem.right - anchors.leftMargin: 5 - font.pixelSize: 12 - } - - - } - - PlasmaComponents.Label { - id: todayweather - text: qsTr("Today's Weather") - anchors.left: parent.left - anchors.leftMargin: 10 - //font.family: "Courier" - font.italic: false - font.bold: true - font.pixelSize: 17 - } - - - - } - } - - } -} diff --git a/plasmoid/contents/ui/WebViewType.qml b/plasmoid/contents/ui/WebViewType.qml new file mode 100644 --- /dev/null +++ b/plasmoid/contents/ui/WebViewType.qml @@ -0,0 +1,75 @@ +import QtQuick 2.0 +import QtQml.Models 2.2 +import QtQuick.Controls 2.0 +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.private.mycroftplasmoid 1.0 as PlasmaLa +import QtWebKit 3.0 +import QtWebKit.experimental 1.0 + +Column { + spacing: 6 + anchors.right: parent.right + + Row { + id: messageRow + spacing: 6 + + Rectangle { + id: messageRect + width: cbwidth + radius: 2 + height: newikiFlick.height + color: theme.backgroundColor + + Flickable { + id: newikiFlick + width: messageRect.width + height: units.gridUnit * 10 + + WebView { + id: wikiview + anchors.fill: parent + experimental.preferredMinimumContentsWidth: 450 + url: model.InputQuery + + Rectangle { + id: hoverBg1 + anchors.right: parent.right + anchors.rightMargin: 15 + anchors.top: parent.top + anchors.topMargin: 5 + visible: true + height: units.gridUnit * 2.2 + width: units.gridUnit * 2.2 + radius: 10 + z: 2 + color: theme.backgroundColor + + PlasmaComponents.ToolButton { + id: viewExtendedScreen + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + visible: true + iconSource: "file-zoom-in" + flat: false + checked: false + focus: false + height: units.gridUnit * 2 + width: units.gridUnit * 2 + z: 10 + + onClicked: { + var browsrUrl = model.InputQuery + PlasmaLa.LaunchApp.runCommand("x-www-browser", browsrUrl) + } + } + } + + } + ScrollIndicator.vertical: ScrollIndicator { } + + } + } + } + } diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -30,23 +30,24 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.private.mycroftplasmoid 1.0 as PlasmaLa import org.kde.plasma.private.volume 0.1 +import QtWebKit 3.0 Item { id: main Layout.fillWidth: true; Plasmoid.toolTipMainText: i18n("Mycroft") Plasmoid.switchWidth: units.gridUnit * 15 Plasmoid.switchHeight: units.gridUnit * 15 - Layout.minimumHeight: units.gridUnit * 18 - Layout.minimumWidth: units.gridUnit * 22 + Layout.minimumHeight: units.gridUnit * 22 + Layout.minimumWidth: units.gridUnit * 24 Component.onCompleted: { mycroftStatusCheckSocket.active = true - //console.log(mycroftStatusCheckSocket.status); - initFile(); - + refreshAllSkills(); + wordIndex(); } + property var skillList: [] property alias cbwidth: rectangle2.width property string defaultmcorestartpath: "/usr/share/plasma/plasmoids/org.kde.plasma.mycroftplasmoid/contents/code/startservice.sh" property string defaultmcorestoppath: "/usr/share/plasma/plasmoids/org.kde.plasma.mycroftplasmoid/contents/code/stopservice.sh" @@ -57,519 +58,635 @@ property string customloc: " " property string coreinstallstartpath: defaultmcorestartpath property string coreinstallstoppath: defaultmcorestoppath - property var files: [] - property variant wordListArray: [] - - function initFile() { - var keywordFileTemp, listFileTemp,path,wordlist; - var baseLocation = '/usr/share/plasma/plasmoids/org.kde.plasma.mycroftplasmoid/contents/ui/suggestion/'; - var diclocation = '/usr/share/dict/' - var path = diclocation + 'words'; - var wordlist = readFile(path); - wordListArray = wordlist.toString().split('\n'); - wordListArray = wordListArray.filter(Boolean); - - - files = [{ - id: '1', - category: 'math', - keywordFile: baseLocation + 'MathKeywords.txt', - listFile: baseLocation + 'MathList.txt', - }, { - id: '2', - category: 'general', - keywordFile: baseLocation + 'GeneralKeywords.txt', - listFile: baseLocation + 'GeneralList.txt', - }, { - id: '3', - category: 'desktop', - keywordFile: baseLocation + 'DesktopKeywords.txt', - listFile: baseLocation + 'DesktopList.txt', - }, { - id: '4', - category: 'weather', - keywordFile: baseLocation + 'WeatherKeywords.txt', - listFile: baseLocation + 'WeatherList.txt', - }, { - id: '5', - category: 'wiki', - keywordFile: baseLocation + 'WikiKeywords.txt', - listFile: baseLocation + 'WikiList.txt', - }]; - for (var i = 0; i < files.length; i++) { - keywordFileTemp = readFile(files[i].keywordFile); - keywordFileTemp = keywordFileTemp.toString().split('\n'); - keywordFileTemp = keywordFileTemp.filter(Boolean); - files[i].keywordFile = keywordFileTemp; - listFileTemp = readFile(files[i].listFile); - listFileTemp = listFileTemp.toString().split('\n'); - listFileTemp = listFileTemp.filter(Boolean); - files[i].listFile = listFileTemp; + property variant searchIndex: [] + property variant results: [] + property var smintent + property var dataContent + + function retryConn(){ + socket.active = true + if (socket.active = false){ + console.log(socket.errorString) } - setSuggestionsRandom(); } - function readFile(filename) { - if (PlasmaLa.FileReader.file_exists_local(filename)) { - try { - var content = PlasmaLa.FileReader.read(filename).toString("utf-8"); - return content; - } catch (e) { - console.log('Mycroft UI - Read File' + e); - return 0; - } - } else { - return 0; + function filterSpeak(msg){ + convoLmodel.append({ + "itemType": "NonVisual", + "InputQuery": msg + }) + inputlistView.positionViewAtEnd(); + } + + function filterincoming(intent, metadata) { + var intentVisualArray = ['WeatherSkill:CurrentWeatherIntent']; + var itemType + + if (intentVisualArray.indexOf(intent) !== -1) { + switch (intent){ + case "WeatherSkill:CurrentWeatherIntent": + itemType = "CurrentWeather" + break; + } + + convoLmodel.append({"itemType": itemType, "itemData": metadata}) + } + + else { + convoLmodel.append({"itemType": "WebViewType", "InputQuery": metadata.url}) } } - function suggestionsRandom() { - - var randomFile, randomText = []; - for (var i = 0; i < 3; i++) { - randomFile = files[Math.floor(files.length * Math.random())].listFile; - randomText[i] = randomFile[Math.floor(randomFile.length * Math.random())]; + function isBottomEdge() { + return plasmoid.location == PlasmaCore.Types.BottomEdge; + } + + function clearList() { + inputlistView.clear() } - - return randomText; + + function muteMicrophone() { + if (!sourceModel.defaultSource) { + return; + } + var toMute = !sourceModel.defaultSource.muted; + sourceModel.defaultSource.muted = toMute; } - function setSuggestionsRandom() { - var random = suggestionsRandom(); - suggst.suggest1 = random[0]; - suggst.suggest2 = random[1]; - suggst.suggest3 = random[2]; + + function refreshAllSkills(){ + getSkills(); + msmskillsModel.reload(); } - function setTerms(suggestTerm) { - if (suggestTerm.length > 0) { - var keywordToSearch = suggestTerm[suggestTerm.length - 1]; - var result = wordSuggest(keywordToSearch); - if (result.length>2) { - suggst.suggest1 = result[0]; - suggst.suggest2 = result[1]; - suggst.suggest3 = result[2]; - } else { - //console.log('should not ever run'); + function getAllSkills(){ + if(skillList.length <= 0){ + getSkills(); + } + return skillList; + } + function getSkillByName(skillName){ + var tempSN=[]; + for(var i = 0; i 0) { - for (a = suggestion.length; a < 3; a++) { - suggestion[a] = list[Math.floor(list.length * Math.random())]; - } - return suggestion; - } - for (k = 0; k < 3; k++) { - suggestion[k] = list[Math.floor(list.length * Math.random())]; - } - return suggestion; - } - } - } - if (suggestion.length < 1) { - suggestion = wordListArray.filter(function(stackValue) { - if (stackValue) { - return (stackValue.substring(0, keywordToSearch.length) === keywordToSearch); - } - //return stackValue; - }); - if (suggestion.length < 3) { - for (a = suggestion.length; a < 3; a++) { - suggestion[a] = wordListArray[Math.floor(wordListArray.length * Math.random())]; - } - } else { - for (k = 0; k < 3; k++) { - suggestion[k] = suggestion[Math.floor(suggestion.length * Math.random())]; - } - } - suggestionFound = false; - return suggestion; - } - return suggestion; + function wordIndex(){ + searchIndex = ["Apache","Autoresponder","BitTorrent","Blog","Bookmark","Bot","Broadband","Captcha","Certificate","Client","Cloud","Cloud Computing","CMS","Cookie","CSS","Cyberspace","Denial of Service","Define","Earth","Facebook","Firefox","Firewall","FTP","Gateway","Google","Google Drive","Gopher","Hashtag","Hit","Home Page","Joke", "Japan", "Inbox","Internet","IP","IP Address","Moon","Meta Tag","Mars","Wallpaper","Mercury","Youtube","Alarm","Pi","News","Time","Distance","Weather","Song","Search Engine","Social Networking","Socket","Spam","Spider","Spoofing","SSH","SSL","Static Website","Twitter", "Venus","XHTML"]; } - function muteMicrophone() { - if (!sourceModel.defaultSource) { - return; - } - var toMute = !sourceModel.defaultSource.muted; - sourceModel.defaultSource.muted = toMute; + function quicksearch(inputvalue){ + var inputTerms = inputvalue + var results = []; + var termsArray = inputTerms + var prefix = termsArray; + var terms = termsArray[termsArray.length -1]; + + for (var i = 0; i < searchIndex.length; i++) { + var a = searchIndex[i].toLowerCase(), + t = a.indexOf(terms); + + if (t > -1) { + results.push(a); + } + } + evaluateResults(results, inputTerms, terms); } - - - function filterinput() { - conversationInputList.append({"InputQuery": qboxoutput.text}); - inputlistView.positionViewAtEnd(); - } - - - function isBottomEdge() { - return plasmoid.location == PlasmaCore.Types.BottomEdge; + + function evaluateResults(intresult, intinterms, intterms) { + var results = intresult + var inputTerms = intinterms + var terms = intterms + if (results.length > 0 && inputTerms.length > 0 && terms.length !== 0) { + if (results.length > 1) { + suggst.suggest1 = results[0]; + suggst.suggest2 = results[1]; + suggst.suggest3 = results[2]; + } + else { + //Should not show undefined + } + } + else if (inputTerms.length > 0 && terms.length !== 0) { + //Should show no results + } } + - function clearList() { - inputlistView.clear() - } - - Timer { +Timer { id: timer } function delay(delayTime, cb) { timer.interval = delayTime; timer.repeat = false; timer.triggered.connect(cb); timer.start(); - } +} + +Item { + id: topBar + Layout.fillWidth: true + height: units.gridUnit * 2 + z: 101 + anchors { + top: main.top + topMargin: -1 + left: main.left + leftMargin: -1 + right: main.right + rightMargin: -1 + } - Item { - id: root - Layout.fillWidth: true; - Layout.fillHeight: true; - property int minimumHeight: inputlistView.height ? inputlistView.height : rectanglebottombar.height + 30 - property int maximumHeight: minimumHeight +Rectangle { + id: topBarBGrect + anchors.fill: parent + color: Qt.darker(theme.backgroundColor, 1.8) + z: 101 + +LeftBarAnim { + id: barAnim + anchors.left: parent.left + anchors.leftMargin: -units.gridUnit * 1 + anchors.verticalCenter: parent.verticalCenter + z: 6 + transformOrigin: Item.Center + width: units.gridUnit * 4 + height: units.gridUnit * 4 +} + + PlasmaComponents.Label { + anchors.top: parent.top + anchors.topMargin: 4 + anchors.left: barAnim.right + anchors.leftMargin: 2 + id: statusId + text: i18n("Mycroft is disabled") + font.bold: false; + font.pixelSize: 14 + color: "#fff" + } + +TopBarAnim { + id: midbarAnim + anchors.verticalCenter: parent.verticalCenter + anchors.left: statusId.left + anchors.right: topbarDividerline.left + //width: units.gridUnit * 4 + height: units.gridUnit * 4 + z: 6 +} + + PlasmaCore.SvgItem { + id: topbarDividerline + anchors { + right: mycroftstartservicebutton.left + rightMargin: units.gridUnit * 0.25 + top: parent.top + topMargin: 0 + bottom: parent.bottom + bottomMargin: 0 + } + + width: linetopvertSvg.elementSize("vertical-line").width + z: 110 + elementId: "vertical-line" + + svg: PlasmaCore.Svg { + id: linetopvertSvg; + imagePath: "widgets/line" + } + } + + + SwitchButton { + anchors.right: qinputmicbx.left + anchors.verticalCenter: topBarBGrect.verticalCenter + id: mycroftstartservicebutton + //iconSource: "media-playback-start" + //tooltip: i18n("Start Mycroft") + //flat: true + checked: false + //focus: false + width: Math.round(units.gridUnit * 2) + height: width + z: 102 + + onClicked: { + //mycroftstartservicebutton.checked = !mycroftstartservicebutton.checked + if (mycroftstartservicebutton.checked === false) { + //mycroftstartservicebutton.iconSource = "media-playback-start" + PlasmaLa.LaunchApp.runCommand("bash", coreinstallstoppath); + convoLmodel.clear() + suggst.visible = true; + socket.active = false; + midbarAnim.showstatsId() + } + + if (mycroftstartservicebutton.checked === true) { + //mycroftstartservicebutton.iconSource = "media-playback-pause" + PlasmaLa.LaunchApp.runCommand("bash", coreinstallstartpath); + convoLmodel.clear() + suggst.visible = true; + delay(10000, function() { + socket.active = true; + }) + } + + } + + } + + PlasmaComponents.ToolButton { + id: qinputmicbx + anchors.right: pinButton.left + anchors.verticalCenter: parent.verticalCenter + iconSource: "mic-on" + tooltip: i18n("Toggle Mic") + flat: true + width: Math.round(units.gridUnit * 2) + height: width + z: 102 + + onClicked: { + if (qinputmicbx.iconSource == "mic-on") { + qinputmicbx.iconSource = "mic-off" + } + else if (qinputmicbx.iconSource == "mic-off") { + qinputmicbx.iconSource = "mic-on" + } + muteMicrophone() + } + } + + + + PlasmaComponents.ToolButton { + id: pinButton + anchors.right: parent.right + anchors.verticalCenter: topBarBGrect.verticalCenter + width: Math.round(units.gridUnit * 1.5) + height: width + checkable: true + iconSource: "window-pin" + onCheckedChanged: plasmoid.hideOnWindowDeactivate = !checked + z: 102 + } + + } +} + +PlasmaCore.SvgItem { + anchors { + left: main.left + right: main.right + top: root.top + } + width: 1 + height: horlinetopbarSvg.elementSize("horizontal-line").height + + elementId: "horizontal-line" + z: 110 + svg: PlasmaCore.Svg { + id: horlinetopbarSvg; + imagePath: "widgets/line" + } +} + +Item { + id: root anchors { - fill: parent - topMargin: isBottomEdge() ? 0 : 7 - bottomMargin: isBottomEdge() ? 7 : 0 + top: topBar.bottom + bottom: rectanglebottombar.top + left: parent.left + right: parent.right } - WebSocket { + WebSocket { id: mycroftStatusCheckSocket - url: "ws://0.0.0.0:8181/core" + url: innerset.wsurl onTextMessageReceived: { - console.log("Mycroft Status Ping"); + //console.log("Mycroft Status Ping"); } active: true onStatusChanged: if (mycroftStatusCheckSocket.status == WebSocket.Open && socket.status == WebSocket.Closed) { console.log("Activated") socket.active = true mycroftstartservicebutton.checked = true mycroftstartservicebutton.iconSource = "media-playback-pause" - statusId.text = "Mycroft is Ready" + statusId.text = i18n("Mycroft is Ready") statusId.color = "green" + statusId.visible = true } else if (mycroftStatusCheckSocket.status == WebSocket.Error) { mycroftstartservicebutton.checked = false mycroftstartservicebutton.iconSource = "media-playback-start" - statusId.text = "Mycroft is Disabled" + statusId.text = i18n("Mycroft is Disabled") statusId.color = "#f4bf42" + statusId.visible = true } } WebSocket { id: socket - url: "ws://0.0.0.0:8181/core" + url: innerset.wsurl onTextMessageReceived: { var somestring = JSON.parse(message) var msgType = somestring.type; qinput.focus = false; if (msgType === "recognizer_loop:utterance") { var intpost = somestring.data.utterances; qinput.text = intpost.toString() + midbarAnim.wsistalking() } - if (msgType === "speak") { + if (somestring && somestring.data && typeof somestring.data.intent_type !== 'undefined'){ + smintent = somestring.data.intent_type; + console.log('intent type: ' + smintent); + } + + if(somestring && somestring.data && typeof somestring.data.utterance !== 'undefined' && somestring.type === 'speak'){ + filterSpeak(somestring.data.utterance); + } + + if(somestring && somestring.data && typeof somestring.data.desktop !== 'undefined') { + dataContent = somestring.data.desktop + filterincoming(smintent, dataContent) + } + + if (msgType === "speak" && !plasmoid.expanded && notificationswitch.checked == true) { var post = somestring.data.utterance; - qboxoutput.text = post; - filterinput() var title = "Mycroft's Reply:" var notiftext = " "+ post; - - if (!plasmoid.expanded && notificationswitch.checked == true) { - PlasmaLa.Notify.mycroftResponse(title, notiftext); -} + PlasmaLa.Notify.mycroftResponse(title, notiftext); } barAnim.wsocmsganimtoggle() + midbarAnim.wsistalking() } onStatusChanged: if (socket.status == WebSocket.Error) { statusId.text = "Connection Error" statusId.color = "red" - barAnim.wsocerroranimtoggle() + mycroftstartservicebutton.circolour = "red" + console.log(socket.errorString) + retryConn() + barAnim.wsocmsganimtoggle() + midbarAnim.showstatsId() } else if (socket.status == WebSocket.Open) { statusId.text = "Mycroft is Ready" statusId.color = "green" - barAnim.wsocrunninganimtoggle() + mycroftstartservicebutton.circolour = "green" + barAnim.wsocmsganimtoggle() + //midbarAnim.topanimrun = false; mycroftStatusCheckSocket.active = false; + midbarAnim.showstatsId() } else if (socket.status == WebSocket.Closed) { statusId.text = "Mycroft is Disabled" statusId.color = "#f4bf42" - barAnim.wsocclosedanimtoggle() + mycroftstartservicebutton.circolour = Qt.lighter(theme.backgroundColor, 1.5) + barAnim.wsocmsganimtoggle() + midbarAnim.showstatsId() } else if (socket.status == WebSocket.Connecting) { statusId.text = "Starting Up" statusId.color = "grey" + mycroftstartservicebutton.circolour = "steelblue" + midbarAnim.showstatsId() } else if (socket.status == WebSocket.Closing) { statusId.text = "Shutting Down" statusId.color = "grey" + midbarAnim.showstatsId() } - + //active: false; + } - active: false; - } + ColumnLayout { + id: sidebar + Layout.fillHeight: true; + width: units.gridUnit * 2 - Rectangle { - id: rectangletopbar - height: 40 - color: theme.backgroundColor - anchors.top: root.top - anchors.right: root.right - anchors.rightMargin: 0 - anchors.left: root.left - anchors.leftMargin: 0 - border.width: 0 - border.color: "#80000000" - z: 2 - - - RowLayout { - id: topbarinnergridLayout - anchors.right: parent.right - anchors.left: parent.left - Layout.fillHeight: true - Layout.fillWidth: true + PlasmaComponents.TabBar { + id: tabBar + anchors.fill: parent + tabPosition: Qt.LeftEdge; - PlasmaComponents.ToolButton { - anchors.left: parent.left - id: mycroftSettingsTab - iconSource: "games-config-options" - flat: true - checked: false - focus: false - minimumHeight: 4 - minimumWidth: 4 - - onClicked: { - mycroftSettingsColumn.visible = !mycroftSettingsColumn.visible - if (mycroftSettingsColumn.visible === true) { - mycroftanimbar.visible = false - } else if (mycroftSettingsColumn.visible === false) { - mycroftanimbar.visible = true - } - } - } - - - PlasmaComponents.ToolButton { - anchors.left: mycroftSettingsTab.right - anchors.leftMargin: 2 - id: mycroftstartservicebutton - iconSource: "media-playback-start" - flat: true - checked: false - focus: false - minimumHeight: 4 - minimumWidth: 4 - - onClicked: { - //console.log(coreinstallstartpath); - mycroftstartservicebutton.checked = !mycroftstartservicebutton.checked - if (mycroftstartservicebutton.checked === false) { - mycroftstartservicebutton.iconSource = "media-playback-start" - PlasmaLa.LaunchApp.runCommand("bash", coreinstallstoppath); - conversationInputList.clear() - suggst.visible = true; - socket.active = false; - } - - if (mycroftstartservicebutton.checked === true) { - mycroftstartservicebutton.iconSource = "media-playback-pause" - PlasmaLa.LaunchApp.runCommand("bash", coreinstallstartpath); - conversationInputList.clear() - suggst.visible = true; - delay(15000, function() { - socket.active = true; - }) - } - - } - - } - - - PlasmaComponents.Label { - anchors.top: parent.top - anchors.topMargin: 4 - anchors.horizontalCenter: parent.horizontalCenter - anchors.horizontalCenterOffset: -10 - id: statusId - text: "Mycroft is disabled" - font.bold: false; - font.pixelSize: 14 - color: "#f4bf42" - } - - PlasmaComponents.TabBar { - id: tabBar - anchors.right: parent.right - PlasmaComponents.TabButton { id: mycroftTab Layout.fillHeight: true Layout.fillWidth: true - iconSource: "system-search" + iconSource: "user-home" } - + PlasmaComponents.TabButton { id: mycroftSkillsTab Layout.fillHeight: true Layout.fillWidth: true iconSource: "games-hint" - } } + + PlasmaComponents.TabButton { + id: mycroftSettingsTab + Layout.fillHeight: true + Layout.fillWidth: true + iconSource: "games-config-options" + } + + PlasmaComponents.TabButton { + id: mycroftMSMinstTab + Layout.fillHeight: true + Layout.fillWidth: true + iconSource: "kmouth-phresebook-new" + } + } + } + + PlasmaCore.SvgItem { + anchors { + left: parent.left + leftMargin: sidebar.width + top: parent.top + topMargin: 1 + bottom: parent.bottom + bottomMargin: 1 } -Rectangle { - id: mycroftanimbar - height: 80 - anchors.left: parent.left - anchors.right: parent.right - anchors.top: rectangletopbar.bottom - anchors.topMargin: -12; - color: theme.backgroundColor - z: 3 - - TopBarAnim { - id: barAnim - z: 6 + width: lineSvg.elementSize("vertical-line").width + z: 110 + elementId: "vertical-line" + + svg: PlasmaCore.Svg { + id: lineSvg; + imagePath: "widgets/line" } -} - + } + ColumnLayout { id: mycroftcolumntab visible: tabBar.currentTab == mycroftTab; -anchors.top: mycroftanimbar.bottom -anchors.left: root.left +anchors.top: root.top +anchors.left: sidebar.right +anchors.leftMargin: units.gridUnit * 0.25 anchors.right: root.right -anchors.bottom: rectanglebottombar.top +anchors.bottom: root.bottom Rectangle { id: rectangle2 color: "#00000000" anchors.top: mycroftcolumntab.top anchors.topMargin:15 anchors.left: mycroftcolumntab.left anchors.right: mycroftcolumntab.right - anchors.bottom: suggestionbottombox.top - - ListModel{ - id: conversationInputList + anchors.bottom: mycroftcolumntab.bottom + +DropArea { + anchors.fill: parent; + id: dragTarget + onEntered: { + for(var i = 0; i < drag.urls.length; i++) + if(validateFileExtension(drag.urls[i])) + return + console.log("No valid files, refusing drag event") + drag.accept() + dragTarget.enabled = false + } + + onDropped: { + for(var i = 0; i < drop.urls.length; i++){ + var ext = getFileExtenion(drop.urls[i]); + if(ext === "jpg" || ext === "png" || ext === "jpeg"){ + var durl = String(drop.urls[i]); + console.log(durl) + convoLmodel.append({ + "itemType": "DropImg", + "InputQuery": durl + }) + inputlistView.positionViewAtEnd(); + + + var irecogmsgsend = innerset.customrecog + var socketmessage = {}; + socketmessage.type = "recognizer_loop:utterance"; + socketmessage.data = {}; + socketmessage.data.utterances = [irecogmsgsend + " " + durl]; + socket.sendTextMessage(JSON.stringify(socketmessage)); + console.log(irecogmsgsend + " " + durl); + } + + if(ext === 'mp3'){ + console.log('mp3'); + } + } } + + ListModel{ + id: convoLmodel + } Rectangle { id: messageBox anchors.fill: parent anchors.right: rectangle2.right + anchors.left: rectangle2.left color: "#00000000" ColumnLayout { id: colconvo anchors.fill: parent - ListView { - id: inputlistView - Layout.fillWidth: true - Layout.fillHeight: true - verticalLayoutDirection: ListView.TopToBottom - spacing: 12 - model: conversationInputList - delegate: Loader { - source: "MessageBox.qml" - } - ScrollBar.vertical: ScrollBar {} + ListView { + id: inputlistView + Layout.fillWidth: true + Layout.fillHeight: true + verticalLayoutDirection: ListView.TopToBottom + spacing: 12 + model: convoLmodel + ScrollBar.vertical: ScrollBar {} + delegate: Component { + Loader { + source: switch(itemType) { + case "NonVisual": return "SimpleMessageType.qml" + case "WebViewType": return "WebViewType.qml" + case "CurrentWeather": return "CurrentWeatherType.qml" + case "DropImg" : return "ImgRecogType.qml" + } + property var metacontent : dataContent + } + } - onCountChanged: { - inputlistView.positionViewAtEnd(); - } + onCountChanged: { + inputlistView.positionViewAtEnd(); + } } } } } - - Rectangle { - id: suggestionbottombox - anchors.bottom: mycroftcolumntab.bottom - anchors.right: parent.right - anchors.left: parent.left - color: theme.backgroundColor - height: 40; - - Flickable { - width: parent.width - height: suggestionbottombox.height - contentWidth: 1000 - contentHeight: suggestionbottombox.height - interactive: true; - - Suggestions { - id: suggst - visible: true; - } - - ScrollBar.horizontal: ScrollBar {} - - } - } - } - + } + ColumnLayout { id: mycroftSkillscolumntab visible: tabBar.currentTab == mycroftSkillsTab; -anchors.top: mycroftanimbar.bottom -anchors.left: root.left +anchors.top: root.top +anchors.left: sidebar.right +anchors.leftMargin: units.gridUnit * 0.25 anchors.right: root.right -anchors.bottom: rectanglebottombar.top -anchors.bottomMargin: 5 +anchors.bottom: root.bottom -Text { - id: qboxoutput - text: " " - visible: false -} Rectangle { anchors.top: mycroftSkillscolumntab.top + anchors.left: mycroftSkillscolumntab.left + anchors.right: mycroftSkillscolumntab.right id: skillsrectmain color: "#00000000" @@ -586,30 +703,81 @@ color: theme.backgroundColor z: -99 - Column { - id: skillcolumn - Layout.fillWidth: true; - PlasmaComponents.Label { wrapMode: Text.WordWrap; font.bold: true; text: 'Skill: ' + Skill } - - Row { + RowLayout { id: skillTopRowLayout - //height: skillimage.height - spacing: 10 - - Column { - id: skillinnercolumn - - PlasmaComponents.Label {wrapMode: Text.WordWrap; width: main.width; text: 'Command: ' + CommandList.get(0).Commands} - PlasmaComponents.Label {wrapMode: Text.WordWrap; width: main.width; text: 'Command: ' + CommandList.get(1).Commands} - PlasmaComponents.Label { wrapMode: Text.WordWrap; width: main.width; text: 'Command: ' + CommandList.get(2).Commands} - PlasmaComponents.Label { wrapMode: Text.WordWrap; width: main.width; text: 'Command: ' + CommandList.get(3).Commands} - PlasmaComponents.Label { wrapMode: Text.WordWrap; width: main.width; text: 'Command: ' + CommandList.get(4).Commands} + spacing: 5 + anchors.fill: parent + + PlasmaComponents.Label { + id: innerskllname + anchors.top: parent.top + anchors.topMargin: 2 + anchors.left: parent.left + anchors.right: parent.right + wrapMode: Text.WordWrap; + font.bold: true; + text: i18n('Skill:' + Skill) } + + Rectangle { + id: skilltipsimage + anchors.left: parent.left + anchors.top: innerskllname.bottom + anchors.bottom: parent.bottom + width: units.gridUnit * 1.2 + color: theme.backgroundColor + + Image { + id: innerskImg + source: Pic + width: units.gridUnit * 1.2 + height: units.gridUnit * 1.2 + anchors.centerIn: parent + } + + PlasmaCore.SvgItem { + anchors { + left: innerskImg.right + leftMargin: 4 + top: parent.top + topMargin: 0 + bottom: parent.bottom + bottomMargin: 0 + } + + width: lineskillpgSvg.elementSize("vertical-line").width + z: 110 + elementId: "vertical-line" + + svg: PlasmaCore.Svg { + id: lineskillpgSvg; + imagePath: "widgets/line" + } + } + + } + + Rectangle { + id: skilltipsinner + anchors.left: skilltipsimage.right + anchors.leftMargin: 10 + anchors.right: parent.right + color: theme.backgroundColor + anchors.top: innerskllname.bottom + anchors.bottom: parent.bottom + + Column{ + id: innerskillscolumn + spacing: 2 + + PlasmaComponents.Label {wrapMode: Text.WordWrap; width: main.width; text: i18n('Command: ' + CommandList.get(0).Commands)} + PlasmaComponents.Label {wrapMode: Text.WordWrap; width: main.width; text: i18n('Command: ' + CommandList.get(1).Commands)} } } } } } + } ListView { id: skillslistmodelview @@ -623,38 +791,39 @@ spacing: 4 focus: false interactive: true + clip: true; } - } + + } ColumnLayout { id: mycroftSettingsColumn -anchors.top: rectangletopbar.bottom -anchors.left: root.left +visible: tabBar.currentTab == mycroftSettingsTab; +anchors.top: root.top +anchors.left: sidebar.right +anchors.leftMargin: units.gridUnit * 0.25 anchors.right: root.right -anchors.bottom: rectanglebottombar.top -anchors.bottomMargin: 5 -visible: false; +anchors.bottom: root.bottom -Rectangle { +Item { id: settingscontent Layout.fillWidth: true; Layout.fillHeight: true; anchors.fill: parent; - color: theme.backgroundColor - - - PlasmaComponents.Label { - id: settingsTabTopLabel - anchors.top: parent.top; - anchors.topMargin: 5; - text: "Plasmoid Settings" - } - + //color: theme.backgroundColor + +Flickable { + id: settingFlick + anchors.fill: parent; + contentWidth: mycroftSettingsColumn.width + contentHeight: units.gridUnit * 22 + clip: true; + PlasmaComponents.Label { id: settingsTabUnits - anchors.top: settingsTabTopLabel.bottom + anchors.top: parent.top; anchors.topMargin: 5 - text: "Your Mycroft Core Installation Path" + text: i18n("Your Mycroft Core Installation Path") } PlasmaComponents.ButtonColumn { @@ -665,7 +834,7 @@ PlasmaComponents.RadioButton { id: settingsTabUnitsOpZero exclusiveGroup: installPathGroup - text: "Default Path" + text: i18n("Default Path") checked: true onCheckedChanged: { @@ -690,7 +859,7 @@ PlasmaComponents.RadioButton { id: settingsTabUnitsOpOne exclusiveGroup: installPathGroup - text: "Installed Using Mycroft Package" + text: i18n("Installed Using Mycroft Package") checked: false onCheckedChanged: { @@ -715,7 +884,7 @@ PlasmaComponents.RadioButton { id: settingsTabUnitsOpTwo exclusiveGroup: installPathGroup - text: "Manual Install Path of Mycroft.sh" + text: i18n("Manual Install Path of Mycroft.sh") checked: false onCheckedChanged: { @@ -771,19 +940,64 @@ } } + PlasmaComponents.TextField { + id: settingsTabUnitsWSpath + width: settingscontent.width / 1.1 + anchors.top: settingsTabUnitsOpThree.bottom + anchors.topMargin: 10 + placeholderText: i18n("ws://0.0.0.0:8181/core") + text: i18n("ws://0.0.0.0:8181/core") + } + + PlasmaComponents.Button { + id: acceptcustomWSPath + anchors.left: settingsTabUnitsWSpath.right + anchors.verticalCenter: settingsTabUnitsWSpath.verticalCenter + anchors.right: parent.right + iconSource: "checkbox" + + onClicked: { + innerset.wsurl = settingsTabUnitsWSpath.text + } + } + + + PlasmaComponents.TextField { + id: settingsTabUnitsIRCmd + width: settingscontent.width / 1.1 + anchors.top: settingsTabUnitsWSpath.bottom + anchors.topMargin: 10 + placeholderText: i18n("Your Custom Image Recognition Skill Voc Keywords") + text: i18n("search image url") + } + + PlasmaComponents.Button { + id: acceptcustomIRCmd + anchors.left: settingsTabUnitsIRCmd.right + anchors.verticalCenter: settingsTabUnitsIRCmd.verticalCenter + anchors.right: parent.right + iconSource: "checkbox" + + onClicked: { + + } + } + + PlasmaComponents.Switch { id: notificationswitch - anchors.top: settingsTabUnitsOpThree.bottom - anchors.topMargin: 5 - text: "Enable Notifications" + anchors.top: settingsTabUnitsIRCmd.bottom + anchors.topMargin: 10 + text: i18n("Enable Notifications") checked: true } + PlasmaExtras.Paragraph { id: settingsTabTF2 anchors.top: notificationswitch.bottom - anchors.topMargin: 5 - text: "Please Note: Default path is set to /home/$USER/mycroft-core/mycroft.sh. Change the above settings to match your installation" + anchors.topMargin: 15 + text: i18n("Please Note: Default path is set to /home/$USER/mycroft-core/mycroft.sh. Change the above settings to match your installation") } PlasmaComponents.Label { @@ -795,109 +1009,191 @@ id: stopsrvcustom visible: false } + } } -} + + } + +ColumnLayout { +id: mycroftMsmColumn +visible: tabBar.currentTab == mycroftMSMinstTab; +anchors.top: root.top +anchors.left: sidebar.right +anchors.leftMargin: units.gridUnit * 0.25 +anchors.right: root.right +anchors.bottom: root.bottom + Item { + id: msmtabtopbar + width: parent.width + anchors.left: parent.left + anchors.right: parent.right + height: units.gridUnit * 2 + + PlasmaComponents.TextField { + id: msmsearchfld + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.right: getskillsbx.left + placeholderText: i18n("Search Skills") + clearButtonShown: true + + onTextChanged: { + if(text.length > 0 ) { + msmskillsModel.applyFilter(text.toLowerCase()); + } else { + msmskillsModel.reload(); + } + } + } -Rectangle { - id: rectanglebottombar - height: 30 - color: theme.backgroundColor - radius: 0 - anchors.bottom: root.bottom - anchors.bottomMargin: 0 - anchors.right: root.right - anchors.rightMargin: 0 - anchors.left: root.left - anchors.leftMargin: 0 - border.color: "#80000000" - border.width: 0 - z: 4 - - - RowLayout { - id: rla1 - anchors.fill: parent - Rectangle{ - anchors.fill: parent - color: "#00000000" - z: 5 - + PlasmaComponents.ToolButton { + id: getskillsbx + anchors.right: parent.right + anchors.top: parent.top + anchors.bottom: parent.bottom + iconSource: "view-refresh" + tooltip: i18n("Refresh List") + flat: true + width: Math.round(units.gridUnit * 2) + height: width + z: 102 + + onClicked: { + msmskillsModel.clear(); + refreshAllSkills(); + } + } + } + + ListModel { + id: msmskillsModel + + Component.onCompleted: { + reload(); + console.log('Completing too early?'); + } + + function reload() { + var skList = getAllSkills(); + msmskillsModel.clear(); + for( var i=0; i < skList.length ; ++i ) { + msmskillsModel.append(skList[i]); + } + } + + function applyFilter(skName) { + var skList = getSkillByName(skName); + msmskillsModel.clear(); + for( var i=0; i < skList.length ; ++i ) { + msmskillsModel.append(skList[i]); + } + } + } + + ListView { + id: msmlistView + anchors.top: msmtabtopbar.bottom + anchors.topMargin: 5 + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + model: msmskillsModel + delegate: MsmView{} + spacing: 4 + focus: false + interactive: true + clip: true; - PlasmaComponents.TextField { + } + } +} + +SourceModel { + id: sourceModel + } + PlasmaCore.SvgItem { + anchors { + left: main.left + right: main.right + bottom: root.bottom + } + width: 1 + height: horlineSvg.elementSize("horizontal-line").height + + elementId: "horizontal-line" + z: 110 + svg: PlasmaCore.Svg { + id: horlineSvg; + imagePath: "widgets/line" + } + } + + +Item { + id: rectanglebottombar + height: units.gridUnit * 3.5 + anchors.left: main.left + anchors.right: main.right + anchors.bottom: main.bottom + z: 110 + + Rectangle { + id: suggestionbottombox + anchors.top: parent.top + anchors.bottom: qinput.top + anchors.right: parent.right + anchors.left: parent.left + color: theme.backgroundColor + //height: 40; + + Suggestions { + id: suggst + visible: true; + } + + } + + + PlasmaComponents.TextField { id: qinput anchors.left: parent.left - anchors.top: parent.top + //anchors.top: parent.top anchors.bottom: parent.bottom - anchors.right: qinputmicbx.left + anchors.right: parent.right placeholderText: i18n("Enter Query or Say 'Hey Mycroft'") clearButtonShown: true - + onAccepted: { suggst.visible = true; - conversationInputList.append({"InputQuery": qinput.text}); - inputlistView.positionViewAtEnd(); - + //conversationInputList.append({"InputQuery": qinput.text}); + //inputlistView.positionViewAtEnd(); + var socketmessage = {}; socketmessage.type = "recognizer_loop:utterance"; socketmessage.data = {}; socketmessage.data.utterances = [qinput.text]; socket.sendTextMessage(JSON.stringify(socketmessage)); - qinput.text = ""; - if (socket.status == WebSocket.Error) { - barAnim.wsocerroranimtoggle() - } - else { - barAnim.wsocmsganimtoggle(); - } - } + qinput.text = ""; + } onTextChanged: { var terms = getTermsForSearchString(qinput.text); - var suggestionsActive = (terms.length > 0); - - if (suggestionsActive) { - setTerms(terms); - } - else{ - setSuggestionsRandom(); - } } - } - PlasmaComponents.ToolButton { - id: qinputmicbx - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - iconSource: "mic-on" - flat: true - width: 42 - height: 42 - - onClicked: { - if (qinputmicbx.iconSource == "mic-on") { - qinputmicbx.iconSource = "mic-off" - } - else if (qinputmicbx.iconSource == "mic-off") { - qinputmicbx.iconSource = "mic-on" - } - muteMicrophone() - } - } - } - - } - } + } } -SourceModel { - id: sourceModel - } Settings { - property alias customsetuppath: settingsTabUnitsOpThree.text - property alias notifybool: notificationswitch.checked - property alias radiobt1: settingsTabUnitsOpOne.checked - property alias radiobt2: settingsTabUnitsOpTwo.checked - property alias radiobt3: settingsTabUnitsOpZero.checked - } + id: innerset + property alias wsurl: settingsTabUnitsWSpath.text + property alias customrecog: settingsTabUnitsIRCmd.text + property alias customsetuppath: settingsTabUnitsOpThree.text + property alias notifybool: notificationswitch.checked + property alias radiobt1: settingsTabUnitsOpOne.checked + property alias radiobt2: settingsTabUnitsOpTwo.checked + property alias radiobt3: settingsTabUnitsOpZero.checked +} + } diff --git a/plasmoid/contents/ui/suggestion/DesktopKeywords.txt b/plasmoid/contents/ui/suggestion/DesktopKeywords.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/DesktopKeywords.txt +++ /dev/null @@ -1,4 +0,0 @@ -open -lockscreen -shutdown -switch diff --git a/plasmoid/contents/ui/suggestion/DesktopList.txt b/plasmoid/contents/ui/suggestion/DesktopList.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/DesktopList.txt +++ /dev/null @@ -1,9 +0,0 @@ -open firefox -open terminal -open konsole -open dolphin -open youtube -open vlc -open kwrite -view recent files -lock this computer diff --git a/plasmoid/contents/ui/suggestion/GeneralKeywords.txt b/plasmoid/contents/ui/suggestion/GeneralKeywords.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/GeneralKeywords.txt +++ /dev/null @@ -1,8 +0,0 @@ -time -joke -hello -world -invented -how -what -distance diff --git a/plasmoid/contents/ui/suggestion/GeneralList.txt b/plasmoid/contents/ui/suggestion/GeneralList.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/GeneralList.txt +++ /dev/null @@ -1,26 +0,0 @@ -tell me a joke -what is the current time -hello world -how are you -which star is at the center of our Solar System? -what is the diameter of Sun? -how many stars are in the Milky Way? -when was Sun born? -how much time does sun rays take to reach earth? -what is the diameter of MERCURY? -what is the Equatorial Circumference of Earth? -what is Earth’s surface temperature? -how many stars are there in Andromeda Galaxy? -who invented Air Conditioning? -who invented Atomic Bomb? -who is the inventor of Ball-Point Pen? -who invented the internet? -who invented the mobile phone? -who invented Electric Chair? -when was MacIntosh Computer invented? -who invented ceiling fans? -who is the inventor of Radio telescope? -which one is the world’s largest and most diverse continent? -what is Eurasia? -how many oceans are there in the world? -which continent has the largest nominal GDP of all continents? diff --git a/plasmoid/contents/ui/suggestion/MathKeywords.txt b/plasmoid/contents/ui/suggestion/MathKeywords.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/MathKeywords.txt +++ /dev/null @@ -1,12 +0,0 @@ -+ -- -/ -* -add -subract -multiply -divide -calculate -pie -square -squareroot diff --git a/plasmoid/contents/ui/suggestion/MathList.txt b/plasmoid/contents/ui/suggestion/MathList.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/MathList.txt +++ /dev/null @@ -1,5 +0,0 @@ -Calculate 2+2 -Calculate 1/4 * (4 - 1/2) -pi to 10 digits -219 to binary -Calculate e^z diff --git a/plasmoid/contents/ui/suggestion/WeatherKeywords.txt b/plasmoid/contents/ui/suggestion/WeatherKeywords.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/WeatherKeywords.txt +++ /dev/null @@ -1,7 +0,0 @@ -weather -rain -forecast -forecasted -climate -snow -storm diff --git a/plasmoid/contents/ui/suggestion/WeatherList.txt b/plasmoid/contents/ui/suggestion/WeatherList.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/WeatherList.txt +++ /dev/null @@ -1,6 +0,0 @@ -today's weather -tomorrow's weather -chances of rain -will it snow today -will it rain today -forcasted weather diff --git a/plasmoid/contents/ui/suggestion/WikiKeywords.txt b/plasmoid/contents/ui/suggestion/WikiKeywords.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/WikiKeywords.txt +++ /dev/null @@ -1,7 +0,0 @@ -wiki -wikipedia -describe -define -explain -compare -evaluate diff --git a/plasmoid/contents/ui/suggestion/WikiList.txt b/plasmoid/contents/ui/suggestion/WikiList.txt deleted file mode 100644 --- a/plasmoid/contents/ui/suggestion/WikiList.txt +++ /dev/null @@ -1,36 +0,0 @@ -explain relativity -wiki ubiquitous -wiki a feeble song in the heart -wiki earth -wiki mars -wiki queen victoria -define null -describe stone age -describe industrial age -explain big bang theory -wiki plot of interstellar -define wiki -wiki periodic table -explain global warming -explain the speed of light -wiki pluto -wiki mercury -wiki saturn -wiki jupiter -wiki the asteriod belt -wiki venus -wiki neptune -define the internet -define space -define data -define hope -explain dna -wiki dna -explain rna -wiki rna -wiki apollo 11 -wiki linux -explain globalization -describe influenza -describe usb -describe gpu diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -2,7 +2,7 @@ kde_enable_exceptions() -set(mycroftplasmoidplugin_SRCS mycroftplasmoidplugin.cpp launchapp.cpp notify.cpp filereader.cpp) +set(mycroftplasmoidplugin_SRCS mycroftplasmoidplugin.cpp launchapp.cpp notify.cpp filereader.cpp msmapp.cpp) add_library(mycroftplasmoidplugin SHARED ${mycroftplasmoidplugin_SRCS}) diff --git a/plugin/msmapp.h b/plugin/msmapp.h new file mode 100644 --- /dev/null +++ b/plugin/msmapp.h @@ -0,0 +1,18 @@ +#ifndef MSMAPP_H +#define MSMAPP_H + +#include +#include + +class MsmApp : public QObject +{ + Q_OBJECT +public: + explicit MsmApp(QObject *parent = 0); + Q_INVOKABLE QString msmapp(const QString &program); + +private: + QProcess *m_process; +}; + +#endif // MSMAPP_H diff --git a/plugin/msmapp.cpp b/plugin/msmapp.cpp new file mode 100644 --- /dev/null +++ b/plugin/msmapp.cpp @@ -0,0 +1,19 @@ +#include "msmapp.h" + +#include + +MsmApp::MsmApp(QObject *parent) : + QObject(parent), + m_process(new QProcess(this)) +{ +} + +QString MsmApp::msmapp(const QString &program) +{ + m_process->start(program); + m_process->waitForFinished(-1); + QByteArray bytes = m_process->readAllStandardOutput(); + QString output = QString::fromLocal8Bit(bytes); + return output; +} + diff --git a/plugin/mycroftplasmoidplugin.cpp b/plugin/mycroftplasmoidplugin.cpp --- a/plugin/mycroftplasmoidplugin.cpp +++ b/plugin/mycroftplasmoidplugin.cpp @@ -20,6 +20,7 @@ #include "launchapp.h" #include "notify.h" #include "filereader.h" +#include "msmapp.h" #include static QObject *notify_singleton(QQmlEngine *engine, QJSEngine *scriptEngine) @@ -51,5 +52,6 @@ Q_ASSERT(uri == QLatin1String("org.kde.private.mycroftplasmoid")); qmlRegisterSingletonType(uri, 1, 0, "Notify", notify_singleton); qmlRegisterSingletonType(uri, 1, 0, "LaunchApp", launchapp_singleton); - qmlRegisterSingletonType(uri, 1, 0, "FileReader", filereader_singleton); + qmlRegisterSingletonType(uri, 1, 0, "FileReader", filereader_singleton); + qmlRegisterType(uri, 1, 0, "MsmApp"); }