added printer docs
This commit is contained in:
parent
a766eb2eaf
commit
d3b4a15866
23
README.md
23
README.md
@ -453,7 +453,22 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (m
|
||||
| | tx_sec | X | | X | | | total bytes reads + written / second |
|
||||
| | ms | X | | X | | | interval length (for per second values) |
|
||||
|
||||
#### 10. Network related functions
|
||||
#### 10. File System
|
||||
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
| si.printer(cb) | [{...}] | X | X | X | X | | get printer information |
|
||||
| | [0].id | X | | X | X | | internal id |
|
||||
| | [0].name | X | | X | X | | name |
|
||||
| | [0].model | X | | X | X | | model |
|
||||
| | [0].uri | X | | X | X | | printer URI |
|
||||
| | [0].uuid | X | | X | X | | printer UUID |
|
||||
| | [0].status | X | | X | X | | printer status (e.g. idle) |
|
||||
| | [0].local | X | | X | X | | is local printer |
|
||||
| | [0].default | X | | X | X | | is default printer |
|
||||
| | [0].shared | X | | X | X | | is shared printer |
|
||||
|
||||
#### 11. Network related functions
|
||||
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
@ -507,7 +522,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (m
|
||||
| | ms | X | X | X | X | X | response time in ms |
|
||||
| si.inetLatency(host, cb) | : number | X | X | X | X | X | response-time (ms) to external resource<br>host parameter is optional (default 8.8.8.8)|
|
||||
|
||||
#### 11. Wifi networks
|
||||
#### 12. Wifi networks
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
| si.wifiNetworks(cb) | [{...}] | X | | X | X | | array of available wifi networks |
|
||||
@ -522,7 +537,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (m
|
||||
| | [0].wpaFlags | X | | X | X | | array of WPA flags |
|
||||
| | [0].rsnFlags | X | | | | | array of RDN flags |
|
||||
|
||||
#### 12. Docker
|
||||
#### 13. Docker
|
||||
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
@ -620,7 +635,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] (m
|
||||
| | [0].command | X | X | X | X | X | command and arguments |
|
||||
| si.dockerAll(cb) | {...} | X | X | X | X | X | list of all containers including their stats<br>and processes in one single array |
|
||||
|
||||
#### 13. Virtual Box
|
||||
#### 14. Virtual Box
|
||||
|
||||
| Function | Result object | Linux | BSD | Mac | Win | Sun | Comments |
|
||||
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
|
||||
|
||||
@ -284,6 +284,12 @@
|
||||
<div class="icontitle">Disks / FS</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="printer.html" class="col-xl-3 col-lg-3 col-md-4 col-6 features">
|
||||
<div class="inner">
|
||||
<div class="icons"><i class="fal fa-print"></i></div>
|
||||
<div class="icontitle">Printer</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="network.html" class="col-xl-3 col-lg-3 col-md-4 col-6 features">
|
||||
<div class="inner">
|
||||
<div class="icons"><i class="fal fa-network-wired"></i></div>
|
||||
|
||||
@ -11,6 +11,7 @@ function createMenu() {
|
||||
[1, 'os', 'OS'],
|
||||
[1, 'processes', 'Processes / Services'],
|
||||
[1, 'filesystem', 'Disks / FS'],
|
||||
[1, 'printer', 'Printer'],
|
||||
[1, 'network', 'Network'],
|
||||
[1, 'wifi', 'Wifi'],
|
||||
[1, 'docker', 'Docker'],
|
||||
|
||||
249
docs/printer.html
Normal file
249
docs/printer.html
Normal file
@ -0,0 +1,249 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-LRlmVvLKVApDVGuspQFnRQJjkv0P7/YFrw84YYQtmYG4nK8c+M+NlmYDCv0rKWpG" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<script src="main.js"></script>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/assets/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png">
|
||||
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/default.min.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<title>systeminformation</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="nav">
|
||||
<div class="container">
|
||||
<a href="."><img class="logo float-left" src="assets/logo.png">
|
||||
<div class="title float-left">systeminformation</div>
|
||||
</a>
|
||||
<div class="text float-right github"><a href="https://github.com/sebhildebrandt/systeminformation">View on Github <i class="fab fa-github"></i></a></div>
|
||||
<div class="text float-right todocs"><a href="./#docs">Docs Overview</a></div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-4 col-lg-3 col-xl-2 menu" id="menu">
|
||||
</div>
|
||||
<div class="col-12 col-md-8 col-lg-9 col-xl-10 content">
|
||||
<div class="row">
|
||||
<div class="col-12 sectionheader">
|
||||
<div class="title">Printer</div>
|
||||
<div class="text">
|
||||
<p>In this section you will learn how to get information about detected printers:</p>
|
||||
<p>For function reference and examples we assume, that we imported <span class="code">systeminformation</span> as follows:</p>
|
||||
<pre><code class="js">const si = require('systeminformation');</code></pre>
|
||||
<h2>Printer</h2>
|
||||
<p>All functions in this section return a promise or can be called with a callback function (parameter <span class="code">cb</span> in the function reference)</p>
|
||||
<table class="table table-sm table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Function</th>
|
||||
<th>Result object</th>
|
||||
<th>Linux</th>
|
||||
<th>BSD</th>
|
||||
<th>Mac</th>
|
||||
<th>Win</th>
|
||||
<th>Sun</th>
|
||||
<th>Comments</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>si.printer(cb)</td>
|
||||
<td>{...}</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>printer informatiom</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>id</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>internal ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>name</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>printer name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>model</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>printer model</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>uri</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>printer URI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>uuid</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>printer UUID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>status</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>printer status (e.g. idle)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>local</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>is local printer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>default</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>is default printer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>shared</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>X</td>
|
||||
<td>X</td>
|
||||
<td></td>
|
||||
<td>is shared printer</td>
|
||||
</tr>
|
||||
<tr class="example">
|
||||
<td></td>
|
||||
<td colspan="7">
|
||||
<h5>Example</h5>
|
||||
<pre><code class="js">const si = require('systeminformation');
|
||||
si.printer().then(data => console.log(data));</code></pre class="example">
|
||||
<pre class="example">
|
||||
[
|
||||
{
|
||||
id: 0,
|
||||
name: 'HP Color LaserJet CP2025 PS',
|
||||
model: 'HP_Color_LaserJet_CP2025',
|
||||
uri: 'http://192.168.1.1:631/printers/HP_Color_LaserJet_CP2025',
|
||||
uuid: null,
|
||||
local: true,
|
||||
status: 'idle',
|
||||
default: false,
|
||||
shared: false
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'HP Color LaserJet CP2025 PS',
|
||||
model: 'null',
|
||||
uri: 'file:///dev/null',
|
||||
uuid: null,
|
||||
local: true,
|
||||
status: 'idle',
|
||||
default: true,
|
||||
shared: true
|
||||
}
|
||||
]</pre>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="container-fluid">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-12">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href=".">Home</a></li>
|
||||
<li><a href="https://github.com/sebhildebrandt/systeminformation">Github <i class="fab fa-github"></i></a></li>
|
||||
<li><a href="contributors.html">Contributors</a></li>
|
||||
<li><a href="https://buymeacoff.ee/systeminfo">Buy me a coffee</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-4 col-12">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="gettingstarted.html">Quick Start</a></li>
|
||||
<li><a href="issues.html">Known Issues</a></li>
|
||||
<li><a href="statsfunctions.html">Stats Functions</a></li>
|
||||
<li><a href="history.html">Version history</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-4 col-12">
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="https://www.plus-innovations.com">© 2021 Sebastian Hildebrandt, +innovations</a></li>
|
||||
<li><a href="copyright.html">Copyright & License</a></li>
|
||||
<li><a href="trademarks.html">Trademarks</a></li>
|
||||
<li><a href="https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
window.onload = function (e) {
|
||||
createMenu();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user