SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-07-16 15:55:59

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

hello

i've created an script named 'bazinga' (with the help of some forum members).

customized text-function:
- display text (shaded, blurred, bordered, underlined, bold, italic, bolditalic, oblique)
- wrap text (thanks to mrpeachy)
- different size of letters (small or big characters)
- horizontal alignment of text (left, center, right)

customized image-function:
- load images from local drive or load images from webpages (for example webcams)
- scale images (use this when the image height is variable) --> very useful!!
- justify images (very useful)
- webcam -> continuously download
- image of the day (nasa) -> download only once a day (not at the weekend)
- photo of the week (hubblesite) -> only download new image on monday at xxx a clock
- draw border around image
- check connection (with ping)
- save data into txt-files (actual url)
- check if file exists
- check if folder exists
- draw rounded image
- use clipping-function
- convert images into png-format

1. download the archive here
2. copy the archive into the folder into your home-folder
3. extract the archive (the easiest way is to use the option 'Extract Here'.

the archive contains five folders:

folder #1 (fonts, icons): 'additional_files'
folder #2: 'config' ->contains .bazinga_config.lua (hidden file) + conky_test
folder #3 (several templates): 'test_templates'
folder #4: download (contains downloaded data)
folder #5: rounded (contains datas to draw rounded images)

the extracted archive contains three files:
file #1: bazinga.lua (main file)
file #2: v9000.lua (simple but powerful weatherscript)
file #3: readme.txt (further explanations)

once extracted you will find a file named bazinga.lua. this file contains useful functions to displays several things:

here you can see some options how you can format your conky-output: http://postimg.org/image/aann1rull/
this shows most of the features that are available at the moment: http://postimg.org/image/3to6esj49/

you can use this script with different scripts (for example weatherscripts).

hint: use different weatherscripts:

mrpeachys wunderground: http://crunchbang.org/forums/viewtopic.php?id=31306 
mrpeachy v9000: http://crunchbang.org/forums/viewtopic.php?id=16100

bazinga already works with v9000 (as standard). but bazinga will work with every lua-script you choose!

use the script to 'include' the new functions:

	lua_load ~/yourpathtoyour/yourluascript.lua
	lua_draw_hook_pre yournametostartyourfunction
	lua_load ~/yourpathtoyour/template.lua

	lua_load ~/bazinga/bazinga.lua

Last edited by lionhead (2014-05-01 16:38:01)

Offline

Be excellent to each other!

#2 2013-07-16 16:32:18

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

it's really important to display text. with help of this tool you can use a lot of features to format the text that you want to display.

use this if you want to use normal formatted text.

mytxt({x=100,y=170,c=0xffffff,f="mono",fs=10,face="normal",txt='test'})

'normal' is the standard-setting. if you want to use this setting then you don't have to declare it. but it still will work!

face="normal"

to use italic text:

face="italic"

use this if you want to use bold text:

face="bold"

to use bold italic text:

face="bolditalic"

sometimes it will not work when u want to use this setting. some fonts do not support this setting. in this case use the setting 'oblique':

face="oblique"

use this if you want to use underlined text:

underline="yes"

as standard you can use black color when you want to underline text. but you can define the color you want to use:

line_color=0xff0000

furthermore you can define the space between the text and the line. as standard setting you can use 1

line_space=5

if u want to use a wider line then you can use the following setting (default value is one)

line_width=2

this is a more complex example:

mytxt({x=100,y=170,c=0xffffff,f="mono",fs=10,underline="yes",line_space=5,line_width=2,line_color=0xff0000,txt='test'})

use this if you want to use shaded text. the shadow increases the contrast very much!

shaded="yes"

of course you can define another color. by default the script uses the color 'black'.

shade_color=0xff0000

furthermore you can set the value alpha! by standard it uses the value 1. with this you can draw a semitransparent shadow.

shade_alpha=0.5

here you can see a more complexe example:


mytxt({x=100,y=170,c=0xffffff,f="mono",fs=10,shaded="yes",shade_color=0xff0000,shade_alpha=0.5,txt='test'})

of course you can use bordered text. it senseful to increase the text size if you want to use this setting.

border="yes"

if you do not like the standard-color (black) use a different color:

bc=0xff0000

surely you can use a widther border. the standard setting is 1. you do not have to define this if you want to use this setting.

bw=5

furthermore you can change the alpha-value. to use a semi-transparent border! standard-setting is 1

ba=0.5

here you can find a more complex example:

mytxt({x=100,y=170,c=0xffffff,f="mono",fs=30,border="yes",bc=0xff0000,bw=5,ba=0.5,txt='test'})

another option to format the text is 'blurred text'. it makes sense if you increase the font size when you want to use this setting!

blurred="yes"

if you do not like the standard color then use a different color:

blurred_color=0xff0000

of course you change the alpha value when you use this option:

blurred_alpha=0.5

hint: decrease alpha when you want to use a smaller font size! otherwise you can not read something.

this is a more complex example:

mytxt({x=100,y=170,c=0xffffff,f="mono",fs=30,blurred="yes",blurred_color=0xff0000,blurred_alpha=0.5,txt='test'})

if you only want to use big characters use this setting:

size="big_c"

if you only want to use small characters use this:

size="small_c"

the standard-setting is 'normal_c'. use this setting if you want to display text in normal size:

size="normal_c"

surely you can define the alignment. use this setting to align the text on the right:

j="r"

sometimes it is very senseful to use align the text on the right site of the window:

mytxt({x=conky_window.width,y=170,c=0xffffff,f="mono",fs=30,txt='test',j="r"})

use this setting if you want to center the text:

j="c"

the standard setting is 'left'. you do not have to decline this setting if you want to use it. but it still works if you declare it:

j="l"

Last edited by lionhead (2014-02-06 10:19:56)

Offline

#3 2013-07-16 16:58:49

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

the main purpose of the tool bazinga is to format and display the conky-output. therefore you can display this is way (as example):

system({arg="downspeedf",dev="wlan0",se="yes",lang="de"})

A more complete complex example:

mytxt({x=spalte_1b,y=170,c=f,f="mono",fs=10,face="italic",shaded="yes",txt=system({arg="downspeedf",dev="wlan0",se="yes",lang="de"}),j='r'})

here you can define the variable that you want to use (as example):

arg="downspeedf"

here you will find a list of all variables you can use: http://conky.sourceforge.net/variables.html

of course you can use / display an different delimiter (see screenshot). if you want to use the german comma then define:

lang="de"

otherwise you could use the sign .

lang="en"

in most cases you need to define a device:

dev="wlan0"

as standard the script uses the device

dev=""

because sometimes it's useful that you do not display the ending (for example the ending 'mb'):

se="no"

if you use this setting then it should look like this (for example)

5 / 100 gb

sometimes it is very useful that you do not display the sign / when the drive is unmounted:

drop("/media/3873-0B71","/")

the script only shows the sign when the device is mounted!

normally it displays the word 'unmounted' when you don't have mount the drive.

you can disable this while you use the following setting:

st="no"

if you want to display custom endings resp. other word phrases then use this settings within the file 'output.lua':

local t1="nicht verfügbar" 	-- display text when hardrive/usb-stick is unmounted
local t2="n/a" 				-- display text when internet connection is not avaiable

-- define replacement for units (it doesn't matter if setting 'short_units' is 'yes' or 'no')
local e1="byte" 	-- B
local e2="kb" 		-- KiB or K
local e3="mb"  		-- MiB or M
local e4="gb" 		-- GiB or G
local e5="tb" 		-- TiB or T
local e6="%" 		-- percent
local e7="mhz" 		-- cpu frequenz #1
local e8="ghz" 		-- cpu frequenz #2
local e9="mb/s"		-- bitrate
local e10="kb/s"	-- downspeedf
local e11="uhr" 	-- time 24h-format

local e12_de="prozent"
local e12_en="percent"

as you can see on the screenshot: http://imgbox.com/adv68u7J you can use 12h-time format.

to use this the define the setting:

tf="12"

the standard-setting is 24h-time format:

tf="24"

it could look like the following:

mytxt({x=spalte_3b,y=220,c=f,f="mono",fs=10,face="italic",shaded="yes",txt=system({arg="time %k:%M",tf="12"}),j='r'})

of course you can display the actual date. therefore you have to use this setting:

dt="yes"

this is an example how you can display this:

mytxt({x=spalte_3b,y=420,c=f,f="mono",fs=10,face="italic",shaded="yes",txt=system({arg="time %d.%m.%Y",dt="yes"}),j='r'})

Last edited by lionhead (2014-02-06 10:21:41)

Offline

#4 2013-07-16 17:07:17

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

sometimes it looks better when you display a word instead of a number, for example when you have more space then you need.

n2w="yes"

this displays the converted words. the standard setting is "no". because it's only senseful if you use this to display the percentage. i only implement this features here. you can use this option like this:

mytxt({x=spalte_4b,y=320,c=f,f="mono",fs=10,face="italic",shaded="yes",txt=system({arg="memperc",n2w="no",lang="de"}),j='r'})

it would look stupid if i would display a word in this case:

system({arg="fs_free",dev="/",n2w="yes",lang="de"})

remember: this won't work!

Last edited by lionhead (2014-02-06 10:22:52)

Offline

#5 2013-07-16 17:37:49

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

of course you can display images! you can display images from your local hdd. furthermore you can display external images (for example webcams).

in case you want to display a local image that is located in the folder where all additional files are stored use the function 'image'. within the file '.bazinga_config.lua' you can define the name and the location of this folder. this function displays ONLY a couple of predefined images. you can define this images with the file 'output.lua'.

but if you want to display images from a external source then you have to use the function 'extern'. this function displays images that are stored in other local folders or are displayed at webpages in the internet (as example webcams).

this way you display the current moon phase:

myimg({x=360,y=330,w=40,h=40,file=moon_icon[1]})


if you want to display the current image from an external source (for example a webcam) use this order:

extern({x=500,y=130,sc="yes",sw=320,url="http://www.gco.org.au/sky.jpg",hdd="sky.jpg",iv=20})

this defines the horizontal position:

x=500

this defines the vertical position:

y=500

you can define the width of the displayed image:

w=500

or the height:

h=500

sometimes it is very useful when you scale the image:

sc="yes"

if you define the width the script calculates automatically the needed heigth.

if you want to use a custom value to define the width use this:

sw=320

the standard-setting for this is 200

to display an image from an external source you have to define the address of the image:

url="http://www.gco.org.au/sky.jpg"

this is a needed value. the script won't work without a value!

furthermore you have to store the 'grabbed image' to a folder of your hard disc:

hdd="sky.jpg"

in periodic intervalls the script saves a 'copy' on your hard disc!

of course you can modify the intervall. the standard setting is the value 60. if you want to use this value you do not have to define something.

iv=20

furthermore i included the possibility to align the images! sometimes it is very useful if you can align the image on the right side of the window (for example):

extern({x=conky_window.width,y=130,sc="yes",sw=320,url="http://www.gco.org.au/sky.jpg",hdd="sky.jpg",iv=20,j="r"})
j="r"

as standard you align the image on the left side. use this setting:

j="l"

edit: the script creates a backup of the displayed photo. furthermore it checks the state of the internet connection.

Last edited by lionhead (2014-02-23 11:08:39)

Offline

#6 2013-07-16 17:41:35

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

as gimmick it is possible to display the actual image of the day by the nasa:

extern({x=500,y=330,sc="yes",sw=320,toi="iotd",iv=20})

furthermore you can display the photo of the week by the webpage 'www.hubblesite.org':

extern({x=500,y=330,sc="yes",sw=320,toi="hubble",iv=20})

Last edited by lionhead (2014-03-11 19:40:03)

Offline

#7 2013-07-16 17:49:30

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,194
Website

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

BAZINGA!  cool   Love it!


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

#8 2013-07-16 17:56:22

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

because it's possible to draw bars within conky i also included this feature in bazinga. it is possible to draw bars with and without gradient. 

this is the easiest way to draw bars:

draw_bar({var="downspeedf",dev="wlan0", w=100,h=20, x=15,y=400, bgc=0xffff00,indc=0xff0000,lc=0x000000,la=0.3,lw=5, r=10,max=400})

first of all you need to define the variable:

var="downspeedf"

furthermore you need the actual device. the standard-setting for this is an empty device (empty string):

dev="wlan0"

surely you can define the width of the bar:

w=100

or the heigth:

h=5

the position the bar you have to define the horizontal position:

x=15

and the vertical position:

y=400

a bar also needs some colors. the value for the background-color is:

bgc=0xffff00

of course you can define the color for the indicator-bar:

indc=0xffff00

to store the indicator we need a border. you can define the border-color this way:

lc=0x000000

it is also important to define the alpha-setting (when u want to use a semi-transparent border):

la=0.5

sometimes it is useful to define another value for the width of the line:

lw=1.5

it is also important to have the possibility to rotate the bar. use this setting to use this feature:

r=10

this rotates the bar 10 degrees.

in some cases it is senseful to define a maximum value:

max=400

it's also possible to draw a bar that contains a gradient:

gbar({lw=1,lc=0xff0000,la=1,var="battery_percent",dev="BAT1",posx=30,posy=460,w=200,h=35,bgc1=0x4D4D4D,bgc2=0x999999,bgc3=0xE6E6E6,ind1=0x00ff00,ind2=0xffff00,ind3=0xff0000})

Offline

#9 2013-07-16 18:12:54

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

i'm always open for critic. please test the script and give me feedback. there are still some things i could make it better smile

as example: i still need a better way to convert numbers into english words.

feel free to post code. i'm willingly to improve the script.

Offline

#10 2013-07-19 16:28:26

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

now you can add text, for example: if you use the argument 'fs_free_perc' it will automatically show 50% free

just enable this parameter and the needed text will appear.

txt="yes"

if you do not decline it then the script will show just the number and the ending. the standard-value for 'txt' is NO

here you can see a more complex example:

system({arg="fs_used_perc",dev="/media/3873-0B71",txt="yes",n2w="no",lang="en"})

surely you can disable this parameter. use this setting and the script does not show this text.

txt="no"

here is an other example:

http://i.imgbox.com/adwExkov.jpg
http://i.imgbox.com/aczH7FcR.jpg

both images use the same code:

system({arg="fs_free",dev="/media/3873-0B71",se="yes",txt="yes",st="no",lang="de"}).." "..drop("/media/3873-0B71","/").." "..system({arg="fs_size",dev="/media/3873-0B71",lang="de",se="yes"})

the function drop shows the declared sign only when the device is mounted!

with help of this code you can define that the script doesn't show the word 'unmounted'. it displays this word only once in our example.

st="no"

with this code you can disable the ending GB. the standard-setting is YES

se="no"

Last edited by lionhead (2014-01-15 13:30:41)

Offline

#11 2013-07-27 09:45:50

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

i fixed several things. it's highly recommended to grab the actual version.

Offline

#12 2013-09-09 09:57:13

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

please give some feedback if you try bazinga.lua. i need your experience to make improvements!

tipp: edit your conky-config-file to reduce cpu-usage: http://crunchbang.org/forums/viewtopic.php?id=27988

Offline

#13 2013-09-26 10:18:07

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

i cleaned up a bit. you will find the actual version here.

remember: i need your feedback to make the script better (improve the script). if you have proposals how i could increase the speed then feel free to contact me!

btw: i always use this script to display important informations (for example system). this script is really useful! and it's a really good possiblity to start learn more about lua-scripts. this is also a very useful guide (written by mrpeachy): http://crunchbang.org/forums/viewtopic.php?id=17246

Last edited by lionhead (2013-09-26 10:25:06)

Offline

#14 2013-12-06 10:52:48

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

i added some useful functions. you will find the actual version here.

remember: i need your feedback to make the script better (improve the script). if you have proposals how i could increase the speed then feel free to contact me!

Offline

#15 2013-12-13 17:02:15

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

new update: i fixed some errors in the original-part (v9000). furthermore i replaced a function.

Offline

#16 2013-12-21 10:52:13

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

feel free to post code if you have an idea of improvement.

Last edited by lionhead (2014-01-15 13:34:30)

Offline

#17 2014-01-03 10:13:08

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

feel free to post code if you have an idea of improvement. or request a feature.

Last edited by lionhead (2014-01-15 13:35:03)

Offline

#18 2014-01-15 13:39:05

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

MAJOR update:

- new structur
- new function
- less code

you can use bazinga.lua with every lua-script (for example weather scripts). just use bazinga like this:

	lua_load ~/yourpathtoyour/weatherscript.lua
	lua_draw_hook_pre weather
	lua_load ~/yourpathtoyour/template.lua

	lua_load ~/bazinga/bazinga.lua

Offline

#19 2014-01-15 14:19:56

Snap
#! Die Hard
Registered: 2013-10-22
Posts: 556

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

Thank you, sir!

Offline

#20 2014-01-15 15:41:02

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

This script offers different features:
- display text (shaded, blurred, bordered, underlined, bold, italic, bolditalic, oblique)
- different size of letters (small or big characters)
- horizontal alignment of text (left, center, right)
- wrap text (thanks to mrpeachy)
- load images from local drive or load images from webpages (for example webcams)
- scale images, justify images
- draw border around external image
- modify the alpha-value of images
- image of the day (nasa), photo of the week (hubblesite)

If you want an additional feature then feel free to request it smile

Last edited by lionhead (2014-02-06 10:25:57)

Offline

#21 2014-01-23 18:06:30

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

i included a new feature. now you can draw a border 'around' the image. this feature is very useful when you use a dark wallpaper.

here you can see an complex example:

extern({x=0,y=0,sc="yes",sw=230,url="http://www.eso.org/public/webcams/vlt.jpg",hdd="vlt.jpg",border="yes",bw=2,ba=0.5,iv=20,j="l"})

to use the border you have to use the following setting.

border="yes"

to increase the width of your new border enter this setting:

bw=2

or

bw=5

the default-value is 1. this draws only a slim border.

furthermore you can use an other color. you can colorize the border smile this way you can draw a red border. the default-setting is yellow.

bc=0xff0000

sometimes it is useful to reduce the value for alpha. the default-setting is 1. here you can see an example:

ba=0.2

hint:  edit this setting if you wanna use a 'huge' border. this looks amazing wink

before the script downloads an image (webcam) it checks if the internet connection is avaiable. if the connection failed it displays an offline version of this image. this is stored in a seperate folder.

Last edited by lionhead (2014-01-31 15:36:09)

Offline

#22 2014-02-01 11:26:09

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

hint: use v9000 to increase your speed at start: http://crunchbang.org/forums/viewtopic.php?id=16100

lua_load ~/bazinga/v9000.lua
lua_draw_hook_pre weather
lua_load ~/v9000/template-sys.lua

lua_load ~/bazinga/bazinga.lua

use wun.lua: http://crunchbang.org/forums/viewtopic.php?id=31306

lua_load ~/bazinga/wun.lua
lua_draw_hook_pre weather
lua_load ~/bazinga/template-sys.lua

lua_load ~/bazinga/bazinga.lua

both weather scripts are very powerful! they were both made bymrpeachy!

Offline

#23 2014-02-15 10:50:36

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

the function that displays 'external images' show sometimes older versions of the image. maybe the 'old' image is still in the cache.

to avoid this problem i remove the existing image before i download the new version. i added this:

os.execute("rm -f "..img_file.."' '")

furthermore i would like to clear the cache. but i do not know how to realize this?! do you have an idea how to do this?

Offline

#24 2014-02-15 19:56:29

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

lionhead wrote:

the function that displays 'external images' show sometimes older versions of the image. maybe the 'old' image is still in the cache.

to avoid this problem i remove the existing image before i download the new version. i added this:

os.execute("rm -f "..img_file.."' '")

furthermore i would like to clear the cache. but i do not know how to realize this?! do you have an idea how to do this?

you could try the command

imlib_free_image_and_decache()

instead of

imlib_free_image()

let me know if it works, im looking into the same thing at the moment

EDIT - it does work, new downloaded image with same name is shown

Last edited by mrpeachy (2014-02-15 20:17:05)

Offline

Be excellent to each other!

#25 2014-02-15 20:18:45

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Bazinga - Decorate your Conky-Output with Lua (last update 1.5.2014)

i already use this within my image-function:

imlib_free_image_and_decache()

furthermore i use this before i download the new image:

	  -- remove old version before i download the new one
	  os.execute("rm -f "..img_file.."' '")

	  print("succesfully connected")
	  print("downloading image")
	  os.execute("wget  -q -O "..img_file..' "'..url..'"')

the second option works better. i do not know why but it works. maybe my internet connection (mobile broadband) causes this problem. the combination of this two options is better (in my opinion). i tested it several days. it seems that the first option doesn't work all the time?!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo