Giter Site home page Giter Site logo

sebferrer / life-notes Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 0.0 3.46 MB

Android app - Chronic symptom tracking

Home Page: http://sebferrer.fr/life-notes

License: MIT License

TypeScript 66.94% HTML 21.78% SCSS 10.27% Dockerfile 0.22% JavaScript 0.79%
angular cordova ionic pouchdb rxjs bullet diary health pain symptom

life-notes's Introduction

life-notes

life-notes's People

Contributors

bastienguillon avatar sebferrer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

life-notes's Issues

Missing resources and bad scaling

I would like to be able to try this app, but it is unusable currently. It appears that the scaling is off, like it expects a much larger screen because only a fraction of the app is displayed. Also it looks like some icons or buttons are not available, and only the text id shows.
See attached image.
Note that I have a OnePlus 6T with a 2340 x 1080 px at 402 ppi display. I am running a custom ROM (LuisDroid crDroid), Android 11
Screenshot_20220203-100145_crDroid_Home
.

Add option to export as CSV

It would be useful to be able to export as a CSV to share with healthcare professionals.

I've made a node script to do this:

const converter = require("json-2-csv");
const fs = require("fs");

const input = require("./backup20230818T2113110100.json");

const flat = [];

const newRow = (date, time, logType, details) => ({
    date,
    time,
    logType,
    details,
});

for (const day of input?.days) {
    // TODO: symptomOverviews
    for (const symptom of day.symptoms) {
        for (const log of symptom?.logs) {
            flat.push(
                newRow(
                    day.date,
                    log.time,
                    "symptom",
                    `${log.key}, intensity: ${log.pain}/5`,
                ),
            );
        }
    }
    for (const log of day.logs) {
        flat.push(newRow(day.date, log.time, "note", log.key));
    }
    for (const med of day.meds) {
        flat.push(newRow(day.date, med.time, "medication", med.key));
    }
    for (const meal of day.meals) {
        flat.push(
            newRow(
                day.date,
                meal.time,
                "meal",
                meal.detail ? `${meal.key}. ${meal.detail}` : meal.key,
            ),
        );
    }
    // TODO: wakeUp and goToBed
}

flat.sort((a, b) => {
    const dateTime = (n) => new Date(`${n.date}T${n.time}:00Z`);
    return dateTime(b) - dateTime(a);
});

const output = converter.json2csv(flat);

fs.writeFileSync("./diary.csv", output);

To use, save the backup from the app, and copy it to your working folder as backup.json. Save the script above as convert.js.

Then, run:

npm install [email protected]
node ./convert.js

The output will be saved as diary.csv.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.