Re: Use of a FreeRunner

2013-12-22 Thread Ben Wong
I'm sure it could; your FreeRunner is a complete computer.

The question is if you have the time (or money to hire someone) to
write the glue script that will put all the pieces together. Let's
see, the parts you'll need are:

1. Check your mail account (fetchmail or python's imaplib)
2. Do a regex check to see if it's important (egrep/python/perl/awk/...)
3. Convert it to SMS format
3a. MIME extract (munpack or python's email package)
3b. Optionally remove HTML markup (lynx -dump or Beautiful Soup's
get_text() function)
4. Send it as an SMS messages (dbus to FSO works but may not be best
practices)

—B

On Sat, Dec 21, 2013 at 2:58 AM, Philip Rhoades p...@pricom.com.au wrote:
 People,

 I have not used my FreeRunner for ages and probably should donate it someone
 who can make use of it but a thought occurred to me:  It would be good to
 have something that could act like a SMS server eg I have a demand where if
 an (urgent) email comes into a particular account, that the contents of the
 email are able to be resent as an SMS out through a mobile device gateway to
 a number of phones - could OpenMoko be rejigged to do this somehow?

 Regards,

 Phil.
 --
 Philip Rhoades

 GPO Box 3411
 Sydney NSW  2001
 Australia
 E-mail:  p...@pricom.com.au

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Use of a FreeRunner

2013-12-22 Thread Philip Rhoades

Ben,


On 2013-12-23 09:26, Ben Wong wrote:

I'm sure it could; your FreeRunner is a complete computer.

The question is if you have the time (or money to hire someone) to
write the glue script that will put all the pieces together. Let's
see, the parts you'll need are:

1. Check your mail account (fetchmail or python's imaplib)
2. Do a regex check to see if it's important 
(egrep/python/perl/awk/...)



I can do those bits.



3. Convert it to SMS format
3a. MIME extract (munpack or python's email package)
3b. Optionally remove HTML markup (lynx -dump or Beautiful Soup's
get_text() function)



and probably those bits - actually now that I think about it - there 
would always just be a little bit of text (the messages would always be 
coming from a phone message service) with an appended WAV file so it 
would have to be MMS rather that SMS . .




4. Send it as an SMS messages (dbus to FSO works but may not be best
practices)



This is the bit I know nothing about . .

Thanks,

Phil.



—B

On Sat, Dec 21, 2013 at 2:58 AM, Philip Rhoades p...@pricom.com.au 
wrote:

People,

I have not used my FreeRunner for ages and probably should donate it 
someone
who can make use of it but a thought occurred to me:  It would be good 
to
have something that could act like a SMS server eg I have a demand 
where if
an (urgent) email comes into a particular account, that the contents 
of the
email are able to be resent as an SMS out through a mobile device 
gateway to

a number of phones - could OpenMoko be rejigged to do this somehow?

Regards,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW  2001
Australia
E-mail:  p...@pricom.com.au

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


--
Philip Rhoades

GPO Box 3411
Sydney NSW  2001
Australia
E-mail:  p...@pricom.com.au

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Use of a FreeRunner

2013-12-22 Thread Sebastian Krzyszkowiak
On Sun, Dec 22, 2013 at 11:43 PM, Philip Rhoades p...@pricom.com.au wrote:
 Ben,



 On 2013-12-23 09:26, Ben Wong wrote:

 I'm sure it could; your FreeRunner is a complete computer.

 The question is if you have the time (or money to hire someone) to
 write the glue script that will put all the pieces together. Let's
 see, the parts you'll need are:

 1. Check your mail account (fetchmail or python's imaplib)
 2. Do a regex check to see if it's important (egrep/python/perl/awk/...)



 I can do those bits.



 3. Convert it to SMS format
 3a. MIME extract (munpack or python's email package)
 3b. Optionally remove HTML markup (lynx -dump or Beautiful Soup's
 get_text() function)



 and probably those bits - actually now that I think about it - there would
 always just be a little bit of text (the messages would always be coming
 from a phone message service) with an appended WAV file so it would have to
 be MMS rather that SMS . .



 4. Send it as an SMS messages (dbus to FSO works but may not be best
 practices)



 This is the bit I know nothing about . .

 Thanks,

 Phil.

Sending SMS using FSO is very easy:
http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.GSM.SMS.html;hb=HEAD#SendTextMessage

You can use mdbus2 or dbus-send, or any dbus binding for your language
of choice. SendTextMessage even handles multi-part messages
automatically for you.

I'm not aware of any existing MMS implementation for FSO.

Cheers,
-- 
Sebastian Krzyszkowiak, dos
http://dosowisko.net/

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Use of a FreeRunner

2013-12-21 Thread Philip Rhoades

People,

I have not used my FreeRunner for ages and probably should donate it 
someone who can make use of it but a thought occurred to me:  It would 
be good to have something that could act like a SMS server eg I have a 
demand where if an (urgent) email comes into a particular account, that 
the contents of the email are able to be resent as an SMS out through a 
mobile device gateway to a number of phones - could OpenMoko be rejigged 
to do this somehow?


Regards,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW  2001
Australia
E-mail:  p...@pricom.com.au

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Use of a FreeRunner

2013-12-21 Thread Torfinn Ingolfsen
On Sat, Dec 21, 2013 at 12:34 PM, Ed Kapitein e...@kapitein.org wrote:
 Hi Phil,

 I did the same thing, but It is of limited use, a lot of mail is in HTML
 format and hard to convert to SMS.
 Also, you need to strip the headers etc.
 So you might want to write a script first and run it on real-life mails,
 before you put effort in reconfiguring the freerunner.

Like these?
http://beaker.mailchimp.com/html-to-text
http://journals.jevon.org/users/jevon-phd/entry/19818
http://www.chuggnutt.com/html2text
http://www.codeproject.com/Articles/11902/Convert-HTML-to-Plain-Text

in Python
http://stackoverflow.com/questions/13337528/rendered-html-to-plain-text-using-python
http://love-python.blogspot.no/2011/04/html-to-text-in-python.html

lynx can also be used.
-- 
Regards,
Torfinn Ingolfsen

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Use of a FreeRunner

2013-12-21 Thread joerg Reisenweber
On Sat 21 December 2013 12:34:49 Ed Kapitein wrote:
 On 12/21/2013 11:58 AM, Philip Rhoades wrote:
  People,
  
  I have not used my FreeRunner for ages and probably should donate it
  someone who can make use of it but a thought occurred to me: It would
  be good to have something that could act like a SMS server eg I have a
  demand where if an (urgent) email comes into a particular account,
  that the contents of the email are able to be resent as an SMS out
  through a mobile device gateway to a number of phones - could OpenMoko
  be rejigged to do this somehow?
  
  Regards,
  
  Phil.
 
 Hi Phil,
 
 I did the same thing, but It is of limited use, a lot of mail is in HTML
 format and hard to convert to SMS.
 Also, you need to strip the headers etc.
 So you might want to write a script first and run it on real-life mails,
 before you put effort in reconfiguring the freerunner.
 
 Just my 0.02BTC
 
 Kind regards,
 Ed
 

Plain HTML mails are usually forwarded to /dev/null by my spam filter right 
away. I haven't recently seen anybody but Jolla sending HTML-only mails 
instead of proper multipart/alternative at least.
Also you shouldn't regularly watch mails by rendering their HTML content, this 
is a severe privacy and security threat.

/j

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
(alas the above page got scrapped due to resignation(!!), so here some 
supplementary links:)
http://www.georgedillon.com/web/html_email_is_evil.shtml  
http://www.nonhtmlmail.org/campaign.html
http://www.georgedillon.com/web/html_email_is_evil_still.shtml
http://www.gerstbach.at/2004/ascii/ (German)


signature.asc
Description: This is a digitally signed message part.
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community