Skip to content

Commit

Permalink
docs: add lifeos imgs to usage + refactor opt for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
adoreblvnk committed May 11, 2024
1 parent 3aa863d commit ad08d18
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 18 deletions.
56 changes: 46 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Life OS](#life-os)
- [Homepage](#homepage)
- [Quick Notes](#quick-notes)
- [Journal](#journal)
- [Tasks](#tasks)
Expand Down Expand Up @@ -49,17 +49,15 @@ Created in Obsidian, packaged as a Obsidian vault template.

All demo files are stored in `data/demo` folder. To interact with the demo vault, use the script `data/demo/demo.sh`.

Run demo:

```bash
./data/demo/demo.sh
```

Uninstall (moves demo files back to demo folder):
By default, the script moves demo files into the appropriate folders.

```bash
./data/demo/demo.sh uninstall
```
Options:

- `-u`, `--uninstall`: Uninstall (moves demo files back to demo folder)

## Getting Started

Expand All @@ -69,29 +67,67 @@ Uninstall (moves demo files back to demo folder):

### Installation

- [Download](https://github.com/adoreblvnk/life_os/archive/refs/tags/v0.1.0.zip) / Clone repository (for latest updates).
- Download [latest release](https://github.com/adoreblvnk/life_os/releases) / Clone repository (for latest updates).
- Obsidian > Open folder as vault > Trust author and enable plugins

## Usage

### Documentation

#### Life OS
#### Homepage

**Task Dashboard**

![](./data/img/homepage_1.png)

**Pages & Stats**

![](./data/img/homepage_2.png)

#### Quick Notes

![](./data/img/quick_notes_dashboard.png)

#### Journal

**Journal Dashboard**

![](./data/img/journal_dashboard.png)

**Journal Page**

![](./data/img/journal_pg.png)

#### Tasks

#### Life Stages

#### Projects

**Projects Dashboard**

![](./data/img/projects_dashboard.png)

**Project Page**

![](./data/img/project_pg_1_w_prop.png)

![](./data/img/project_pg_2.png)

![](./data/img/project_pg_3.png)

#### Learning

#### Writings

**Writings Dashboard**

![](./data/img/writings_dashboard.png)

**Writings Page**

![](./data/img/writings_pg.png)

### Online sync to GitHub via [Obsidian Git](https://publish.obsidian.md/git-doc/Getting+Started#Start%20with%20existing%20remote%20repository)

Prior to this, you should've cloned / downloaded Life OS. Ensure that the `.git` folder exists.
Expand Down Expand Up @@ -120,7 +156,7 @@ Prior to this, you should've cloned / downloaded Life OS. Ensure that the `.git`

### Bugs

- Javascript not rendering.
- Javascript not rendering occasionally.
- ```
TypeError: Cannot read properties of undefined (reading 'file')
```
Expand Down
4 changes: 2 additions & 2 deletions data/demo/2024-03-23.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ await dv.view("data/views/navbar");

## 📝 Tasks

- [ ] upgrade iCloud subscription 📅 2024-04-26
- [ ] investigate unit test failure in test pipeline ⏫ 📅 2024-03-29
- [ ] upgrade iCloud subscription 📅 2024-05-15
- [ ] investigate unit test failure in test pipeline ⏫ 📅 2024-05-16
- [x] clean keyboard 📅 2024-03-24 ✅ 2024-03-24

## 🗒️ Notes
Expand Down
2 changes: 1 addition & 1 deletion data/demo/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

demo_folder="data/demo"

if [ "$1" = "uninstall" ]; then
if [[ "$1" == "--uninstall" || "$1" == "-u" ]]; then
mv "pages/0_quick_notes/Dinner Date.md" $demo_folder
mv "pages/1_journal/2024-03-23.md" $demo_folder
mv "pages/4_projects/Debian Setup.md" $demo_folder
Expand Down
Binary file added data/img/homepage_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/homepage_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/journal_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/journal_pg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/project_pg_1_w_prop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/project_pg_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/project_pg_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/projects_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/quick_notes_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/writings_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/img/writings_pg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions data/scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ class Config {
Object.entries(this.FOLDERS).map(([key, val]) => [val, key])
);


/**
* Non-user folders
* @type {string}
*/
EXCLUDED_FOLDER = "data/"

/**
* Page status to header text binding
* @type {Object.<string, string>}
Expand Down
13 changes: 8 additions & 5 deletions data/scripts/customUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ class CustomUtils extends customJS.Config.constructor {
* @returns Number of tasks fully completed
*/
completedTasks(dv) {
let taskResults = this.getTasks(dv, "t => t.fullyCompleted", '!"data"');
let taskResults = this.getTasks(
dv,
"t => t.fullyCompleted",
`!"${this.EXCLUDED_FOLDER}"`
);
return taskResults.length;
}

Expand All @@ -220,12 +224,11 @@ class CustomUtils extends customJS.Config.constructor {
*/
timeSpent(dv) {
let firstFile = dv.pages().file.sort((t) => t.ctime)[0];
// NOTE: dv date uses Luxon
// NOTE: dv uses Luxon
let totalDays = Math.ceil(
dv.date("now").diff(firstFile.ctime, "days").toObject().days
);
// exclude data folder
let allFiles = dv.pages('!"data"').file;
let allFiles = dv.pages(`!"${this.EXCLUDED_FOLDER}"`).file;
let totalFiles = allFiles.length;
let totalTasks = allFiles.tasks.length;

Expand All @@ -241,7 +244,7 @@ class CustomUtils extends customJS.Config.constructor {
recentlyModified(dv) {
dv.list(
dv
.pages('!"data"')
.pages(`!"${this.EXCLUDED_FOLDER}"`)
.sort((p) => p.file.mtime, "desc")
.limit(5).file.link
);
Expand Down

0 comments on commit ad08d18

Please sign in to comment.