Compare commits

..

No commits in common. "601eb63f3a63100c05f0a712bb13e87c0dd0f6f0" and "8ff9ce269d0bb5f18e290405792c3c6cf443cc57" have entirely different histories.

7 changed files with 6 additions and 62 deletions

2
Cargo.lock generated
View file

@ -147,7 +147,7 @@ dependencies = [
[[package]]
name = "aliveline"
version = "0.2.1"
version = "0.2.0"
dependencies = [
"chrono",
"serde",

View file

@ -1,6 +1,6 @@
[package]
name = "aliveline"
version = "0.2.1"
version = "0.2.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -16,8 +16,7 @@ By clicking on the timeline in Record mode you can hide controls to make app sma
Review mode may be used to show some activity, tracked on another day:
![Review mode example](images/review.png)
Aliveline currently supports Linux only, but Windows executable seems to work.
You can also compile Aliveline yourself (see building section).
Aliveline currently supports Linux only, but you can compile it to your platform.
## Features
@ -39,8 +38,7 @@ Requirements:
- Slint dependencies (see [Platforms](https://docs.slint.dev/latest/docs/slint/guide/platforms/desktop/) and [Backends & Renderers](https://docs.slint.dev/latest/docs/slint/guide/backends-and-renderers/backends_and_renderers/))
Instructions:
Just run `cargo build --release` and the resulting binary can be located at `target/release/aliveline[.exe]` if compilation succeeds.
If compilation fails, double check that you have all required dependencies. If it still fails, file an issue on [Codeberg](https://codeberg.org/2ndbeam/aliveline/issues), including logs and system info.
Run `cargo build --release`
## Usage
@ -48,7 +46,6 @@ Just run `aliveline` by any preferred way, for example:
```
$ ./aliveline
```
or via file explorer.
## Configuration
Aliveline tries to find config at:
@ -65,4 +62,4 @@ If config isn't found, Aliveline uses default values defined in [config.toml](ht
Keep in mind that default paths are relative, and in this case logs will be written to and read from current working directory.
## Contribution
You can contribute to Aliveline by creating an issue/PR on [Codeberg mirror](https://codeberg.org/2ndbeam/aliveline/issues)
You can contribute to Aliveline by creating an issue/PR on [Codeberg mirror](https://codeberg.org/2ndbeam/aliveline)

View file

@ -1,43 +0,0 @@
#!/bin/sh
print_usage() {
echo "Usage: scripts/bundle.sh [TARGET]"
}
fail() {
echo "$1"
exit 1
}
if [ ! -n "$1" ]; then
print_usage
exit 1
fi
toml --version > /dev/null || fail "toml-cli is required to fetch version from Cargo.toml"
version=$(toml get -r Cargo.toml package.version)
target=$1
extension=""
case "$target" in
*"windows"*)
exe=".exe"
;;
esac
echo "Building aliveline$exe for $target..."
cargo build --release --target $target || fail "Could not build aliveline for target $target"
prefix=target/$target/release
binary_name=aliveline-$version-$target$exe
echo "Renaming aliveline$exe to $binary_name..."
mv -v $prefix/aliveline$exe $prefix/$binary_name
echo "Computing checksum..."
cd $prefix
sha256sum $binary_name > $binary_name.sha256

View file

@ -42,7 +42,7 @@ pub fn load_config() -> Config {
}
println!("Config not found at ${place_var} / {place:?}");
}
println!("Using config path ./config.toml");
println!("Using last resort config path ./config.toml");
Config::new(PathBuf::from("./config.toml"))
}
/// Get random-like color id in range 0..16 by computing string hash

View file

@ -8,9 +8,6 @@ use chrono::{Datelike, Timelike};
use slint::{Color, Model, ModelRc, SharedString, ToSharedString, VecModel, Weak};
use toml::value::{Date as TomlDate, Time};
const DEFAULT_WINDOW_WIDTH: f32 = 800.;
const DEFAULT_WINDOW_HEIGHT: f32 = 600.;
slint::include_modules!();
impl From<Event> for TimelineEvent {
@ -109,7 +106,6 @@ fn main() -> Result<(), Box<dyn Error>> {
load_colors(ui_weak, config_arc);
ui.invoke_update_record_offset(offset as i32);
ui.invoke_update_window_size(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT);
ui.on_fetch_log({
let config = config.clone();

View file

@ -11,7 +11,6 @@ export component AppWindow inherits Window {
callback new-day-started <=> record.new-day-started;
callback get-previous-event <=> record.get-previous-event;
callback update-record-offset(int);
callback update-window-size(length, length);
callback save-log;
callback fetch-log <=> review.fetch-log;
@ -22,11 +21,6 @@ export component AppWindow inherits Window {
record.offset = new-offset;
}
update-window-size(width, height) => {
self.width = width;
self.height = height;
}
in-out property record-events <=> record.events;
in-out property record-offset <=> record.offset;
in-out property record-visible-time <=> record.visible-time;