Sigx

We are the future in the past.
It is currently Mon Mar 18, 2024 11:04 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Tcl SigX Client
PostPosted: Thu Dec 09, 2004 5:41 am 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
I may possibly do a Tcl SigX client that can be just as portable as the Perl script but easier to configure. The planned config is this:

Code:
# Account Settings
namespace eval ::settings::account {}

set ::settings::account::username "breadcrust" ;# Your user name
set ::settings::account::password "" ;# Your password (encryted)



# Program Settings
namespace eval ::settings::programs {}

set ::settings::programs::hostnameCommand "hostname -f" ;# command to get your comp's hostname
set ::settings::programs::uptimeCommand "uptime" ;# command to use for uptime
set ::settings::programs::freeCommand "free -m" ;# command to use for free
set ::settings::programs::freeUnit mb ;# unit free will output in: b, kb, mb or gb
set ::settings::programs::dfCommand "df -m" ;# command to use for df (disk free)
set ::settings::programs::xdpyinfoCommand "xdpyinfo" ;# command to use for xdpyinfo
set ::settings::programs::netInfoFile "/proc/net/dev" ;# /proc file containing network info
#  which network interfaces to include in i/o info, can be any interface name, all or allButLo
set ::settings::programs::netInfoInterfaces allButLo
# Path to an XML status file made by the Kopete plugin Web Presence
set ::settings::programs::kopeteWebPresenceFile "~/webpresence.xml"

# OS info string. can contain %file and/or %command but doesnt have to.
set ::settings::programs::osInfoFrom "%file (%command)"
set ::settings::programs::osInfoFile "/etc/SuSE-release" ;# file containing OS info
set ::settings::programs::osInfoFileLine 1 ;# the line to find the OS name on the OS info file
set ::settings::programs::osInfoCommand "uname -s -r" ;# command to use to get OS name/version

# A text file containing the song xmms is currently playing. Use the Song Change plugin
# with the command {echo "%s" > ~/.xmms/currentSong} (without the braces) for song
# changes and {echo "Nothing" > ~/.xmms/currentSong} for end of playlist in Song Change's
# configuration to set this up.
set ::settings::programs::xmmsSongFile "~/.xmms/currentSong"

# Program Settings - CPU Info
set ::settings::programs::cpuInfoFile "/proc/cpuinfo" ;# file where CPU info is kept
set ::settings::programs::cpuInfoHertzUnit ghz ;# unit to output hertz speed: khz, mhz or ghz
set ::settings::programs::cpuInfoBogomipsUnit gbm ;# bogomips speed unit: bm, kbm, mbm or gbm
# if set to true this will change (tm) and (r) in anycase to XHTML's proper versions.
set ::settings::programs::cpuInfoLegalSignReplace true
# If you put text here it will override reading info from Linux's /proc cpuInfo file. Useful
# for use on platforms other than linux (eg BSD, OS X (?)).
set ::settings::programs::cpuInfoCustom ""



# Other Settings
namespace eval ::settings::other {}

set ::settings::other::enableXml true ;# if you dont have TclXML installed, set this to false

set ::settings::other::linuxCounterNum "307180" ;# Your Linux Counter number
# Custom Text lines (put whatever you want here). Add as many as you want.
set ::settings::other::customText(0) "0"
set ::settings::other::customText(1) "1"
set ::settings::other::customText(2) "2"
set ::settings::other::customText(3) "3"
set ::settings::other::customText(4) "4"

# how to find your status info. can be kopeteWp or file
set ::settings::other::status kopeteWp
# details on the method on finding status info, different for every status info type
# file - path to file containing status
# kopeteWp - protocol to take status info from (empty string will return first one found)
set ::settings::other::statusDetails "JabberProtocol"



# Output Settings
namespace eval ::settings::output {}

set ::settings::output::lines 5 ;# number of lines to use (mozaik)

# Output Line strings.
# You can put any text you like here and stat variables.
#
# Stat variables :
# %customTextX - Custom text strings (where X is custom string number)
# %linuxCounter %linuxCounterWithURL - Linux Counter Number
# %status - Your current status
# %xmmsListening - The music you are currently listening to in XMMS
# %screenRes0 - Resolution of screen. Adjust 0 to wanted screen if needed
# %operatingSystem - Self-Explainitory :-)
# %memfreePhysical %memfreeSwap %memfreeAll - Free system memory
# %memusedPhysical %memusedSwap %memusedAll - Used system memory
# %memtotalPhysical %memtotalSwap %memtotalAll - Total system memory
# %memfreePercentPhysical %memfreePercentSwap %memfreePercentAll - Free memory in percent
# %cpuInfo %cpuModel %cpuHertz %cpuBogomips - CPU info (%cpuInfo displays all)
# %uptime - Displays uptime info
# %diskFree %diskUsed %diskTotal - Free, used and total space of all disks
# %diskFree-dev-hdx0 %diskUsed-dev-hdx0 %diskTotal-dev-hdx0 - As above for a perticular device
# %diskFree-mnt-/home %diskUsed-mnt-/home %diskTotal-mnt-/home - As above for a mount point
# %diskFreePercent %diskFreePercent-dev-hdx0 %diskFreePercent-mnt-/home - Free space in %
# %networkInputBytes %networkOutputBytes - Input and output of network in (mega/kila)bytes
# %networkInputPackets %networkOutputPackets - Input and output of network in packets
# %hostname - Computer Hostname
# %% - Insert a %
#
set ::settings::output::line(0) "Listening to %xmmsListening"
set ::settings::output::line(1) "CPU: %cpuInfo | Disk space: %diskTotal (%diskFreePercent used)"
set ::settings::output::line(2) "OS: %operatingSystem | Linux Counter: %linuxCounterWithURL"
set ::settings::output::line(3) "Network: %hostname, %networkInputBytes (%networkInputPackets packets) input, %networkOutputBytes (%networkOutputPackets packets) output"
set ::settings::output::line(4) "RAM: %freememPercentPhysical of %totalmemPhysical used | Status: %status"
set ::settings::output::line(5) ""
set ::settings::output::line(6) ""
set ::settings::output::line(7) ""
set ::settings::output::line(8) ""
set ::settings::output::line(9) ""



it stores the password in a weak encrytion that can be hacked, but isnt very easy for a usual pc user to figure out. i also will put in other fetaures like the winblows clients have later.

anyways, back to the original main point of this post, i havent been able to find any real details on how SigX signatures are updated so i thought id ask here, how is this done?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 10:42 am 
Offline

Joined: Thu Jul 03, 2003 3:06 pm
Posts: 652
We talked about how its done in this topic.
http://forum.yuriy.net/phpbb/viewtopic. ... =urlencode

In my SigX C++ version what i do is an html POST

"http://sigx.yuriy.net/update.php/username=" +username + "&password=" + password + "&data=" + urlencode( data ) + "&version=Cplus2.1.5";

If your going to write one please make sure you submit the version at the end, it will work withought it but its nice to see what other versions people are using and the newline in sigx is represented by *<*

_________________
Image
~~~SigX C++ Edition~~~


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 1:09 pm 
Offline

Joined: Mon Mar 15, 2004 1:48 pm
Posts: 1397
Location: Los Angeles
read the perl script to figure out how it works

http://forum.yuriy.net/phpbb/viewtopic.php?t=213

_________________
Image

Image

Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 09, 2004 6:25 pm 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
well i am looking at the perl script for figuring out ways to do stuff (like getting screen res from X) but I couldnt figure out how exactly it sends data.

your reply helps alot buddy, it should be all I need to know to update the sig.

btw, i am also aiming to try and make this script easily hackable, and to allow other programs to change the configuration (eg, for frontends). I would like to continue working on this script after the first version, including modifications other people have done to the script in later versions. at least thats what i would like. :-)

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 11, 2004 5:54 am 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
w00t, i got submitting the sig working, well almost.

its supposted to say:

Code:
TclSigX v0.1.0 (® Breadcrust 2004/Licensed under GPL)


but instead it says

Code:
TclSigX v0.1.0 (è Breadcrust 2004/Licensed under GPL)


wtf? (thats an little arrow pointed down on the S btw) how should i get this working properly? i tryed using the escape character (%a9) but it didnt work :x

btw, talking of different versions, have you made up a page with client stats at all yuriy? it sounds interesting to be able see the stats

_________________
Image


Last edited by breadcrust on Sat Dec 11, 2004 6:16 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 11, 2004 9:11 am 
Offline

Joined: Thu Jul 03, 2003 3:06 pm
Posts: 652
It looks to me like this Font that SigX is using does not have the ® symbol you can always use (c) instead.

_________________
Image
~~~SigX C++ Edition~~~


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 11, 2004 6:15 pm 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
well i tryed « and Ö but the same thing there (Z with arrow and "). so yeah, it seems php's internal font doent have those characters.

i could do (c), (r), etc but that wouldnt look as good :-(

yuriy, is there a way around this, or is this the way it will stay?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 11, 2004 6:58 pm 
Offline

Joined: Mon Mar 15, 2004 1:48 pm
Posts: 1397
Location: Los Angeles
yep, no way around it with the system font i guess.

is the copyright symbol so important to you?

_________________
Image

Image

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 11, 2004 7:05 pm 
Offline

Joined: Mon Mar 15, 2004 1:48 pm
Posts: 1397
Location: Los Angeles
Here is an interesting piece of data

Quote:
+---------------+----------------+
| version | count(version) |
+---------------+----------------+
| Cplus2.0 | 24 |
| Cplus2.0.1 | 17 |
| Cplus2.0.2 | 4 |
| Cplus2.0.3 | 1 |
| Cplus2.0.4 | 68 |
| Cplus2.0.5 | 19 |
| Cplus2.0.6 | 57 |
| Cplus2.0.7 | 67 |
| Cplus2.0.8 | 196 |
| Cplus2.0.9 | 170 |
| Cplus2.1. | 6 |
| Cplus2.1.0 | 172 |
| Cplus2.1.1 | 1038 |
| Cplus2.1.2 | 33 |
| Cplus2.1.3 | 1427 |
| Cplus2.1.4 | 1173 |
| Cplus2.1.5 | 780 |
| Cplus2.1.6 | 2 |
| FP vb 1.0.0 | 1 |
| java1.1.2 | 155 |
| java1.1.3 | 213 |
| java1.1.4 | 46 |
| java1.1.5 | 31 |
| java1.1.6 | 14 |
| java1.1.7 | 262 |
| RFv0.01a | 2 |
| SigX vb 1. | 470 |
| SigX vb 1.1.3 | 6181 |
| SigX vb 1.1.4 | 6435 |
| SigX vb 1.1.5 | 1102 |
| SigX vb 1.1.6 | 376 |
| SigX vb 1.1.7 | 2267 |
| SigX vb 2. | 416 |
| SigX vb 2.0.0 | 46 |
| SigX vb 2.0.1 | 120 |
| SigX vb 2.0.2 | 3293 |
| TclSigX-Te | 1 |
+---------------+----------------+

_________________
Image

Image

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 12, 2004 3:56 am 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
yuriy wrote:
is the copyright symbol so important to you?


quite alot yes. it annoys me when (c) has to be used when ® could work. how ever if this has to stay like that than ok, whatever, ill put up with it

Quote:
Here is an interesting piece of data


lol, and theres my program right down the bottom ^_^

however this is the code i used to send the data

Code:
set httpToken [::http::geturl sigx.yuriy.net/update.php -query "username=[urlEncode $::settings::account::username]&password=[pwdc $::settings::account::password]&data=[urlEncode $::data::item::tclSigXInfo]&version=TclSigX-Testing"]


so why did it cut the program name off?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 12, 2004 10:28 am 
Offline

Joined: Thu Jul 03, 2003 3:06 pm
Posts: 652
The version field in the database is only 10 letters long.

_________________
Image
~~~SigX C++ Edition~~~


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 12, 2004 1:51 pm 
Offline

Joined: Mon Mar 15, 2004 1:48 pm
Posts: 1397
Location: Los Angeles
ok i changed it to 15

_________________
Image

Image

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 13, 2004 5:09 am 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
yuriy wrote:
ok i changed it to 15


ok, cool. but why did the vb clients have program name/version strings longer than 10 characters? is this the sigx server automaticlly changing the name to show a nicer looking version string than the one the vb client really sends out?

oh, and i guess ill live with that legal character stuff :|

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 13, 2004 12:59 pm 
Offline

Joined: Mon Mar 15, 2004 1:48 pm
Posts: 1397
Location: Los Angeles
back then it was allowed to have more then 20 chars.

_________________
Image

Image

Image


Top
 Profile  
 
 Post subject: Update on progress of TclSigX
PostPosted: Fri Dec 31, 2004 5:46 am 
Offline

Joined: Thu Dec 09, 2004 5:24 am
Posts: 140
Location: Hiding inside my laptop
ok, so for an update.

eveything is working now (except for the status stuff) and I can now use TclSigX instead of the Perl script.

basicly, the structure of the script now:

Code:
  Usual Tcl Program Header
  Configuration
  Load Procedures and Librarys
  Find what is being used in sig
  Retrieve the data needed
  Generate sig
  Update sig (or ouput to stdout/console if --stdout argument is used)
  Exit


the sigature that i am generating right now through it is

Code:
Listening to (2 // Gorillaz) 5/4
CPU: AMD Duron (1.2Ghz/2.4 Kilabogomips) | Disk space: 35.36gb (71% used)
OS: Yoper Linux  2.0 (for i686) (Linux 2.6.8.1-7) | Status: @status
Network: nova, 0.51mb (850 packets) input, 0.46mb (1834 packets) output
RAM: 46% of 257mb used | Linux Counter: 307180 (http://counter.li.org)
TclSigX v0.1.0 Alpha ((c) Breadcrust 2004/Licensed under GPL)


when i have finished v0.1.0 ill release it here, which hopfully will be sometime in the next week! :D

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group