mirror of
https://github.com/Starlio-app/StarlioX.git
synced 2025-04-07 03:35:27 +01:00
Compare commits
No commits in common. "main" and "v1.3" have entirely different histories.
53 changed files with 108 additions and 3619 deletions
36
.github/ISSUE_TEMPLATE/bug_report.md
vendored
36
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,36 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: Bug
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
|
||||||
- OS: [e.g. Linux, Debian]
|
|
||||||
- Version [e.g. 10]
|
|
||||||
- Graphical shell [e.g. GNOME]
|
|
||||||
|
|
||||||
**Smartphone (please complete the following information):**
|
|
||||||
- Device: [e.g. Galaxy Z Fold 2]
|
|
||||||
- OS: [e.g. Android 12]
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: FEAT
|
|
||||||
labels: enhancement
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
14
.github/ISSUE_TEMPLATE/questions.md
vendored
14
.github/ISSUE_TEMPLATE/questions.md
vendored
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
name: Questions
|
|
||||||
about: Question about the program or something else
|
|
||||||
title: Questions
|
|
||||||
labels: question
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Before publishing, make sure
|
|
||||||
**That this question has not been asked before otherwise your question will be marked as a duplicate and closed**
|
|
||||||
|
|
||||||
**Describe your question**
|
|
||||||
Clearly and concisely, if possible without the words of parasites
|
|
15
.gitignore
vendored
15
.gitignore
vendored
|
@ -1,15 +0,0 @@
|
||||||
# Other
|
|
||||||
|
|
||||||
.idea
|
|
||||||
/logs
|
|
||||||
|
|
||||||
# Database files
|
|
||||||
|
|
||||||
*.db
|
|
||||||
*.db-journal
|
|
||||||
|
|
||||||
# Build files
|
|
||||||
|
|
||||||
*.exe
|
|
||||||
*.msi
|
|
||||||
*.syso
|
|
|
@ -1,128 +0,0 @@
|
||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, religion, or sexual identity
|
|
||||||
and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
|
||||||
community include:
|
|
||||||
|
|
||||||
* Demonstrating empathy and kindness toward other people
|
|
||||||
* Being respectful of differing opinions, viewpoints, and experiences
|
|
||||||
* Giving and gracefully accepting constructive feedback
|
|
||||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
||||||
and learning from the experience
|
|
||||||
* Focusing on what is best not just for us as individuals, but for the
|
|
||||||
overall community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery, and sexual attention or
|
|
||||||
advances of any kind
|
|
||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or email
|
|
||||||
address, without their explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official e-mail address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported to the community leaders responsible for enforcement at
|
|
||||||
https://t.me/Redume.
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series
|
|
||||||
of actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or
|
|
||||||
permanent ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within
|
|
||||||
the community.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
||||||
version 2.0, available at
|
|
||||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
||||||
enforcement ladder](https://github.com/mozilla/diversity).
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
|
||||||
https://www.contributor-covenant.org/faq. Translations are available at
|
|
||||||
https://www.contributor-covenant.org/translations.
|
|
695
LICENSE
695
LICENSE
|
@ -1,674 +1,21 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
MIT License
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
Copyright (c) 2022 Redume
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this license document, but changing it is not allowed.
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
Preamble
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
The GNU General Public License is a free, copyleft license for
|
furnished to do so, subject to the following conditions:
|
||||||
software and other kinds of works.
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
The licenses for most software and other practical works are designed
|
copies or substantial portions of the Software.
|
||||||
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
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
share and change all versions of a program--to make sure it remains free
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
GNU General Public License for most of our software; it applies also to
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
any other work released this way by its authors. You can apply it to
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
your programs, too.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
||||||
|
|
88
README.md
88
README.md
|
@ -1,66 +1,28 @@
|
||||||
<p align="center"><img src="web/static/image/icons/favicon.png" alt="Starlio"></p>
|
## ⚠️ Проект находится в бета версии
|
||||||
<h2 align="center"> Amazing wallpaper straight from space! </h2>
|
|
||||||
|
|
||||||
**<p align="center">This version of the project is no longer maintained. See another: https://github.com/Starlio-app/Starlio</p>**
|
## Инструкция
|
||||||
|
1. Скачайте все необходимые модули
|
||||||
|
|
||||||
---
|
```
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Запустите main.py
|
||||||
|
|
||||||
|
```
|
||||||
|
python main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Участники проекта ✨
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/redume"><img src="https://avatars.githubusercontent.com/u/49362257?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Redume</b></sub></a><br />
|
||||||
|
<a href="#code" title="Код">💻</a>
|
||||||
|
<a href="#ideas" title="Идеи">🤔</a>
|
||||||
|
<a href="#projectManagement" title="Управление проектом">📆</a></td>
|
||||||
|
|
||||||
> **Note**
|
<td align="center"><a href="https://github.com/Murzify"><img src="https://avatars.githubusercontent.com/u/59001661?v=3?s=100" width="100px;" alt=""/><br /><sub><b>Murzify</b></sub></a><br />
|
||||||
> This app is not official from NASA
|
<a href="#code" title="Помощь с кодом">💻</a>
|
||||||
|
</tr>
|
||||||
| Platform | Status | Get in on |
|
</table>
|
||||||
|----------|--------|--------------------------------------------------|
|
|
||||||
| Windows | 🟡 | [Github][windows-download] |
|
|
||||||
| Linux | 🟡 | [Github][linux-download] |
|
|
||||||
| Android | 🟢 | [Google Play][google-play] / [RuStore][rustore]* |
|
|
||||||
| MacOS | 🔴 | N/A |
|
|
||||||
| iOS | 🔴 | N/A |
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Explanation of designations</summary>
|
|
||||||
|
|
||||||
#### 🟢 — Development for the platform is supported to date
|
|
||||||
#### 🟡 — Development was earlier, but was discontinued
|
|
||||||
#### 🔴 — Not available for this platform
|
|
||||||
#### * — Loaded an old version, to get the current version it is better to install from [Google Play][google-play]
|
|
||||||
</details>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
[windows-download]: https://github.com/Starlio-app/StarlioX/releases/latest
|
|
||||||
[linux-download]: https://github.com/Starlio-app/StarlioX/releases/download/v1.6/Starlio
|
|
||||||
|
|
||||||
[google-play]: https://play.google.com/store/apps/details?id=ru.murzify.everynasa
|
|
||||||
[rustore]: https://apps.rustore.ru/app/ru.murzify.everynasa
|
|
||||||
|
|
||||||
### License. The project is under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html) license.
|
|
||||||
|
|
||||||
```
|
|
||||||
EveryNasa Copyright (C) 2022-2023 Redume
|
|
||||||
StarlioX Copyright (C) 2023 Redume
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
```
|
|
||||||
|
|
||||||
### Third-party library licenses
|
|
||||||
- [getlantern/systray](https://github.com/getlantern/systray) — [Apache-2.0](https://github.com/getlantern/systray/blob/master/LICENSE)
|
|
||||||
- [gofiber/fiber](https://github.com/gofiber/fiber) — [MIT](https://github.com/gofiber/fiber/blob/master/LICENSE)
|
|
||||||
- [go-ole/go-ole](https://github.com/go-ole/go-ole) — [MIT](https://github.com/go-ole/go-ole/blob/master/LICENSE)
|
|
||||||
- [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) — [MIT](https://github.com/mattn/go-sqlite3/blob/master/LICENSE)
|
|
||||||
- [rodkranz/fetch](https://github.com/rodkranz/fetch) — [MIT](https://github.com/rodkranz/fetch/blob/master/LICENSE)
|
|
||||||
- [shirou/gopsutil](https://github.com/shirou/gopsutil) — [BSD-3](https://github.com/shirou/gopsutil/blob/master/LICENSE)
|
|
||||||
- [skratchdot/open-golang](https://github.com/skratchdot/open-golang) — [MIT](https://github.com/skratchdot/open-golang/blob/master/LICENSE)
|
|
||||||
- [twbs/bootstrap](https://github.com/twbs/bootstrap) — [MIT](https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
||||||
- [LottieFiles/lottie-player](https://github.com/LottieFiles/lottie-player) — [MIT](https://github.com/LottieFiles/lottie-player/blob/master/LICENSE)
|
|
||||||
- [jquery/jquery](https://github.com/jquery/jquery) — [MIT](https://github.com/jquery/jquery/blob/main/LICENSE.txt)
|
|
||||||
|
|
19
SECURITY.md
19
SECURITY.md
|
@ -1,19 +0,0 @@
|
||||||
# Security Policy
|
|
||||||
|
|
||||||
## Supported Versions
|
|
||||||
|
|
||||||
Use this section to tell people about which versions of your project are
|
|
||||||
currently being supported with security updates.
|
|
||||||
|
|
||||||
| Version | Status |
|
|
||||||
|---------|--------|
|
|
||||||
| < 2.4 | ❌ |
|
|
||||||
| 2.4 | ✔️ |
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
|
||||||
|
|
||||||
Use this section to tell people how to report a vulnerability.
|
|
||||||
|
|
||||||
Tell them where to go, how often they can expect to get an update on a
|
|
||||||
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
||||||
declined, etc.
|
|
|
@ -1,135 +0,0 @@
|
||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
"github.com/Redume/Starlio/utils"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
var GetFavorites = func(c *fiber.Ctx) error {
|
|
||||||
FavoriteTitle := c.Query("title")
|
|
||||||
|
|
||||||
type Favorite struct {
|
|
||||||
Title string `json:"title"`
|
|
||||||
Explanation string `json:"explanation"`
|
|
||||||
Copyright string `json:"copyright"`
|
|
||||||
Date string `json:"date"`
|
|
||||||
URL string `json:"url"`
|
|
||||||
HDURL string `json:"hdurl"`
|
|
||||||
MediaType string `json:"media_type"`
|
|
||||||
}
|
|
||||||
|
|
||||||
var title, explanation, copyright, date, url, hdurl, media_type string
|
|
||||||
db := utils.GetDatabase()
|
|
||||||
|
|
||||||
if FavoriteTitle != "" {
|
|
||||||
queryFavorites, err := db.Query("SELECT * FROM favorite WHERE title LIKE ?", FavoriteTitle)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
defer func(query *sql.Rows) {
|
|
||||||
err := query.Close()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
}(queryFavorites)
|
|
||||||
|
|
||||||
for queryFavorites.Next() {
|
|
||||||
err := queryFavorites.Scan(&title, &explanation, ©right, &date, &url, &hdurl, &media_type)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
return c.JSON(fiber.Map{
|
|
||||||
"title": title,
|
|
||||||
"explanation": explanation,
|
|
||||||
"copyright": copyright,
|
|
||||||
"date": date,
|
|
||||||
"url": url,
|
|
||||||
"hdurl": hdurl,
|
|
||||||
"media_type": media_type,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
queryFavorite, err := db.Query("SELECT * FROM favorite")
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
defer func(query *sql.Rows) {
|
|
||||||
err := query.Close()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
}(queryFavorite)
|
|
||||||
|
|
||||||
var favorites []Favorite
|
|
||||||
for queryFavorite.Next() {
|
|
||||||
err := queryFavorite.Scan(&title, &explanation, ©right, &date, &url, &hdurl, &media_type)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
favorites = append(favorites, Favorite{
|
|
||||||
Title: title,
|
|
||||||
Explanation: explanation,
|
|
||||||
Copyright: copyright,
|
|
||||||
Date: date,
|
|
||||||
URL: url,
|
|
||||||
HDURL: hdurl,
|
|
||||||
MediaType: media_type})
|
|
||||||
}
|
|
||||||
|
|
||||||
return c.JSON(favorites)
|
|
||||||
}
|
|
||||||
|
|
||||||
return c.SendString("No favorites found")
|
|
||||||
}
|
|
||||||
|
|
||||||
var AddFavorite = func(c *fiber.Ctx) error {
|
|
||||||
title := c.FormValue("title")
|
|
||||||
explanation := c.FormValue("explanation")
|
|
||||||
copyright := c.FormValue("copyright")
|
|
||||||
date := c.FormValue("date")
|
|
||||||
url := c.FormValue("url")
|
|
||||||
hdurl := c.FormValue("hdurl")
|
|
||||||
media_type := c.FormValue("media_type")
|
|
||||||
|
|
||||||
if title == "" && explanation == "" && date == "" && url == "" && hdurl == "" && media_type == "" {
|
|
||||||
utils.Respond(c, utils.Message(false, "All fields are required"))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
db := utils.GetDatabase()
|
|
||||||
|
|
||||||
_, err := db.Exec("INSERT INTO favorite (title, explanation, copyright, date, url, hdurl, media_type) VALUES (?, ?, ?, ?, ?, ?, ?)",
|
|
||||||
title,
|
|
||||||
explanation,
|
|
||||||
copyright,
|
|
||||||
date,
|
|
||||||
url,
|
|
||||||
hdurl,
|
|
||||||
media_type)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "Favorite added"))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var DeleteFavorite = func(c *fiber.Ctx) error {
|
|
||||||
title := c.FormValue("title")
|
|
||||||
|
|
||||||
db := utils.GetDatabase()
|
|
||||||
|
|
||||||
_, err := db.Exec("DELETE FROM favorite WHERE title = ?", title)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "Favorite deleted"))
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"os/user"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/Redume/Starlio/utils"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
var CreateLabel = func(c *fiber.Ctx) error {
|
|
||||||
u, err := user.Current()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
dir, err := os.Getwd()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
dir = strings.Replace(dir, "\\", "\\\\", -1) + "\\Starlio.exe"
|
|
||||||
|
|
||||||
err = utils.CreateLnk(dir, strings.Replace(u.HomeDir, "\\", "\\\\", -1)+"\\Desktop\\Starlio.lnk")
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "The shortcut was successfully created"))
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,91 +0,0 @@
|
||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
"github.com/Redume/Starlio/utils"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
|
||||||
)
|
|
||||||
|
|
||||||
var SettingsGet = func(c *fiber.Ctx) error {
|
|
||||||
db, err := sql.Open("sqlite3", "Starlio.db")
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
querySettings, err := db.Query("SELECT * FROM settings")
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
defer func(query *sql.Rows) {
|
|
||||||
err := query.Close()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
}(querySettings)
|
|
||||||
|
|
||||||
var startup, wallpaper, save_logg int
|
|
||||||
|
|
||||||
for querySettings.Next() {
|
|
||||||
err := querySettings.Scan(&startup, &wallpaper, &save_logg)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = map[string]interface{}{
|
|
||||||
"startup": startup,
|
|
||||||
"wallpaper": wallpaper,
|
|
||||||
"save_logg": save_logg,
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var SettingsUpdate = func(c *fiber.Ctx) error {
|
|
||||||
db, err := sql.Open("sqlite3", "Starlio.db")
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
startup := c.FormValue("startup")
|
|
||||||
wallpaper := c.FormValue("wallpaper")
|
|
||||||
save_logg := c.FormValue("save_logg")
|
|
||||||
|
|
||||||
if startup == "" && wallpaper == "" && save_logg == "" {
|
|
||||||
utils.Respond(c, utils.Message(false, "All fields are required."))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if wallpaper != "" {
|
|
||||||
_, err := db.Exec("UPDATE settings SET wallpaper = ?", wallpaper)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if wallpaper == "1" {
|
|
||||||
go utils.StartWallpaper()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if startup != "" {
|
|
||||||
_, err := db.Exec("UPDATE settings SET startup = ?", startup)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if save_logg != "" {
|
|
||||||
_, err := db.Exec("UPDATE settings SET save_logg = ?", save_logg)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "The settings have been applied successfully."))
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
"os"
|
|
||||||
"os/user"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/Redume/Starlio/utils"
|
|
||||||
)
|
|
||||||
|
|
||||||
var Startup = func(c *fiber.Ctx) error {
|
|
||||||
startup := c.FormValue("startup")
|
|
||||||
if startup == "" {
|
|
||||||
utils.Respond(c, utils.Message(false, "All fields are required."))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if startup == "1" {
|
|
||||||
SetStartup(c)
|
|
||||||
} else if startup == "0" {
|
|
||||||
RemoveStartup(c)
|
|
||||||
} else {
|
|
||||||
utils.Respond(c, utils.Message(false, "Invalid field."))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var SetStartup = func(c *fiber.Ctx) error {
|
|
||||||
u, err := user.Current()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
dir, err := os.Getwd()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
dir = strings.Replace(dir, "\\", "\\\\", -1) + "\\Starlio.exe"
|
|
||||||
|
|
||||||
err = utils.CreateLnk(dir, strings.Replace(u.HomeDir, "\\", "\\\\", -1)+"\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\Starlio.lnk")
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "The settings have been applied successfully."))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var RemoveStartup = func(c *fiber.Ctx) error {
|
|
||||||
u, err := user.Current()
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
err = os.Remove(strings.Replace(u.HomeDir, "\\", "\\\\", -1) + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\Starlio.lnk")
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "The settings have been applied successfully."))
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/Redume/Starlio/utils"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
"github.com/reujab/wallpaper"
|
|
||||||
)
|
|
||||||
|
|
||||||
var WallpaperUpdate = func(c *fiber.Ctx) error {
|
|
||||||
var url string
|
|
||||||
url = c.FormValue("url")
|
|
||||||
if url == "" {
|
|
||||||
utils.Respond(c, utils.Message(false, "URL is required"))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
err := wallpaper.SetFromURL(url)
|
|
||||||
if err != nil {
|
|
||||||
utils.Logger(err.Error())
|
|
||||||
utils.Respond(c, utils.Message(false, "An error occurred while setting the wallpaper"))
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "Wallpaper successfully updated"))
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
49
go.mod
49
go.mod
|
@ -1,49 +0,0 @@
|
||||||
module github.com/Redume/Starlio
|
|
||||||
|
|
||||||
go 1.19
|
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/getlantern/systray v1.2.1
|
|
||||||
github.com/go-ole/go-ole v1.2.6
|
|
||||||
github.com/gofiber/fiber/v2 v2.43.0
|
|
||||||
github.com/jasonlvhit/gocron v0.0.1
|
|
||||||
github.com/mattn/go-sqlite3 v1.14.16
|
|
||||||
github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740
|
|
||||||
github.com/rodkranz/fetch v1.2.0
|
|
||||||
github.com/shirou/gopsutil/v3 v3.23.2
|
|
||||||
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
|
|
||||||
)
|
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/andybalholm/brotli v1.0.5 // indirect
|
|
||||||
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 // indirect
|
|
||||||
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 // indirect
|
|
||||||
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 // indirect
|
|
||||||
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 // indirect
|
|
||||||
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 // indirect
|
|
||||||
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f // indirect
|
|
||||||
github.com/go-stack/stack v1.8.0 // indirect
|
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
|
||||||
github.com/klauspost/compress v1.16.3 // indirect
|
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
|
||||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
|
||||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
|
||||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
|
|
||||||
github.com/philhofer/fwd v1.1.2 // indirect
|
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
|
||||||
github.com/rivo/uniseg v0.2.0 // indirect
|
|
||||||
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
|
|
||||||
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect
|
|
||||||
github.com/tinylib/msgp v1.1.8 // indirect
|
|
||||||
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
|
||||||
github.com/tklauser/numcpus v0.6.0 // indirect
|
|
||||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
|
||||||
github.com/valyala/fasthttp v1.45.0 // indirect
|
|
||||||
github.com/valyala/tcplisten v1.0.0 // indirect
|
|
||||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
|
||||||
golang.org/x/net v0.8.0 // indirect
|
|
||||||
golang.org/x/sys v0.6.0 // indirect
|
|
||||||
gopkg.in/ini.v1 v1.66.2 // indirect
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
|
||||||
)
|
|
179
go.sum
179
go.sum
|
@ -1,179 +0,0 @@
|
||||||
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
|
|
||||||
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
|
||||||
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4=
|
|
||||||
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY=
|
|
||||||
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So=
|
|
||||||
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A=
|
|
||||||
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 h1:guBYzEaLz0Vfc/jv0czrr2z7qyzTOGC9hiQ0VC+hKjk=
|
|
||||||
github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7/go.mod h1:zx/1xUUeYPy3Pcmet8OSXLbF47l+3y6hIPpyLWoR9oc=
|
|
||||||
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 h1:micT5vkcr9tOVk1FiH8SWKID8ultN44Z+yzd2y/Vyb0=
|
|
||||||
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o=
|
|
||||||
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 h1:XYzSdCbkzOC0FDNrgJqGRo8PCMFOBFL9py72DRs7bmc=
|
|
||||||
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA=
|
|
||||||
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f h1:wrYrQttPS8FHIRSlsrcuKazukx/xqO/PpLZzZXsF+EA=
|
|
||||||
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA=
|
|
||||||
github.com/getlantern/systray v1.2.1 h1:udsC2k98v2hN359VTFShuQW6GGprRprw6kD6539JikI=
|
|
||||||
github.com/getlantern/systray v1.2.1/go.mod h1:AecygODWIsBquJCJFop8MEQcJbWFfw/1yWbVabNgpCM=
|
|
||||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
|
||||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
|
||||||
github.com/go-redis/redis v6.15.5+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
|
||||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
|
||||||
github.com/gofiber/fiber/v2 v2.43.0 h1:yit3E4kHf178B60p5CQBa/3v+WVuziWMa/G2ZNyLJB0=
|
|
||||||
github.com/gofiber/fiber/v2 v2.43.0/go.mod h1:mpS1ZNE5jU+u+BA4FbM+KKnUzJ4wzTK+FT2tG3tU+6I=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
|
||||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
|
||||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
|
||||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
|
||||||
github.com/jasonlvhit/gocron v0.0.1 h1:qTt5qF3b3srDjeOIR4Le1LfeyvoYzJlYpqvG7tJX5YU=
|
|
||||||
github.com/jasonlvhit/gocron v0.0.1/go.mod h1:k9a3TV8VcU73XZxfVHCHWMWF9SOqgoku0/QlY2yvlA4=
|
|
||||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
|
||||||
github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY=
|
|
||||||
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
|
||||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
|
||||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
|
||||||
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
|
|
||||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
|
||||||
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
|
||||||
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
|
||||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
|
|
||||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
|
|
||||||
github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
|
|
||||||
github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
|
|
||||||
github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
|
||||||
github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740 h1:X6IDPPN+zrSClp0Q+JiERA//d8L0WcU5MqcGeulCW1A=
|
|
||||||
github.com/reujab/wallpaper v0.0.0-20210630195606-5f9f655b3740/go.mod h1:WYwPVmM/8szeItLeWkwZSLRvQgrvsvstRzgznR8+E4Q=
|
|
||||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
|
||||||
github.com/rodkranz/fetch v1.2.0 h1:Yw9E7EOfNbCSEdAfNGu7HXJYkqEj/nRG5GQcnc7M1RI=
|
|
||||||
github.com/rodkranz/fetch v1.2.0/go.mod h1:ojApfh+3ll3N2GP5dvYLGlxOrLS1ke5IRqpOUS7XGf4=
|
|
||||||
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 h1:rmMl4fXJhKMNWl+K+r/fq4FbbKI+Ia2m9hYBLm2h4G4=
|
|
||||||
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94/go.mod h1:90zrgN3D/WJsDd1iXHT96alCoN2KJo6/4x1DZC3wZs8=
|
|
||||||
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4=
|
|
||||||
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee h1:8Iv5m6xEo1NR1AvpV+7XmhI4r39LGNzwUL4YpMuL5vk=
|
|
||||||
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee/go.mod h1:qwtSXrKuJh/zsFQ12yEE89xfCrGKK63Rr7ctU/uCo4g=
|
|
||||||
github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU=
|
|
||||||
github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M=
|
|
||||||
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=
|
|
||||||
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
|
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
|
||||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
|
||||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
|
||||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
|
||||||
github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw=
|
|
||||||
github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0=
|
|
||||||
github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
|
|
||||||
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
|
|
||||||
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
|
|
||||||
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
|
|
||||||
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
|
|
||||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
|
||||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
|
||||||
github.com/valyala/fasthttp v1.45.0 h1:zPkkzpIn8tdHZUrVa6PzYd0i5verqiPSkgTd3bSUcpA=
|
|
||||||
github.com/valyala/fasthttp v1.45.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA=
|
|
||||||
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
|
|
||||||
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
|
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
|
||||||
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
|
||||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
|
||||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
|
||||||
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
|
||||||
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
|
||||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
|
||||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
|
||||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|
||||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
|
||||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
|
||||||
gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
|
|
||||||
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
104
main.go
104
main.go
|
@ -1,104 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/Redume/Starlio/api/controllers"
|
|
||||||
"github.com/Redume/Starlio/utils"
|
|
||||||
"github.com/getlantern/systray"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
"github.com/gofiber/fiber/v2/middleware/cors"
|
|
||||||
"github.com/skratchdot/open-golang/open"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
go open.Run("http://localhost:3000")
|
|
||||||
go utils.Database()
|
|
||||||
go systray.Run(utils.Tray, utils.Quit)
|
|
||||||
go utils.StartWallpaper()
|
|
||||||
|
|
||||||
app := fiber.New()
|
|
||||||
|
|
||||||
app = fiber.New(fiber.Config{
|
|
||||||
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
|
|
||||||
code := fiber.StatusInternalServerError
|
|
||||||
|
|
||||||
if e, ok := err.(*fiber.Error); ok {
|
|
||||||
code = e.Code
|
|
||||||
}
|
|
||||||
|
|
||||||
if code == fiber.StatusNotFound {
|
|
||||||
return ctx.SendFile("./web/errors/404.html")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
app.Static("/static", "./web/static")
|
|
||||||
app.Use(cors.New())
|
|
||||||
|
|
||||||
app.Get("/", func(c *fiber.Ctx) error {
|
|
||||||
con := utils.Connected()
|
|
||||||
if con == false {
|
|
||||||
return c.SendFile("./web/errors/500.html")
|
|
||||||
}
|
|
||||||
|
|
||||||
return c.SendFile("./web/page/gallery.html")
|
|
||||||
})
|
|
||||||
app.Get("/settings", func(c *fiber.Ctx) error {
|
|
||||||
con := utils.Connected()
|
|
||||||
if con == false {
|
|
||||||
return c.SendFile("./web/errors/500.html")
|
|
||||||
}
|
|
||||||
|
|
||||||
return c.SendFile("./web/page/settings.html")
|
|
||||||
})
|
|
||||||
app.Get("/about", func(c *fiber.Ctx) error {
|
|
||||||
return c.SendFile("./web/page/about.html")
|
|
||||||
})
|
|
||||||
app.Get("/favorite", func(c *fiber.Ctx) error {
|
|
||||||
return c.SendFile("./web/page/favorite.html")
|
|
||||||
})
|
|
||||||
|
|
||||||
api := app.Group("/api")
|
|
||||||
|
|
||||||
update := api.Group("/update")
|
|
||||||
get := api.Group("/get")
|
|
||||||
add := api.Group("/add")
|
|
||||||
del := api.Group("/del")
|
|
||||||
create := api.Group("/create")
|
|
||||||
|
|
||||||
update.Post("/settings", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.SettingsUpdate(c)
|
|
||||||
})
|
|
||||||
update.Post("/wallpaper", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.WallpaperUpdate(c)
|
|
||||||
})
|
|
||||||
update.Post("/startup", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.Startup(c)
|
|
||||||
})
|
|
||||||
|
|
||||||
create.Post("/label", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.CreateLabel(c)
|
|
||||||
})
|
|
||||||
|
|
||||||
get.Get("/settings", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.SettingsGet(c)
|
|
||||||
})
|
|
||||||
|
|
||||||
get.Get("/favorites", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.GetFavorites(c)
|
|
||||||
})
|
|
||||||
|
|
||||||
add.Post("/favorite", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.AddFavorite(c)
|
|
||||||
})
|
|
||||||
|
|
||||||
del.Post("/favorite", func(c *fiber.Ctx) error {
|
|
||||||
return controllers.DeleteFavorite(c)
|
|
||||||
})
|
|
||||||
|
|
||||||
err := app.Listen(":3000")
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
58
main.py
Normal file
58
main.py
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from elevate import elevate
|
||||||
|
import requests
|
||||||
|
import ctypes
|
||||||
|
import os
|
||||||
|
import urllib
|
||||||
|
import schedule
|
||||||
|
import winreg as reg
|
||||||
|
import getpass
|
||||||
|
|
||||||
|
|
||||||
|
class Nasa:
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.url = "https://apod.nasa.gov/apod/"
|
||||||
|
self.headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) '
|
||||||
|
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36'}
|
||||||
|
self.photoName = "everydayphotonasa.jpg"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def autorun():
|
||||||
|
path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
address = os.path.join(path, "main.py")
|
||||||
|
key_value = "Software/Microsoft/Windows/CurrentVersion/Run"
|
||||||
|
user = getpass.getuser()
|
||||||
|
key = reg.OpenKey(reg.HKEY_LOCAL_MACHINE, key_value, 0, reg.KEY_ALL_ACCESS)
|
||||||
|
reg.SetValueEx(key, user, 0, reg.REG_SZ, address)
|
||||||
|
reg.CloseKey(key)
|
||||||
|
|
||||||
|
def download_photo(self):
|
||||||
|
full_page = requests.get(self.url, headers=self.headers)
|
||||||
|
soup = BeautifulSoup(full_page.content, 'html.parser')
|
||||||
|
lnk = str
|
||||||
|
for link in soup.select("img"):
|
||||||
|
lnk = link["src"]
|
||||||
|
|
||||||
|
img = urllib.request.urlopen(self.url + lnk).read()
|
||||||
|
out = open(self.photoName, "wb")
|
||||||
|
out.write(img)
|
||||||
|
out.close()
|
||||||
|
|
||||||
|
def set_wallpaper(self):
|
||||||
|
path = os.path.abspath(self.photoName)
|
||||||
|
ctypes.windll.user32.SystemParametersInfoW(20, 0, path, 0)
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
if not ctypes.windll.shell32.IsUserAnAdmin() != 0:
|
||||||
|
elevate(show_console=False, graphical=False)
|
||||||
|
self.download_photo()
|
||||||
|
self.set_wallpaper()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
nasa = Nasa()
|
||||||
|
nasa.start()
|
||||||
|
schedule.every(3).seconds.do(nasa.start)
|
||||||
|
while True:
|
||||||
|
schedule.run_pending()
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
beautifulsoup4==4.11.1
|
||||||
|
requests~=2.28.0
|
||||||
|
schedule~=1.1.0
|
||||||
|
elevate~=0.1.3
|
|
@ -1,11 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import "net/http"
|
|
||||||
|
|
||||||
func Connected() (ok bool) {
|
|
||||||
_, err := http.Get("http://clients3.google.com/generate_204")
|
|
||||||
if err != nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/go-ole/go-ole"
|
|
||||||
"github.com/go-ole/go-ole/oleutil"
|
|
||||||
)
|
|
||||||
|
|
||||||
func CreateLnk(src, dst string) error {
|
|
||||||
err := ole.CoInitializeEx(0, ole.COINIT_APARTMENTTHREADED|ole.COINIT_SPEED_OVER_MEMORY)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
oleShellObject, err := oleutil.CreateObject("WScript.Shell")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
defer oleShellObject.Release()
|
|
||||||
wshell, err := oleShellObject.QueryInterface(ole.IID_IDispatch)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
defer wshell.Release()
|
|
||||||
cs, err := oleutil.CallMethod(wshell, "CreateShortcut", dst)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
idispatch := cs.ToIDispatch()
|
|
||||||
_, err = oleutil.PutProperty(idispatch, "TargetPath", src)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
dir, err := os.Getwd()
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = oleutil.PutProperty(idispatch, "WorkingDirectory", dir)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = oleutil.CallMethod(idispatch, "Save")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,74 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Database() {
|
|
||||||
db, err := sql.Open("sqlite3", "Starlio.db")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if !TableExists(db, "settings") {
|
|
||||||
sqlTable := `
|
|
||||||
CREATE TABLE IF NOT EXISTS settings (
|
|
||||||
startup INTEGER DEFAULT 0,
|
|
||||||
wallpaper INTEGER DEFAULT 0,
|
|
||||||
save_logg INTEGER DEFAULT 1
|
|
||||||
);`
|
|
||||||
|
|
||||||
_, err = db.Exec(sqlTable)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
stmt, err := db.Prepare("INSERT INTO settings(startup, wallpaper, save_logg) values(?,?,?)")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = stmt.Exec(0, 0, 1)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if !TableExists(db, "favorite") {
|
|
||||||
sqlTable := `
|
|
||||||
CREATE TABLE IF NOT EXISTS favorite (
|
|
||||||
title TEXT,
|
|
||||||
explanation TEXT,
|
|
||||||
copyright TEXT,
|
|
||||||
date TEXT,
|
|
||||||
url TEXT,
|
|
||||||
hdurl TEXT,
|
|
||||||
media_type TEXT
|
|
||||||
);`
|
|
||||||
|
|
||||||
_, err = db.Exec(sqlTable)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetDatabase() *sql.DB {
|
|
||||||
db, err := sql.Open("sqlite3", "Starlio.db")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
return db
|
|
||||||
}
|
|
||||||
|
|
||||||
func TableExists(db *sql.DB, name string) bool {
|
|
||||||
var exists bool
|
|
||||||
err := db.QueryRow("SELECT EXISTS(SELECT name FROM sqlite_master WHERE type='table' AND name=?)", name).Scan(&exists)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
return exists
|
|
||||||
}
|
|
123
utils/logger.go
123
utils/logger.go
|
@ -1,123 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"runtime"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/rodkranz/fetch"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Logger(text string) {
|
|
||||||
now := time.Now()
|
|
||||||
|
|
||||||
file := string(now.Format("02.01.2006")) + ".log"
|
|
||||||
|
|
||||||
if getDatabase() == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if !FileExists("logs") {
|
|
||||||
err := CreateFolder("logs")
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if !FileExists("./logs/" + file) {
|
|
||||||
err := CreateFile(file)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
f, err := os.OpenFile("logs/"+file, os.O_APPEND|os.O_WRONLY, 0600)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
_, file, line, ok := runtime.Caller(1)
|
|
||||||
|
|
||||||
if !ok {
|
|
||||||
file = "???"
|
|
||||||
}
|
|
||||||
|
|
||||||
dir, err := os.Getwd()
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if strings.Contains(file, dir) {
|
|
||||||
file = strings.Replace(file, dir, "", -1)
|
|
||||||
}
|
|
||||||
|
|
||||||
var lineString string
|
|
||||||
if ok {
|
|
||||||
lineString = fmt.Sprintf("%d", line)
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = f.Write([]byte(now.Format("15:04:05") + " | " + text + " [" + file + "] [" + lineString + "]\n"))
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func FileExists(name string) bool {
|
|
||||||
if _, err := os.Stat(name); err != nil {
|
|
||||||
if os.IsNotExist(err) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateFile(name string) error {
|
|
||||||
file, err := os.Create("logs/" + name)
|
|
||||||
if err != nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
defer func(file *os.File) {
|
|
||||||
err := file.Close()
|
|
||||||
if err != nil {
|
|
||||||
|
|
||||||
}
|
|
||||||
}(file)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateFolder(name string) error {
|
|
||||||
err := os.Mkdir(name, 0755)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func getDatabase() int {
|
|
||||||
client := fetch.NewDefault()
|
|
||||||
res, err := client.Get("http://localhost:3000/api/get/settings", nil)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
body, err := res.ToString()
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
type DatabaseStruct struct {
|
|
||||||
Save_logg int `json:"save_logg"`
|
|
||||||
}
|
|
||||||
|
|
||||||
var Database DatabaseStruct
|
|
||||||
err = json.Unmarshal([]byte(body), &Database)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return Database.Save_logg
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Message(status bool, message string) map[string]interface{} {
|
|
||||||
return map[string]interface{}{"status": status, "message": message}
|
|
||||||
}
|
|
||||||
|
|
||||||
func Respond(c *fiber.Ctx, data map[string]interface{}) {
|
|
||||||
c.Set("Content-Type", "application/json")
|
|
||||||
err := json.NewEncoder(c).Encode(data)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/getlantern/systray"
|
|
||||||
"github.com/shirou/gopsutil/v3/process"
|
|
||||||
"github.com/skratchdot/open-golang/open"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Tray() {
|
|
||||||
systray.SetIcon(GetIcon("web/static/image/icons/icon.ico"))
|
|
||||||
systray.SetTitle("Starlio")
|
|
||||||
systray.SetTooltip("Starlio")
|
|
||||||
ui := systray.AddMenuItem("Open UI", "Open UI")
|
|
||||||
exit := systray.AddMenuItem("Quit", "Quit the whole app")
|
|
||||||
|
|
||||||
for {
|
|
||||||
select {
|
|
||||||
case <-ui.ClickedCh:
|
|
||||||
err := open.Run("http://localhost:3000")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
case <-exit.ClickedCh:
|
|
||||||
Quit()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func Quit() {
|
|
||||||
err := KillProcess("Starlio.exe")
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
systray.Quit()
|
|
||||||
}
|
|
||||||
|
|
||||||
func KillProcess(name string) error {
|
|
||||||
processes, err := process.Processes()
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, p := range processes {
|
|
||||||
n, err := p.Name()
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if n == name {
|
|
||||||
return p.Kill()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fmt.Errorf("process not found")
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetIcon(s string) []byte {
|
|
||||||
b, err := os.ReadFile(s)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
|
@ -1,108 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/jasonlvhit/gocron"
|
|
||||||
"github.com/reujab/wallpaper"
|
|
||||||
"github.com/rodkranz/fetch"
|
|
||||||
)
|
|
||||||
|
|
||||||
func GetWallpaper(date string) string {
|
|
||||||
type WallpaperStruct struct {
|
|
||||||
Hdurl string `json:"hdurl"`
|
|
||||||
Url string `json:"url"`
|
|
||||||
Media_type string `json:"media_type"`
|
|
||||||
}
|
|
||||||
|
|
||||||
client := fetch.NewDefault()
|
|
||||||
res, err := client.Get("https://api.nasa.gov/planetary/apod?api_key=1gI9G84ZafKDEnrbydviGknReOGiVK9jqrQBE3et&date="+
|
|
||||||
date,
|
|
||||||
nil)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
body, err := res.ToString()
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
var Wallpaper WallpaperStruct
|
|
||||||
err = json.Unmarshal([]byte(body), &Wallpaper)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if Wallpaper.Media_type == "video" {
|
|
||||||
return "https://img.youtube.com/vi/" + Wallpaper.Url[30:41] + "/maxresdefault.jpg"
|
|
||||||
}
|
|
||||||
|
|
||||||
return Wallpaper.Hdurl
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetWallpaper() {
|
|
||||||
times := time.Now()
|
|
||||||
t := time.Date(times.Year(),
|
|
||||||
times.Month(),
|
|
||||||
times.Day(),
|
|
||||||
times.Hour(),
|
|
||||||
times.Minute(),
|
|
||||||
times.Second(),
|
|
||||||
times.Nanosecond(),
|
|
||||||
time.UTC)
|
|
||||||
|
|
||||||
err := wallpaper.SetFromURL(GetWallpaper(t.Format("2006-01-02")))
|
|
||||||
if err != nil {
|
|
||||||
t = t.AddDate(0, 0, -1)
|
|
||||||
err = wallpaper.SetFromURL(GetWallpaper(t.Format("2006-01-02")))
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func StartWallpaper() {
|
|
||||||
type Autostart struct {
|
|
||||||
Wallpaper int `json:"wallpaper"`
|
|
||||||
}
|
|
||||||
|
|
||||||
client := fetch.NewDefault()
|
|
||||||
res, err := client.Get("http://localhost:3000/api/get/settings", nil)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
body, err := res.ToString()
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
var AutostartSetWallpaper Autostart
|
|
||||||
err = json.Unmarshal([]byte(body), &AutostartSetWallpaper)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if AutostartSetWallpaper.Wallpaper == 1 {
|
|
||||||
times := time.Now()
|
|
||||||
t := time.Date(times.Year(),
|
|
||||||
times.Month(),
|
|
||||||
times.Day(),
|
|
||||||
4,
|
|
||||||
50,
|
|
||||||
times.Second(),
|
|
||||||
times.Nanosecond(),
|
|
||||||
time.UTC)
|
|
||||||
|
|
||||||
SetWallpaper()
|
|
||||||
|
|
||||||
err = gocron.Every(1).Day().From(&t).Do(SetWallpaper)
|
|
||||||
if err != nil {
|
|
||||||
Logger(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
gocron.Start()
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Starlio</title>
|
|
||||||
<link rel="icon" href="/image/icons/favicon.png">
|
|
||||||
</head>
|
|
||||||
<style>
|
|
||||||
* {
|
|
||||||
line-height: 1.2;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
lottie-player {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 300px; height: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-family: sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0.4% auto;
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:visited {
|
|
||||||
color: #9FA4AF;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<body style="background: #131313; color: white;">
|
|
||||||
<lottie-player src="/static/image/lottie/lf20_2QSlz3Li88.json" background="transparent" speed="1" loop autoplay></lottie-player>
|
|
||||||
<p style="font-size: 160%;">Page not found!</p>
|
|
||||||
<p style="font-size: 115%;">Sorry, but the page you want to view may have been deleted or moved!</p>
|
|
||||||
<p><a style="font-size: 1em;" href="/">General page</a></p>
|
|
||||||
<script src="/static/scripts/lottie-player.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,35 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Starlio</title>
|
|
||||||
<link rel="icon" href="/static/image/icons/favicon.png">
|
|
||||||
<style>
|
|
||||||
lottie-player {
|
|
||||||
margin: 2% auto;
|
|
||||||
width: 250px;
|
|
||||||
height: 250px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-family: sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
font-family: sans-serif;
|
|
||||||
margin-top: 3%;
|
|
||||||
margin-left: 43%
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body style="background: #131313; color: white;">
|
|
||||||
<lottie-player src="/static/image/lottie/lf20_3FGZxC.json" background="transparent" speed="0.5" style="width: 250px; height: 250px;" loop autoplay></lottie-player>
|
|
||||||
<p style="margin: 3% auto; font-size: 1.7em;">No internet connection</p>
|
|
||||||
<p style="margin: -2% auto; font-size: 1.2em;">Try to do the following:</p>
|
|
||||||
<li>Check the network cables, modem and router.</li>
|
|
||||||
<li style="margin-top: 1%; margin-left: 43%">Connect to the Wi-Fi network again.</li>
|
|
||||||
<script src="static/scripts/lottie-player.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because one or more lines are too long
|
@ -1,97 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Starlio</title>
|
|
||||||
|
|
||||||
<link rel="icon" href="/static/image/icons/favicon.png">
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="/static/style/gallery.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="/static/style/favorite.css" type="text/css">
|
|
||||||
</head>
|
|
||||||
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<a class="navbar-brand" href="/" draggable="false">
|
|
||||||
<img src="/static/image/icons/favicon.png" width="45" alt="Starlio">
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/">Gallery</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" aria-current="page" href="/favorite">Favorite</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/settings">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/about">About</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<div class="modal fade" id="WallpaperModal" aria-hidden="true" aria-labelledby="WallpaperModal" tabindex="-1" style="color: black;">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="WallpaperModale">
|
|
||||||
<span class="d-inline-block text-truncate w-modal-title" style="max-width: 429px;"></span>
|
|
||||||
</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body"></div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<header class="header-row"></header>
|
|
||||||
</div>
|
|
||||||
<div class="preloader">
|
|
||||||
<lottie-player src="https://assets4.lottiefiles.com/datafiles/a3YH0ragZcwfKHS/data.json" background="transparent" speed="1" style="width: 600px; height: 600px;" loop autoplay></lottie-player>
|
|
||||||
</div>
|
|
||||||
<body>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
|
|
||||||
<script src="/static/scripts/gallery.js" type="application/javascript"></script>
|
|
||||||
<script type="application/javascript">
|
|
||||||
$(document).ready(function () {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/favorites",
|
|
||||||
type: "GET",
|
|
||||||
success: function(data) {
|
|
||||||
console.log(data);
|
|
||||||
if(data === null) {
|
|
||||||
$(".preloader").hide();
|
|
||||||
$("body").append(`
|
|
||||||
<lottie-player id="star"
|
|
||||||
src="https://assets2.lottiefiles.com/private_files/lf30_rcvcAS.json"
|
|
||||||
background="transparent"
|
|
||||||
autoplay
|
|
||||||
speed="1">
|
|
||||||
</lottie-player>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<h1 class="text-center" style="color: white; margin-top: -5%">You don't have any favorites</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
|
|
||||||
wallpaperLoad(data);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,97 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Starlio</title>
|
|
||||||
<link rel="icon" href="/static/image/icons/favicon.png">
|
|
||||||
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="/static/style/gallery.css" type="text/css">
|
|
||||||
</head>
|
|
||||||
<body style="background: #131313; color: white;">
|
|
||||||
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<a class="navbar-brand" href="/">
|
|
||||||
<img src="/static/image/icons/favicon.png" width="45" alt="Starlio">
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" aria-current="page" href="/">Gallery</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/favorite">Favorite</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/settings">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/about">About</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<div class="modal fade" id="WallpaperModal" aria-hidden="true" aria-labelledby="WallpaperModal" tabindex="-1" style="color: black;">
|
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="WallpaperModale">
|
|
||||||
<span class="d-inline-block text-truncate w-modal-title" style="max-width: 429px;"></span>
|
|
||||||
</h5>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body"></div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<header class="header-row"></header>
|
|
||||||
</div>
|
|
||||||
<div class="preloader">
|
|
||||||
<lottie-player src="https://assets4.lottiefiles.com/datafiles/a3YH0ragZcwfKHS/data.json" background="transparent" speed="1" style="width: 600px; height: 600px;" loop autoplay></lottie-player>
|
|
||||||
</div>
|
|
||||||
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
|
||||||
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="toast-header">
|
|
||||||
<img src="/static/image/icons/favicon.png" class="rounded me-2" alt="Starlio" width="30">
|
|
||||||
<strong class="me-auto" style="color: black;">Starlio</strong>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body" style="color: black;"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.10.0/lottie.min.js"></script>
|
|
||||||
<script src="/static/scripts/gallery.js" type="application/javascript"></script>
|
|
||||||
<script type="application/javascript">
|
|
||||||
startDate.setDate(startDate.getUTCDate() - 17);
|
|
||||||
$(document).ready(function() {
|
|
||||||
$.ajax({
|
|
||||||
url: "https://api.nasa.gov/planetary/apod",
|
|
||||||
type: "GET",
|
|
||||||
data: {
|
|
||||||
api_key: apiKEY,
|
|
||||||
start_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
|
|
||||||
end_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
data.reverse();
|
|
||||||
wallpaperLoad(data);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,86 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Starlio</title>
|
|
||||||
<link rel="icon" href="/static/image/icons/favicon.png">
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="/static/style/settings.css" type="text/css">
|
|
||||||
</head>
|
|
||||||
<body style="background: #131313; color: white;">
|
|
||||||
<nav class="navbar navbar-expand-lg bg-dark navbar-dark">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<a class="navbar-brand" href="/" draggable="false">
|
|
||||||
<img src="/static/image/icons/favicon.png" width="45" alt="Starlio">
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/">Gallery</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/favorite">Favorite</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" aria-current="page" href="/settings">Settings</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="/about">About</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<h1 id="title">Application Settings</h1>
|
|
||||||
<div class="container">
|
|
||||||
<header class="header-row">
|
|
||||||
<div class="settings">
|
|
||||||
<p class="title"><strong>Add a program to the startup</strong></p>
|
|
||||||
<p class="desc">EverNasa will automatically start when you log in.</p>
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="settings_startupSwitch">
|
|
||||||
<label class="form-check-label" for="settings_startupTogglerName" id="settings_startupTogglerName">Off</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="settings">
|
|
||||||
<p class="title"><strong>Auto-change of desktop wallpaper</strong></p>
|
|
||||||
<p class="desc">Starlio will automatically change the desktop wallpaper at startup as well as every day.</p>
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="settings_autoSetWallpaperSwitch">
|
|
||||||
<label class="form-check-label" for="settings_autoSetWallpaperTogglerName" id="settings_autoSetWallpaperTogglerName">Off</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="settings">
|
|
||||||
<p class="title"><strong>Create log files</strong></p>
|
|
||||||
<p class="desc">Starlio will create files in which errors will be written that will help developers when correcting errors.</p>
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="settings_saveLoggSwitch">
|
|
||||||
<label class="form-check-label" for="settings_saveLoggTogglerName" id="settings_saveLoggTogglerName">Off</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="settings">
|
|
||||||
<p class="title"><strong>Create an application shortcut</strong></p>
|
|
||||||
<p class="desc">Starlio will create an application shortcut on your desktop.</p>
|
|
||||||
<button type="button" class="btn btn-outline-primary" id="createLabelButton">Create</button>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
</div>
|
|
||||||
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
|
||||||
<div id="liveToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="toast-header">
|
|
||||||
<img src="/static/image/icons/favicon.png" class="rounded me-2" alt="Starlio" width="30">
|
|
||||||
<strong class="me-auto" style="color: black;">Starlio</strong>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body" style="color: black;"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
|
|
||||||
<script src="/static/scripts/switch.js" type="application/javascript"></script>
|
|
||||||
<script src="/static/scripts/createLabel.js" type="application/javascript"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 149 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 6 KiB |
|
@ -1,20 +0,0 @@
|
||||||
let button = document.querySelector("#createLabelButton");
|
|
||||||
button.addEventListener("click", function() {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/create/label",
|
|
||||||
type: "POST",
|
|
||||||
success: function(data) {
|
|
||||||
if(data.status) {
|
|
||||||
$(".toast-body").text(data.message);
|
|
||||||
let toastLiveExample = document.getElementById('liveToast');
|
|
||||||
let toast = new bootstrap.Toast(toastLiveExample);
|
|
||||||
toast.show();
|
|
||||||
} else {
|
|
||||||
$(".toast-body").text("An error occurred while creating the label.");
|
|
||||||
let toastLiveExample = document.getElementById('liveToast');
|
|
||||||
let toast = new bootstrap.Toast(toastLiveExample);
|
|
||||||
toast.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,299 +0,0 @@
|
||||||
const startDate = new Date();
|
|
||||||
const endDate = new Date();
|
|
||||||
|
|
||||||
const ids = [];
|
|
||||||
let id = 0;
|
|
||||||
|
|
||||||
const apiKEY = "1gI9G84ZafKDEnrbydviGknReOGiVK9jqrQBE3et";
|
|
||||||
|
|
||||||
function wallpaperLoad(data) {
|
|
||||||
$(".preloader").hide();
|
|
||||||
|
|
||||||
for (let i = 0; i < data.length; i++, id++) {
|
|
||||||
ids.push(data[i]);
|
|
||||||
|
|
||||||
if (ids.filter((item) => item['url'] === data[i]['url']).length > 1) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let image = new Image();
|
|
||||||
image.src = ids[id]['media_type'] === "video" ?
|
|
||||||
`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg` :
|
|
||||||
ids[id]['url'];
|
|
||||||
|
|
||||||
image.onload = function() {
|
|
||||||
if(image.width+image.height !== 210) {
|
|
||||||
$(`img[data-src="${image.src}"]`).attr("src", `${image.src}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ids[id]['media_type'] === "image") {
|
|
||||||
$(".header-row").append(`
|
|
||||||
<div class="card">
|
|
||||||
<a data-bs-toggle="modal" href="#WallpaperModal" role="button">
|
|
||||||
<img src="${ids[id]['url']}" alt="${ids[id]['title']}" class="card-img-top shimmer" id="${id}">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
`);
|
|
||||||
} else {
|
|
||||||
$(".header-row").append(`
|
|
||||||
<div class="card">
|
|
||||||
<a data-bs-toggle="modal" href="#WallpaperModal" role="button">
|
|
||||||
<img src="http://localhost:3000/static/image/placeholder.png"
|
|
||||||
data-src="https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg"
|
|
||||||
alt="${ids[id]['title']}"
|
|
||||||
class="card-img-top shimmer"
|
|
||||||
id="${id}">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".card-img-top").on("load", function() {
|
|
||||||
$(this).removeClass("shimmer");
|
|
||||||
});
|
|
||||||
|
|
||||||
const button_modal = document.querySelector(".header-row");
|
|
||||||
button_modal.addEventListener("click", function (event) {
|
|
||||||
if (event.target === button_modal) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let id = event.target.getAttribute("id");
|
|
||||||
let img = document.querySelector(".modal-body");
|
|
||||||
let title = document.querySelector(".w-modal-title");
|
|
||||||
|
|
||||||
let button = document.querySelector(".modal-footer");
|
|
||||||
|
|
||||||
if($(`img#${id}.card-img-top`).attr("src") !== "http://localhost:3000/static/image/placeholder.png") {
|
|
||||||
button.innerHTML = `<lottie-player id="favorite"
|
|
||||||
src="https://assets2.lottiefiles.com/private_files/lf30_rcvcAS.json"
|
|
||||||
background="transparent"
|
|
||||||
speed="1">
|
|
||||||
</lottie-player>
|
|
||||||
<button type="button" class="btn btn-primary" id="setWallpaper">Set Wallpaper</button>
|
|
||||||
`;
|
|
||||||
} else {
|
|
||||||
button.innerHTML = `<lottie-player id="favorite"
|
|
||||||
src="https://assets2.lottiefiles.com/private_files/lf30_rcvcAS.json"
|
|
||||||
background="transparent"
|
|
||||||
speed="1">
|
|
||||||
</lottie-player>
|
|
||||||
<button type="button"
|
|
||||||
class="btn"
|
|
||||||
id="setWallpaper"
|
|
||||||
disabled
|
|
||||||
style="background-color: grey; color: white;">
|
|
||||||
Set Wallpaper
|
|
||||||
</button>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const setWallpaper = document.querySelector("#setWallpaper");
|
|
||||||
const favorite = document.querySelector("#favorite");
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/favorites",
|
|
||||||
type: "GET",
|
|
||||||
data: {
|
|
||||||
title: ids[id]['title'],
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
if (data !== "No favorites found") {
|
|
||||||
favorite.setDirection(1);
|
|
||||||
favorite.play();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
ids[id]['copyright'] = ids[id]['copyright'] === undefined ? "NASA" : ids[id]['copyright'];
|
|
||||||
|
|
||||||
const explanation = ids[id]['explanation'].length > 200 ?
|
|
||||||
ids[id]['explanation'].slice(0, 200) + "..." :
|
|
||||||
ids[id]['explanation'];
|
|
||||||
|
|
||||||
if (ids[id]['media_type'] === "image") {
|
|
||||||
title.innerHTML = `<h5 class="modal-title">${ids[id]['title']}</h5>`;
|
|
||||||
img.innerHTML = `
|
|
||||||
<img src="${ids[id]['url']}" alt="${ids[id]['title']}" class="card-img">
|
|
||||||
<p><strong>Author:</strong> ${ids[id]['copyright']}</p>
|
|
||||||
<p><strong>Date of publication:</strong> ${ids[id]['date']}</p>
|
|
||||||
<p><strong>Explanation:</strong> ${explanation}</p>
|
|
||||||
|
|
||||||
<button type="button" class="show-more btn btn-primary" id="show-more">Show more</button>
|
|
||||||
`;
|
|
||||||
|
|
||||||
setWallpaper.addEventListener("click", function () {
|
|
||||||
wallpaperUpdate(ids[id]['hdurl']);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
title.innerHTML = `<h5 class="modal-title">${ids[id]['title']}</h5>`;
|
|
||||||
img.innerHTML = `
|
|
||||||
<iframe width="460"
|
|
||||||
height="315"
|
|
||||||
src="${ids[id]['url']}"
|
|
||||||
title="YouTube video player"
|
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
||||||
allowFullScreen></iframe>
|
|
||||||
|
|
||||||
<p><strong>Author:</strong> ${ids[id]['copyright']}</p>
|
|
||||||
<p><strong>Date of publication:</strong> ${ids[id]['date']}</p>
|
|
||||||
<p><strong>Explanation:</strong> ${explanation}</p>
|
|
||||||
<button type="button" class="show-more btn btn-primary" id="show-more">Show more</button>
|
|
||||||
`;
|
|
||||||
|
|
||||||
setWallpaper.addEventListener("click", function () {
|
|
||||||
wallpaperUpdate(`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
favorite.addEventListener("click", function() {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/favorites",
|
|
||||||
type: "GET",
|
|
||||||
data: {
|
|
||||||
title: ids[id]['title'],
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
if (data === "No favorites found") {
|
|
||||||
if (ids[id]['media_type'] === "image") {
|
|
||||||
favoriteAdd(ids[id]['title'],
|
|
||||||
ids[id]['explanation'],
|
|
||||||
ids[id]['copyright'],
|
|
||||||
ids[id]['date'],
|
|
||||||
ids[id]['url'],
|
|
||||||
ids[id]['hdurl'],
|
|
||||||
ids[id]['media_type'],
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
favoriteAdd(ids[id]['title'],
|
|
||||||
ids[id]['explanation'],
|
|
||||||
ids[id]['copyright'],
|
|
||||||
ids[id]['date'],
|
|
||||||
`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/0.jpg`,
|
|
||||||
`https://img.youtube.com/vi/${ids[id]['url'].slice(30, 41)}/maxresdefault.jpg`,
|
|
||||||
ids[id]['media_type'],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
favorite.setDirection(1);
|
|
||||||
favorite.play()
|
|
||||||
} else {
|
|
||||||
favoriteRemove(ids[id]['title']);
|
|
||||||
favorite.setDirection(-1);
|
|
||||||
favorite.play();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
let showMore = document.querySelector("#show-more");
|
|
||||||
showMore.addEventListener("click", function () {
|
|
||||||
let explanation = document.querySelector(".modal-body p:nth-child(4)");
|
|
||||||
if(showMore.innerHTML === "Show more") {
|
|
||||||
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation']}`;
|
|
||||||
showMore.innerHTML = "Show less";
|
|
||||||
} else {
|
|
||||||
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation'].length > 200 ? ids[id]['explanation'].slice(0, 200) + "..." : ids[id]['explanation']}`;
|
|
||||||
showMore.innerHTML = "Show more";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window).scroll(function () {
|
|
||||||
if (($(window).scrollTop() > $(document).height() - $(window).height() - 100)) {
|
|
||||||
$(".preloader").show();
|
|
||||||
$(window).off("scroll");
|
|
||||||
|
|
||||||
startDate.setDate(startDate.getDate() - 1);
|
|
||||||
|
|
||||||
endDate.setDate(endDate.getDate() - 15);
|
|
||||||
endDate.setMonth(endDate.getMonth() - 1);
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "https://api.nasa.gov/planetary/apod",
|
|
||||||
data: {
|
|
||||||
api_key: apiKEY,
|
|
||||||
start_date: `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}`,
|
|
||||||
end_date: `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}`,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
wallpaperLoad(data);
|
|
||||||
$(window).on("scroll");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param url {String} Url of the image to be set as wallpaper
|
|
||||||
*/
|
|
||||||
|
|
||||||
function wallpaperUpdate(url) {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/wallpaper",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
url: url,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
$(".toast-body").text(data.message);
|
|
||||||
let toastLiveExample = document.getElementById('liveToast');
|
|
||||||
let toast = new bootstrap.Toast(toastLiveExample);
|
|
||||||
toast.show();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param title {String} Title of the image
|
|
||||||
* @param explanation {String} Explanation of the image
|
|
||||||
* @param copyright {String} Author of the image
|
|
||||||
* @param date {String} Date of publication
|
|
||||||
* @param url {String} Url of the image
|
|
||||||
* @param hdurl {String} Url of the image in high definition
|
|
||||||
* @param media_type {String} Type of media
|
|
||||||
*/
|
|
||||||
|
|
||||||
function favoriteAdd(title, explanation, copyright, date, url, hdurl, media_type) {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/add/favorite",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
title: title,
|
|
||||||
explanation: explanation,
|
|
||||||
date: date,
|
|
||||||
url: url,
|
|
||||||
hdurl: hdurl,
|
|
||||||
media_type: media_type,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
$(".toast-body").text(data.message);
|
|
||||||
let toastLiveExample = document.getElementById('liveToast');
|
|
||||||
let toast = new bootstrap.Toast(toastLiveExample);
|
|
||||||
toast.show();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param title {String} Title of the image
|
|
||||||
*/
|
|
||||||
|
|
||||||
function favoriteRemove(title) {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/del/favorite",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
title: title,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
$(".toast-body").text(data.message);
|
|
||||||
let toastLiveExample = document.getElementById('liveToast');
|
|
||||||
let toast = new bootstrap.Toast(toastLiveExample);
|
|
||||||
toast.show();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
|
@ -1,198 +0,0 @@
|
||||||
$(document).ready(async function() {
|
|
||||||
const $startupSwitch = $("#settings_startupSwitch");
|
|
||||||
const $startupSwitchTogglerName = $("#settings_startupTogglerName");
|
|
||||||
|
|
||||||
const $wallpaperSwitch = $("#settings_autoSetWallpaperSwitch");
|
|
||||||
const $wallpaperSwitchTogglerName = $("#settings_autoSetWallpaperTogglerName");
|
|
||||||
|
|
||||||
const $loggingSwitch = $("#settings_saveLoggSwitch");
|
|
||||||
const $loggingSwitchTogglerName = $("#settings_saveLoggTogglerName");
|
|
||||||
|
|
||||||
getSettings().then((data) => {
|
|
||||||
if (data["wallpaper"] === 1) {
|
|
||||||
$wallpaperSwitch.attr("checked", "true");
|
|
||||||
$wallpaperSwitchTogglerName.text("On");
|
|
||||||
}
|
|
||||||
if (data["startup"] === 1) {
|
|
||||||
$startupSwitch.attr("checked", "true");
|
|
||||||
$startupSwitchTogglerName.text("On");
|
|
||||||
}
|
|
||||||
if (data["save_logg"] === 1) {
|
|
||||||
$loggingSwitch.attr("checked", "true");
|
|
||||||
$loggingSwitchTogglerName.text("On");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$wallpaperSwitch.click(async function () {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/settings",
|
|
||||||
type: "GET",
|
|
||||||
success: function (data) {
|
|
||||||
if (data["wallpaper"] === 1) {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/settings",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"wallpaper": 0,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
if (data["status"]) {
|
|
||||||
$wallpaperSwitchTogglerName.text("Off");
|
|
||||||
$wallpaperSwitch.removeAttr("checked");
|
|
||||||
|
|
||||||
toast(data.message);
|
|
||||||
} else {
|
|
||||||
toast("Failed to apply settings.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/settings",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"wallpaper": 1,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
if (data["status"]) {
|
|
||||||
$wallpaperSwitchTogglerName.text("On");
|
|
||||||
$wallpaperSwitch.attr("checked", "true");
|
|
||||||
|
|
||||||
toast(data.message);
|
|
||||||
} else {
|
|
||||||
toast("Failed to apply settings.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
$startupSwitch.click(async function () {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/settings",
|
|
||||||
type: "GET",
|
|
||||||
success: function (data) {
|
|
||||||
if (data["startup"] === 1) {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/settings",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"startup": 0,
|
|
||||||
},
|
|
||||||
success: async function (data) {
|
|
||||||
if (data["status"]) {
|
|
||||||
await editStartup(0);
|
|
||||||
|
|
||||||
$startupSwitchTogglerName.text("Off");
|
|
||||||
$startupSwitch.removeAttr("checked");
|
|
||||||
|
|
||||||
toast(data.message);
|
|
||||||
} else {
|
|
||||||
toast("Failed to apply settings.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/settings",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"startup": 1,
|
|
||||||
},
|
|
||||||
success: async function (data) {
|
|
||||||
if (data["status"]) {
|
|
||||||
await editStartup(1);
|
|
||||||
|
|
||||||
$startupSwitchTogglerName.text("On");
|
|
||||||
$startupSwitch.attr("checked", "true");
|
|
||||||
toast(data.message);
|
|
||||||
} else {
|
|
||||||
toast("Failed to apply settings.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$loggingSwitch.click(async function () {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/settings",
|
|
||||||
type: "GET",
|
|
||||||
success: function (data) {
|
|
||||||
if (data["save_logg"] === 1) {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/settings",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"save_logg": 0,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
if (data["status"]) {
|
|
||||||
$loggingSwitchTogglerName.text("Off");
|
|
||||||
$loggingSwitch.removeAttr("checked");
|
|
||||||
|
|
||||||
toast(data.message);
|
|
||||||
} else {
|
|
||||||
toast("Failed to apply settings.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/settings",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"save_logg": 1,
|
|
||||||
},
|
|
||||||
success: function (data) {
|
|
||||||
if (data["status"]) {
|
|
||||||
$loggingSwitchTogglerName.text("On");
|
|
||||||
$loggingSwitch.attr("checked", "true");
|
|
||||||
|
|
||||||
toast(data.message);
|
|
||||||
} else {
|
|
||||||
toast("Failed to apply settings.");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function toast(message) {
|
|
||||||
if (message === null) {
|
|
||||||
return "Required parameter 'message' is missing.";
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".toast-body").text(message);
|
|
||||||
let toastLiveExample = document.getElementById('liveToast');
|
|
||||||
let toast = new bootstrap.Toast(toastLiveExample);
|
|
||||||
toast.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
function editStartup(i) {
|
|
||||||
if (i !== 1 || i !== 0 || i === null) {
|
|
||||||
return "Required parameter 'i' is missing.";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $.ajax({
|
|
||||||
url: "http://localhost:3000/api/update/startup",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"startup": i
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSettings() {
|
|
||||||
return $.ajax({
|
|
||||||
url: "http://localhost:3000/api/get/settings",
|
|
||||||
type: "GET",
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
|
|
||||||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
|
|
|
@ -1,44 +0,0 @@
|
||||||
p {
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#title {
|
|
||||||
font-size: 1.6em;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#banner {
|
|
||||||
display: block;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-top: 1%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#description, #dev {
|
|
||||||
font-size: 1.2em;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contact-image {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin-top: -0.5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#version {
|
|
||||||
font-size: 1em;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: -0.5%;
|
|
||||||
color: #9FA4AF
|
|
||||||
}
|
|
||||||
|
|
||||||
#license a, #github a {
|
|
||||||
color: #a596bd;
|
|
||||||
}
|
|
||||||
|
|
||||||
#license, #github {
|
|
||||||
font-size: 1em;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
body {
|
|
||||||
background-color: #131313;
|
|
||||||
}
|
|
||||||
|
|
||||||
lottie-player {
|
|
||||||
width: 30%;
|
|
||||||
height: 30%;
|
|
||||||
margin-top: -10%;
|
|
||||||
}
|
|
|
@ -1,92 +0,0 @@
|
||||||
.card {
|
|
||||||
background-color: #131313;
|
|
||||||
border-radius: 34px;
|
|
||||||
width: 359px;
|
|
||||||
height: 237px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-row {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
grid-template-rows: repeat(1, 1fr);
|
|
||||||
grid-gap: 40px;
|
|
||||||
padding: 10px;
|
|
||||||
margin-left: -100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-img-top {
|
|
||||||
min-width: 120%;
|
|
||||||
min-height: 120%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-img {
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
lottie-player {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
background-color: #131313;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shimmer {
|
|
||||||
display: inline-block;
|
|
||||||
color: #333333;
|
|
||||||
-webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) right/386% 100%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
animation: shimmer 2.5s infinite;
|
|
||||||
filter: blur(50px)
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes shimmer {
|
|
||||||
100% {-webkit-mask-position: left}
|
|
||||||
}
|
|
||||||
|
|
||||||
#show-more {
|
|
||||||
background-color: #212529;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-body p {
|
|
||||||
font-family: 'Roboto', sans-serif;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
|
||||||
position: -webkit-sticky;
|
|
||||||
position: sticky;
|
|
||||||
z-index: 100;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#favorite {
|
|
||||||
width: 130px;
|
|
||||||
height: 130px;
|
|
||||||
margin: -17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#favorite:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#favorite:active {
|
|
||||||
transform: scale(0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
#setWallpaper:disabled {
|
|
||||||
cursor: unset;
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-close{
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
#title {
|
|
||||||
margin-top: 0.6em;
|
|
||||||
margin-left: 0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
margin-top: 2.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
|
||||||
margin-top: -0.7em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.settings {
|
|
||||||
margin-top: 2.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.settings p, .form-check {
|
|
||||||
margin-left: -17.5em;
|
|
||||||
margin-top: -0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#createLabelButton {
|
|
||||||
margin-left: -17.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-check-input {
|
|
||||||
position: relative;
|
|
||||||
left: 5px;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-check-label {
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-top: 2.2px;
|
|
||||||
}
|
|
BIN
winres/icon.png
BIN
winres/icon.png
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"RT_GROUP_ICON": {
|
|
||||||
"APP": {
|
|
||||||
"0000": [
|
|
||||||
"icon.png"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"RT_MANIFEST": {
|
|
||||||
"#1": {
|
|
||||||
"0409": {
|
|
||||||
"identity": {
|
|
||||||
"name": "Starlio",
|
|
||||||
"version": "2.3.3"
|
|
||||||
},
|
|
||||||
"description": "Automatic space wallpaper from Nasa",
|
|
||||||
"minimum-os": "win10",
|
|
||||||
"execution-level": "",
|
|
||||||
"ui-access": false,
|
|
||||||
"auto-elevate": false,
|
|
||||||
"dpi-awareness": "system",
|
|
||||||
"disable-theming": false,
|
|
||||||
"disable-window-filtering": false,
|
|
||||||
"high-resolution-scrolling-aware": false,
|
|
||||||
"ultra-high-resolution-scrolling-aware": false,
|
|
||||||
"long-path-aware": false,
|
|
||||||
"printer-driver-isolation": false,
|
|
||||||
"gdi-scaling": false,
|
|
||||||
"segment-heap": false,
|
|
||||||
"use-common-controls-v6": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"RT_VERSION": {
|
|
||||||
"#1": {
|
|
||||||
"0000": {
|
|
||||||
"fixed": {
|
|
||||||
"file_version": "2.3.2",
|
|
||||||
"product_version": "2.3.2"
|
|
||||||
},
|
|
||||||
"info": {
|
|
||||||
"0409": {
|
|
||||||
"Comments": "",
|
|
||||||
"CompanyName": "Redume",
|
|
||||||
"FileDescription": "",
|
|
||||||
"FileVersion": "3.2.1",
|
|
||||||
"InternalName": "Starlio",
|
|
||||||
"LegalCopyright": "Redume",
|
|
||||||
"LegalTrademarks": "",
|
|
||||||
"OriginalFilename": "Starlio.exe",
|
|
||||||
"PrivateBuild": "",
|
|
||||||
"ProductName": "Starlio",
|
|
||||||
"ProductVersion": "2.3.2",
|
|
||||||
"SpecialBuild": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
50
wix.json
50
wix.json
|
@ -1,50 +0,0 @@
|
||||||
{
|
|
||||||
"product": "Starlio",
|
|
||||||
"company": "Redume",
|
|
||||||
"license": "LICENSE",
|
|
||||||
"upgrade-code": "4165e562-ab60-4ac2-b27b-df2d62548dd9",
|
|
||||||
"files": {
|
|
||||||
"guid": "c68b679d-8199-4036-8ead-d509fad132c8",
|
|
||||||
"items": [
|
|
||||||
"Starlio.exe",
|
|
||||||
"NOTICE"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"directories": [
|
|
||||||
"api",
|
|
||||||
"web",
|
|
||||||
"utils"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"guid": "24554370-7366-4725-8509-7aebb35da25a",
|
|
||||||
"vars": [
|
|
||||||
{
|
|
||||||
"name": "PATH",
|
|
||||||
"value": "[INSTALLDIR]",
|
|
||||||
"permanent": "no",
|
|
||||||
"system": "no",
|
|
||||||
"action": "set",
|
|
||||||
"part": "last"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"shortcuts": {
|
|
||||||
"guid": "f2fb0dac-ddda-4c8e-bba4-3eb377150cde",
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"name": "Starlio",
|
|
||||||
"description": "Automatic space wallpaper from NASA",
|
|
||||||
"target": "[INSTALLDIR]Starlio.exe",
|
|
||||||
"wdir": "INSTALLDIR",
|
|
||||||
"arguments": "",
|
|
||||||
"icon": "web/static/image/icons/icon.ico"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"choco": {
|
|
||||||
"description": "Automatic space wallpaper from NASA",
|
|
||||||
"project-url": "https://github.com/Redume/Starlio",
|
|
||||||
"tags": "Wallpaper, NASA, go, auto-wallpaper",
|
|
||||||
"license-url": "https://github.com/Redume/Starlio/blob/main/NOTICE"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
||||||
<Fragment>
|
|
||||||
<UI>
|
|
||||||
<Dialog Id="LicenseAgreementDlg_HK" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
|
|
||||||
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20" Y="207" Width="330" Height="18" CheckBoxValue="1" Property="LicenseAccepted" Text="!(loc.LicenseAgreementDlgLicenseAcceptedCheckBox)" />
|
|
||||||
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
|
|
||||||
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
|
|
||||||
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
|
|
||||||
<Condition Action="disable">
|
|
||||||
<![CDATA[LicenseAccepted <> "1"]]>
|
|
||||||
</Condition>
|
|
||||||
<Condition Action="enable">LicenseAccepted = "1"</Condition>
|
|
||||||
</Control>
|
|
||||||
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
|
|
||||||
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
|
|
||||||
</Control>
|
|
||||||
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
|
|
||||||
<Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
|
|
||||||
{{if gt (.License | len) 0}}
|
|
||||||
<Text SourceFile="{{.License}}" />
|
|
||||||
{{end}}
|
|
||||||
</Control>
|
|
||||||
<Control Id="Print" Type="PushButton" X="112" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
|
|
||||||
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
|
|
||||||
</Control>
|
|
||||||
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
|
|
||||||
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
|
|
||||||
<Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
|
|
||||||
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgTitle)" />
|
|
||||||
</Dialog>
|
|
||||||
</UI>
|
|
||||||
</Fragment>
|
|
||||||
</Wix>
|
|
|
@ -1,62 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
||||||
<Fragment>
|
|
||||||
<UI Id="WixUI_HK">
|
|
||||||
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
|
|
||||||
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
|
|
||||||
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
|
|
||||||
|
|
||||||
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
|
|
||||||
<Property Id="WixUI_Mode" Value="InstallDir" />
|
|
||||||
|
|
||||||
<DialogRef Id="BrowseDlg" />
|
|
||||||
<DialogRef Id="DiskCostDlg" />
|
|
||||||
<DialogRef Id="ErrorDlg" />
|
|
||||||
<DialogRef Id="FatalError" />
|
|
||||||
<DialogRef Id="FilesInUse" />
|
|
||||||
<DialogRef Id="MsiRMFilesInUse" />
|
|
||||||
<DialogRef Id="PrepareDlg" />
|
|
||||||
<DialogRef Id="ProgressDlg" />
|
|
||||||
<DialogRef Id="ResumeDlg" />
|
|
||||||
<DialogRef Id="UserExit" />
|
|
||||||
|
|
||||||
<!-- Make sure to include custom dialogs in the installer database via a DialogRef command,
|
|
||||||
especially if they are not included explicitly in the publish chain below -->
|
|
||||||
<DialogRef Id="LicenseAgreementDlg_HK" />
|
|
||||||
|
|
||||||
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
|
|
||||||
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4">
|
|
||||||
<![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]>
|
|
||||||
</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" {{if gt (.License | len) 0}} Value="LicenseAgreementDlg_HK" {{else}} Value="InstallDirDlg" {{end}}>NOT Installed</Publish>
|
|
||||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="LicenseAgreementDlg_HK" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
|
|
||||||
<Publish Dialog="LicenseAgreementDlg_HK" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg_HK">1</Publish>
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3">
|
|
||||||
<![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]>
|
|
||||||
</Publish>
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
|
|
||||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
|
|
||||||
|
|
||||||
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
|
|
||||||
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
|
|
||||||
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
|
|
||||||
</UI>
|
|
||||||
|
|
||||||
<UIRef Id="WixUI_Common" />
|
|
||||||
</Fragment>
|
|
||||||
</Wix>
|
|
115
wix/product.wxs
115
wix/product.wxs
|
@ -1,115 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<?if $(sys.BUILDARCH)="x86" ?>
|
|
||||||
<?define Program_Files="ProgramFilesFolder" ?>
|
|
||||||
<?elseif $(sys.BUILDARCH)="x64" ?>
|
|
||||||
<?define Program_Files="ProgramFiles64Folder" ?>
|
|
||||||
<?else ?>
|
|
||||||
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH) ?>
|
|
||||||
<?endif ?>
|
|
||||||
|
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
||||||
|
|
||||||
<Product Id="*" UpgradeCode="{{.UpgradeCode}}" Name="{{.Product}}" Version="{{.VersionOk}}" Manufacturer="{{.Company}}" Language="1033">
|
|
||||||
|
|
||||||
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package" InstallScope="perMachine" />
|
|
||||||
|
|
||||||
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
|
|
||||||
|
|
||||||
<Upgrade Id="{{.UpgradeCode}}">
|
|
||||||
<UpgradeVersion Minimum="{{.VersionOk}}" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />
|
|
||||||
<UpgradeVersion Minimum="0.0.0" Maximum="{{.VersionOk}}" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" />
|
|
||||||
</Upgrade>
|
|
||||||
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>
|
|
||||||
|
|
||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
||||||
|
|
||||||
<Directory Id="$(var.Program_Files)">
|
|
||||||
<Directory Id="INSTALLDIR" Name="{{.Product}}">
|
|
||||||
{{if gt (.Files.Items | len) 0}}
|
|
||||||
<Component Id="ApplicationFiles" Guid="{{.Files.GUID}}">
|
|
||||||
{{range $i, $e := .Files.Items}}
|
|
||||||
<File Id="ApplicationFile{{$i}}" Source="{{$e}}" />
|
|
||||||
{{end}}
|
|
||||||
</Component>
|
|
||||||
{{end}}
|
|
||||||
{{if gt (.Directories | len) 0}}
|
|
||||||
{{range $i, $e := .Directories}}
|
|
||||||
<Directory Id="APPDIR{{$i}}" Name="{{$e}}" />
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</Directory>
|
|
||||||
</Directory>
|
|
||||||
{{if gt (.Env.Vars | len) 0}}
|
|
||||||
<Component Id="ENVS" Guid="{{.Env.GUID}}">
|
|
||||||
{{range $i, $e := .Env.Vars}}
|
|
||||||
<Environment Id="ENV{{$i}}" Name="{{$e.Name}}" Value="{{$e.Value}}" Permanent="{{$e.Permanent}}" Part="{{$e.Part}}" Action="{{$e.Action}}" System="{{$e.System}}" />
|
|
||||||
{{end}}
|
|
||||||
</Component>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if gt (.Shortcuts.Items | len) 0}}
|
|
||||||
<Directory Id="ProgramMenuFolder">
|
|
||||||
<Directory Id="ProgramMenuSubfolder" Name="{{.Product}}">
|
|
||||||
<Component Id="ApplicationShortcuts" Guid="{{.Shortcuts.GUID}}">
|
|
||||||
{{range $i, $e := .Shortcuts.Items}}
|
|
||||||
<Shortcut Id="ApplicationShortcut{{$i}}" Name="{{$e.Name}}" Description="{{$e.Description}}" Target="{{$e.Target}}" WorkingDirectory="{{$e.WDir}}" {{if gt ($e.Arguments | len) 0}} Arguments="{{$e.Arguments}}" {{end}}>
|
|
||||||
{{if gt ($e.Icon | len) 0}}
|
|
||||||
<Icon Id="Icon{{$i}}" SourceFile="{{$e.Icon}}" />
|
|
||||||
{{end}}
|
|
||||||
</Shortcut>
|
|
||||||
<RegistryValue Root="HKCU" Key="Software\{{$.Company}}\{{$.Product}}" Name="installed{{$i}}" Type="integer" Value="1" KeyPath="yes" />
|
|
||||||
{{end}}
|
|
||||||
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall" />
|
|
||||||
</Component>
|
|
||||||
</Directory>
|
|
||||||
</Directory>
|
|
||||||
{{end}}
|
|
||||||
</Directory>
|
|
||||||
{{range $i, $e := .InstallHooks}}
|
|
||||||
<SetProperty Id="CustomInstallExec{{$i}}" Value="{{$e.CookedCommand}}" Before="CustomInstallExec{{$i}}" Sequence="execute" />
|
|
||||||
<CustomAction Id="CustomInstallExec{{$i}}" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
|
|
||||||
{{end}}
|
|
||||||
{{range $i, $e := .UninstallHooks}}
|
|
||||||
<SetProperty Id="CustomUninstallExec{{$i}}" Value="{{$e.CookedCommand}}" Before="CustomUninstallExec{{$i}}" Sequence="execute" />
|
|
||||||
<CustomAction Id="CustomUninstallExec{{$i}}" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
|
|
||||||
{{end}}
|
|
||||||
<InstallExecuteSequence>
|
|
||||||
<RemoveExistingProducts After="InstallValidate" />
|
|
||||||
{{range $i, $e := .InstallHooks}}
|
|
||||||
<Custom Action="CustomInstallExec{{$i}}" After="{{if eq $i 0}}InstallFiles{{else}}CustomInstallExec{{dec $i}}{{end}}">NOT Installed AND NOT REMOVE</Custom>
|
|
||||||
{{end}}
|
|
||||||
{{range $i, $e := .UninstallHooks}}
|
|
||||||
<Custom Action="CustomUninstallExec{{$i}}" After="{{if eq $i 0}}InstallInitialize{{else}}CustomUninstallExec{{dec $i}}{{end}}">REMOVE ~= "ALL"</Custom>
|
|
||||||
{{end}}
|
|
||||||
</InstallExecuteSequence>
|
|
||||||
|
|
||||||
<Feature Id="DefaultFeature" Level="1">
|
|
||||||
{{if gt (.Env.Vars | len) 0}}
|
|
||||||
<ComponentRef Id="ENVS" />
|
|
||||||
{{end}}
|
|
||||||
{{if gt (.Files.Items | len) 0}}
|
|
||||||
<ComponentRef Id="ApplicationFiles" />
|
|
||||||
{{end}}
|
|
||||||
{{if gt (.Shortcuts.Items | len) 0}}
|
|
||||||
<ComponentRef Id="ApplicationShortcuts" />
|
|
||||||
{{end}}
|
|
||||||
{{range $i, $e := .Directories}}
|
|
||||||
<ComponentGroupRef Id="AppFiles{{$i}}" />
|
|
||||||
{{end}}
|
|
||||||
</Feature>
|
|
||||||
|
|
||||||
<UI>
|
|
||||||
<!-- Define the installer UI -->
|
|
||||||
<UIRef Id="WixUI_HK" />
|
|
||||||
</UI>
|
|
||||||
|
|
||||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
|
||||||
|
|
||||||
<!-- this should help to propagate env var changes -->
|
|
||||||
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
|
|
||||||
|
|
||||||
</Product>
|
|
||||||
|
|
||||||
</Wix>
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue