Active Topics

 



Notices


Reply
Thread Tools
MK99's Avatar
Posts: 644 | Thanked: 480 times | Joined on Jul 2012 @ Finland
#821
tonyhuynh

Try something like that:
Code:
result.append('%d minutes RM' % minutes)
 

The Following User Says Thank You to MK99 For This Useful Post:
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#822
N9QT just updated with netspeed. It would be interesting to bring this feature to BB.
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#823
Is there a way to have the first RSS feed of a website in billboard?

Last edited by flotron; 2013-04-25 at 01:03.
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#824
@tonyhuynh do you want speed to be updated once a minute? will it be precise?
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#825
Originally Posted by flotron View Post
Is there a way to have the first RSS feed of a website in billboard?
Yes, write a Python script and use it using {script:/path/to/yourscript.py} like this:

Code:
import feedparser
f = feedparser.parse('http://example.org/feed.rss')
print f.entries[0].title
Local caching and conditional requests to avoid excessive network traffic left as an exercise to the reader

Oh yeah, and you need python-feedparser and python installed for this to work.
 

The Following 2 Users Say Thank You to thp For This Useful Post:
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#826
@coderus, I wish "on-going" status i/o once a minute! is it possible?
 
knobtviker's Avatar
Posts: 665 | Thanked: 2,388 times | Joined on Feb 2012 @ Zagreb, Croatia
#827
@thp
Will some of these scripts be sanctioned and implemented in some future updates?
 

The Following User Says Thank You to knobtviker For This Useful Post:
Posts: 179 | Thanked: 108 times | Joined on Dec 2011 @ Bangalore
#828
For some reason billboard doesn't work with just the shell file path after {script:

it started working after I appended sh before .sh files and python before .py files.

like
Code:
{script:sh gprs.sh}
{script:python uptime.py}
Is this just me or is this for everyone? If its for everyone then the instructions in about should be updated

The script for gprs did not work because the total downloaded data is in excess of 6.5 GB which translates to a large number of bytes, i think it has something to do with the ceiling of division in bash. I installed bc to perform the division and it works with large numbers now.

Code:
apt-get install bc
I've modified it to recognize if it needs to represent the data in bytes, kB, MB or GB. I've attached the script here if anyone wants it, but you'll have to install bc before it works as expected.

Last edited by danested; 2013-04-29 at 05:02.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#829
Hi to all
Can I somehow to change the {full-date}, that will show this in another language ?
Thanks
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#830
Schturman, you can use
Code:
#!/bin/sh

day=$(date +%u)
echo | awk -v d=$day '{split("Mo Tu We Th Fr Sa Su",a," "); printf a[d]}'
followed by {date}, Just replace "Mo Tu ..." with whatever you like to have displayed.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 

The Following User Says Thank You to Win7Mac For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 18:01.