Skip to content

Commit

Permalink
Cleanup (trailing whitespace)
Browse files Browse the repository at this point in the history
  • Loading branch information
anorm committed Oct 25, 2024
1 parent 5aa22ee commit db9a707
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 52 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

A terminal application to view, tail, merge, and search log files (plus JSONL).

<details>
<details>
<summary> 🎬 Viewing a single file </summary>

&nbsp;

<div align="center">
Expand All @@ -36,7 +36,7 @@ See [Toolong on Calmcode.io](https://calmcode.io/shorts/toolong.py) for a calmin
- Support for JSONL files: lines are pretty printed.
- Opens .bz and .bz2 files automatically.
- Merges log files by auto detecting timestamps.


## Why?

Expand Down Expand Up @@ -72,30 +72,30 @@ It is snappy, straightforward to use, and does a lot of the *grunt work* for you

### Videos

<details>
<details>
<summary> 🎬 Merging multiple (compressed) files </summary>
&nbsp;

<div align="center">
<video src="https://github.com/Textualize/tailless/assets/554369/efbbde11-bebf-44ff-8d2b-72a84b542b75" />
</div>


</details>

<details>
<details>
<summary> 🎬 Viewing JSONL files </summary>
&nbsp;

<div align="center">
<video src="https://github.com/Textualize/tailless/assets/554369/38936600-34ee-4fe1-9fd3-b1581fc3fa37" />
</div>



</details>

<details>
<details>
<summary> 🎬 Live Tailing a file </summary>
&nbsp;

Expand All @@ -120,7 +120,7 @@ You could also install Toolong with Pip:
pip install toolong
```

> [!NOTE]
> [!NOTE]
> If you use pip, you should ideally create a virtual environment to avoid potential dependancy conflicts.
However you install Toolong, the `tl` command will be added to your path:
Expand Down Expand Up @@ -167,7 +167,7 @@ tree / | tl

This [guy](https://github.com/willmcgugan). An ex web developer who somehow makes a living writing terminal apps.


---

## History
Expand Down
6 changes: 3 additions & 3 deletions src/toolong/find_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class FindDialog(Widget, can_focus_children=True):
DEFAULT_CSS = """
FindDialog {
layout: horizontal;
dock: top;
padding-top: 1;
dock: top;
padding-top: 1;
width: 1fr;
height: auto;
max-height: 70%;
Expand Down Expand Up @@ -55,7 +55,7 @@ class FindDialog(Widget, can_focus_children=True):
display: none;
}
}
}
}
"""
BINDINGS = [
Binding("escape", "dismiss_find", "Dismiss", key_display="esc", show=False),
Expand Down
18 changes: 9 additions & 9 deletions src/toolong/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#### Merging files
Multiple files will open in tabs.
Multiple files will open in tabs.
If you add the `--merge` switch, TooLong will merge all the log files based on their timestamps:
```bash
Expand All @@ -72,7 +72,7 @@
### Pointer mode
Pointer mode lets you navigate by line.
To enter pointer mode, press `enter` or click a line.
To enter pointer mode, press `enter` or click a line.
When in pointer mode, the navigation keys will move this pointer rather than scroll the log file.
Press `enter` again or click the line a second time to expand the line in to a new panel.
Expand All @@ -98,9 +98,9 @@
"""

TITLE = rf"""
_______ _
_______ _
|__ __| | | Built with Textual
| | ___ ___ | | ___ _ __ __ _
| | ___ ___ | | ___ _ __ __ _
| |/ _ \ / _ \| | / _ \| '_ \ / _` |
| | (_) | (_) | |___| (_) | | | | (_| |
|_|\___/ \___/|______\___/|_| |_|\__, |
Expand Down Expand Up @@ -138,21 +138,21 @@ class HelpScreen(ModalScreen):
CSS = """
HelpScreen VerticalScroll {
background: $surface;
margin: 4 8;
border: heavy $accent;
height: 1fr;
margin: 4 8;
border: heavy $accent;
height: 1fr;
.title {
width: auto;
}
scrollbar-gutter: stable;
Markdown {
margin:0 2;
}
}
Markdown .code_inline {
background: $primary-darken-1;
text-style: bold;
}
}
}
"""

BINDINGS = [
Expand Down
14 changes: 7 additions & 7 deletions src/toolong/line_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@

class LineDisplay(Widget):
DEFAULT_CSS = """
LineDisplay {
LineDisplay {
padding: 0 1;
margin: 1 0;
width: auto;
height: auto;
height: auto;
Label {
width: 1fr;
}
}
.json {
width: auto;
width: auto;
}
.nl {
width: auto;
}
}
}
"""

Expand Down Expand Up @@ -57,10 +57,10 @@ def compose(self) -> ComposeResult:
class LinePanel(ScrollableContainer):
DEFAULT_CSS = """
LinePanel {
background: $panel;
background: $panel;
overflow-y: auto;
overflow-x: auto;
border: blank transparent;
border: blank transparent;
scrollbar-gutter: stable;
&:focus {
border: heavy $accent;
Expand Down
10 changes: 5 additions & 5 deletions src/toolong/log_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class LogLines(ScrollView, inherit_bindings=False):
LogLines {
scrollbar-gutter: stable;
overflow: scroll;
border: heavy transparent;
border: heavy transparent;
.loglines--filter-highlight {
background: $secondary;
color: auto;
Expand All @@ -164,19 +164,19 @@ class LogLines(ScrollView, inherit_bindings=False):
}
border-subtitle-color: $success;
border-subtitle-align: center;
border-subtitle-align: center;
align: center middle;
&.-scanning {
tint: $background 30%;
}
.loglines--line-numbers {
color: $warning 70%;
color: $warning 70%;
}
.loglines--line-numbers-active {
color: $warning;
color: $warning;
text-style: bold;
}
}
}
"""
COMPONENT_CLASSES = {
Expand Down
22 changes: 11 additions & 11 deletions src/toolong/log_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class InfoOverlay(Widget):
DEFAULT_CSS = """
InfoOverlay {
display: none;
dock: bottom;
dock: bottom;
layer: overlay;
width: 1fr;
visibility: hidden;
visibility: hidden;
offset-y: -1;
text-style: bold;
}
Expand All @@ -54,7 +54,7 @@ class InfoOverlay(Widget):
width: 1fr;
align: center bottom;
}
InfoOverlay Label {
visibility: visible;
width: auto;
Expand Down Expand Up @@ -101,9 +101,9 @@ class FooterKey(Label):
&:light {
color: $primary;
}
padding: 0 1 0 0;
padding: 0 1 0 0;
&:hover {
text-style: bold underline;
text-style: bold underline;
}
}
"""
Expand Down Expand Up @@ -148,9 +148,9 @@ class LogFooter(Widget):
dock: bottom;
Horizontal {
width: 1fr;
height: 1;
height: 1;
}
.key {
color: $warning;
}
Expand All @@ -161,7 +161,7 @@ class LogFooter(Widget):
color: $success;
padding: 0 1 0 0;
}
.tail {
padding: 0 1;
margin: 0 1;
Expand Down Expand Up @@ -264,11 +264,11 @@ class LogView(Horizontal):
}
}
LogLines {
width: 1fr;
}
width: 1fr;
}
LinePanel {
width: 50%;
display: none;
display: none;
}
}
"""
Expand Down
8 changes: 4 additions & 4 deletions src/toolong/scan_progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ class ScanProgressBar(Vertical):
width: 100%;
height: auto;
margin: 2 4;
dock: top;
dock: top;
padding: 1 2;
background: $primary;
background: $primary;
display: block;
text-align: center;
display: none;
align: center top;
align: center top;
ProgressBar {
margin: 1 0;
}
}
}
LogLines:focus ScanProgressBar.-has-content {
Expand Down
4 changes: 2 additions & 2 deletions src/toolong/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ class LogScreen(Screen):
CSS = """
LogScreen {
layers: overlay;
& TabPane {
& TabPane {
padding: 0;
}
& Tabs:focus Underline > .underline--bar {
color: $accent;
}
}
Underline > .underline--bar {
color: $panel;
}
Expand Down

0 comments on commit db9a707

Please sign in to comment.