Remove accidentially added files from repository

This commit is contained in:
Thomas Lauf 2018-12-06 13:36:17 +01:00
parent c416b48612
commit 9598f01fcf
39 changed files with 0 additions and 2517 deletions

View file

@ -1,13 +0,0 @@
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
[**/man/**]
insert_final_newline = false

View file

@ -1,88 +0,0 @@
# Project Title
One Paragraph of project description goes here
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
What things you need to install the software and how to install them
```
Give examples
```
### Installing
A step by step series of examples that tell you have to get a development env running
Say what the step will be
```
Give the example
```
And repeat
```
until finished
```
End with an example of getting some data out of the system or using it for a little demo
## Running the tests
Explain how to run the automated tests for this system
### Break down into end to end tests
Explain what these tests test and why
```
Give an example
```
### And coding style tests
Explain what these tests test and why
```
Give an example
```
## Deployment
Add additional notes about how to deploy this on a live system
## Built With
* [Dropwizard](http://www.dropwizard.io/1.0.2/docs/) - The web framework used
* [Maven](https://maven.apache.org/) - Dependency Management
* [ROME](https://rometools.github.io/rome/) - Used to generate RSS Feeds
## Contributing
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).
## Authors
* **Billie Thompson** - *Initial work* - [PurpleBooth](https://github.com/PurpleBooth)
See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Acknowledgments
* Hat tip to anyone who's code was used
* Inspiration
* etc

View file

@ -1,57 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
cat <<EOF > ${TIMEWARRIORDB}/timewarrior.cfg
exclusions.monday = <9:00 >20:00
exclusions.tuesday = <9:00 >20:00
exclusions.wednesday = <9:00 >20:00
exclusions.thursday = <9:00 >20:00
exclusions.friday = <9:00 >20:00
exclusions.saturday = <9:00 >20:00
exclusions.sunday = <9:00 >20:00
reports.day.hours = auto
reports.week.hours = auto
reports.month.hours = auto
EOF
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track "${YESTERDAY}T1200" - "${YESTERDAY}T1400" FOO
src/timew start "${YESTERDAY}T1900" BAR
#src/timew week :month
echo "TI-103-1.sh: open interval from yesterday"

View file

@ -1,58 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
cat <<EOF > ${TIMEWARRIORDB}/timewarrior.cfg
exclusions.monday = <9:00 >20:00
exclusions.tuesday = <9:00 >20:00
exclusions.wednesday = <9:00 >20:00
exclusions.thursday = <9:00 >20:00
exclusions.friday = <9:00 >20:00
exclusions.saturday = <9:00 >20:00
exclusions.sunday = <9:00 >20:00
reports.day.hours = auto
reports.week.hours = auto
reports.month.hours = auto
EOF
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track "${YESTERDAY}T1200" - "${YESTERDAY}T1400" FOO
src/timew track "${YESTERDAY}T1900" - "${YESTERDAY}T2000" BAR1
src/timew start "${TODAY}T0900" BAR2
#src/timew week :month
echo "TI-103-2.sh: open interval today"

View file

@ -1,56 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
cat <<EOF > ${TIMEWARRIORDB}/timewarrior.cfg
exclusions.monday = <9:00 >20:00
exclusions.tuesday = <9:00 >20:00
exclusions.wednesday = <9:00 >20:00
exclusions.thursday = <9:00 >20:00
exclusions.friday = <9:00 >20:00
exclusions.saturday = <9:00 >20:00
exclusions.sunday = <9:00 >20:00
reports.day.hours = auto
reports.week.hours = auto
reports.month.hours = auto
EOF
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track "${YESTERDAY}T1200" - "${YESTERDAY}T1400" FOO
#src/timew week :month
echo "TI-103.sh: no open interval"

View file

@ -1,58 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
cat <<EOF > ${TIMEWARRIORDB}/timewarrior.cfg
exclusions.monday = <9:00 >20:00
exclusions.tuesday = <9:00 >20:00
exclusions.wednesday = <9:00 >20:00
exclusions.thursday = <9:00 >20:00
exclusions.friday = <9:00 >20:00
exclusions.saturday = <9:00 >20:00
exclusions.sunday = <9:00 >20:00
reports.day.hours = auto
reports.week.hours = auto
reports.month.hours = auto
EOF
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track "${YESTERDAY}T1200" - "${YESTERDAY}T1400" FOO
src/timew track "${YESTERDAY}T1900" - "${YESTERDAY}T2000" BAR1
src/timew track "${TODAY}T0900" - "${TODAY}T1200" BAR2
#src/timew week :month
echo "TI-103-4.sh: closed interval today"

View file

@ -1,51 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
cat <<EOF > ${TIMEWARRIORDB}/timewarrior.cfg
reports.day.hours = auto
reports.week.hours = auto
reports.month.hours = auto
EOF
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track "${YESTERDAY}T1200" - "${YESTERDAY}T1400" FOO
src/timew track "${YESTERDAY}T1900" - "${YESTERDAY}T2000" BAR1
src/timew start "${TODAY}T0900" BAR2
#src/timew week :month
echo "TI-103-4.sh: open interval today (no exclusions)"

View file

@ -1,13 +0,0 @@
#!/bin/bash
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
timew start ${YESTERDAY}T124452Z homework
timew month
timew week
timew day

View file

@ -1,39 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/mnt/smalldisk/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")

View file

@ -1,42 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew start 5min ago "Numbers 1 2 3 Somewhere" "\"one-quoted-word\""
src/timew stop

View file

@ -1,42 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew start 5min ago "Numbers 1 2 3 Somewhere" "'one-quoted-word'"
src/timew stop

View file

@ -1,42 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew start 5min ago 'foo' '\"quoted words\"'
#src/timew stop :debug

View file

@ -1,42 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew start 5min ago 'Numbers 1 2 3 Somewhere' '"one-quoted-word"'
src/timew stop

View file

@ -1,46 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track ${two_hours_before} - ${two_hours_before}
src/timew track ${one_hour_before} - ${one_hour_before}
src/timew summary :year :ids
src/timew move @2 ${three_hours_before}
#src/timew move @2 2018-08-01

View file

@ -1,47 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/tmp/timewarriordb
mkdir -p ${TIMEWARRIORDB}
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew get dom.active.tag.0
src/timew start FOO
src/timew get dom.active.tag.0
src/timew get dom.active.tag.1

View file

@ -1,42 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track ${one_hour_before} - ${one_hour_after} AHEAD
src/timew track ${one_hour_after} - ${two_hours_after} FUTURE

View file

@ -1,41 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/home/lauft/Projects/timew/timewarriordb
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")
src/timew track ${one_hour_before} - ${one_hour_after}

View file

@ -1,40 +0,0 @@
#!/bin/bash
TODAY=$(date "+%Y%m%d")
YESTERDAY=$(date -d "yesterday" "+%Y%m%d")
CURRENT_HOUR=$(date +%k)
function get_current_date_with_delta()
{
local delta=${1}
let "hour = CURRENT_HOUR + delta"
if [[ ${hour} -lt 0 ]] ; then
let "hour = hour + 24"
day=${YESTERDAY}
else
day=${TODAY}
fi
if [[ ${hour} -lt 10 ]] ; then
hour="0${hour}"
fi
echo "${day}T${hour}0000"
}
export TIMEWARRIORDB=/tmp/timewarriordb
mkdir -p ${TIMEWARRIORDB}
rm -f ${TIMEWARRIORDB}/data/*.data
:> ${TIMEWARRIORDB}/timewarrior.cfg
five_hours_before=$(get_current_date_with_delta "-5")
four_hours_before=$(get_current_date_with_delta "-4")
three_hours_before=$(get_current_date_with_delta "-3")
two_hours_before=$(get_current_date_with_delta "-2")
one_hour_before=$(get_current_date_with_delta "-1")
current_hour=$(get_current_date_with_delta "0")
one_hour_after=$(get_current_date_with_delta "1")
two_hours_after=$(get_current_date_with_delta "2")

View file

@ -1,10 +0,0 @@
# top-most EditorConfig file
root = false
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

View file

@ -1,6 +0,0 @@
#!/usr/bin/env python
import sys
for line in sys.stdin:
print line.strip()

View file

@ -1,23 +0,0 @@
#!/bin/bash
current_branch=$(git symbolic-ref HEAD 2>/dev/null) || { echo "you are on a unnamed branch" ; exit 1 ; }
current_branch=${current_branch##refs/heads/}
git diff-index --quiet HEAD -- || { echo "you have unstaged changes" ; exit 1 ; }
branches=$(git for-each-ref --format='%(refname:short)' refs/heads/)
echo "We are currently on ${current_branch}"
for branch in ${branches}; do
if [[ ${branch%%/*} == 'feature' || ${branch} =~ TI-[0-9]+ ]] ; then
git checkout ${branch}
git rebase 1.1.0 || break
else
echo "skipping branch ${branch}"
continue
fi
done
git checkout ${current_branch}

View file

@ -1,36 +0,0 @@
#include "GranularDatetime.h"
#include <Datetime.h>
#include <timew.h>
#include <format.h>
GranularDatetime::GranularDatetime(Rules &rules, const std::string &input, const std::string &format) : Datetime()
{
if (!input.empty()) {
std::string::size_type start = 0;
if (! parse (input, start, format))
throw ::format ("'{1}' is not a valid date in the '{2}' format.", input, format);
}
debug (::format ("Granular time, input {1}", this->toISOLocalExtended()));
if (rules.has("record.granularity"))
this->correct_for_granularity(rules.getInteger("record.granularity", 0));
debug (::format ("Granular time, output {1}", this->toISOLocalExtended()));
}
void GranularDatetime::correct_for_granularity(int granularity)
{
debug (::format ("Granularity set to {1}", granularity));
int seconds = this->second();
int minutes = this->minute();
debug (::format ("Seconds {1}, minutes {2}", seconds, minutes));
int minute_delta = granularity == 0 ? 0 : minutes % granularity;
debug (::format ("Seconds {1}, minutes {2}", seconds, minutes-minute_delta));
this->_date -= minute_delta*60 + seconds;
}

View file

@ -1,16 +0,0 @@
#ifndef GRANULARDATETIME_H
#define GRANULARDATETIME_H
#include <Rules.h>
#include <Datetime.h>
class GranularDatetime : public Datetime
{
public:
GranularDatetime(Rules &rules, const std::string& input = "", const std::string& format = "");
private:
void correct_for_granularity(int granularity);
};
#endif // GRANULARDATETIME_H

View file

@ -1,35 +0,0 @@
#include <LegacyRulesWrapper.h>
LegacyRulesWrapper::LegacyRulesWrapper(Rules &rules)
: _rules(rules)
{}
bool LegacyRulesWrapper::has (const std::string& key) const
{
return _rules.has(key);
}
std::string LegacyRulesWrapper::get (const std::string& key) const
{
return _rules.get(key);
}
int LegacyRulesWrapper::getInteger (const std::string& key, int defaultValue) const
{
return _rules.getInteger(key, defaultValue);
}
double LegacyRulesWrapper::getReal (const std::string& key) const
{
return _rules.getReal(key);
}
bool LegacyRulesWrapper::getBoolean (const std::string& key) const
{
return _rules.getBoolean(key);
}
std::vector <std::string> LegacyRulesWrapper::all (const std::string& stem = "") const
{
return _rules.all(stem);
}

View file

@ -1,24 +0,0 @@
#ifndef INCLUDED_LEGACYRULESWRAPPER
#define INCLUDED_LEGACYRULESWRAPPER
#include <Rules.h>
#include <RulesProvider.h>
class LegacyRulesWrapper : public RulesProvider
{
public:
explicit LegacyRulesWrapper(Rules &rules);
bool has (const std::string&) const override;
std::string get (const std::string&) const override;
int getInteger (const std::string&, int defaultValue) const override;
double getReal (const std::string&) const override;
bool getBoolean (const std::string&) const override;
std::vector <std::string> all (const std::string& stem) const;
private:
Rules& _rules;
};
#endif

View file

@ -1,16 +0,0 @@
#ifndef INCLUDED_RULESPROVIDER
#define INCLUDED_RULESPROVIDER
class RulesProvider
{
public:
virtual bool has (const std::string&) const = 0;
virtual std::string get (const std::string&) const = 0;
virtual int getInteger (const std::string&, int defaultValue) const = 0;
virtual double getReal (const std::string&) const = 0;
virtual bool getBoolean (const std::string&) const = 0;
virtual std::vector <std::string> all (const std::string& stem = "") const = 0;
};
#endif

View file

@ -1,13 +0,0 @@
# top-most EditorConfig file
root = false
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
[{*.py,*.t}]
indent_size = 4

Binary file not shown.

View file

@ -1,16 +0,0 @@
#ifndef INCLUDED_RULESMOCK
#define INCLUDED_RULESMOCK
#include <gmock/gmock.h>
#include <RulesProvider.h>
class RulesProviderMock : public RulesProvider
{
MOCK_CONST_METHOD1(has, bool (const std::string&));
MOCK_CONST_METHOD1(get, std::string (const std::string&));
MOCK_CONST_METHOD2(getInteger, int (const std::string&, int defaultValue));
MOCK_CONST_METHOD1(getReal, double (const std::string&));
MOCK_CONST_METHOD1(getBoolean, bool (const std::string&));
};
#endif

Binary file not shown.

Binary file not shown.

View file

@ -1,21 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
#include <cmake.h>
#include <timew.h>
#include <test.h>
////////////////////////////////////////////////////////////////////////////////
void test_granular_datetime (UnitTest& t)
{
}
////////////////////////////////////////////////////////////////////////////////
int main (int, char**)
{
int planned = 1;
UnitTest t(planned);
test_granular_datetime(t);
}

View file

@ -1,14 +0,0 @@
{
"description": "Hey Foo",
"entry": "20180316T231055Z",
"modified": "20180316T232042Z",
"status": "pending",
"uuid": "d07b40c4-5df7-409f-bf98-930e550333b3"
}
{
"description": "Hello World",
"entry": "20180316T231055Z",
"modified": "20180316T232042Z",
"status": "pending",
"uuid": "d07b40c4-5df7-409f-bf98-930e550333b3"
}

View file

@ -1,15 +0,0 @@
{
"description": "FooBar",
"entry": "20180316T231125Z",
"modified": "20180316T231808Z",
"status": "pending",
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
}
{
"description": "FooBar",
"due": "20180331T220000Z",
"entry": "20180316T231125Z",
"modified": "20180316T231808Z",
"status": "pending",
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
}

View file

@ -1,15 +0,0 @@
{
"description": "FooBar",
"entry": "20180316T231125Z",
"modified": "20180316T231808Z",
"status": "pending",
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
}
{
"description": "FooBar",
"due": "20180331T220000Z",
"entry": "20180316T231125Z",
"modified": "20180316T231808Z",
"status": "pending",
"uuid": "e11d7d19-20a7-47bb-999e-6554a70ea094"
}

View file

@ -1,85 +0,0 @@
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright 2006 - 2017, Thomas Lauf, Paul Beckingham, Federico Hernandez.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# http://www.opensource.org/licenses/mit-license.php
#
###############################################################################
import os
import subprocess
import sys
import unittest
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import TestCase
class TestCsv(TestCase):
def setUp(self):
current_dir = os.path.dirname(os.path.abspath(__file__))
self.process = subprocess.Popen([os.path.join(current_dir, '../ext/csv.py')],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
def test_csv_with_empty_database(self):
"""csv extension should print nothing on empty database"""
out, err = self.process.communicate(input="color: off\ndebug: on\ntemp.report.start: \ntemp.report.end: \n\n[]")
self.assertEqual('', out)
self.assertEqual('', err)
def test_csv_with_filled_database(self):
"""csv extension should print intervals for filled database"""
out, err = self.process.communicate(
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[\"foo\"]}]")
self.assertEqual('"20160101T070000Z","20160101T080000Z","foo"\n', out)
self.assertEqual('', err)
def test_csv_with_interval_without_tags(self):
"""csv extension should handle interval without tags"""
out, err = self.process.communicate(
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]")
self.assertEqual('"20160101T070000Z","20160101T080000Z"\n', out)
self.assertEqual('', err)
def test_csv_with_interval_with_empty_tag_list(self):
"""csv extension should handle interval with empty tag list"""
out, err = self.process.communicate(
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]")
self.assertEqual('"20160101T070000Z","20160101T080000Z"\n', out)
self.assertEqual('', err)
if __name__ == "__main__":
from simpletap import TAPTestRunner
unittest.main(testRunner=TAPTestRunner())
# vim: ai sts=4 et sw=4 ft=python

View file

@ -1,91 +0,0 @@
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright 2006 - 2017, Thomas Lauf, Paul Beckingham, Federico Hernandez.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# http://www.opensource.org/licenses/mit-license.php
#
###############################################################################
import os
import subprocess
import sys
import unittest
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from basetest import TestCase
class TestDebug(TestCase):
def setUp(self):
current_dir = os.path.dirname(os.path.abspath(__file__))
self.process = subprocess.Popen([os.path.join(current_dir, '../ext/debug.py')],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
def test_debug_with_empty_database(self):
"""debug extension should print nothing on empty database"""
out, err = self.process.communicate(input="color: off\ndebug: on\ntemp.report.start: \ntemp.report.end: \n\n[]")
self.assertEqual('color: off\ndebug: on\ntemp.report.start:\ntemp.report.end:\n\n[]\n', out)
self.assertEqual('', err)
def test_debug_with_filled_database(self):
"""debug extension should print intervals for filled database"""
out, err = self.process.communicate(
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[\"foo\"]}]")
self.assertEqual(
'color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[\"foo\"]}]\n',
out)
self.assertEqual('', err)
def test_debug_with_interval_without_tags(self):
"""debug extension should handle intervals without tags"""
out, err = self.process.communicate(
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]")
self.assertEqual(
'color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\"}]\n',
out)
self.assertEqual('', err)
def test_totals_with_interval_with_empty_tag_list(self):
"""totals extension should handle interval with empty tag list"""
out, err = self.process.communicate(
input="color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[]}]")
self.assertEqual(
'color: off\ndebug: on\ntemp.report.start: 20160101T070000Z\ntemp.report.end: 20160101T080000Z\n\n[{\"start\":\"20160101T070000Z\",\"end\":\"20160101T080000Z\",\"tags\":[]}]\n',
out)
self.assertEqual('', err)
if __name__ == "__main__":
from simpletap import TAPTestRunner
unittest.main(testRunner=TAPTestRunner())
# vim: ai sts=4 et sw=4 ft=python

View file

@ -1,43 +0,0 @@
#!/bin/bash
# parse options/arguments
until [ -z "${1}" ] ; do
case "${1}" in
--minute)
shift
minutes="${minutes} ${1}"
;;
--hour)
shift
hours="${hours} ${1}"
;;
--day)
shift
days="${days} ${1}"
;;
-*)
echo "Unknown option '${1}'"
exit 1
;;
*)
tests="${tests} ${1}"
;;
esac
shift
done
for day in ${days-$(date --rfc-3339=date)} ; do
for minute in ${minutes-$(echo "0$(rand -M 60)" | sed "s|.\+\(..\)\$|\1|g")} ; do
for hour in ${hours-$(seq -w 0 23)} ; do
date="${day}T${hour}:${minute}"
for single_test in ${tests} ; do
echo "Running test ${single_test} at ${date}"
faketime ${date} ${single_test}
if [ $? -ne 0 ] ; then
echo "Test ${single_test} broke at ${date}!"
break 2
fi
done
done
done
done

1221
timew.cbp

File diff suppressed because it is too large Load diff