Ask your questions here.
Post a reply
golinux

- golinux
- Posts: 663
- Joined: Thu Nov 08, 2012 1:23 am

## Taskfer

Mon Feb 03, 2014 2:59 am

I have sent up a recurring event for every 5 days. Is there a way to have a reminder sent to an email address? In the script it says:

> This is a limited list. For full options, run todo-fsr from a terminal.

I was hoping to find the answer to my question by doing that. But there are even less options than when launching it from the menu. What am I missing/doing wrong?
*edit* Just found this thread over at FDN. It's going to take me a while to process all that but I see discussion of popups in the taskbar etc. That would work for me.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Taskfer

Mon Feb 03, 2014 4:28 am

The script has no way of doing anything when something in the task list is due. taskfer-notify will only notify you when you run it. The readme talks about putting it in your startup applications so it reminds you when you log in. You could make a cron job to run taskfer-notify every whenever and get a notification, and you could then add a line to the script to send a mail.
You want to send it to a user on the local system, or you want to send it over the internet?
golinux

- golinux
- Posts: 663
- Joined: Thu Nov 08, 2012 1:23 am

## Re: Taskfer

Mon Feb 03, 2014 5:41 am

Thanks. Stupid me didn't even think that there might be a readme somewhere. Understanding it is the next challenge. If taskfer-notify only works at login, it won't be useful to me because I just suspend for weeks/months at a time. Any way it could pop up coming out of suspend? The email would have to go through the internet. It's going to take some time to wrap my head around this . . . it's pretty foreign territory because I don't go there often.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Taskfer

Mon Feb 03, 2014 2:23 pm

I am not very focused on computing these days.
Just a bit of chat, fiddle with it or consider it to be damn wrong and call it a day.
I put taskfer/todo in my ~/.profile and didn't use a login-manager.
That way i got the info each time i rebooted
(I understand that you suspend, just saying what i did).
When i had it in ~/.bashrc, it ran each time i opened a terminal.
For me that was annoying, but it might be a solution.
I think one could also fidle with cron and let it run from a terminal every now and then.
I got to say that cron in general is beyond me.
It partly works for me, but i never fully understand why or how.
I now mainly use osmo (because i sshfs the folder where taskfer has it's todo list. And i add the ssh-key and mount it _after i login to the GUI. I haven't found a good solution for myself, though i generally prefer taskfer over osmo).
Good luck, make sure to post the result[s]. I am very interested.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Taskfer

Mon Feb 03, 2014 5:06 pm

I question the wisdom of keeping your todo list on a computer that may be sleeping for weeks or months at a time, but if you really want to do it, here's how. This will only report tasks that are due on the same date that the computer resumes. Let me know if it works or not.
If you want it to run on resume...
Give this a name, make it executable, and save it in etc/pm/sleep.d/

Code:
  `#!/bin/bash
  case "$1" in
  resume)
  # executed on resume
  /usr/bin/taskfer-notify
  ;;
  *)
  ;;
  esac`

(If you want it to run every day, make a cron job to run taskfer-notify instead of making the above file in sleep.d.)
Create ~/.muttrc and put in your correct email address.
Then 'chmod 600 ~/.muttrc' so only you can read your password.
The smtp server shown below is correct for gmail. If you use other mail, find out what to use for the smtp server, and if it does not take an encrypted password, get rid of the ssl_force_tls line and change smtps:// to smtp:// (or better yet, change your email provider to one that does encrypt the password.)

Code:
  `set use_from = "yes"
  set from = "[email protected]
  "
  set smtp_url = "smtps://golinux:[email protected]
  :465/"
  set ssl_force_tls = "yes"
  `

Edit /usr/bin/taskfer-notify - replace everthing from line 28 on with the following. Put your correct email address in the mutt line. The -s option is for the subject line, which you can edit to suit your tastes. Also, I'm not sure if the 'sleep 3' is necessary, but I figured it's a good idea to give mutt a chance to send the file before deleting it.
This will create one email message with the attached text file that has a line for each task due today.

Code:
  `ddt=$(date +%F)
  if [[ $(type -p notify-send) ]] ; then
  while read line ; do
  if [[ -n $(echo $line | cut -d"|" -f2 | grep $ddt) ]] ; then
  echo "$line" >> /tmp/mail.txt
  fi
  done < "$tasklist"
  else
  echo " You need to install the libnotify-bin package
  for this function to work."
  exit 1
  fi
  if [[ -f /tmp/mail.txt ]] ; then
  notify-send -t 7000 "You have tasks listed for today. Check your todo list."
  mutt -s "Today's Tasks" -a /tmp/mail.txt -- [email protected]
  < /dev/null
  sleep 3
  rm -f /tmp/mail.txt
  fi
  exit 0
  `

@nadir: if you script the sshfs mount, add taskfer-notify to the end of the script. You might need to change the paths to the sourced files in the beginning of taskfer-notify.
golinux

- golinux
- Posts: 663
- Joined: Thu Nov 08, 2012 1:23 am

## Re: Taskfer

Mon Feb 03, 2014 5:25 pm

> fsmithred wrote:I question the wisdom of keeping your todo list on a computer that may be sleeping for weeks or months at a time . . .

I'm on it every day but rarely reboot it . . . only go in and out of suspend. Sorry I wasn't clearer.
WOW! Can't believe you put in all that effort. I don't know that I'll be capable of deciphering it but will give it a go later.
I'm hoping this reminder will save my scalp from destruction. Sometimes I forget I'm due for a shave and if the stubble gets too long it can be a bloody (and painful) mess. Every 5 days is about right. You think I would have gotten this down after over 30 years. Slow learner . . .
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Taskfer

Mon Feb 03, 2014 11:08 pm

> fsmithred wrote:
> @nadir: if you script the sshfs mount, add taskfer-notify to the end of the script. You might need to change the paths to the sourced files in the beginning of taskfer-notify.

I tried it with both, xterm and xfce4-terminal, -e option/argument.
using
xfce4-terminal -e todo
works.
But adding
xfce4-terminal -e todo -wc
in single quoutes, double quotes or with a $ does not work.
I would prefer a terminal to open and show me the tasks.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Taskfer

Tue Feb 04, 2014 2:04 am

This works.

Code:
  `xfce4-terminal -e 'todo-fsr -l'`

This does not work. There is no -wc option in taskfer. Try just -w to show the week.

Code:
  `xfce4-terminal -e 'todo-fsr -wc'`

nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Taskfer

Tue Feb 04, 2014 2:34 am

Ups: No tasks are known for this week, that is why the xfce4-terminal closed immediatly.
using -l worked.
btw:
todo -h
gives:
-dc, -tc, -wc same as the respective options above,
but for console mode. (inline calendar)
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Taskfer

Tue Feb 04, 2014 3:40 am

Code:
  `$ todo-fsr -v
  Taskfer/todo 0.05
  `

Console mode is the only mode in the newer version. I got rid of the popup calendar.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.