Compare commits
9
Commits
423a89557c
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a131c6bb92 | ||
|
|
a91f279598 | ||
|
|
b351677040 | ||
|
|
2b3cf890d2 | ||
|
|
992547719c | ||
|
|
4e3c756b34 | ||
|
|
5dd09f9fd9 | ||
|
|
ebefc359d5 | ||
|
|
4cb3c865a5 |
@@ -0,0 +1,339 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service 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 make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. 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.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
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
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the 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 a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE 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.
|
||||||
|
|
||||||
|
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
|
||||||
|
convey 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 2 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, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision 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, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This 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.
|
||||||
+254
-235
@@ -1,225 +1,243 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>SysCmd — Command Reference</title>
|
<title>SysCmd</title>
|
||||||
<style>
|
<style>
|
||||||
|
:root{--bg:#f8fafc;--fg:#0f172a;--sidebar:#fff;--brd:#e2e8f0;--brd2:#f1f5f9;--muted:#94a3b8;--txt:#475569;--title:#0f172a;--hover:#f1f5f9;--alt:#fafbfc;--actbg:#0f172a;--actfg:#fff;--boxbg:#fff}
|
||||||
|
.dark{--bg:#0b1120;--fg:#e2e8f0;--sidebar:#0f172a;--brd:#1e293b;--brd2:#1e293b;--muted:#64748b;--txt:#94a3b8;--title:#f1f5f9;--hover:#1e293b;--alt:#151e30;--actbg:#3b82f6;--actfg:#fff;--boxbg:#1e293b}
|
||||||
*{box-sizing:border-box;margin:0;padding:0}
|
*{box-sizing:border-box;margin:0;padding:0}
|
||||||
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:#f8fafc;color:#0f172a;line-height:1.5}
|
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--fg);line-height:1.5;transition:background .2s,color .2s}
|
||||||
.sbar{width:14rem;border-right:1px solid #e2e8f0;background:#fff;display:flex;flex-direction:column;min-height:100vh;padding:12px 0;overflow-y:auto;flex-shrink:0}
|
.sbar{width:12rem;border-right:1px solid var(--brd);background:var(--sidebar);display:flex;flex-direction:column;min-height:100vh;padding:10px 0;overflow-y:auto;flex-shrink:0}
|
||||||
.main{flex:1;padding:24px;max-width:960px}
|
.main{flex:1;padding:24px 32px;max-width:100%}
|
||||||
.tree{flex:1;overflow-y:auto}
|
.tree{flex:1;overflow-y:auto}
|
||||||
.grp{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;padding:8px 12px 4px}
|
.grp{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:8px 12px 4px}
|
||||||
.slk{display:flex;align-items:center;gap:6px;padding:4px 10px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;color:#475569;transition:all .12s;user-select:none}
|
.slk{display:flex;align-items:center;gap:6px;padding:4px 10px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;color:var(--txt);transition:all .12s;user-select:none}
|
||||||
.slk:hover{background:#f1f5f9;color:#0f172a}
|
.slk:hover{background:var(--hover);color:var(--title)}
|
||||||
.slk.act{background:#0f172a;color:#fff}
|
.slk.act{background:var(--actbg);color:var(--actfg)}
|
||||||
.slk3{padding-left:48px;font-size:12px}
|
.slk3{padding-left:48px;font-size:12px}
|
||||||
.slk4{padding-left:64px;font-size:11px;font-weight:400}
|
.slk4{padding-left:64px;font-size:11px;font-weight:400}
|
||||||
.tgl{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;transition:transform .15s;color:#94a3b8}
|
.tgl{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;transition:transform .15s;color:var(--muted)}
|
||||||
.tgl.o{transform:rotate(90deg)}
|
.tgl.o{transform:rotate(90deg)}
|
||||||
.chd{display:none}
|
.chd{display:none}.chd.o{display:block}
|
||||||
.chd.o{display:block}
|
|
||||||
.dg{width:6px;height:6px;border-radius:50%;background:#22c55e;flex-shrink:0}
|
.dg{width:6px;height:6px;border-radius:50%;background:#22c55e;flex-shrink:0}
|
||||||
.dgr{width:6px;height:6px;border-radius:50%;background:#cbd5e1;flex-shrink:0}
|
.dgr{width:6px;height:6px;border-radius:50%;background:var(--muted);flex-shrink:0}
|
||||||
.do{width:6px;height:6px;border-radius:50%;background:#f59e0b;flex-shrink:0}
|
.do{width:6px;height:6px;border-radius:50%;background:#f59e0b;flex-shrink:0}
|
||||||
.bd{font-size:11px;color:#94a3b8;display:flex;gap:6px;align-items:center;margin-bottom:2px}
|
.bd{font-size:11px;color:var(--muted);display:flex;gap:6px;align-items:center;margin-bottom:2px}
|
||||||
.bd .c{color:#0f172a;font-weight:500}
|
.bd .c{color:var(--title);font-weight:500}
|
||||||
.scmd{display:grid;grid-template-columns:190px 1fr;align-items:start;padding:4px 12px;border-radius:5px;font-size:13px;gap:8px;transition:background .1s}
|
.scmd{display:grid;grid-template-columns:190px 1fr;align-items:start;padding:4px 12px;border-radius:5px;font-size:13px;gap:8px;transition:background .1s}
|
||||||
.scmd:hover{background:#f1f5f9}
|
.scmd:hover{background:var(--hover)}
|
||||||
.scmd .d{color:#475569;font-weight:500;line-height:1.4}
|
.scmd .d{color:var(--txt);font-weight:500;line-height:1.4}
|
||||||
.scmd .t{font-family:Consolas,'Courier New',monospace;font-size:12px;color:#0f172a;cursor:pointer;display:inline-flex;align-items:center;gap:6px;line-height:1.4;word-break:break-all}
|
.scmd .t{font-family:Consolas,'Courier New',monospace;font-size:12px;color:var(--title);cursor:pointer;display:inline-flex;align-items:center;gap:6px;line-height:1.4;word-break:break-all}
|
||||||
.scmd .t:hover .cp{opacity:1}
|
.scmd .t:hover .cp{opacity:1}
|
||||||
.cp{opacity:0;width:14px;height:14px;flex-shrink:0;color:#94a3b8;transition:opacity .12s}
|
.cp{opacity:0;width:14px;height:14px;flex-shrink:0;color:var(--muted);transition:opacity .12s}
|
||||||
.alt{background:#fafbfc}
|
.alt{background:var(--alt)}
|
||||||
.stab{padding:4px 10px;border-radius:5px;font-size:11px;font-weight:500;cursor:pointer;border:1px solid #e2e8f0;color:#64748b;white-space:nowrap;transition:all .12s}
|
.stab{padding:4px 10px;border-radius:5px;font-size:11px;font-weight:500;cursor:pointer;border:1px solid var(--brd);color:var(--txt);white-space:nowrap;transition:all .12s}
|
||||||
.stab.a{background:#0f172a;color:#fff;border-color:#0f172a}
|
.stab.a{background:var(--actbg);color:var(--actfg);border-color:var(--actbg)}
|
||||||
.stab:hover:not(.a){background:#f1f5f9}
|
.stab:hover:not(.a){background:var(--hover)}
|
||||||
.si{width:100%;padding:7px 12px 7px 34px;border-radius:8px;font-size:13px;outline:none;border:1.5px solid #e2e8f0;background:#fff;transition:border-color .12s}
|
.si{width:100%;padding:7px 12px 7px 34px;border-radius:8px;font-size:13px;outline:none;border:1.5px solid var(--brd);background:var(--boxbg);color:var(--fg);transition:border-color .12s,.2s}
|
||||||
.si:focus{border-color:#0f172a}
|
.si:focus{border-color:var(--actbg)}
|
||||||
.oc{border-radius:10px;border:1px solid #e2e8f0;background:#fff;cursor:pointer;transition:all .15s;padding:16px}
|
.si::placeholder{color:var(--muted)}
|
||||||
.oc:hover{border-color:#0f172a;box-shadow:0 2px 12px rgba(0,0,0,.08)}
|
.oc{border-radius:10px;border:1px solid var(--brd);background:var(--boxbg);cursor:pointer;transition:all .15s;padding:12px}
|
||||||
.oc .ic{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
|
.oc:hover{border-color:var(--actbg);box-shadow:0 2px 8px rgba(0,0,0,.1)}
|
||||||
.oc .sl{font-size:11px;color:#94a3b8}
|
.oc .ic{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
|
||||||
.oc.ph{opacity:.6}
|
.oc .sl{font-size:11px;color:var(--muted)}
|
||||||
.oc.ph:hover{opacity:.8}
|
.oc.ph{opacity:.6}.oc.ph:hover{opacity:.8}
|
||||||
.emp{padding:40px 16px;max-width:360px;margin:0 auto;text-align:center}
|
.emp{padding:40px 16px;max-width:360px;margin:0 auto;text-align:center}
|
||||||
.emp h3{font-weight:600;font-size:15px;margin-bottom:4px;color:#0f172a}
|
.emp h3{font-weight:600;font-size:15px;margin-bottom:4px;color:var(--title)}
|
||||||
.emp p{font-size:13px;color:#94a3b8;line-height:1.5}
|
.emp p{font-size:13px;color:var(--muted)}
|
||||||
.sb{border:1px solid #e2e8f0;border-radius:10px;background:#fff;text-align:center;padding:12px}
|
.sb{border:1px solid var(--brd);border-radius:10px;background:var(--boxbg);text-align:center;padding:12px}
|
||||||
.sb .n{font-size:20px;font-weight:700;color:#0f172a}
|
.sb .n{font-size:20px;font-weight:700;color:var(--title)}
|
||||||
.sb .l{font-size:11px;color:#94a3b8}
|
.sb .l{font-size:11px;color:var(--muted)}
|
||||||
.cl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;margin-top:8px;margin-bottom:4px}
|
.cl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-top:8px;margin-bottom:4px;grid-column:1/-1}
|
||||||
.gp{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:12px}
|
.gp{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:12px}
|
||||||
.lr{display:flex;gap:12px;align-items:center;margin-bottom:12px;font-size:11px;color:#64748b}
|
.lr{display:flex;gap:12px;align-items:center;margin-bottom:12px;font-size:11px;color:var(--txt)}
|
||||||
.p8{padding:24px;font-size:13px;color:#94a3b8}
|
.p8{padding:24px;font-size:13px;color:var(--muted)}
|
||||||
.cmdbox{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}
|
.cmdbox{background:var(--boxbg);border:1px solid var(--brd);border-radius:12px;overflow:hidden}
|
||||||
.cmdbox .s{font-size:11px;color:#94a3b8;padding:8px 12px;border-bottom:1px solid #f1f5f9}
|
.cmdbox .s{font-size:11px;color:var(--muted);padding:8px 12px;border-bottom:1px solid var(--brd2)}
|
||||||
|
.dbtn{padding:3px;border-radius:5px;cursor:pointer;border:none;background:transparent;color:var(--muted);font-size:14px;line-height:1;transition:all .12s;display:flex;align-items:center;justify-content:center;width:28px;height:28px}
|
||||||
|
.dbtn:hover{background:var(--hover);color:var(--title)}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="display:flex;min-height:100vh">
|
<body style="display:flex;min-height:100vh">
|
||||||
|
|
||||||
<!-- SIDEBAR -->
|
|
||||||
<div class="sbar">
|
<div class="sbar">
|
||||||
<div style="display:flex;align-items:center;gap:10px;padding:8px 12px 16px;border-bottom:1px solid #f1f5f9;flex-shrink:0;cursor:pointer" onclick="SH()">
|
<div style="display:flex;align-items:center;gap:10px;padding:8px 12px 12px;border-bottom:1px solid var(--brd2);flex-shrink:0">
|
||||||
<div style="width:28px;height:28px;background:#0f172a;border-radius:8px;display:flex;align-items:center;justify-content:center">
|
<div style="width:28px;height:28px;background:var(--actbg);border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0" onclick="SH()">
|
||||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5"><path d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"/></svg>
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5"><path d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"/></svg>
|
||||||
</div>
|
</div>
|
||||||
<span style="font-weight:700;font-size:14px">SysCmd</span>
|
<span style="font-weight:700;font-size:14px;flex:1;cursor:pointer" onclick="SH()">SysCmd</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tree" id="tree"></div>
|
<div class="tree" id="tree"></div>
|
||||||
<div style="padding-top:12px;border-top:1px solid #f1f5f9;flex-shrink:0">
|
<div style="padding-top:8px;border-top:1px solid var(--brd2);flex-shrink:0">
|
||||||
<div style="display:flex;align-items:center;gap:8px;padding:8px 12px">
|
<div style="display:flex;align-items:center;gap:8px;padding:6px 12px">
|
||||||
<div style="width:28px;height:28px;background:#e2e8f0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:#64748b">LK</div>
|
<div style="width:28px;height:28px;background:var(--brd2);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--muted)">LK</div>
|
||||||
<div style="font-size:12px"><div style="font-weight:500;color:#0f172a">Laurent</div><div style="color:#94a3b8">sysadmin</div></div>
|
<div style="font-size:12px;flex:1"><div style="font-weight:500;color:var(--title)">Laurent</div><div style="color:var(--muted)">sysadmin</div></div>
|
||||||
|
<div class="dbtn" onclick="TD()" id="dm-btn" title="Dark mode">☾</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- MAIN -->
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
|
||||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px">
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px">
|
||||||
<div>
|
<div>
|
||||||
<div class="bd" id="bd"></div>
|
<div class="bd" id="bd"></div>
|
||||||
<h1 style="font-size:18px;font-weight:700" id="os-title">SysCmd</h1>
|
<h1 style="font-size:18px;font-weight:700" id="os-title">SysCmd</h1>
|
||||||
<p style="font-size:11px;color:#64748b;margin-top:2px" id="os-sub"></p>
|
<p style="font-size:11px;color:var(--txt);margin-top:2px" id="os-sub"></p>
|
||||||
</div>
|
</div>
|
||||||
<div style="position:relative">
|
<div style="position:relative">
|
||||||
<svg style="position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:#94a3b8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
|
<svg style="position:absolute;left:10px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--muted)" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
|
||||||
<input class="si" id="search" placeholder="Chercher une commande..." oninput="onSearch(this.value)">
|
<input class="si" id="search" placeholder="Search a command..." oninput="onSearch(this.value)">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gp" id="tabs"></div>
|
<div class="gp" id="tabs"></div>
|
||||||
|
|
||||||
<div class="lr" id="stats-bar">
|
<div class="lr" id="stats-bar">
|
||||||
<span id="shown">0</span> <span>commandes</span>
|
<span id="shown">0</span> <span>commands</span>
|
||||||
<span>·</span>
|
<span class="sep">·</span>
|
||||||
<span id="fi">Aucun filtre</span>
|
<span id="fi">No filter</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cmdbox" id="cmd-box">
|
<div class="cmdbox" id="cmd-box">
|
||||||
<div id="cmds"></div>
|
<div id="cmds"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- HOME -->
|
|
||||||
<div id="home">
|
<div id="home">
|
||||||
<div style="text-align:center;margin:32px 0 24px">
|
<div style="display:grid;grid-template-columns:repeat(5,1fr);gap:6px" id="grid"></div>
|
||||||
<h2 style="font-size:24px;font-weight:700;margin-bottom:8px">SysCmd</h2>
|
|
||||||
<p style="font-size:13px;color:#64748b;max-width:480px;margin:0 auto">Référence de commandes multi-plateforme. Cliquez sur un OS pour voir ses commandes.</p>
|
|
||||||
<div style="margin-top:12px;display:flex;justify-content:center;gap:12px;font-size:11px;color:#94a3b8">
|
|
||||||
<span style="display:flex;align-items:center;gap:4px"><span class="dg" style="display:inline-block;vertical-align:middle"></span> Données disponibles</span>
|
|
||||||
<span style="display:flex;align-items:center;gap:4px"><span class="do" style="display:inline-block;vertical-align:middle"></span> Catégorie</span>
|
|
||||||
<span style="display:flex;align-items:center;gap:4px"><span class="dgr" style="display:inline-block;vertical-align:middle"></span> À venir</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="gs" style="display:none;margin-bottom:24px"></div>
|
<div id="gs" style="display:none;margin-bottom:24px"></div>
|
||||||
|
|
||||||
<div id="stats-row" style="display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px"></div>
|
|
||||||
|
|
||||||
<div id="grid" style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-top:16px;text-align:center;font-size:11px;color:#94a3b8" id="fh">Cliquez sur un OS pour explorer ses commandes</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
"use strict";
|
"use strict";
|
||||||
function t(f,e){return{fr:f,en:e}}
|
var DM=localStorage.getItem('dm')==='1',N=null,MS=null;
|
||||||
var N=null,CS=null;
|
if(DM)document.documentElement.classList.add('dark');
|
||||||
|
|
||||||
|
function $(i){return document.getElementById(i)}
|
||||||
|
function FN(t,i){if(t.id===i)return t;for(var j=0;j<(t.children||[]).length;j++){var r=FN(t.children[j],i);if(r)return r}return null}
|
||||||
|
function CL(n,o){if(n.children){for(var i=0;i<n.children.length;i++)CL(n.children[i],o)}else o.push(n);return o}
|
||||||
|
function CC(n){
|
||||||
|
if(n.secs){var t=0;for(var i=0;i<n.secs.length;i++)if(SEC[n.secs[i]])t+=SEC[n.secs[i]].cmds.length;return t}
|
||||||
|
if(n.children){var t=0;for(var i=0;i<n.children.length;i++)t+=CC(n.children[i]);return t}
|
||||||
|
return 0}
|
||||||
|
function TD(){DM=!DM;document.documentElement.classList.toggle('dark',DM);localStorage.setItem('dm',DM?'1':'0')}
|
||||||
|
|
||||||
var TREE={id:'r',children:[
|
var TREE={id:'r',children:[
|
||||||
{id:'os',label:t('OS','OS'),children:[
|
{id:'os',label:'OS',children:[
|
||||||
{id:'lnx',label:t('Linux','Linux'),children:[
|
{id:'lnx',label:'Linux',children:[
|
||||||
{id:'ubu',label:t('Ubuntu','Ubuntu'),children:[
|
{id:'ubu',label:'Ubuntu',children:[
|
||||||
{id:'u20',label:t('20.04','20.04'),osKey:'u',secs:['sys','apt','users']},
|
{id:'u20',label:'20.04',secs:['sys','apt','users']},
|
||||||
{id:'u22',label:t('22.04','22.04'),osKey:'u',secs:['sys','apt','users']},
|
{id:'u22',label:'22.04',secs:['sys','apt','users']},
|
||||||
{id:'u24',label:t('24.04','24.04'),osKey:'u',secs:['sys','apt','users','systemd']}]},
|
{id:'u24',label:'24.04',secs:['sys','apt','users','systemd']}]},
|
||||||
{id:'deb',label:t('Debian','Debian'),osKey:'d',secs:['sys','apt','users','systemd']},
|
{id:'deb',label:'Debian',secs:['sys','apt','users','systemd']},
|
||||||
{id:'ora',label:t('Oracle Linux','Oracle Linux'),osKey:'o',secs:['odnf','ospec','osel','ofw','systemd']},
|
{id:'ora',label:'Oracle Linux',secs:['odnf','ospec','osel','ofw','systemd']},
|
||||||
{id:'rhel',label:t('RHEL/CentOS','RHEL/CentOS')},{id:'fed',label:t('Fedora','Fedora')}]},
|
{id:'rhel',label:'RHEL/CentOS',secs:['r_dnf','r_fw','r_selinux','r_epel','systemd']},{id:'fed',label:'Fedora'}]},
|
||||||
{id:'win',label:t('Windows','Windows'),children:[
|
{id:'win',label:'Windows',children:[
|
||||||
{id:'wcl',label:t('Client','Client'),children:[
|
{id:'wcl',label:'Client',children:[
|
||||||
{id:'wxp',label:t('XP','XP')},{id:'w10',label:t('10','10'),osKey:'w',secs:['wsys','wfiles','wproc','wnet']},
|
{id:'wxp',label:'XP'},{id:'w10',label:'10',secs:['wsys','wfiles','wproc','wnet']},
|
||||||
{id:'w11',label:t('11','11'),osKey:'w',secs:['wsys','wfiles','wproc','wnet']}]},
|
{id:'w11',label:'11',secs:['wsys','wfiles','wproc','wnet']}]},
|
||||||
{id:'wsrv',label:t('Server','Server'),children:[
|
{id:'wsrv',label:'Server',children:[
|
||||||
{id:'w16',label:t('2016','2016'),osKey:'ws',secs:['wsys','wfiles','wproc','wnet']},
|
{id:'w16',label:'2016',secs:['wsys','wfiles','wproc','wnet']},
|
||||||
{id:'w19',label:t('2019','2019'),osKey:'ws',secs:['wsys','wfiles','wproc','wnet']}]}]},
|
{id:'w19',label:'2019',secs:['wsys','wfiles','wproc','wnet']}]}]},
|
||||||
{id:'sol',label:t('Solaris/illumos','Solaris/illumos'),osKey:'s',secs:['sips','ssmf','szfs','szones']},
|
{id:'sol',label:'Solaris/illumos',secs:['sips','ssmf','szfs','szones']},
|
||||||
{id:'mac',label:t('macOS','macOS')}]},
|
{id:'mac',label:'macOS',secs:['mac_brew','mac_defaults','mac_disk','mac_sys']},{id:'bsd',label:'BSD',children:[
|
||||||
{id:'dck',label:t('Docker','Docker'),children:[
|
{id:'freebsd',label:'FreeBSD',secs:['fbsd_sys','fbsd_pkg','fbsd_zfs','fbsd_jail','fbsd_net']},
|
||||||
{id:'dcc',label:t('Compose','Compose')},{id:'dcs',label:t('Swarm','Swarm')},{id:'dcf',label:t('Dockerfile','Dockerfile')}]},
|
{id:'openbsd',label:'OpenBSD'},{id:'netbsd',label:'NetBSD'}]}]},
|
||||||
{id:'oth',label:t('Other','Other'),children:[
|
{id:'dck',label:'Docker',children:[
|
||||||
{id:'net',label:t('Reseau','Network'),children:[{id:'cis',label:t('Cisco','Cisco')},{id:'tpl',label:t('TP-Link','TP-Link')}]},
|
{id:'dck-up',label:'Compose up/down',secs:['dc_up']},
|
||||||
{id:'sql',label:t('SQL','SQL'),children:[{id:'my',label:t('MySQL/MariaDB','MySQL/MariaDB')},{id:'pg',label:t('PostgreSQL','PostgreSQL')}]},
|
{id:'dck-logs',label:'Compose logs',secs:['dc_logs']},
|
||||||
{id:'dev',label:t('DevOps','DevOps'),children:[{id:'ans',label:t('Ansible','Ansible')},{id:'tf',label:t('Terraform','Terraform')},{id:'k8',label:t('Kubernetes','Kubernetes')}]}]}]};
|
{id:'dck-exec',label:'Compose exec',secs:['dc_exec']},
|
||||||
|
{id:'dck-ps',label:'Compose ps',secs:['dc_ps']},
|
||||||
|
{id:'dck-build',label:'Compose build',secs:['dc_build']},
|
||||||
|
{id:'dck-df',label:'Dockerfile build',secs:['dck_build']},
|
||||||
|
{id:'dck-instr',label:'Dockerfile instr.',secs:['dck_directives']}]},
|
||||||
|
{id:'oth',label:'Other',children:[
|
||||||
|
{id:'net',label:'Network',children:[{id:'cis',label:'Cisco'},{id:'tpl',label:'TP-Link'}]},
|
||||||
|
{id:'sql',label:'SQL',children:[{id:'my',label:'MySQL/MariaDB',secs:['mysql']},{id:'pg',label:'PostgreSQL',secs:['pg']}]},
|
||||||
|
{id:'dev',label:'DevOps',children:[{id:'ans',label:'Ansible'},{id:'tf',label:'Terraform'},{id:'k8',label:'Kubernetes'}]}]}]};
|
||||||
|
|
||||||
var SEC={};
|
var SEC={};
|
||||||
SEC.sys={label:t('systeme','system'),cmds:[
|
SEC.sys={label:'System',cmds:[
|
||||||
{d:t('Version noyau','Kernel'),c:'uname -r'},{d:t('Version OS','OS version'),c:'lsb_release -a'},
|
{d:'Kernel version',c:'uname -r'},{d:'OS version',c:'lsb_release -a'},{d:'Memory',c:'free -h'},
|
||||||
{d:t('Memoire','Memory'),c:'free -h'},{d:t('Hostname','Hostname'),c:'hostnamectl'},
|
{d:'Hostname',c:'hostnamectl'},{d:'Uptime',c:'uptime'},{d:'CPU',c:'lscpu'},{d:'Date',c:'timedatectl'}]};
|
||||||
{d:t('Uptime','Uptime'),c:'uptime'},{d:t('CPU','CPU'),c:'lscpu'},{d:t('Date','Date'),c:'timedatectl'}]};
|
SEC.apt={label:'APT',cmds:[
|
||||||
SEC.apt={label:t('APT','APT'),cmds:[
|
{d:'Sync repos',c:'sudo apt update'},{d:'Upgrade',c:'sudo apt full-upgrade -y'},{d:'Install',c:'sudo apt install [pkg]'},
|
||||||
{d:t('Sync repos','Sync repos'),c:'sudo apt update'},{d:t('Mise a jour','Upgrade'),c:'sudo apt full-upgrade -y'},
|
{d:'Purge',c:'sudo apt purge [pkg]'},{d:'Search',c:'apt search [kw]'},{d:'Installed',c:'apt list --installed'},
|
||||||
{d:t('Installer','Install'),c:'sudo apt install [pkg]'},{d:t('Purge','Purge'),c:'sudo apt purge [pkg]'},
|
{d:'Package files',c:'dpkg -L [pkg]'}]};
|
||||||
{d:t('Search','Search'),c:'apt search [kw]'},{d:t('Installed','Installed'),c:'apt list --installed'},
|
SEC.users={label:'Users',cmds:[
|
||||||
{d:t('Fichiers','Package files'),c:'dpkg -L [pkg]'}]};
|
{d:'Add user',c:'sudo adduser [n]'},{d:'Delete user',c:'sudo deluser --remove-home [n]'},
|
||||||
SEC.users={label:t('utilisateurs','users'),cmds:[
|
{d:'Sudo group',c:'sudo usermod -aG sudo [n]'},{d:'Permissions',c:'chmod 755 [f]'},{d:'Root shell',c:'sudo -i'}]};
|
||||||
{d:t('Ajouter','Add'),c:'sudo adduser [n]'},{d:t('Supprimer','Delete'),c:'sudo deluser --remove-home [n]'},
|
SEC.systemd={label:'Systemd',cmds:[
|
||||||
{d:t('Groupe sudo','Sudo group'),c:'sudo usermod -aG sudo [n]'},{d:t('Permissions','Perms'),c:'chmod 755 [f]'},
|
{d:'Start/Stop',c:'sudo systemctl start|stop [s]'},{d:'Restart',c:'sudo systemctl restart [s]'},
|
||||||
{d:t('Root','Root'),c:'sudo -i'}]};
|
{d:'Enable',c:'sudo systemctl enable [s]'},{d:'Status',c:'systemctl status [s]'},
|
||||||
SEC.systemd={label:t('systemd','systemd'),cmds:[
|
{d:'Logs',c:'journalctl -u [s] -n 50'},{d:'Purge logs',c:'sudo journalctl --vacuum-time=7d'}]};
|
||||||
{d:t('Start/Stop','Start/Stop'),c:'sudo systemctl start|stop [s]'},{d:t('Restart','Restart'),c:'sudo systemctl restart [s]'},
|
SEC.wsys={label:'System',cmds:[
|
||||||
{d:t('Enable','Enable'),c:'sudo systemctl enable [s]'},{d:t('Status','Status'),c:'systemctl status [s]'},
|
{d:'(CMD) Version',c:'ver'},{d:'(CMD) systeminfo',c:'systeminfo'},{d:'(PS) Get-ComputerInfo',c:'Get-ComputerInfo'}]};
|
||||||
{d:t('Logs','Logs'),c:'journalctl -u [s] -n 50'},{d:t('Purge logs','Purge logs'),c:'sudo journalctl --vacuum-time=7d'}]};
|
SEC.wfiles={label:'Files',cmds:[
|
||||||
SEC.wsys={label:t('systeme','system'),cmds:[
|
{d:'(CMD) dir',c:'dir /s'},{d:'(CMD) rmdir',c:'rmdir /s [f]'},{d:'(PS) Get-ChildItem',c:'Get-ChildItem -Recurse -Filter *.txt'}]};
|
||||||
{d:t('(CMD) Version','(CMD) Version'),c:'ver'},{d:t('(CMD) systeminfo','(CMD) systeminfo'),c:'systeminfo'},
|
SEC.wproc={label:'Processes',cmds:[
|
||||||
{d:t('(PS) Get-ComputerInfo','(PS) Get-ComputerInfo'),c:'Get-ComputerInfo'}]};
|
{d:'(CMD) tasklist',c:'tasklist'},{d:'(CMD) taskkill',c:'taskkill /IM notepad.exe /F'},{d:'(PS) Get-Process',c:'Get-Process'}]};
|
||||||
SEC.wfiles={label:t('fichiers','files'),cmds:[
|
SEC.wnet={label:'Network',cmds:[
|
||||||
{d:t('(CMD) dir','(CMD) dir'),c:'dir /s'},{d:t('(CMD) rmdir','(CMD) rmdir'),c:'rmdir /s [f]'},
|
{d:'(CMD) ipconfig',c:'ipconfig /all'},{d:'(CMD) netstat',c:'netstat -an | findstr LISTEN'},
|
||||||
{d:t('(PS) Get-ChildItem','(PS) Get-ChildItem'),c:'Get-ChildItem -Recurse -Filter *.txt'}]};
|
{d:'(PS) Test-NetConn',c:'Test-NetConnection [ip] -Port [port]'}]};
|
||||||
SEC.wproc={label:t('processus','processes'),cmds:[
|
SEC.odnf={label:'DNF',cmds:[
|
||||||
{d:t('(CMD) tasklist','(CMD) tasklist'),c:'tasklist'},{d:t('(CMD) taskkill','(CMD) taskkill'),c:'taskkill /IM notepad.exe /F'},
|
{d:'Sync',c:'sudo dnf check-update'},{d:'Upgrade',c:'sudo dnf upgrade -y'},{d:'Install',c:'sudo dnf install [p]'},{d:'Remove',c:'sudo dnf remove [p]'}]};
|
||||||
{d:t('(PS) Get-Process','(PS) Get-Process'),c:'Get-Process'}]};
|
SEC.r_dnf={label:'DNF',cmds:[
|
||||||
SEC.wnet={label:t('reseau','network'),cmds:[
|
{d:'Sync repos',c:'sudo dnf check-update'},{d:'Upgrade',c:'sudo dnf upgrade -y'},{d:'Install',c:'sudo dnf install [pkg]'},
|
||||||
{d:t('(CMD) ipconfig','(CMD) ipconfig'),c:'ipconfig /all'},{d:t('(CMD) netstat','(CMD) netstat'),c:'netstat -an | findstr LISTEN'},
|
{d:'Remove',c:'sudo dnf remove [pkg]'},{d:'Search',c:'dnf search [kw]'},{d:'History',c:'dnf history'},
|
||||||
{d:t('(PS) TNM','(PS) TNM'),c:'Test-NetConnection [ip] -Port [port]'}]};
|
{d:'Package info',c:'dnf info [pkg]'},{d:'Package files',c:'rpm -ql [pkg]'}]};
|
||||||
SEC.odnf={label:t('DNF','DNF'),cmds:[
|
SEC.r_fw={label:'firewalld',cmds:[
|
||||||
{d:t('Sync','Sync'),c:'sudo dnf check-update'},{d:t('Upgrade','Upgrade'),c:'sudo dnf upgrade -y'},
|
{d:'Status',c:'sudo firewall-cmd --state'},{d:'Default zone',c:'sudo firewall-cmd --get-default-zone'},
|
||||||
{d:t('Install','Install'),c:'sudo dnf install [p]'},{d:t('Remove','Remove'),c:'sudo dnf remove [p]'}]};
|
{d:'Open port',c:'sudo firewall-cmd --permanent --add-port=22/tcp'},
|
||||||
SEC.ospec={label:t('Oracle spec.','Oracle spec.'),cmds:[
|
{d:'Open service',c:'sudo firewall-cmd --permanent --add-service=http'},
|
||||||
{d:t('Ksplice status','Ksplice status'),c:'sudo uptrack-status'},{d:t('Ksplice upgrade','Ksplice upgrade'),c:'sudo uptrack-upgrade'},
|
{d:'Reload',c:'sudo firewall-cmd --reload'},{d:'List rules',c:'sudo firewall-cmd --list-all'}]};
|
||||||
{d:t('Switch kernel','Switch kernel'),c:'sudo grubby --set-default /boot/vmlinuz-[v]'}]};
|
SEC.r_selinux={label:'SELinux',cmds:[
|
||||||
SEC.osel={label:t('SELinux','SELinux'),cmds:[
|
{d:'Status',c:'getenforce'},{d:'Permissive',c:'sudo setenforce 0'},{d:'Enforcing',c:'sudo setenforce 1'},
|
||||||
{d:t('Status','Status'),c:'getenforce'},{d:t('Permissive','Permissive'),c:'sudo setenforce 0'},
|
{d:'AVC logs',c:'sudo ausearch -m avc -ts recent'},{d:'File contexts',c:'ls -Z [f]'},{d:'restorecon',c:'sudo restorecon -Rv [p]'},
|
||||||
{d:t('AVC logs','AVC logs'),c:'sudo ausearch -m avc -ts recent'}]};
|
{d:'Bool list',c:'getsebool -a'},{d:'Permanent config',c:'cat /etc/selinux/config'}]};
|
||||||
SEC.ofw={label:t('firewalld','firewalld'),cmds:[
|
SEC.r_epel={label:'EPEL',cmds:[{d:'Install EPEL',c:'sudo dnf install epel-release'},{d:'Enable EPEL',c:'sudo dnf config-manager --set-enabled epel'}]};
|
||||||
{d:t('Status','Status'),c:'sudo firewall-cmd --state'},{d:t('Open port','Open port'),c:'sudo firewall-cmd --permanent --add-port=22/tcp'}]};
|
SEC.ospec={label:'Oracle specifics',cmds:[
|
||||||
SEC.sips={label:t('IPS','IPS'),cmds:[
|
{d:'Ksplice status',c:'sudo uptrack-status'},{d:'Ksplice upgrade',c:'sudo uptrack-upgrade'},{d:'Switch kernel',c:'sudo grubby --set-default /boot/vmlinuz-[v]'}]};
|
||||||
{d:t('Refresh','Refresh'),c:'sudo pkg refresh'},{d:t('Update','Update'),c:'sudo pkg update'},
|
SEC.osel={label:'SELinux',cmds:[{d:'Status',c:'getenforce'},{d:'Permissive',c:'sudo setenforce 0'},{d:'AVC logs',c:'sudo ausearch -m avc -ts recent'}]};
|
||||||
{d:t('Install','Install'),c:'sudo pkg install [p]'},{d:t('Remove','Remove'),c:'sudo pkg uninstall [p]'}]};
|
SEC.ofw={label:'firewalld',cmds:[{d:'Status',c:'sudo firewall-cmd --state'},{d:'Open port',c:'sudo firewall-cmd --permanent --add-port=22/tcp'}]};
|
||||||
SEC.ssmf={label:t('SMF','SMF'),cmds:[
|
SEC.sips={label:'IPS',cmds:[
|
||||||
{d:t('List','List'),c:'svcs -a'},{d:t('Enable','Enable'),c:'sudo svcadm enable [s]'},
|
{d:'Refresh',c:'sudo pkg refresh'},{d:'Update',c:'sudo pkg update'},{d:'Install',c:'sudo pkg install [p]'},{d:'Remove',c:'sudo pkg uninstall [p]'}]};
|
||||||
{d:t('Disable','Disable'),c:'sudo svcadm disable [s]'},{d:t('Restart','Restart'),c:'sudo svcadm restart [s]'}]};
|
SEC.ssmf={label:'SMF',cmds:[{d:'List',c:'svcs -a'},{d:'Enable',c:'sudo svcadm enable [s]'},{d:'Disable',c:'sudo svcadm disable [s]'},{d:'Restart',c:'sudo svcadm restart [s]'}]};
|
||||||
SEC.szfs={label:t('ZFS','ZFS'),cmds:[
|
SEC.szfs={label:'ZFS',cmds:[
|
||||||
{d:t('Pool status','Pool status'),c:'zpool status'},{d:t('Scrub','Scrub'),c:'sudo zpool scrub [p]'},
|
{d:'Pool status',c:'zpool status'},{d:'Scrub',c:'sudo zpool scrub [p]'},{d:'Snapshot',c:'sudo zfs snapshot [p]/[ds]@[n]'},{d:'Send/Receive',c:'zfs send [p]/[ds]@snap | zfs receive [d]'}]};
|
||||||
{d:t('Snapshot','Snapshot'),c:'sudo zfs snapshot [p]/[ds]@[n]'},{d:t('Send/Receive','Send/Receive'),c:'zfs send [p]/[ds]@snap | zfs receive [d]'}]};
|
SEC.szones={label:'Zones',cmds:[{d:'List',c:'zoneadm list -cv'},{d:'Boot',c:'sudo zoneadm -z [z] boot'},{d:'Halt',c:'sudo zoneadm -z [z] halt'},{d:'Console',c:'sudo zlogin -C [z]'}]};
|
||||||
SEC.szones={label:t('Zones','Zones'),cmds:[
|
SEC.fbsd_pkg={label:'pkg',cmds:[{d:'Update repos',c:'sudo pkg update'},{d:'Upgrade',c:'sudo pkg upgrade'},{d:'Install',c:'sudo pkg install [pkg]'},
|
||||||
{d:t('List','List'),c:'zoneadm list -cv'},{d:t('Boot','Boot'),c:'sudo zoneadm -z [z] boot'},
|
{d:'Remove',c:'sudo pkg delete [pkg]'},{d:'Search',c:'pkg search [kw]'},{d:'Package info',c:'pkg info [pkg]'},{d:'Installed',c:'pkg info'}]};
|
||||||
{d:t('Halt','Halt'),c:'sudo zoneadm -z [z] halt'},{d:t('Console','Console'),c:'sudo zlogin -C [z]'}]};
|
SEC.fbsd_zfs={label:'ZFS',cmds:[{d:'Pool status',c:'zpool status'},{d:'Pool list',c:'zpool list'},{d:'Scrub',c:'sudo zpool scrub [pool]'},{d:'Datasets',c:'zfs list'},
|
||||||
|
{d:'Snapshot',c:'sudo zfs snapshot [pool]/[ds]@[n]'},{d:'Rollback',c:'sudo zfs rollback [pool]/[ds]@[n]'}]};
|
||||||
|
SEC.fbsd_jail={label:'jail',cmds:[{d:'List jails',c:'jls'},{d:'Console',c:'jexec [id] sh'},{d:'Start jail',c:'sudo service jail start [name]'},{d:'Stop jail',c:'sudo service jail stop [name]'}]};
|
||||||
|
SEC.fbsd_net={label:'Network',cmds:[{d:'Interfaces',c:'ifconfig'},{d:'Route',c:'netstat -rn'},{d:'DNS config',c:'cat /etc/resolv.conf'},{d:'pf status',c:'sudo pfctl -s info'}]};
|
||||||
|
SEC.fbsd_sys={label:'System',cmds:[{d:'Version',c:'uname -r -s'},{d:'Hostname',c:'hostname'},{d:'CPU info',c:'sysctl hw.model'},{d:'Memory',c:'sysctl hw.physmem'}]};
|
||||||
|
SEC.mac_brew={label:'Homebrew',cmds:[{d:'Install',c:'brew install [pkg]'},{d:'Uninstall',c:'brew uninstall [pkg]'},{d:'Update',c:'brew update'},{d:'Upgrade all',c:'brew upgrade'},
|
||||||
|
{d:'Search',c:'brew search [kw]'},{d:'Info',c:'brew info [pkg]'},{d:'List installed',c:'brew list'},{d:'Install cask',c:'brew install --cask [app]'}]};
|
||||||
|
SEC.mac_defaults={label:'defaults',cmds:[{d:'Read key',c:"defaults read [domain] [key]"},{d:'Write key',c:"defaults write [domain] [key] -type [val]"},
|
||||||
|
{d:'Show hidden files',c:"defaults write com.apple.Finder AppleShowAllFiles true && killall Finder"},
|
||||||
|
{d:'Screenshot path',c:"defaults write com.apple.screencapture location [path]; killall SystemUIServer"}]};
|
||||||
|
SEC.mac_disk={label:'disk',cmds:[{d:'List disks',c:'diskutil list'},{d:'Disk info',c:'diskutil info [disk]'},{d:'Mount',c:'diskutil mount [disk]'},{d:'Unmount',c:'diskutil unmount [disk]'}]};
|
||||||
|
SEC.mac_sys={label:'System',cmds:[{d:'macOS version',c:'sw_vers'},{d:'Hardware',c:'system_profiler SPHardwareDataType'},{d:'Memory',c:'system_profiler SPMemoryDataType'},{d:'Processes',c:'top -l 1 -n 10'},{d:'Disk space',c:'df -h'}]};
|
||||||
|
SEC.dc_up={label:'Up/Down',cmds:[{d:'Start',c:'docker compose up -d'},{d:'Stop',c:'docker compose down'},{d:'Rebuild+start',c:'docker compose up -d --build'},{d:'Force recreate',c:'docker compose up -d --force-recreate'},{d:'Stop (no rm)',c:'docker compose stop'},{d:'Remove all',c:'docker compose down -v'}]};
|
||||||
|
SEC.dc_logs={label:'Logs',cmds:[{d:'Follow',c:'docker compose logs -f'},{d:'Service logs',c:'docker compose logs [s] -f'},{d:'Last 50',c:'docker compose logs --tail=50'},{d:'Timestamps',c:'docker compose logs -t'}]};
|
||||||
|
SEC.dc_exec={label:'Exec',cmds:[{d:'Shell',c:'docker compose exec [s] bash'},{d:'Run command',c:'docker compose exec [s] [cmd]'},{d:'Shell root',c:'docker compose exec -u root [s] bash'}]};
|
||||||
|
SEC.dc_ps={label:'PS',cmds:[{d:'List services',c:'docker compose ps'},{d:'Validate config',c:'docker compose config'},{d:'Images',c:'docker compose images'}]};
|
||||||
|
SEC.dc_build={label:'Build',cmds:[{d:'Build all',c:'docker compose build'},{d:'Build service',c:'docker compose build [s]'},{d:'No cache',c:'docker compose build --no-cache'},{d:'Pull images',c:'docker compose pull'}]};
|
||||||
|
SEC.dck_build={label:'Build image',cmds:[{d:'Build',c:'docker build -t [name]:[tag] .'},{d:'No cache',c:'docker build --no-cache -t [name]:[tag] .'},{d:'Build args',c:'docker build --build-arg [k]=[v] -t [name]:[tag] .'},{d:'Multi-stage',c:'docker build --target [stage] -t [name]:[tag] .'}]};
|
||||||
|
SEC.dck_directives={label:'Dockerfile',cmds:[{d:'FROM',c:'FROM [image]:[tag]'},{d:'RUN',c:'RUN [command]'},{d:'COPY',c:'COPY [src] [dest]'},{d:'WORKDIR',c:'WORKDIR /app'},
|
||||||
|
{d:'EXPOSE',c:'EXPOSE [port]'},{d:'CMD',c:'CMD ["exec","args"]'},{d:'ENTRYPOINT',c:'ENTRYPOINT ["exec","args"]'},{d:'ENV',c:'ENV [key]=[value]'},
|
||||||
|
{d:'VOLUME',c:'VOLUME [path]'},{d:'USER',c:'USER [user]'},{d:'HEALTHCHECK',c:'HEALTHCHECK CMD [cmd]'},{d:'LABEL',c:'LABEL [key]=[value]'}]};
|
||||||
|
SEC.mysql={label:'MySQL/MariaDB',cmds:[{d:'Connect',c:'mysql -u [user] -p'},{d:'Show databases',c:'SHOW DATABASES;'},{d:'Show tables',c:'SHOW TABLES;'},
|
||||||
|
{d:'Users',c:'SELECT User,Host FROM mysql.user;'},{d:'Create DB',c:'CREATE DATABASE [db];'},{d:'Create user',c:"CREATE USER '[u]'@'localhost' IDENTIFIED BY '[p]';"},
|
||||||
|
{d:'Grant',c:"GRANT ALL ON [db].* TO '[u]'@'localhost';"},{d:'Dump DB',c:'mysqldump -u [u] -p [db] > backup.sql'},{d:'Restore DB',c:'mysql -u [u] -p [db] < backup.sql'},
|
||||||
|
{d:'Dump all',c:'mysqldump -u [u] -p --all-databases > all.sql'},{d:'Processlist',c:'SHOW FULL PROCESSLIST;'},{d:'Variables',c:"SHOW VARIABLES LIKE '%[kw]%';"}]};
|
||||||
|
SEC.pg={label:'PostgreSQL',cmds:[{d:'Connect',c:"psql -U [user] -d [db]"},{d:'List databases',c:'\\l+'},{d:'List tables',c:'\\dt+'},{d:'Describe',c:'\\d+ [table]'},
|
||||||
|
{d:'Create DB',c:'CREATE DATABASE [db];'},{d:'Create user',c:"CREATE USER [u] WITH PASSWORD '[p]';"},{d:'Grant',c:"GRANT ALL PRIVILEGES ON DATABASE [db] TO [u];"},
|
||||||
|
{d:'Dump DB',c:'pg_dump -U [u] [db] > backup.sql'},{d:'Restore DB',c:'psql -U [u] -d [db] < backup.sql'},{d:'Vacuum',c:"VACUUM FULL ANALYZE;"}]};
|
||||||
|
|
||||||
var ALL=[];(function(){var seen={};for(var k in SEC)SEC[k].cmds.forEach(function(x){if(!seen[x.c]){seen[x.c]=1;ALL.push(x)}})})();
|
var ALL=[];(function(){var seen={};for(var k in SEC)SEC[k].cmds.forEach(function(x){if(!seen[x.c]){seen[x.c]=1;ALL.push(x)}})})();
|
||||||
|
|
||||||
function FN(t,i){if(t.id===i)return t;for(var j=0;j<(t.children||[]).length;j++){var r=FN(t.children[j],i);if(r)return r}return null}
|
// ── RENDER TREE ──
|
||||||
function CL(n,o){if(n.children){for(var i=0;i<n.children.length;i++)CL(n.children[i],o)}else o.push(n);return o}
|
|
||||||
function CC(n){if(n.secs){var t=0;for(var i=0;i<n.secs.length;i++)if(SEC[n.secs[i]])t+=SEC[n.secs[i]].cmds.length;return t}return 0}
|
|
||||||
function $(i){return document.getElementById(i)}
|
|
||||||
|
|
||||||
function RT(){
|
function RT(){
|
||||||
var el=$('tree');el.innerHTML='';
|
var el=$('tree');el.innerHTML='';
|
||||||
function RN(c,n,d){
|
(function RN(c,n,d){
|
||||||
var br=n.children&&n.children.length>0,ver=!!n.secs;
|
var br=n.children&&n.children.length>0,ver=!!n.secs;
|
||||||
var dv=document.createElement('div');
|
var dv=document.createElement('div');
|
||||||
if(d===0){var lb=document.createElement('div');lb.className='grp';lb.textContent='Categories';dv.appendChild(lb)}
|
if(d===0){var lb=document.createElement('div');lb.className='grp';lb.textContent='Categories';dv.appendChild(lb)}
|
||||||
@@ -227,141 +245,142 @@ function RT(){
|
|||||||
var rw=document.createElement('div');
|
var rw=document.createElement('div');
|
||||||
var c2='slk';if(d===2)c2+=' slk3';if(d===3)c2+=' slk4';if(n===N)c2+=' act';rw.className=c2;
|
var c2='slk';if(d===2)c2+=' slk3';if(d===3)c2+=' slk4';if(n===N)c2+=' act';rw.className=c2;
|
||||||
if(br){var tg=document.createElement('span');tg.className='tgl o';
|
if(br){var tg=document.createElement('span');tg.className='tgl o';
|
||||||
tg.innerHTML='<svg width="12" height="12" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9 18l6-6-6-6"/></svg>';rw.appendChild(tg)
|
tg.innerHTML='<svg width="12" height="12" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9 18l6-6-6-6"/></svg>';rw.appendChild(tg)}
|
||||||
}else{var sp=document.createElement('span');sp.style.cssText='width:16px;flex-shrink:0;display:inline-block';rw.appendChild(sp)}
|
else{rw.appendChild(document.createElement('span'))}
|
||||||
var dt=document.createElement('span');
|
var dt=document.createElement('span');
|
||||||
if(ver||n._p)dt.className='dg';else if(br)dt.className='do';else dt.className='dgr';
|
if(ver||n._p)dt.className='dg';else if(br)dt.className='do';else dt.className='dgr';
|
||||||
rw.appendChild(dt);
|
rw.appendChild(dt);
|
||||||
var lb2=document.createElement('span');lb2.textContent=n.label.fr;rw.appendChild(lb2);
|
var lb2=document.createElement('span');lb2.textContent=n.label;rw.appendChild(lb2);
|
||||||
var cnt=CC(n)||(n._p&&n._p.secs?SEC[n._sid]?SEC[n._sid].cmds.length:0:0);
|
var cnt=CC(n)||(n._p&&n._p.secs?SEC[n._sid]?SEC[n._sid].cmds.length:0:0);
|
||||||
if(cnt>0){var b2=document.createElement('span');b2.style.cssText='margin-left:auto;font-size:10px;color:#94a3b8';b2.textContent=''+cnt;rw.appendChild(b2)}
|
if(cnt>0){var b2=document.createElement('span');b2.style.cssText='margin-left:auto;font-size:10px;color:var(--muted)';b2.textContent=''+cnt;rw.appendChild(b2)}
|
||||||
rw.onclick=function(e){
|
rw.onclick=function(e){
|
||||||
if(br&&(e.target.closest('.tgl')||e.target.closest('[data-toggle]'))){var tg=rw.querySelector('.tgl');if(tg){tg.classList.toggle('o');rw.nextElementSibling.classList.toggle('o');e.stopPropagation()}return}
|
if(br&&(e.target.closest('.tgl')||e.target.closest('[data-toggle]'))){var tg=rw.querySelector('.tgl');if(tg){tg.classList.toggle('o');rw.nextElementSibling.classList.toggle('o');e.stopPropagation()}return}
|
||||||
if(br)return;S(n)
|
if(br)return;S(n)
|
||||||
};
|
};
|
||||||
dv.appendChild(rw)
|
dv.appendChild(rw)}
|
||||||
}
|
function onPath(t){if(!t)return false;if(t===n)return true;var p=t._p;while(p){if(p===n)return true;p=p._p}return false}
|
||||||
function onPath(t) { if(!t)return false; if(t===n)return true; var p=t._p; while(p){if(p===n)return true;p=p._p}return false; }
|
|
||||||
if(br){var kd=document.createElement('div');kd.className='chd'+(onPath(N)?' o':'');
|
if(br){var kd=document.createElement('div');kd.className='chd'+(onPath(N)?' o':'');
|
||||||
for(var i=0;i<n.children.length;i++){n.children[i]._p=n;RN(kd,n.children[i],d+1)}
|
for(var i=0;i<n.children.length;i++){n.children[i]._p=n;RN(kd,n.children[i],d+1)}
|
||||||
dv.appendChild(kd)
|
dv.appendChild(kd)}
|
||||||
}
|
|
||||||
if(ver&&n.secs){var kd=document.createElement('div');kd.className='chd';
|
if(ver&&n.secs){var kd=document.createElement('div');kd.className='chd';
|
||||||
if(n===N||(N&&N._p===n))kd.className='chd o';
|
if(n===N||(N&&N._p===n))kd.className='chd o';
|
||||||
for(var j=0;j<n.secs.length;j++){var s=n.secs[j],sc=SEC[s];if(!sc)continue;
|
for(var j=0;j<n.secs.length;j++){var s=n.secs[j],sc=SEC[s];if(!sc)continue;
|
||||||
var sn={id:n.id+'-'+s,label:sc.label,_sid:s,_p:n};RN(kd,sn,d+1)}
|
var sn={id:n.id+'-'+s,label:sc.label,_sid:s,_p:n};RN(kd,sn,d+1)}
|
||||||
dv.appendChild(kd)
|
dv.appendChild(kd)}
|
||||||
}
|
|
||||||
c.appendChild(dv)
|
c.appendChild(dv)
|
||||||
}
|
})(el,TREE,0)
|
||||||
RN(el,TREE,0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── SELECT ──
|
||||||
function S(n){
|
function S(n){
|
||||||
N=n;CS=null;RT();$('search').value='';HI();$('bd').innerHTML='';
|
N=n;MS=null;RT();$('search').value='';HI();$('bd').innerHTML='';
|
||||||
var t=$('os-title'),s=$('os-sub'),c=$('cmds');
|
if(n._sid){var sc=SEC[n._sid];if(sc){$('os-title').textContent=(n._p.label||'')+' > '+sc.label;$('os-sub').textContent=sc.cmds.length+' commands';SC(sc.cmds);return}}
|
||||||
if(n._sid){var sc=SEC[n._sid];if(sc){t.textContent=(n._p.label.fr||'')+' > '+sc.label.fr;s.textContent=sc.cmds.length+' commandes';SC(sc.cmds)}return}
|
if(n.secs&&n.secs.length>0){var s0=n.secs[0],sc0=SEC[s0];if(sc0){$('os-title').textContent=n.label;$('os-sub').textContent=n.secs.length+' sections . '+CC(n)+' commands';SC(sc0.cmds);return}}
|
||||||
if(n.secs&&n.secs.length>0){var s0=n.secs[0],sc0=SEC[s0];if(sc0){t.textContent=n.label.fr;s.textContent=n.secs.length+' sections . '+CC(n)+' commandes';SC(sc0.cmds)}return}
|
$('os-title').textContent=n.label;$('os-sub').textContent='No data';$('cmds').innerHTML='<div class="emp"><h3>'+n.label+'</h3><p>'+'No commands yet for this OS.</p></div>'
|
||||||
t.textContent=n.label.fr;s.textContent='Aucune donnee';c.innerHTML='<div class="emp"><h3>'+n.label.fr+'</h3><p>Pas encore de commandes</p></div>'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SH(){N=null;CS=null;RT();$('search').value='';
|
function SH(){N=null;MS=null;RT();$('search').value='';
|
||||||
$('home').style.display='block';$('tabs').style.display='none';$('stats-bar').style.display='none';$('cmd-box').style.display='none';
|
$('home').style.display='block';$('tabs').style.display='none';$('stats-bar').style.display='none';$('cmd-box').style.display='none';
|
||||||
$('bd').innerHTML='';$('os-title').textContent='SysCmd';$('os-sub').textContent='';$('fh').textContent='Cliquez sur un OS pour explorer ses commandes';
|
$('bd').innerHTML='';$('os-title').textContent='SysCmd';$('os-sub').textContent='';RCS()}
|
||||||
RH()
|
function HI(){$('home').style.display='none';$('tabs').style.display='flex';$('stats-bar').style.display='flex';$('cmd-box').style.display='block'}
|
||||||
}
|
|
||||||
function HI(){$('home').style.display='none';$('tabs').style.display='flex';$('stats-bar').style.display='flex';$('cmd-box').style.display='block';$('fh').textContent='Cliquez sur une commande pour la copier'}
|
|
||||||
|
|
||||||
function RH(){RS();RCS()}
|
function RH(){RS();RCS()}
|
||||||
function RS(){
|
function RS(){
|
||||||
var tc=ALL.length,ts=0;for(var k in SEC)ts++;
|
var tc=ALL.length,ts=0;for(var k in SEC)ts++;
|
||||||
var lv=CL(TREE,[]),tos=0;for(var i=0;i<lv.length;i++)if(lv[i].secs)tos++;
|
var lv=CL(TREE,[]),tos=0;for(var i=0;i<lv.length;i++)if(lv[i].secs)tos++;
|
||||||
$('stats-row').innerHTML='<div class="sb"><div class="n">'+tc+'</div><div class="l">commandes</div></div><div class="sb"><div class="n">'+ts+'</div><div class="l">sections</div></div><div class="sb"><div class="n">'+tos+'</div><div class="l">OS renseignes</div></div><div class="sb"><div class="n" style="color:#94a3b8">'+(lv.length-tos)+'</div><div class="l">placeholders</div></div>'
|
$('stats-row').innerHTML='<div class="sb"><div class="n">'+tc+'</div><div class="l">commands</div></div><div class="sb"><div class="n">'+ts+'</div><div class="l">sections</div></div><div class="sb"><div class="n">'+tos+'</div><div class="l">OS documented</div></div><div class="sb"><div class="n" style="color:var(--muted)">'+(lv.length-tos)+'</div><div class="l">pending</div></div>'
|
||||||
}
|
}
|
||||||
|
|
||||||
var CARDS=[
|
var CARDS=[
|
||||||
{id:'deb',l:'Debian',i:'D',c:'#0f172a',d:t('Distribution stable','Stable'),cat:'os'},
|
{id:'deb',l:'Debian',i:'D',c:'#0f172a',d:'Stable distribution',cat:'os'},
|
||||||
{id:'ubu',l:'Ubuntu',i:'U',c:'#dc2626',d:t('Base Debian LTS','Debian LTS'),cat:'os',gr:true},
|
{id:'ubu',l:'Ubuntu',i:'U',c:'#dc2626',d:'Debian-based LTS',cat:'os',gr:true},
|
||||||
{id:'ora',l:'Oracle Linux',i:'O',c:'#b9141e',d:t('Linux UEK+SELinux','UEK+SELinux'),cat:'os'},
|
{id:'ora',l:'Oracle Linux',i:'O',c:'#b9141e',d:'Linux UEK+SELinux',cat:'os'},
|
||||||
{id:'win',l:'Windows',i:'W',c:'#0078d4',d:t('CMD+PS','CMD+PS'),cat:'os',gr:true},
|
{id:'win',l:'Windows',i:'W',c:'#0078d4',d:'CMD+PS client/server',cat:'os',gr:true},
|
||||||
{id:'sol',l:'Solaris',i:'S',c:'#b46400',d:t('Solaris+ZFS+DTrace','Solaris'),cat:'os'},
|
{id:'sol',l:'Solaris',i:'S',c:'#b46400',d:'Solaris ZFS+DTrace',cat:'os'},
|
||||||
{id:'rhel',l:'RHEL/CentOS',i:'R',c:'#94a3b8',d:t('Enterprise Linux','Enterprise'),cat:'os',ph:1},
|
{id:'rhel',l:'RHEL/CentOS',i:'R',c:'#e63946',d:'Enterprise Linux',cat:'os'},
|
||||||
{id:'fed',l:'Fedora',i:'F',c:'#94a3b8',d:t('RHEL-based','RHEL-based'),cat:'os',ph:1},
|
{id:'fed',l:'Fedora',i:'F',c:'#94a3b8',d:'RHEL-based (pending)',cat:'os',ph:1},
|
||||||
{id:'mac',l:'macOS',i:'M',c:'#94a3b8',d:t('macOS','macOS'),cat:'os',ph:1},
|
{id:'freebsd',l:'FreeBSD',i:'B',c:'#cc1111',d:'BSD with ZFS+jails',cat:'os'},
|
||||||
{id:'dcc',l:'Docker Compose',i:'D',c:'#0ea5e9',d:t('Multi-conteneurs','Multi-container'),cat:'dk',ph:1},
|
{id:'mac',l:'macOS',i:'M',c:'#a1a1a6',d:'Homebrew+defaults',cat:'os'},
|
||||||
{id:'dcs',l:'Docker Swarm',i:'S',c:'#0ea5e9',d:t('Cluster natif','Cluster'),cat:'dk',ph:1},
|
{id:'dck',l:'Docker',i:'D',c:'#0ea5e9',d:'Compose + Dockerfile',cat:'dk',gr:true},
|
||||||
{id:'dcf',l:'Dockerfile',i:'F',c:'#0ea5e9',d:t('Build','Build'),cat:'dk',ph:1},
|
{id:'cis',l:'Cisco',i:'C',c:'#8b5cf6',d:'Cisco networking (pending)',cat:'oth',ph:1},
|
||||||
{id:'cis',l:'Cisco',i:'C',c:'#8b5cf6',d:t('Reseau Cisco','Cisco'),cat:'oth',ph:1},
|
{id:'my',l:'MySQL/MariaDB',i:'S',c:'#8b5cf6',d:'SQL databases',cat:'oth'},
|
||||||
{id:'my',l:'MySQL/MariaDB',i:'S',c:'#8b5cf6',d:t('Bases SQL','SQL'),cat:'oth',ph:1},
|
{id:'pg',l:'PostgreSQL',i:'P',c:'#8b5cf6',d:'Advanced database',cat:'oth'},
|
||||||
{id:'pg',l:'PostgreSQL',i:'P',c:'#8b5cf6',d:t('Base avancee','Advanced DB'),cat:'oth',ph:1},
|
{id:'ans',l:'Ansible',i:'A',c:'#8b5cf6',d:'IT automation (pending)',cat:'oth',ph:1},
|
||||||
{id:'ans',l:'Ansible',i:'A',c:'#8b5cf6',d:t('Automatisation','Automation'),cat:'oth',ph:1},
|
{id:'k8',l:'Kubernetes',i:'K',c:'#8b5cf6',d:'Container orchestration (pending)',cat:'oth',ph:1}];
|
||||||
{id:'k8',l:'Kubernetes',i:'K',c:'#8b5cf6',d:t('Orchestration','Orchestration'),cat:'oth',ph:1}];
|
|
||||||
|
|
||||||
function RCS(){
|
function RCS(){
|
||||||
var cats={os:{l:t('Systemes d exploitation','Operating Systems'),h:''},dk:{l:t('Docker/Conteneurs','Docker/Containers'),h:''},oth:{l:t('Reseau, BDD, DevOps','Network, DB, DevOps'),h:''}};
|
var ct0={os:{l:'Operating Systems',h:''},dk:{l:'Docker/Containers',h:''},oth:{l:'Network, DB, DevOps',h:''}};
|
||||||
CARDS.forEach(function(cd){
|
CARDS.forEach(function(cd){
|
||||||
var nd=FN(TREE,cd.id),cnt=nd?CC(nd):0,ph=cd.ph&&cnt===0;
|
var nd=FN(TREE,cd.id),cnt=nd?CC(nd):0,ph=cd.ph&&cnt===0;
|
||||||
if(!cats[cd.cat])cats[cd.cat]={l:cd.cat,h:''};
|
if(!ct0[cd.cat])ct0[cd.cat]={l:cd.cat,h:''};
|
||||||
var h='<div class="oc'+(ph?' ph':'')+'" data-card="'+cd.id+'">'+
|
var h='<div class="oc'+(ph?' ph':'')+'" data-card="'+cd.id+'">'+
|
||||||
'<div style="display:flex;gap:12px;margin-bottom:12px">'+
|
'<div style="display:flex;gap:12px;margin-bottom:12px">'+
|
||||||
'<div class="ic" style="background:'+(ph?'#e2e8f0':cd.c)+';color:'+(ph?'#94a3b8':'#fff')+'"><span style="font-weight:700;font-size:13px">'+cd.i+'</span></div>'+
|
'<div class="ic" style="background:'+(ph?'var(--brd2)':cd.c)+';color:'+(ph?'var(--muted)':'#fff')+'"><span style="font-weight:700;font-size:13px">'+cd.i+'</span></div>'+
|
||||||
'<div style="flex:1;min-width:0"><div style="font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">'+(cd.gr?cd.l+' >':cd.l)+'</div>'+
|
'<div style="flex:1;min-width:0"><div style="font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--title)">'+(cd.gr?cd.l+'>':cd.l)+'</div>'+
|
||||||
'<div class="sl">'+cd.d.fr+'</div></div></div>'+
|
'<div style="font-size:11px;color:var(--muted)">'+cd.d+'</div></div></div>'+
|
||||||
'<div style="display:flex;gap:8px;font-size:11px">'+(cnt>0?'<span style="font-weight:600;color:#0f172a">'+cnt+'</span><span style="color:#94a3b8">commandes</span>':'<span style="color:#cbd5e1">'+(ph?'A venir':'via sidebar')+'</span>')+'</div></div>';
|
'<div style="display:flex;gap:8px;font-size:11px">'+(cnt>0?'<span style="font-weight:600;color:var(--title)">'+cnt+'</span><span style="color:var(--muted)">commands</span>':'<span style="color:var(--muted)">Pending</span>')+'</div></div>';
|
||||||
cats[cd.cat].h+=h
|
ct0[cd.cat].h+=h});
|
||||||
});
|
var html='';Object.keys(ct0).forEach(function(k){html+='<div class="cl">'+ct0[k].l+'</div>'+ct0[k].h});
|
||||||
var html='';
|
|
||||||
Object.keys(cats).forEach(function(k){html+='<div class="cl">'+cats[k].l.fr+'</div>'+cats[k].h});
|
|
||||||
$('grid').innerHTML=html;
|
$('grid').innerHTML=html;
|
||||||
// Bind clicks
|
|
||||||
$('grid').querySelectorAll('[data-card]').forEach(function(el){
|
$('grid').querySelectorAll('[data-card]').forEach(function(el){
|
||||||
el.onclick=function(){
|
el.onclick=function(){
|
||||||
var id=el.dataset.card,cd=null;
|
var id=el.dataset.card,cd=null;
|
||||||
for(var i=0;i<CARDS.length;i++)if(CARDS[i].id===id){cd=CARDS[i];break}
|
for(var i=0;i<CARDS.length;i++)if(CARDS[i].id===id){cd=CARDS[i];break}
|
||||||
if(!cd)return;
|
if(!cd)return;
|
||||||
var nd=FN(TREE,cd.id);
|
var nd=FN(TREE,cd.id);
|
||||||
if(cd.gr&&nd&&nd.children&&nd.children.length>0)S(nd.children[0]);
|
if(cd.gr&&nd&&nd.children&&nd.children.length>0)S(nd.children[0]);else if(nd)S(nd)}})
|
||||||
else if(nd)S(nd)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SC(cmds){
|
function SC(cmds){
|
||||||
var el=$('cmds'),sv=$('search').value.trim().toLowerCase();
|
var el=$('cmds'),sv=$('search').value.trim().toLowerCase();
|
||||||
var c2=sv?cmds.filter(function(x){return x.d.fr.indexOf(sv)!==-1||x.d.en.indexOf(sv)!==-1||x.c.indexOf(sv)!==-1}):cmds;
|
var c2=sv?cmds.filter(function(x){return x.d.toLowerCase().indexOf(sv)!==-1||x.c.toLowerCase().indexOf(sv)!==-1}):cmds;
|
||||||
$('shown').textContent=''+c2.length;
|
$('shown').textContent=''+c2.length;
|
||||||
if(c2.length===0){el.innerHTML='<div class="p8">Aucune commande trouvee</div>';return}
|
if(c2.length===0){el.innerHTML='<div class="p8">No commands found</div>';return}
|
||||||
el.innerHTML='';
|
el.innerHTML='';
|
||||||
c2.forEach(function(x,i){
|
c2.forEach(function(x,i){
|
||||||
var r=document.createElement('div');r.className='scmd'+(i%2===0?' alt':'');
|
var r=document.createElement('div');r.className='scmd'+(i%2===0?' alt':'');
|
||||||
r.innerHTML='<div class="d">'+x.d.fr+'</div><div class="t"><span class="cp"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></span><span>'+x.c+'</span></div>';
|
r.innerHTML='<div class="d">'+x.d+'</div><div class="t"><span class="cp"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></span><span>'+x.c+'</span></div>';
|
||||||
r.querySelector('.t').onclick=function(){
|
r.querySelector('.t').onclick=function(){
|
||||||
navigator.clipboard.writeText(x.c).then(function(){
|
navigator.clipboard.writeText(x.c).then(function(){
|
||||||
var ic=r.querySelector('.cp');
|
var ic=r.querySelector('.cp');
|
||||||
ic.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.5" width="14" height="14"><polyline points="20 6 9 17 4 12"/></svg>';
|
ic.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.5" width="14" height="14"><polyline points="20 6 9 17 4 12"/></svg>';
|
||||||
setTimeout(function(){ic.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>'},1200)
|
setTimeout(function(){ic.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>'},1200)})};
|
||||||
})
|
el.appendChild(r)})
|
||||||
};
|
|
||||||
el.appendChild(r)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSearch(v){
|
function onSearch(v){
|
||||||
$('fi').textContent=v.trim()?'Filtre: "'+v+'"':'Aucun filtre';
|
$('fi').textContent=v.trim()?'Filter: "'+v+'"':'No filter';
|
||||||
if(N&&N._sid){SC(SEC[N._sid].cmds);return}
|
if(N&&N._sid){SC(SEC[N._sid].cmds);return}
|
||||||
if(N&&N.secs&&N.secs.length>0){SC(SEC[N.secs[0]].cmds);return}
|
if(N&&N.secs&&N.secs.length>0){MSS(N,v);return}
|
||||||
if(!N&&v.trim()){
|
if(!N&&v.trim()){
|
||||||
var r=ALL.filter(function(x){return x.d.fr.indexOf(v.trim().toLowerCase())!==-1||x.d.en.indexOf(v.trim().toLowerCase())!==-1||x.c.indexOf(v.trim().toLowerCase())!==-1});
|
var r=ALL.filter(function(x){return x.d.toLowerCase().indexOf(v.trim().toLowerCase())!==-1||x.c.toLowerCase().indexOf(v.trim().toLowerCase())!==-1});
|
||||||
$('gs').style.display='block';
|
$('gs').style.display='block';
|
||||||
var h='<div class="cmdbox"><div class="s">'+r.length+' resultat(s)</div>';
|
var h='<div class="cmdbox"><div class="s">'+r.length+' result(s)</div>';
|
||||||
if(r.length===0)h+='<div class="p8">Aucun resultat</div>';
|
if(r.length===0)h+='<div class="p8">No results</div>';
|
||||||
else{r.forEach(function(x,i){
|
else{r.forEach(function(x,i){
|
||||||
h+='<div class="scmd'+(i%2===0?' alt':'')+'"><div class="d">'+x.d.fr+'</div><div class="t"><span class="cp"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></span><span>'+x.c+'</span></div></div>'
|
h+='<div class="scmd'+(i%2===0?' alt':'')+'"><div class="d">'+x.d+'</div><div class="t"><span class="cp"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></span><span>'+x.c+'</span></div></div>'})}
|
||||||
})}
|
|
||||||
h+='</div>';$('gs').innerHTML=h;$('grid').style.display='none';$('stats-row').style.display='none'
|
h+='</div>';$('gs').innerHTML=h;$('grid').style.display='none';$('stats-row').style.display='none'
|
||||||
}else if(!N){$('gs').style.display='none';$('grid').style.display='grid';$('stats-row').style.display='grid'}
|
}else if(!N){$('gs').style.display='none';$('grid').style.display='grid';$('stats-row').style.display='grid'}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function MSS(n,v){
|
||||||
|
var secs=n.secs;
|
||||||
|
if(!secs||secs.length===0){SC(SEC[secs[0]].cmds);return}
|
||||||
|
var allCmds=[];
|
||||||
|
secs.forEach(function(sid){var sc=SEC[sid];if(sc)sc.cmds.forEach(function(x){allCmds.push({cmd:x,sec:sc.label})})});
|
||||||
|
var sv=v.trim().toLowerCase();
|
||||||
|
if(sv)allCmds=allCmds.filter(function(x){return x.cmd.d.toLowerCase().indexOf(sv)!==-1||x.cmd.c.toLowerCase().indexOf(sv)!==-1});
|
||||||
|
$('shown').textContent=''+allCmds.length;
|
||||||
|
var el=$('cmds');
|
||||||
|
if(allCmds.length===0){el.innerHTML='<div class="p8">No commands found</div>';return}
|
||||||
|
el.innerHTML='';
|
||||||
|
allCmds.forEach(function(x,i){
|
||||||
|
var r=document.createElement('div');r.className='scmd'+(i%2===0?' alt':'');
|
||||||
|
r.innerHTML='<div class="d">'+x.cmd.d+' <span style="color:var(--muted);font-weight:400;font-size:10px">['+x.sec+']</span></div><div class="t"><span class="cp"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="14" height="14"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg></span><span>'+x.cmd.c+'</span></div>';
|
||||||
|
r.querySelector('.t').onclick=function(){navigator.clipboard.writeText(x.cmd.c)};
|
||||||
|
el.appendChild(r)})
|
||||||
|
}
|
||||||
|
|
||||||
RT();
|
RT();
|
||||||
SH();
|
SH();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user