voidcli 0.1.0__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {voidcli-0.1.0 → voidcli-1.0.0}/.gitignore +1 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/PKG-INFO +6 -1
- {voidcli-0.1.0 → voidcli-1.0.0}/README.md +5 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/pyproject.toml +1 -1
- {voidcli-0.1.0 → voidcli-1.0.0}/void/main.py +34 -2
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/activity.py +11 -7
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/collection.py +2 -6
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/note_form.py +12 -11
- {voidcli-0.1.0 → voidcli-1.0.0}/LICENSE +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/__init__.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/controllers/__init__.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/controllers/activity.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/controllers/category.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/controllers/note.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/database/__init__.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/database/connection.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/database/init_tables.sql +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/models/__init__.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/models/activity.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/models/category.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/models/note.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/__init__.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/day_note.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/note.py +0 -0
- {voidcli-0.1.0 → voidcli-1.0.0}/void/views/welcome.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: voidcli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Project-URL: Repository, https://github.com/NelsonUrrutia/void
|
|
5
5
|
Author-email: Nelson Urrutia <nelurrutia15@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -44,6 +44,7 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
# **V**ital **O**ffline **I**nformation **D**iary
|
|
45
45
|
|
|
46
46
|
---
|
|
47
|
+

|
|
47
48
|
|
|
48
49
|
> **VOID** is an offline diary to be used in the terminal.
|
|
49
50
|
|
|
@@ -75,3 +76,7 @@ I made it public so there's proof on the Internet of my work.
|
|
|
75
76
|
### How to install
|
|
76
77
|
|
|
77
78
|
The project is available on PyPI, so you can install it with `pipx install voidcli`.
|
|
79
|
+
|
|
80
|
+
### How to use
|
|
81
|
+
|
|
82
|
+
After installation, run `void` in your terminal.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
# **V**ital **O**ffline **I**nformation **D**iary
|
|
13
13
|
|
|
14
14
|
---
|
|
15
|
+

|
|
15
16
|
|
|
16
17
|
> **VOID** is an offline diary to be used in the terminal.
|
|
17
18
|
|
|
@@ -43,3 +44,7 @@ I made it public so there's proof on the Internet of my work.
|
|
|
43
44
|
### How to install
|
|
44
45
|
|
|
45
46
|
The project is available on PyPI, so you can install it with `pipx install voidcli`.
|
|
47
|
+
|
|
48
|
+
### How to use
|
|
49
|
+
|
|
50
|
+
After installation, run `void` in your terminal.
|
|
@@ -45,11 +45,43 @@ class VoidApp(App):
|
|
|
45
45
|
padding: 1 0;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/* FORM FIELDS */
|
|
49
|
+
.field, Select.field > SelectCurrent{
|
|
50
|
+
border: round $panel-lighten-2;
|
|
51
|
+
border-title-color: $text-muted;
|
|
52
|
+
background: transparent;
|
|
53
|
+
padding: 1 2;
|
|
54
|
+
}
|
|
55
|
+
Input.field, Select.field > SelectCurrent{
|
|
56
|
+
height: 5;
|
|
57
|
+
}
|
|
58
|
+
.field:focus, Select.field:focus > SelectCurrent{
|
|
59
|
+
border: round $primary;
|
|
60
|
+
border-title-color: $primary;
|
|
61
|
+
border-title-style: bold;
|
|
62
|
+
}
|
|
63
|
+
Select.field, Select.field:focus{
|
|
64
|
+
border: none;
|
|
65
|
+
padding: 0;
|
|
66
|
+
}
|
|
67
|
+
TextArea.field > .text-area--cursor-line{
|
|
68
|
+
background: transparent;
|
|
69
|
+
}
|
|
70
|
+
Select.field > SelectOverlay{
|
|
71
|
+
border: round $primary;
|
|
72
|
+
background: $background;
|
|
73
|
+
}
|
|
74
|
+
Checkbox.field.-on{
|
|
75
|
+
border: round $success;
|
|
76
|
+
}
|
|
77
|
+
|
|
48
78
|
/* CARDS */
|
|
49
79
|
.note_card{
|
|
50
80
|
height: auto;
|
|
51
|
-
padding: 0 2;
|
|
52
|
-
border: round $primary
|
|
81
|
+
padding: 1 2 0 2;
|
|
82
|
+
border: round $primary 40%;
|
|
83
|
+
border-title-color: $accent;
|
|
84
|
+
border-title-style: bold;
|
|
53
85
|
}
|
|
54
86
|
.note_card Label{
|
|
55
87
|
width: 100%;
|
|
@@ -5,6 +5,7 @@ from textual.app import ComposeResult
|
|
|
5
5
|
from textual.containers import Horizontal, Vertical
|
|
6
6
|
from textual.message import Message
|
|
7
7
|
from textual.widgets import Button, DataTable, Input, Label, Select, Static
|
|
8
|
+
from textual.widgets._select import SelectCurrent
|
|
8
9
|
|
|
9
10
|
from void.controllers.activity import ActivityController
|
|
10
11
|
from void.controllers.category import CategoryController
|
|
@@ -29,7 +30,7 @@ class ActivitiesView(Static):
|
|
|
29
30
|
width: 70%;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
#new_category, #new_activity, #category_select{
|
|
33
34
|
margin: 1 0 0 0;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -75,17 +76,14 @@ class ActivitiesView(Static):
|
|
|
75
76
|
with Horizontal(classes="main_container"):
|
|
76
77
|
with Vertical(id="category_module"):
|
|
77
78
|
yield Label("CATEGORIES", classes="module_title")
|
|
78
|
-
yield
|
|
79
|
-
yield Input(placeholder="Add a new category", id="new_category")
|
|
79
|
+
yield Input(placeholder="Add a new category", id="new_category", classes="field")
|
|
80
80
|
yield Button(label="ADD", flat=True, id="add_category")
|
|
81
81
|
yield DataTable(id="categories_table")
|
|
82
82
|
with Vertical(id="activity_module"):
|
|
83
83
|
with Vertical(id="activity_form"):
|
|
84
84
|
yield Label("ACTIVITIES", classes="module_title")
|
|
85
|
-
yield
|
|
86
|
-
yield
|
|
87
|
-
yield Label("Select a category", classes="field_label")
|
|
88
|
-
yield Select([], type_to_search=True, id="category_select")
|
|
85
|
+
yield Input(placeholder="Add a new activity", id="new_activity", classes="field")
|
|
86
|
+
yield Select([], type_to_search=True, id="category_select", classes="field")
|
|
89
87
|
yield Input(id="activity_id", compact=True)
|
|
90
88
|
with Horizontal(id="activity_form_cta_container"):
|
|
91
89
|
yield Button(label="ADD", flat=True, id="add_activity", variant="success")
|
|
@@ -110,6 +108,12 @@ class ActivitiesView(Static):
|
|
|
110
108
|
self.clear_activity_form_btn = self.query_one("#clear_activity_form", Button)
|
|
111
109
|
self.activities_table = self.query_one("#activities_table", DataTable)
|
|
112
110
|
|
|
111
|
+
# Border titles
|
|
112
|
+
self.add_category_input.border_title = "New Category"
|
|
113
|
+
self.add_activity_input.border_title = "Activity"
|
|
114
|
+
# Select draws its border on its inner SelectCurrent widget
|
|
115
|
+
self.category_selector.query_one(SelectCurrent).border_title = "Select a category"
|
|
116
|
+
|
|
113
117
|
self.init_activities_table()
|
|
114
118
|
self.init_categories_selector()
|
|
115
119
|
self.init_categories_table()
|
|
@@ -16,10 +16,6 @@ class CollectionView(Static):
|
|
|
16
16
|
grid-size: 3;
|
|
17
17
|
grid-gutter: 1;
|
|
18
18
|
}
|
|
19
|
-
.note_card_date{
|
|
20
|
-
color: $text-muted;
|
|
21
|
-
padding: 0 0 1 0;
|
|
22
|
-
}
|
|
23
19
|
"""
|
|
24
20
|
|
|
25
21
|
@override
|
|
@@ -38,8 +34,8 @@ class CollectionView(Static):
|
|
|
38
34
|
return
|
|
39
35
|
with Grid(classes="card_grid note_grid"):
|
|
40
36
|
for note_date, rows in groupby(notes, key=lambda row: row["note_date"]):
|
|
41
|
-
with Vertical(classes="note_card"):
|
|
42
|
-
|
|
37
|
+
with Vertical(classes="note_card") as card:
|
|
38
|
+
card.border_title = self.format_date(note_date)
|
|
43
39
|
for row in rows:
|
|
44
40
|
with Vertical(classes="entry_card"):
|
|
45
41
|
yield Label(row["activity"], classes="entry_title")
|
|
@@ -34,12 +34,11 @@ class NoteForm(Static):
|
|
|
34
34
|
|
|
35
35
|
.category_block{
|
|
36
36
|
height: auto;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
padding: 0 0 1 0;
|
|
37
|
+
margin: 0 0 1 0;
|
|
38
|
+
padding: 1 1 0 1;
|
|
39
|
+
border: round $primary 40%;
|
|
40
|
+
border-title-color: $accent;
|
|
41
|
+
border-title-style: bold;
|
|
43
42
|
}
|
|
44
43
|
.activity_grid{
|
|
45
44
|
grid-size: 2;
|
|
@@ -53,7 +52,7 @@ class NoteForm(Static):
|
|
|
53
52
|
width: 100%;
|
|
54
53
|
}
|
|
55
54
|
.activity_card TextArea{
|
|
56
|
-
height:
|
|
55
|
+
height: 8;
|
|
57
56
|
}
|
|
58
57
|
.activity_handle{
|
|
59
58
|
display: none;
|
|
@@ -90,15 +89,17 @@ class NoteForm(Static):
|
|
|
90
89
|
with VerticalScroll(classes="main_container"):
|
|
91
90
|
for _, category, activities in self.activities_by_category_data:
|
|
92
91
|
if activities:
|
|
93
|
-
with Vertical(classes="category_block"):
|
|
94
|
-
|
|
92
|
+
with Vertical(classes="category_block") as block:
|
|
93
|
+
block.border_title = category
|
|
95
94
|
with Grid(classes="card_grid activity_grid"):
|
|
96
95
|
for id, name in activities:
|
|
97
96
|
handle = f"{id}::{self.handleize(name)}"
|
|
98
97
|
with Vertical(classes="activity_card"):
|
|
99
|
-
yield Checkbox(label=name)
|
|
98
|
+
yield Checkbox(label=name, classes="field")
|
|
100
99
|
yield Input(value=handle, classes="activity_handle")
|
|
101
|
-
|
|
100
|
+
notes = TextArea(classes="field")
|
|
101
|
+
notes.border_title = "Notes"
|
|
102
|
+
yield notes
|
|
102
103
|
|
|
103
104
|
@on(Checkbox.Changed)
|
|
104
105
|
def on_activity_toggled(self) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|