wassup 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +11 -11
- data/docs/.gitignore +20 -0
- data/docs/README.md +41 -0
- data/docs/babel.config.js +3 -0
- data/docs/blog/2021-12-09-welcome/index.md +8 -0
- data/docs/blog/authors.yml +5 -0
- data/docs/docs/Supfile-basics/_category_.json +4 -0
- data/docs/docs/Supfile-basics/understanding-the-supfile.md +50 -0
- data/docs/docs/intro.md +54 -0
- data/docs/docusaurus.config.js +110 -0
- data/docs/package-lock.json +21196 -0
- data/docs/package.json +43 -0
- data/docs/sidebars.js +31 -0
- data/docs/src/components/HomepageFeatures.module.css +10 -0
- data/docs/src/components/HomepageFeatures.tsx +60 -0
- data/docs/src/css/custom.css +28 -0
- data/docs/src/pages/index.module.css +36 -0
- data/docs/src/pages/index.tsx +39 -0
- data/docs/src/pages/markdown-page.md +7 -0
- data/docs/static/.nojekyll +0 -0
- data/docs/static/img/demo-supfile.png +0 -0
- data/docs/static/img/favicon.ico +0 -0
- data/docs/static/img/logo.svg +27 -0
- data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
- data/docs/static/img/tutorial/localeDropdown.png +0 -0
- data/docs/static/img/tutorial-intro-starter-screenshot.png +0 -0
- data/docs/static/img/undraw_docusaurus_mountain.svg +170 -0
- data/docs/static/img/undraw_docusaurus_react.svg +169 -0
- data/docs/static/img/undraw_docusaurus_tree.svg +1 -0
- data/docs/static/img/wassup-long.png +0 -0
- data/docs/static/img/wassup-screenshot.png +0 -0
- data/docs/static/img/wassup.png +0 -0
- data/docs/static/video/wassup-demo.mov +0 -0
- data/docs/tsconfig.json +7 -0
- data/examples/debug/Supfile +3 -0
- data/examples/josh-fastlane/Supfile +8 -2
- data/examples/starter/Supfile +44 -0
- data/lib/wassup/app.rb +70 -5
- data/lib/wassup/pane.rb +39 -5
- data/lib/wassup/pane_builder.rb +14 -1
- data/lib/wassup/version.rb +1 -1
- metadata +40 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe6fcd8e497b99430a22d16872f83d9b8a08356436c95f222bb3c9bed1b86d47
|
4
|
+
data.tar.gz: db98e8f4af5997b228bd8f148b13fc0b09681dcfa5486ad8d37e8c21aae0dc7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7623256788359eac541c314581b9b552257f58af44a36216df2922c80a411a9a0dd078e3ca3291b0b0943706689f06c49ec27898879bca2a2131857e960c8b21
|
7
|
+
data.tar.gz: 9b4a0cbb77b12eebb1e9a1392d4d0ac6fcc9796aac72c9632bab5d9217aba1d179847220348532106ae4175131207f3f1484041b7527db1cc5e7957f038d3b89
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<hr/>
|
11
11
|
|
12
|
-
https://user-images.githubusercontent.com/401294/
|
12
|
+
https://user-images.githubusercontent.com/401294/145632767-d75a8244-b68f-4838-8ff4-4017ba0c1ed2.mov
|
13
13
|
|
14
14
|
## Example `Supfile`
|
15
15
|
|
@@ -17,25 +17,25 @@ https://user-images.githubusercontent.com/401294/144465499-a8903d4c-f003-4550-b4
|
|
17
17
|
require 'json'
|
18
18
|
require 'rest-client'
|
19
19
|
|
20
|
-
add_pane do |pane|
|
21
|
-
pane.height = 0.5
|
22
|
-
pane.width =
|
23
|
-
pane.top = 0
|
20
|
+
add_pane do |pane|
|
21
|
+
pane.height = 0.5
|
22
|
+
pane.width = 0.5
|
23
|
+
pane.top = 0
|
24
24
|
pane.left = 0
|
25
25
|
|
26
26
|
pane.highlight = true
|
27
27
|
pane.title = "Open PRs - fastlane/fastlane"
|
28
28
|
|
29
29
|
pane.interval = 60 * 5
|
30
|
-
pane.content do
|
30
|
+
pane.content do |builder|
|
31
31
|
resp = RestClient.get "https://api.github.com/repos/fastlane/fastlane/pulls"
|
32
32
|
json = JSON.parse(resp)
|
33
33
|
json.map do |pr|
|
34
|
-
display = "##{pr["number"]} pr["title"]"
|
35
|
-
|
36
|
-
# First
|
37
|
-
# Second
|
38
|
-
|
34
|
+
display = "##{pr["number"]} #{pr["title"]}"
|
35
|
+
|
36
|
+
# First argument is displayed
|
37
|
+
# Second argument is passed to pane.selection
|
38
|
+
builder.add_row(display, pr["html_url"])
|
39
39
|
end
|
40
40
|
end
|
41
41
|
pane.selection do |url|
|
data/docs/.gitignore
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Dependencies
|
2
|
+
/node_modules
|
3
|
+
|
4
|
+
# Production
|
5
|
+
/build
|
6
|
+
|
7
|
+
# Generated files
|
8
|
+
.docusaurus
|
9
|
+
.cache-loader
|
10
|
+
|
11
|
+
# Misc
|
12
|
+
.DS_Store
|
13
|
+
.env.local
|
14
|
+
.env.development.local
|
15
|
+
.env.test.local
|
16
|
+
.env.production.local
|
17
|
+
|
18
|
+
npm-debug.log*
|
19
|
+
yarn-debug.log*
|
20
|
+
yarn-error.log*
|
data/docs/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Website
|
2
|
+
|
3
|
+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
4
|
+
|
5
|
+
### Installation
|
6
|
+
|
7
|
+
```
|
8
|
+
$ yarn
|
9
|
+
```
|
10
|
+
|
11
|
+
### Local Development
|
12
|
+
|
13
|
+
```
|
14
|
+
$ yarn start
|
15
|
+
```
|
16
|
+
|
17
|
+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
18
|
+
|
19
|
+
### Build
|
20
|
+
|
21
|
+
```
|
22
|
+
$ yarn build
|
23
|
+
```
|
24
|
+
|
25
|
+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
26
|
+
|
27
|
+
### Deployment
|
28
|
+
|
29
|
+
Using SSH:
|
30
|
+
|
31
|
+
```
|
32
|
+
$ USE_SSH=true yarn deploy
|
33
|
+
```
|
34
|
+
|
35
|
+
Not using SSH:
|
36
|
+
|
37
|
+
```
|
38
|
+
$ GIT_USER=<Your GitHub username> yarn deploy
|
39
|
+
```
|
40
|
+
|
41
|
+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
sidebar_position: 1
|
3
|
+
---
|
4
|
+
|
5
|
+
# Understanding the `Supfile`
|
6
|
+
|
7
|
+
The `Supfile` is what **Wassup** uses to generate the dashboard.
|
8
|
+
|
9
|
+
The dashboard is made up of **panes**. These **panes** are configured by the `Supfile`.
|
10
|
+
|
11
|
+
```ruby title="Supfile"
|
12
|
+
add_pane do |pane|
|
13
|
+
pane.height = 0.5
|
14
|
+
pane.width = 0.4
|
15
|
+
pane.top = 0
|
16
|
+
pane.left = 0
|
17
|
+
|
18
|
+
pane.title = "Current Time"
|
19
|
+
|
20
|
+
pane.highlight = false
|
21
|
+
|
22
|
+
pane.interval = 1
|
23
|
+
pane.content do |content|
|
24
|
+
date = `date`
|
25
|
+
content.add_row(date)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
```
|
29
|
+
|
30
|
+
## Properties
|
31
|
+
|
32
|
+
### Positioning
|
33
|
+
|
34
|
+
| Property | Type | Description |
|
35
|
+
| --- | --- | --- |
|
36
|
+
| height | Float | Height of the pane (value between 0 and 1) |
|
37
|
+
| width | Float | Width of the pane (value between 0 and 1) |
|
38
|
+
| top | Float | Top positioning of the pane (value between 0 and 1) |
|
39
|
+
| left | Float | Left positioning of the pane (value between 0 and 1) |
|
40
|
+
| title | String | Title to display in the top border of the pane |
|
41
|
+
|
42
|
+
### Content
|
43
|
+
|
44
|
+
| Property | Type | Description |
|
45
|
+
| --- | --- | --- |
|
46
|
+
| interval | Integer (or Float) | Interval (in seconds) on how often to refresh pane with the `content` block |
|
47
|
+
| show_refresh | Boolean | Whether or not to show when a content refresh is happening |
|
48
|
+
| highlight | Boolean | Whether or not to allow highlighting and selection of rows |
|
49
|
+
| content | Block | A Ruby block for fetching and adding content to the pane |
|
50
|
+
| selection | Block | A Ruby block for fetching and adding content to the pane |
|
data/docs/docs/intro.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
---
|
2
|
+
sidebar_position: 1
|
3
|
+
---
|
4
|
+
|
5
|
+
# Getting Started
|
6
|
+
|
7
|
+
Get started by **installing the gem**.
|
8
|
+
|
9
|
+
## Installing
|
10
|
+
|
11
|
+
Install **Wassup** from RubyGems:
|
12
|
+
|
13
|
+
```shell
|
14
|
+
gem install wassup
|
15
|
+
```
|
16
|
+
|
17
|
+
Or in a `Gemfile`:
|
18
|
+
|
19
|
+
```rb
|
20
|
+
source "https://rubygems.org"
|
21
|
+
|
22
|
+
gem "wassup"
|
23
|
+
```
|
24
|
+
|
25
|
+
## Create Your First `Supfile`
|
26
|
+
|
27
|
+
Create a `Supfile` with the following contents:
|
28
|
+
|
29
|
+
```ruby title="Supfile"
|
30
|
+
add_pane do |pane|
|
31
|
+
pane.height = 0.5
|
32
|
+
pane.width = 0.4
|
33
|
+
pane.top = 0
|
34
|
+
pane.left = 0
|
35
|
+
|
36
|
+
pane.highlight = false
|
37
|
+
pane.title = "Current Time"
|
38
|
+
|
39
|
+
pane.interval = 1
|
40
|
+
pane.content do |content|
|
41
|
+
date = `date`
|
42
|
+
|
43
|
+
content.add_row(date)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
Run `wassup` (or `bundle exec wassup` if using a `Gemfile`) from your terminal in the same directory as your `Supfile`.
|
49
|
+
|
50
|
+
### Screenshot
|
51
|
+
|
52
|
+
You should see a pane in the top left corner that updates the time every second.
|
53
|
+
|
54
|
+
![Tutorial intro starter screenshot](/img/tutorial-intro-starter-screenshot.png)
|
@@ -0,0 +1,110 @@
|
|
1
|
+
// @ts-check
|
2
|
+
// Note: type annotations allow type checking and IDEs autocompletion
|
3
|
+
|
4
|
+
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
5
|
+
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
6
|
+
|
7
|
+
/** @type {import('@docusaurus/types').Config} */
|
8
|
+
const config = {
|
9
|
+
title: 'Wassup',
|
10
|
+
tagline: 'Scriptable terminal dashboard',
|
11
|
+
url: 'https://wassup.tools',
|
12
|
+
baseUrl: '/',
|
13
|
+
onBrokenLinks: 'throw',
|
14
|
+
onBrokenMarkdownLinks: 'warn',
|
15
|
+
favicon: 'img/favicon.ico',
|
16
|
+
organizationName: 'joshdholtz', // Usually your GitHub org/user name.
|
17
|
+
projectName: 'wassup', // Usually your repo name.
|
18
|
+
|
19
|
+
presets: [
|
20
|
+
[
|
21
|
+
'classic',
|
22
|
+
/** @type {import('@docusaurus/preset-classic').Options} */
|
23
|
+
({
|
24
|
+
docs: {
|
25
|
+
sidebarPath: require.resolve('./sidebars.js'),
|
26
|
+
// Please change this to your repo.
|
27
|
+
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
|
28
|
+
},
|
29
|
+
blog: {
|
30
|
+
showReadingTime: true,
|
31
|
+
// Please change this to your repo.
|
32
|
+
editUrl:
|
33
|
+
'https://github.com/facebook/docusaurus/edit/main/website/blog/',
|
34
|
+
},
|
35
|
+
theme: {
|
36
|
+
customCss: require.resolve('./src/css/custom.css'),
|
37
|
+
},
|
38
|
+
}),
|
39
|
+
],
|
40
|
+
],
|
41
|
+
|
42
|
+
themeConfig:
|
43
|
+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
44
|
+
({
|
45
|
+
navbar: {
|
46
|
+
title: 'Wassup',
|
47
|
+
logo: {
|
48
|
+
alt: 'Wassup Logo',
|
49
|
+
src: 'img/logo.svg',
|
50
|
+
},
|
51
|
+
items: [
|
52
|
+
{
|
53
|
+
type: 'doc',
|
54
|
+
docId: 'intro',
|
55
|
+
position: 'left',
|
56
|
+
label: 'Tutorial',
|
57
|
+
},
|
58
|
+
{to: '/blog', label: 'Blog', position: 'left'},
|
59
|
+
{
|
60
|
+
href: 'https://github.com/joshdholtz/wassup',
|
61
|
+
label: 'GitHub',
|
62
|
+
position: 'right',
|
63
|
+
},
|
64
|
+
],
|
65
|
+
},
|
66
|
+
footer: {
|
67
|
+
style: 'dark',
|
68
|
+
links: [
|
69
|
+
{
|
70
|
+
title: 'Docs',
|
71
|
+
items: [
|
72
|
+
{
|
73
|
+
label: 'Tutorial',
|
74
|
+
to: '/docs/intro',
|
75
|
+
},
|
76
|
+
],
|
77
|
+
},
|
78
|
+
{
|
79
|
+
title: 'Community',
|
80
|
+
items: [
|
81
|
+
{
|
82
|
+
label: 'Twitter',
|
83
|
+
href: 'https://twitter.com/joshdholtz',
|
84
|
+
},
|
85
|
+
],
|
86
|
+
},
|
87
|
+
{
|
88
|
+
title: 'More',
|
89
|
+
items: [
|
90
|
+
{
|
91
|
+
label: 'Blog',
|
92
|
+
to: '/blog',
|
93
|
+
},
|
94
|
+
{
|
95
|
+
label: 'GitHub',
|
96
|
+
href: 'https://github.com/joshdholtz/wassup',
|
97
|
+
},
|
98
|
+
],
|
99
|
+
},
|
100
|
+
],
|
101
|
+
copyright: `Copyright © ${new Date().getFullYear()} Josh Holtz. Built with Docusaurus.`,
|
102
|
+
},
|
103
|
+
prism: {
|
104
|
+
theme: lightCodeTheme,
|
105
|
+
darkTheme: darkCodeTheme,
|
106
|
+
},
|
107
|
+
}),
|
108
|
+
};
|
109
|
+
|
110
|
+
module.exports = config;
|