Skip to content

Commit

Permalink
update application name to neuronek
Browse files Browse the repository at this point in the history
merge side-project which was intented to build small dosage tracker into
main branch of project. since now `psylog` will be developed as
`neuronek` as fundamentally it's the same thing. Enough research on
`psylog` was made to be implemented into `neuronek`
  • Loading branch information
keinsell committed Dec 31, 2024
1 parent 74c58d5 commit 17682ce
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 284 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- next
- trunk
- release/*
- feature/*
- bugfix/*
Expand All @@ -14,6 +15,7 @@ on:
branches:
- next
- main
- trunk
- release/*
- feature/*
- bugfix/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
repository: "keinsell/psylog"
repository: "keinsell/neuronek"
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
# So we have access to the formula
- name: Fetch homebrew formulae
Expand Down
2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
rust = "nightly"
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cargo-features = ["edition2024"]

[package]
name = "psylog"
name = "neuronek"
description = "🧬 Intelligent dosage tracker application for monitoring supplements, nootropics and psychoactive substances along with their long-term influence on one's mind and body."
authors = ["Jakub Olan <[email protected]>"]
version = "0.0.0-dev.5"
edition = "2024"
repository = "https://github.com/keinsell/psylog"
repository = "https://github.com/keinsell/neuronek"

[[bin]]
name = "psylog"
name = "neuronek"
path = "src/main.rs"

[package.metadata.wix]
Expand Down
64 changes: 26 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Psylog
# Neuronek

🧬 Intelligent dosage tracker application for monitoring supplements, nootropics and psychoactive substances along with
their long-term influence on one's mind and body.
Expand All @@ -7,20 +7,15 @@ their long-term influence on one's mind and body.

## About

Psylog is an intelligent dosage tracking application designed to monitor and log the use of supplements, nootropics, and
psychoactive substances. By recording and analyzing ingestions, it helps users better understand the long-term effects
Neuronek is an intelligent dosage tracking application designed to monitor and log the use of supplements, nootropics, and
psychoactive substances. By recording and analyzing ingestion, it helps users better understand the long-term effects
of these compounds on their physical and mental health.

The project originated as a streamlined, minimal viable product (MVP), branching out from
the [Neuronek](https://github.com/keinsell/neuronek) project. While Neuronek focuses on broader neurological insights,
Psylog provides a laser-focused solution for personal consumption tracking and journaling, offering a simple yet robust
interface to build meaningful reports and integrations.

## Getting Started

### Installation

To install the application, please visit the [GitHub Releases Page](https://github.com/keinsell/psylog/releases) for
To install the application, please visit the [GitHub Releases Page](https://github.com/keinsell/neuronek/releases) for
pre-built binaries and installation instructions for your platform. Alternatively, you can install the application from
supported package managers or build it from source.

Expand All @@ -36,25 +31,25 @@ supported package managers or build it from source.

[//]: # (|----------------------------|-----------------|------------------------------------|)

[//]: # (| **macOS** | Homebrew | `brew install keinsell/tap/psylog` |)
[//]: # (| **macOS** | Homebrew | `brew install keinsell/tap/neuronek` |)

[//]: # (| **Windows** | Scoop | `scoop install psylog` |)
[//]: # (| **Windows** | Scoop | `scoop install neuronek` |)

[//]: # (| **Linux &#40;Debian/Ubuntu&#41;** | APT | `apt install psylog` |)
[//]: # (| **Linux &#40;Debian/Ubuntu&#41;** | APT | `apt install neuronek` |)

[//]: # (| **Linux &#40;Arch Linux&#41;** | Pacman | `pacman -S psylog` |)
[//]: # (| **Linux &#40;Arch Linux&#41;** | Pacman | `pacman -S neuronek` |)

[//]: # (| **Linux &#40;Fedora/CentOS&#41;** | DNF | `dnf install psylog` |)
[//]: # (| **Linux &#40;Fedora/CentOS&#41;** | DNF | `dnf install neuronek` |)

[//]: # (| **Linux/NixOS/nix-darwin** | Nix | `dnf install psylog` |)
[//]: # (| **Linux/NixOS/nix-darwin** | Nix | `dnf install neuronek` |)

#### Installation from source (Advanced)

Application can be installed with `cargo` and providing url to this repository,
this may be the most conformable way for users which are looking for the latest version of application.

```
cargo install --git https://github.com/keinsell/psylog
cargo install --git https://github.com/keinsell/neuronek
```

**Note:** This method might be best for users who always want the absolute newest version of the application. However,
Expand Down Expand Up @@ -90,7 +85,7 @@ This data is stored in a low-level database that serves as the foundation for fu
such as journaling, analytics, or integrations with external tools.
While power users may prefer to work directly with this raw data,
many user-friendly abstractions are planned to make this process seamless,
such as simplified commands (e.g., `psylog a coffee`) for quicker entries.
such as simplified commands (e.g., `neuronek a coffee`) for quicker entries.

Logging ingestions not only serves the purpose of record-keeping
but also helps users build a personalized database of their consumption habits.
Expand All @@ -100,7 +95,7 @@ providing insights into the long-term effects of different substances on physica
An example usage of the `log ingestion` feature is shown below:

```bash
psylog ingestion log caffeine 80mg
neuronek ingestion log caffeine 80mg

+----+----------------+--------+----------------------+-------------------------------+
| id | substance_name | route | dosage | ingested_at |
Expand All @@ -123,7 +118,7 @@ ensuring that users stay informed about their habits and their long-term impact
##### List Ingestions

```bash
psylog ingestion list
neuronek ingestion list

+----+----------------+---------------+----------------------+----------------------------+
| id | substance_name | route | dosage | ingested_at |
Expand All @@ -148,7 +143,7 @@ except `id` and `created_at` can be updated, providing flexibility in maintainin
useful when correcting data entry errors or adding additional information to an existing record.

Users can update ingestions using the following command structure:
```psylog ingestion update <id> [options]```
```neuronek ingestion update <id> [options]```

Available update options:

Expand All @@ -158,7 +153,7 @@ Available update options:
- `-t, --time`: Adjust the ingestion timestamp (can be represented in a relative format eg. "now" or "1 hour ago")

```bash
psylog ingestion list
neuronek ingestion list

+----+----------------+---------------+----------------------+----------------------------+
| id | substance_name | route | dosage | ingested_at |
Expand All @@ -183,22 +178,22 @@ unique ID. Here's how it works:
Command syntax:

```
psylog ingestion delete <id>
neuronek ingestion delete <id>
```

Example usage:

```bash
# View current ingestions
psylog ingestion list
neuronek ingestion list
+----+----------------+--------+----------+----------------------------+
| id | substance_name | route | dosage | ingested_at |
+----+----------------+--------+----------+----------------------------+
| 36 | caffeine | "oral" | 80 mg | 2024-12-18 08:14:37.211076 |
+----+----------------+--------+----------+----------------------------+

# Delete ingestion with ID 36
psylog ingestion delete 36
neuronek ingestion delete 36
```

The command removes the specified ingestion record permanently. Verify deletion by running `psylog ingestion list`
Expand Down Expand Up @@ -234,26 +229,19 @@ friendly human interface.

*Roadmap is a subject to change and one that is presented here is a high-level overview of direction of the project.*

Psylog is an ongoing project with many planned features and improvements. Some of the key areas of development include:
neuronek is an ongoing project with many planned features and improvements. Some of the key areas of development include:

- **Journaling**: A user-friendly interface for creating and managing journal entries related to ingestions, thoughts,
and experiences.
- **Analytics**: Advanced data analysis tools to help users visualize trends, patterns, and correlations in their
consumption habits.
- **Integrations**: Seamless integration with external tools, APIs, and services to enhance the user experience and
provide additional insights.
- **Customization**: Personalization options for tailoring the application to individual preferences, such as themes,
layouts, and data views.
- **Security**: Enhanced security features to protect user data and ensure privacy, including encryption,
authentication, and access controls.
- **Cloud Sync**: Synchronization capabilities for storing data in the cloud and accessing it across multiple devices or
platforms.
- **Terminal User Interface**: Friendly and efficient interactive interface for terminal application.
- **Web Application**
- **Desktop/Mobile Application**
- **Cloud Sync**


## Contributing

Project do not expect any external contribution. If you want to contribute, please take a look
at [keinsell/neuronek](https://github.com/keinsell/neuronek)
project or contact me directly via [[email protected]]() and we can discuss the project together and move code to
Project do not expect any external contribution. If you want to contribute, please contact me directly via [[email protected]]() and we can discuss the project together and move code to
organization out of my profile.

See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
Expand Down
2 changes: 1 addition & 1 deletion dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ci = "github"
# The installers to generate for each app
installers = ["shell", "powershell", "homebrew", "msi"]
# A GitHub repo to push Homebrew formulas to
tap = "keinsell/psylog"
tap = "keinsell/neuronek"
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
# Path that installers should place binaries in
Expand Down
2 changes: 1 addition & 1 deletion src/lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Default for Config

if cfg!(test) || cfg!(debug_assertions)
{
journal_path = temp_dir().join("psylog.sqlite");
journal_path = temp_dir().join("neuronek.sqlite");
}

info!("Using database file at: {}", journal_path.display());
Expand Down
17 changes: 8 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ lazy_static! {
std::str::from_utf8(&Resources::get("small.flf").unwrap().data).unwrap()
)
.unwrap();
static ref FIGURE: figlet_rs::FIGure<'static> = FIGFONT.convert("psylog").unwrap();
static ref FIGURE: figlet_rs::FIGure<'static> = FIGFONT.convert("neuronek").unwrap();
}

fn default_output_format() -> OutputFormat {
Expand Down Expand Up @@ -75,7 +75,7 @@ pub enum OutputFormat {

fn default_complete_shell() -> clap_complete::Shell
{
clap_complete::shells::Shell::from_env().unwrap()
clap_complete::shells::Shell::from_env().unwrap_or(clap_complete::Shell::Bash)
}

#[derive(Debug, Parser)]
Expand Down Expand Up @@ -129,13 +129,15 @@ impl CommandHandler for ApplicationCommands
}

#[async_std::main]
async fn main()
async fn main() -> miette::Result<()>
{
setup_diagnostics();
setup_logger();

let cli = CLI::parse();

migrate_database(&DATABASE_CONNECTION).await?;

// TODO: Perform a check of completion scripts existance and update them or install them
// https://askubuntu.com/a/1188315
// https://github.com/scop/bash-completion#faq
Expand All @@ -147,12 +149,9 @@ async fn main()
output_format: cli.output_format,
};

migrate_database(context.database_connection)
.await
.expect("Database migration failed!");

cli.command
.handle(context)
.await
.expect("Failed to execute command!");
.await?;

Ok(())
}
2 changes: 1 addition & 1 deletion tests/log_ingestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::process::Command;
#[test]
fn test_log_ingestion() -> Result<(), Box<dyn std::error::Error>>
{
let mut cmd = Command::cargo_bin("psylog")?;
let mut cmd = Command::cargo_bin("neuronek")?;
cmd.arg("ingestion").arg("log").arg("caffeine").arg("100mg");
cmd.assert().success();

Expand Down
4 changes: 2 additions & 2 deletions tests/update_ingestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use std::process::Command;
#[test]
fn test_update_ingestion() -> Result<(), Box<dyn std::error::Error>>
{
let mut cmd = Command::cargo_bin("psylog")?;
let mut cmd = Command::cargo_bin("neuronek")?;
cmd.arg("ingestion").arg("log").arg("caffeine").arg("100mg");
cmd.assert().success();

let mut cmd2 = Command::cargo_bin("psylog")?;
let mut cmd2 = Command::cargo_bin("neuronek")?;
cmd2.arg("ingestion").arg("update").arg("1").arg("-d 200mg");
cmd2.assert().success();

Expand Down
Loading

0 comments on commit 17682ce

Please sign in to comment.