Skip to content

Commit

Permalink
merge with remote
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo committed Aug 30, 2018
2 parents 56fd907 + 2a3bd28 commit cf61fe6
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 12 deletions.
10 changes: 10 additions & 0 deletions docs/tiddlers/HabitExample.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
created: 20180827144553783
days_cooldown: 1
days_done: [[2018-08-28 10:51:23]] [[2018-08-28 10:53:21]] [[2018-08-28 10:55:37]]
gold_reward: -10
modified: 20180828172648181
revision: 0
tags: Habit
title: Fall into social media spiral of chaos and vain novelty :(
xp_reward: -2

15 changes: 14 additions & 1 deletion docs/tiddlers/Introduction.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
created: 20180826044241098
modified: 20180828073400709
modified: 20180828172555339
revision: 0
tags: Docs Habito
title: Introduction
Expand Down Expand Up @@ -39,3 +39,16 @@ This system will allow you to buy a reward without sufficient funds. However, be
Examples:

* [[Videojuego]]

!! Habits

This will help you track your habits. Reinforce a good habit and get more gold and xp, reinforce a bad habit and get penalized with a discount on gold and xp. To create a habit, just add the tag <<tag Habit>> to a tiddler. Set the following fields:

| !gold_reward|The reward when this habit is reinforced. This can be a negative number, meaning it is a bad habit. |
| !xp_reward|The experience reward. It can also be negative. |
| !days_cooldown|How many days will the cooldown last. The button will appear brighter when cooling down, indicating the habit has been hitted recently. |
| !days_done|Leave blank. This will hold the list of datetimes when the habit button was hitted. |

! What if I cheat?

This tool won't help much if you decide to deceive your own system of rewards and penalties. There is no app for that, unless you hire some third party to punish and reward you, independently of your will. To avoid this you must also hack your mind and your environment. A friend recommended me [ext[zen habits|https://zenhabits.net/archives/]] blog and I bet there are other methods to improve your concentration and motivation.
6 changes: 0 additions & 6 deletions docs/tiddlers/Llenar el ecofiltro.tid

This file was deleted.

6 changes: 3 additions & 3 deletions plugins/Guitlle/habito/Habito.tid
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
created: 20180826045249890
gold: 110
gold: 250
modified: 20180830232446552
title: Habito
type: application/x-tiddler
xp: -4
xp: 13

<div class="habito-coimage"> <span class="amount"> {{!!gold}} </span> <span>{{$:/plugins/Guitlle/habito/images/coin.png}}</span> </div>
<div class="habito-coimage"> <span class="amount"> {{!!xp}} </span> <span> experience</span> </div>

<div class="habito-display">
<$macrocall $name="tabs" tabsList="$:/plugins/Guitlle/habito/habitsView $:/plugins/Guitlle/habito/dailiesView $:/plugins/Guitlle/habito/rewardsView" default="$:/plugins/Guitlle/habito/dailiesView" state="$:/state/tab/habito" />
</div>
</div>
22 changes: 22 additions & 0 deletions plugins/Guitlle/habito/habitButton.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
created: 20180828155306887
list-before: $:/core/ui/ViewTemplate/title
modified: 20180828170036075
tags: $:/tags/ViewTemplate
title: $:/plugins/Guitlle/habito/habitButton

<$list filter="[all[current]tag[Habit]]" variable="tag_name">
<$wikify name="dateEntry" text="""<$macrocall $name="now" format="YYYY-0MM-DD 0hh:0mm:0ss"/>""">
<$wikify name="dateEntry_brackets" text="""<$text text='[['/><<dateEntry>><$text text=']]'/>""">
<$wikify name="cooldown" text="""{{{[list[!!days_done]titledate:toOffsetFromDate[]!compare:greater{!!days_cooldown}first[]count[]]}}}""">
<$wikify name="positive" text="""<$calc>({{!!gold_reward}} >= 0)?1:0</$calc>""">
<$wikify name="widget_class" text="""<$list filter="[<cooldown>compare:equal[1]]">habito-habit-cooldown </$list><$list filter="[<positive>compare:equal[1]]" emptyMessage=" habito-habit-negative"> habito-habit-positive</$list> habito-btn-wrapper""">
<div class=<<widget_class>>>
<$button class="habito-btn habit-btn">
<$action-listops $field="days_done" $subfilter=<<dateEntry_brackets>>/>
<$action-setfield-mathjs $tiddler="Habito" $field="gold" $eval="gold + gold_reward" gold_reward={{!!gold_reward}} />
<$action-setfield-mathjs $tiddler="Habito" $field="xp" $eval="xp + xp_reward" xp_reward={{!!xp_reward}} />
·
</$button>
<$list filter=[list[!!days_done]titledate:toOffsetFromDate[]last[]!compare:equal[NaN]]><span class="habito-btn-caption"><<currentTiddler>></span> </$list>
</div>
</$wikify></$wikify></$wikify></$wikify></$wikify></$list>
2 changes: 1 addition & 1 deletion plugins/Guitlle/habito/plugin.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "$:/plugins/Guitlle/habito",
"description": "Habitica like habit tracker for tiddlywiki.",
"author": "Guitlle",
"version": "0.1.1",
"version": "0.1.3",
"core-version": ">=5.0.0",
"plugin-type": "plugin",
"list": ""
Expand Down
2 changes: 1 addition & 1 deletion plugins/Guitlle/habito/styles.css.tid
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ type: text/css
font-weight: bold;
display: inline-block;
height: 25px;
}
}

0 comments on commit cf61fe6

Please sign in to comment.