Giter VIP home page Giter VIP logo

petals's Introduction

Petals

License Unit Tests Lint Dependency Analysis Translation status GitHub Repo stars Gitmoji Git Secrets

Petals - An open source app to help users quit or control weed usage | Product Hunt ko-fi


The Open Source app Petals aims to help its users to either quit weed, reduce usage or simply know how much they're using.

Get it on GitHub Get it on F-Droid Get it on Play Store

โš ๏ธ The Google Play Store version contains advertisements

For an ad free experience download the app either from F-Droid or from the Releases Page.

Translations

Translations are hosted at Weblate. You can contribute to your language here

Translation status
Translation status

Screenshots

Open to see screenshots

More Screenshots

Building

Signed

The signed version (the one published to GitHub and PlayStore) can be built with:

./gradlew packageGithubReleaseUniversalApk

You must first decrypt secrets using git secret reveal

Unsigned

If you're building an unsigned version, build the same one that goes to FDroid (as FDroid signs the app themselves).

./gradlew packageFdroidReleaseUniversalApk

This approach doesn't require secrets.

Git Secrets

The Keystore, Keystore Properties and Google Play deploy json files are included in the repository using git secret. The current secret owners are:

  • Leonardo Colman Lopes

    • Fingerprint B3A5 9909 9ECC 4DB4 FD40 896F 7706 1922 C587 2792
    • Original Author
  • GitHub Actions

    • Fingerprint 882E 409C 71F4 565B 1698 B947 A992 5FF4 75B3 5E07
    • Auto-publishing signed app to GitHub
    • Expires on 2027-04-05
    • Available on environment secret GPG_KEY

Releasing

Release to all our channels are made automatically after a tag is released. The workflow responsible for doing that is release.main.kts.

Google Play Store

  1. Decrypt all git secrets
  2. Run ./gradlew packageGithubReleaseUniversalApk
  3. Publish to playstore running bundle config path vendor/bundle && bundle install --jobs 4 --retry 3 && bundle exec fastlane playstore

F-Droid

F-Droid builds automatically from the repository whenever a new tag is published. The definitions for how to build the app are in FDroid's data repository. If modifications are required, the place to change is there.

Releases Page

  1. Decrypt all git secrets
  2. Run ./gradlew packageGithubReleaseUniversalApk

petals's People

Contributors

albanobattistella avatar anshu-bijarnia avatar azmatroshan avatar comradekingu avatar degradka avatar dependabot[bot] avatar eugentoptic44 avatar evan-m7 avatar gbl17 avatar ivanchoff avatar jhomatas48 avatar krzema12 avatar leocolman avatar markopex avatar mikropsoft avatar mkicina avatar poussinou avatar quad-one avatar renovate[bot] avatar santossi avatar secularsteve avatar weblate avatar yellowrosecx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

petals's Issues

Improve Add Use Dialog

Current Add Use Dialog:

image

Content is located in this file

We want to make it clearer that both the Date and the Time field are editable. They currently don't look like editable, as they're greyed out.

  • Make Date and Time fields edit-ability clearer
  • Ensure that the entire date is in the same line, and not cut
  • Make currency icon locale-dependant #52

Add a "Break Period" functionality

As an user, I want to be able to set a period of the day as a break time, in which the app should remind me of the break before letting me add an use.


Implementation

image

  • Add a button/icon to manage the break period
  • Open a dialog with a selector for break start time and break end time
  • Persist the period and if it's enabled or not
  • Use the break period to make Add Use show a break is on-going
  • If the break period is active, Add Use should first add an "Are you sure?" dialog -- Should never disallow the button to be used
  • If the break period is active, add a persistent notification as a reminder -- Should be toggleable

Improve Hit Timer

  • Add a small vibration toggle for the end of the timer
  • Improve visual cue to more than just a blinking text

Add sound to hit timer

After creating #3, it's possible to further enhance the timer making a sound to warn users when to release the smoke

  • Implement timer sound
  • Add button to silence timer (start silent by default)

Crashes on symptoms page after adding usage

Install app
Add usage (5 grams, 10 /g)
Seevthe stat page with the ticking dtats isn't displayed properly
Tap nav item to go to symptoms page
App crashes
Even after restarts, keeps crashin on that page

Add Amount Used data

Instead of having a Quit Date button in the Home page we should have an "Add Use" button, that is able to record how much is used and display this information to the user.

Branch: feature/amount-used-data

Add setting for date format

Is your feature request related to a problem? Please describe.
Today I'm forced to use the date/time format that the app specifies

Describe the solution you'd like
In the settings screen I'd like to customize date and time format

Export data

  • As CSV
  • As PDF
  • Summarized graphs? Pizza charts?

Cleanup dependencies and versions

At the moment, some dependencies are in

buildSrc/Libs

Some are hardcoded in app/build.gradle.kts

Ideally we should keep all versions in Libs.kts.

F-Droid build failed

AILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle

Could you please take a look? Thanks!

Change logo

It would be better to have a logo that doesn't contain a reference to Cannabis. This would be better to allow situations with eaves-droppers.

Taking suggestions.

Add visual cues to hit timer

With #3 we might want to have more visual cues to the timer other than a single countdown.

This would allow the user to set the phone aside while waiting for the timer, and a blinking screen might be a better visual warning

  • Add blinking screen
  • Find an icon that represents a blinking screen
  • Add a toggle for the blinking screen - starts off by default

Add Dark Mode

Is your feature request related to a problem? Please describe.
When using this app I am mostly outside in the dark and my eyes start to get red, also from the blindingly bright screen.

Describe the solution you'd like
I'd like to have an option to turn the app into dark mode which would be a little easier on the eyes.

Describe alternatives you've considered
I tried to turn down the brightness but I was still in discomfort of the brightness. Also I know there is an option "Override Force Dark" or similar, allowing to turn any app into a non-eye-straining experience but it doesn't work in this app.
Another addition could be to adapt to the phones setting, because my phone is already set to dark.

Additional context
Yes.

Create timer

  • Hit timer navigation
  • Countdown timer
  • Start Button
  • Restart Button
  • Stop Button (returns to max time and pauses)

Hit timer

Studies (quote missing) have shown that holding a hit in for longer won't increase your high, but will increase your lung damage, your coughing and others.

For damage reduction purposes, adding a quick "Hit Timer" to measure this can be very beneficial to users

Add a way to track successful/failed pauses

With the Break/Pause feature, it would be interesting as an user to know how successful that pause period has been for me.

The app https://github.com/iSoron/uhabits displays habit-tracking in a beautiful way:

image

We can leverage that idea and include a tracker specifically for the break period, giving a bigger sense of accomplishment.


To add to the discussion, should the Pause feature get a page to itself?
If we plan to escalate the feature to include things like Tolerance breaks, a dialog is way too simple for this

Add auto publish to Google Play Store

At the moment we only have a release pipeline to FDroid. We must have one for Google Play Store, as it's currently being updated manually

  • Add secret to github CI -> PLAY_CONFIG_JSON_BASE64
  • Prepare fastlane file

Dynavap Integration

The Dynavap vaporizer has a particularity: It produces a distinctive sound when it's ready and it means you'll start smoking.

With that in mind, a possible integration with Petals is possible, enabling the hit timer to start when the dynavap click is heard

  • Find dynavap click recordings
  • Understand how to identify them through mixed microphone audio (if that's even possible)
  • Add this experimental integration to the app and await feedback

Add more information to use

One might want to classify their usage for different kinds of plants (for example, days of Sativa vs days of Indica) to analyze the data with more dimensions.

  • Genetics (Bagweed, Sativa, Indica, ...)
  • Consumption method (smoked, vaporized, bonged, ...)
  • Objective/purpose ?
  • Group Size/alone
  • Possible triggers (anxiety, stress?)

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.