From 5465241cfe2a7177fbf595fde678226c8761d564 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 18 May 2013 02:04:29 +0000 Subject: [PATCH] New version, new tarball, new man page. Unless disabled by distribution maintainers, offers weather -w option. With -x, -xx-, -xxx, shows more information. Basic line is just weather and system time there. -x adds time zone, which is useful for servers, particurly web servers. -x also adds wind speed. -xx adds humidity and barometric pressure. -xxx adds a possible new line, if data is available, heat index, wind chill, and dew point. -xxx also adds a line for location (blocked by irc/-z) / weather observation time. -z filter applies as usual to location data, removes it in irc by default. -Z overrides override. The api this uses is probably going to be dropped at some point, so this is just going to work while it works, then it will need to be updated at some point, so don't get very attached to it. Also adds option to, with -w: -! location= This lets users send an alternate location using either or or (commas for city,state and latitude,longitude are not optional, and the order must be as listed. If There is a developer flag if distro maintainers do not want this enabled, simply set: B_ALLOW_WEATHER='false' before packaging and the weather feature will be disabled. --- inxi | 406 +++++++++++++++++++++++++++++++++++++++++++- inxi.1 | 445 ++++++++++++++++++++++++++----------------------- inxi.changelog | 31 ++++ 3 files changed, 663 insertions(+), 219 deletions(-) diff --git a/inxi b/inxi index e0a2c7e..354f6f7 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/usr/bin/env bash ######################################################################## #### Script Name: inxi -#### Version: 1.8.47 -#### Date: May 3 2013 +#### Version: 1.9.00 +#### Date: May 17 2013 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -236,6 +236,7 @@ A_PS_DATA='' A_RAID_DATA='' A_SENSORS_DATA='' A_UNMOUNTED_PARTITION_DATA='' +A_WEATHER_DATA='' A_X_DATA='' ### Boolean true/false globals ## usage: 'B_' @@ -243,7 +244,7 @@ A_X_DATA='' # flag to allow distro maintainers to turn off update features. If false, turns off # -U and -! testing/advanced update options, as well as removing the -U help menu item B_ALLOW_UPDATE='true' -B_ALLOW_WEATHER='false' +B_ALLOW_WEATHER='true' ## standard boolean flags ## B_BSD_RAID='false' B_COLOR_SCHEME_SET='false' @@ -448,6 +449,7 @@ SEP3='' # do not set, will be set dynamically ### Script names/paths - must be non root writable SCRIPT_DATA_DIR="$HOME/.inxi" ALTERNATE_FTP='' # for data uploads +ALTERNATE_WEATHER_LOCATION='' # weather alternate location LOG_FILE="$SCRIPT_DATA_DIR/inxi.log" LOG_FILE_1="$SCRIPT_DATA_DIR/inxi.1.log" LOG_FILE_2="$SCRIPT_DATA_DIR/inxi.2.log" @@ -2232,6 +2234,9 @@ get_parameters() V) print_version_info exit 0 ;; + w) B_SHOW_WEATHER=true + use_short='false' + ;; # this will trigger either with x, xx, xxx or with Fx but not with xF x) if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then B_EXTRA_EXTRA_EXTRA_DATA='true' @@ -2350,6 +2355,10 @@ get_parameters() ftp*) ALTERNATE_FTP="$OPTARG" ;; + # for weather function, allows user to set an alternate weather location + location=*) + ALTERNATE_WEATHER_LOCATION=$( sed 's/location=//' <<< $OPTARG ) + ;; *) error_handler 11 "$OPTARG" ;; esac @@ -2466,7 +2475,8 @@ show_options() print_screen_output " 7 - Network IP data (-i); triggers -xxx." # if distro maintainers don't want the weather feature disable it if [[ $B_ALLOW_WEATHER == 'true' ]];then - print_screen_output "-w Local weather data. " + print_screen_output "-w Local weather data/time. To check an alternate location, see: -! location=." + print_screen_output " For extra data options see -x, -xx, and -xxx." fi print_screen_output "-x Adds the following extra data (only works with verbose or line output, not short form): " print_screen_output " -C - Bogomips on Cpu;" @@ -2484,7 +2494,10 @@ show_options() print_screen_output " blocks; chunk size; bitmap (if present). Resync line, shows blocks synced/total blocks." print_screen_output " - zfs-raid: Shows raid array full size; available size; portion allocated to RAID" print_screen_output " -S - Desktop toolkit if avaliable (GNOME/XFCE/KDE only); Kernel gcc version" - print_screen_output " -t - Adds memory use output to cpu (-xt c), and cpu use to memory (-xt m)." + print_screen_output " -t - Memory use output to cpu (-xt c), and cpu use to memory (-xt m)." + if [[ $B_ALLOW_WEATHER == 'true' ]];then + print_screen_output " -w - Wind speed and time zone." + fi print_screen_output "-xx Show extra, extra data (only works with verbose or line output, not short form): " print_screen_output " -A - Chip vendor:product ID for each audio device." print_screen_output " -D - Disk serial number." @@ -2497,9 +2510,15 @@ show_options() print_screen_output " (kernel support,read ahead, raid events). If present, adds unused device line. " print_screen_output " Resync line, shows progress bar." print_screen_output " -S - Display manager (dm) in desktop output, if in X (like kdm, gdm3, lightdm)." + if [[ $B_ALLOW_WEATHER == 'true' ]];then + print_screen_output " -w - Humidity, barometric pressure." + fi print_screen_output " -xx -@ <11-14> - Automatically uploads debugger data tar.gz file to ftp.techpatterns.com." print_screen_output "-xxx Show extra, extra, extra data (only works with verbose or line output, not short form): " print_screen_output " -S - Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel)." + if [[ $B_ALLOW_WEATHER == 'true' ]];then + print_screen_output " -w - Location (uses -z/irc filter), weather observation time, wind chill, heat index," print_screen_output " dew point (shows extra lines for data where relevant)." + fi print_screen_output "-z Security filters for IP/Mac addresses, and user home directory name. Default on for irc clients." print_screen_output "-Z Absolute override for output filters. Useful for debugging networking issues in irc for example." print_screen_output " " @@ -2532,6 +2551,11 @@ show_options() print_screen_output "Advanced Options:" print_screen_output "-! 31 Turns off hostname in output. Useful if showing output from servers etc." print_screen_output "-! 32 Turns on hostname in output. Overrides global B_SHOW_HOST='false'" + if [[ $B_ALLOW_WEATHER == 'true' ]];then + print_screen_output "-! location= - Supported types: zip (postal) code; city,state; latitude,longtitude" + print_screen_output " Only use if you want the weather somewhere other than the machine running $SCRIPT_NAME." + print_screen_output " Must be used with -w" + fi if [[ $1 == 'full' ]];then print_screen_output " " print_screen_output "Developer and Testing Options (Advanced):" @@ -5800,7 +5824,7 @@ get_networking_wan_ip_data() # awk has bad regex handling so checking it with grep -E instead # ip=$( echo 2001:0db8:85a3:0000:0000:8a2e:0370:7334 | gawk --re-interval ' # ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval ' - ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval ' + ip=$( wget -t 1 -T 4 -q -O - $WAN_IP_URL | gawk --re-interval ' { #gsub("\n","",$2") print $NF @@ -7937,6 +7961,249 @@ get_uptime() eval $LOGFE } +get_weather_data() +{ + eval $LOGFS + + local location_site='http://geoip.ubuntu.com/lookup' + local weather_feed='http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=' + local weather_spider='http://wunderground.com/' + local data_grab_error='' wget_error=0 b_testing=false b_debug=false + local location_data='' location='' weather_data='' location_array_value='' a_location='' + local weather_array_value='' site_elevation='' + local testDir="$HOME/bin/scripts/inxi/data/weather/" + + # first we get the location data, once that is parsed and handled, we move to getting the + # actual weather data, assuming no errors + if [[ -n $ALTERNATE_WEATHER_LOCATION ]];then + location=$ALTERNATE_WEATHER_LOCATION + else + if [[ $b_testing != 'true' ]];then + # make sure location site is up + wget -q -t 1 -T 5 --spider $location_site || wget_error=$? + # grab the location xml file + if [[ $wget_error -eq 0 ]];then + location_data=$( wget -q -t 1 -T 5 -O- $location_site || wget_error=$? ) + else + data_grab_error="Error: unable to connect to location server - wget: $wget_error" + fi + if [[ $wget_error -ne 0 ]];then + data_grab_error="Error: location server up but download error - wget: $wget_error" + fi + else + if [[ -f $testDir/my-location.xml ]];then + location_data="$( cat $testDir/my-location.xml)" + else + data_grab_error="Error: location xml local file not found." + fi + fi + if [[ -z $( grep -i '<|>\n<|g' <<< $location_data )" + location_data="$( sed $SED_RX 's|><|>\ +<|g' <<< $location_data )" + location_array_value=$( gawk ' + function clean(data) { + returnData="" + # some lines might be empty, so ignore those + if (data !~ /^<[^>]+>$/ ) { + returnData=gensub(/(.*>)([^<]*)(<.*)/, "\\2", 1, data) + } + return returnData + } + BEGIN { + IGNORECASE=1 + locationString="" + countryCode="" + countryCode3="" + countryName="" + regionCode="" + regionName="" + city="" + postalCode="" + latitude="" + longitude="" + timeZone="" + areaCode="" + } + /CountryCode/ { + if ( $0 ~ /CountryCode3/ ){ + countryCode3=clean($0) + } + else { + countryCode=clean($0) + } + } + /CountryName/ { + countryName = clean($0) + } + /RegionCode/ { + regionCode = clean($0) + } + /RegionName/ { + regionName = clean($0) + } + /City/ { + city = clean($0) + } + /ZipPostalCode/ { + postalCode = clean($0) + } + /Latitude/ { + latitude = clean($0) + } + /Longitude/ { + longitude = clean($0) + } + /TimeZone/ { + timeZone = clean($0) + } + END { + locationString = city ";" regionCode ";" regionName ";" countryName ";" countryCode ";" countryCode3 + locationString = locationString ";" latitude "," longitude ";" postalCode ";" timeZone + print locationString + }' <<< "$location_data" ) + fi + A_WEATHER_DATA[0]=$location_array_value + IFS=";" + a_location=( ${A_WEATHER_DATA[0]} ) + IFS="$ORIGINAL_IFS" + + # assign location, cascade from most accurate + # latitude,longitude first + if [[ -n ${a_location[6]} ]];then + location="${a_location[6]}" + # city,state next + elif [[ -n ${a_location[0]} && -n ${a_location[1]} ]];then + location="${a_location[0]},${a_location[1]}" + # postal code last, that can be a very large region + elif [[ -n ${a_location[7]} ]];then + location=${a_location[7]} + fi + fi + if [[ $b_debug == 'true' ]];then + echo "${A_WEATHER_DATA[0]}" + echo "location: $location" + fi + + if [[ -z $location ]];then + data_grab_error="Error: location data downloaded but no location detected." + fi + + # now either dump process or go on to get weather data + if [[ -n $data_grab_error ]];then + A_WEATHER_DATA=$data_grab_error + else + if [[ $b_testing != 'true' ]];then + wget -q -t 1 -T 5 --spider $weather_spider || wget_error=$? + # grab the weather feed xml file + if [[ $wget_error -eq 0 ]];then + weather_data="$( wget -q -t 1 -T 5 -O- $weather_feed$location || wget_error=$? )" + else + data_grab_error="Error: unable to connect to weather server - wget: $wget_error" + fi + if [[ $wget_error -ne 0 ]];then + data_grab_error="Error: weather server up but download error - wget: $wget_error" + fi + else + if [[ -f $testDir/weather-feed.xml ]];then + weather_data="$( cat $testDir/weather-feed.xml)" + else + data_grab_error="Error: weather feed xml local file not found." + fi + fi + if [[ -z $( grep -i '' <<< "$weather_data" | sed $SED_RX -e 's/<[^>]*>//g' \ + -e 's/\.[0-9]*//' ) + + # clean off everything before/after observation_location + weather_data=$( sed -e '//,//d' \ + -e '//,/<\/current_observation>/d' <<< "$weather_data" -e 's/^[[:space:]]*$//g' -e '/^$/d' ) + + # echo "$weather_data";exit + weather_array_value=$( gawk -v siteElevation="$site_elevation" ' + function clean(data) { + returnData="" + # some lines might be empty, so ignore those + if (data !~ /^<[^>]+>$/ ) { + returnData=gensub(/(.*>)([^<]*)(<.*)/, "\\2", 1, data) + gsub(/^[[:space:]]+|[[:space:]]+$|NA|N\/A/, "", returnData) + } + return returnData + } + BEGIN { + IGNORECASE=1 + observationTime="" + localTime="" + weather="" + tempString="" + humidity="" + windString="" + pressureString="" + dewpointString="" + heatIndexString="" + windChillString="" + weatherString="" + } + /observation_time>/ { + observationTime=clean($0) + sub(/Last Updated on /, "", observationTime ) + } + /local_time>/ { + localTime=clean($0) + } + / ALL = NOPASSWD: /usr/bin/file (sample) -Does not show components (partitions that create the md raid array) of md-raid arrays. +Does not show components (partitions that create the md raid array) of md\-raid arrays. .TP -.B -p -Show full partition information (\fB-P\fR plus all other detected partitions). +.B \-p +Show full partition information (\fB\-P\fR plus all other detected partitions). .TP -.B -P -Show Partition information (shows what \fB-v 4\fR would show, but without extra data). -Shows, if detected: / /boot /home /tmp /usr /var. Use \fB-p\fR to see all mounted partitions. +.B \-P +Show Partition information (shows what \fB\-v 4\fR would show, but without extra data). +Shows, if detected: / /boot /home /tmp /usr /var. Use \fB\-p\fR to see all mounted partitions. .TP -.B -r +.B \-r Show distro repository data. Currently supported repo types: APT (Debian, Ubuntu + derived versions) @@ -168,246 +168,265 @@ YUM. (Fedora, Redhat, maybe Suse + derived versions) (as distro data is collected more will be added. If your's is missing please show us how to get this information and we'll try to add it.) .TP -.B -R -Show RAID data. Shows RAID devices, states, levels, and components, and extra data with \fB-x\fR / \fB-xx\fR. -md-raid: If device is resyncing, shows resync progress line as well. +.B \-R +Show RAID data. Shows RAID devices, states, levels, and components, and extra data with \fB\-x\fR / \fB\-xx\fR. +md\-raid: If device is resyncing, shows resync progress line as well. .TP -.B --recommends +.B \-\-recommends Checks inxi application dependencies + recommends, and directories, then shows what package(s) you need to install to add support for that feature. .TP -.B -s +.B \-s Show sensors output (if sensors installed/configured): mobo/cpu/gpu temp; detected fan speeds. Gpu temp only for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens. .TP -.B -S -Show System information: host name, kernel, desktop environment (if in X), distro. With \fB-xx\fR show -dm - or startx - (only shows if present and running if out of X), and if in X, with \fB-xxx\fR show more desktop info, like shell/panel etc. +.B \-S +Show System information: host name, kernel, desktop environment (if in X), distro. With \fB\-xx\fR show +dm \- or startx \- (only shows if present and running if out of X), and if in X, with \fB\-xxx\fR show more desktop info, like shell/panel etc. .TP -.B -t \fR[\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR]\fR -Show processes. If followed by numbers \fB1-20\fR, shows that number of processes for each type +.B \-t \fR[\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR]\fR +Show processes. If followed by numbers \fB1\-20\fR, shows that number of processes for each type (default: \fB5\fR; if in irc, max: \fB5\fR) -Make sure to have no space between letters and numbers (\fB-t cm10\fR - right, \fB-t cm 10\fR - wrong). +Make sure to have no space between letters and numbers (\fB\-t cm10\fR \- right, \fB\-t cm 10\fR \- wrong). .TP -.B -t c\fR -- cpu only. With \fB-x\fR, shows also memory for that process on same line. +.B \-t c\fR +\- cpu only. With \fB\-x\fR, shows also memory for that process on same line. .TP -.B -t m\fR -- memory only. With \fB-x\fR, shows also cpu for that process on same line. +.B \-t m\fR +\- memory only. With \fB\-x\fR, shows also cpu for that process on same line. .TP -.B -t cm\fR -- cpu+memory. With \fB-x\fR, shows also cpu or memory for that process on same line. +.B \-t cm\fR +\- cpu+memory. With \fB\-x\fR, shows also cpu or memory for that process on same line. .TP -.B -u -Show partition UUIDs. Default: short partition \fB-P\fR. For full \fB-p\fR output, use: \fB-pu\fR (or \fB-plu\fR). +.B \-u +Show partition UUIDs. Default: short partition \fB\-P\fR. For full \fB\-p\fR output, use: \fB\-pu\fR (or \fB\-plu\fR). .TP -.B -U -Note -- Maintainer may have disabled this function. +.B \-U +Note \- Maintainer may have disabled this function. If inxi \-h has no listing for U then its disabled. -Auto-update script. Note: if you installed as root, you must be root to update, -otherwise user is fine. Also installs /updates this Man Page to: \fB-/usr/share/man/man8\fR +Auto\-update script. Note: if you installed as root, you must be root to update, +otherwise user is fine. Also installs /updates this Man Page to: \fB/usr/share/man/man8\fR This requires that you be root to write to that directory. .TP -.B -V +.B \-V inxi version information. Prints information then exits. .TP -.B --version -same as \fB-V +.B \-\-version +same as \fB\-V .TP -.B -v -Script verbosity levels. Verbosity level number is required. Should not be used with \fB-b\fR or \fB-F\fR. +.B \-v +Script verbosity levels. Verbosity level number is required. Should not be used with \fB\-b\fR or \fB\-F\fR. -Supported levels: \fB0-7\fR Examples :\fB inxi \-v 4 \fR or \fB inxi \-v4\fR +Supported levels: \fB0\-7\fR Examples :\fB inxi \-v 4 \fR or \fB inxi \-v4\fR .TP -.B -v 0 -- Short output, same as: \fBinxi\fR +.B \-v 0 +\- Short output, same as: \fBinxi\fR .TP -.B -v 1 -- Basic verbose, \fB-S\fR + basic CPU + \fB-G\fR + basic Disk + \fB-I\fR. +.B \-v 1 +\- Basic verbose, \fB\-S\fR + basic CPU + \fB\-G\fR + basic Disk + \fB\-I\fR. .TP -.B -v 2 -- Adds networking card (\fB-N\fR), Machine (\fB-M\fR) data, and shows basic hard disk data +.B \-v 2 +\- Adds networking card (\fB\-N\fR), Machine (\fB\-M\fR) data, and shows basic hard disk data (names only). Same as: \fBinxi \-b .TP -.B -v 3 -- Adds advanced CPU (\fB-C\fR); network (\fB-n\fR) data; triggers \fB-x\fR advanced data option. +.B \-v 3 +\- Adds advanced CPU (\fB\-C\fR); network (\fB\-n\fR) data; triggers \fB\-x\fR advanced data option. .TP -.B -v 4 -- Adds partition size/filled data (\fB-P\fR) for (if present):/, /home, /var/, /boot -Shows full disk data (\fB-D\fR) +.B \-v 4 +\- Adds partition size/filled data (\fB\-P\fR) for (if present):/, /home, /var/, /boot +Shows full disk data (\fB\-D\fR) .TP -.B -v 5 -- Adds audio card (\fB-A\fR); sensors (\fB-s\fR), partition label (\fB-l\fR) and UUID (\fB-u\fR), short form of +.B \-v 5 +\- Adds audio card (\fB\-A\fR); sensors (\fB\-s\fR), partition label (\fB\-l\fR) and UUID (\fB\-u\fR), short form of optical drives. .TP -.B -v 6 -- Adds full partition data (\fB-p\fR), unmounted partition data (\fB-o\fR), optical drive data (\fB-d\fR); -triggers \fB-xx\fR extra data option. +.B \-v 6 +\- Adds full partition data (\fB\-p\fR), unmounted partition data (\fB\-o\fR), optical drive data (\fB\-d\fR); +triggers \fB\-xx\fR extra data option. .TP -.B -v 7 -- Adds network IP data (\fB-i\fR); triggers \fB-xxx +.B \-v 7 +\- Adds network IP data (\fB\-i\fR); triggers \fB\-xxx .TP -.B -z -Adds security filters for IP addresses, Mac, and user home directory name. Default on for irc clients. +.B \-w +Adds weather line. Note, this depends on an unreliable api so it may not always be working in the future. +To get weather for an alternate location, use also the \-! location=. See also \-x, \-xx, \-xxx option. .TP -.B -Z +.B \-z +Adds security filters for IP addresses, Mac, location (\-w), and user home directory name. Default on for irc clients. +.TP +.B \-Z Absolute override for output filters. Useful for debugging networking issues in irc for example. .SH EXTRA DATA OPTIONS -These options are for long form only, and can be triggered by one or more \fB-x\fR, like \fB-xx\fR. -Alternately, the \fB-v\fR options trigger them in the following way: -\fB-v 3\fR adds \fB-x\fR; \fB-v 6\fR adds \fB-xx\fR; \fB-v 7\fR adds \fB-xxx\fR +These options are for long form only, and can be triggered by one or more \fB\-x\fR, like \fB\-xx\fR. +Alternately, the \fB\-v\fR options trigger them in the following way: +\fB\-v 3\fR adds \fB\-x\fR; \fB\-v 6\fR adds \fB\-xx\fR; \fB\-v 7\fR adds \fB\-xxx\fR -These extra data triggers can be useful for getting more in-depth data on various options. -Can be added to any long form option list, like: \fB-bxx\fR or \fB-Sxxx\fR +These extra data triggers can be useful for getting more in\-depth data on various options. +Can be added to any long form option list, like: \fB\-bxx\fR or \fB\-Sxxx\fR -There are 3 extra data levels: \fB-x\fR; \fB-xx\fR; and \fB-xxx\fR +There are 3 extra data levels: \fB\-x\fR; \fB\-xx\fR; and \fB\-xxx\fR The following shows which lines / items get extra information with each extra data level. .TP -.B -x -A -- Adds version/port(s)/driver version (if available) for each Audio device. +.B \-x \-A +\- Adds version/port(s)/driver version (if available) for each Audio device. .TP -.B -x -A -- Shows PCI Bus ID/Usb ID number of each Audio device. +.B \-x \-A +\- Shows PCI Bus ID/Usb ID number of each Audio device. .TP -.B -x -C -- bogomips on CPU (if available). +.B \-x \-C +\- bogomips on CPU (if available). .TP -.B -x -d -- Adds items to features line of optical drive; adds rev version to optical drive. +.B \-x \-d +\- Adds items to features line of optical drive; adds rev version to optical drive. .TP -.B -x -D -- Hdd temp with disk data if you have hddtemp installed, if you are root OR if you have added to +.B \-x \-D +\- Hdd temp with disk data if you have hddtemp installed, if you are root OR if you have added to /etc/sudoers (sudo v. 1.7 or newer): .B ALL = NOPASSWD: /usr/sbin/hddtemp (sample) .TP -.B -x -G -- Direct rendering status for Graphics (in X). +.B \-x \-G +\- Direct rendering status for Graphics (in X). .TP -.B -x -G -- (for single gpu, nvidia driver) screen number gpu is running on. +.B \-x \-G +\- (for single gpu, nvidia driver) screen number gpu is running on. .TP -.B -x -G -- Shows PCI Bus ID/Usb ID number of each Graphics card. +.B \-x \-G +\- Shows PCI Bus ID/Usb ID number of each Graphics card. .TP -.B -x -i -- Show IPv6 as well for LAN interface (IF) devices. +.B \-x \-i +\- Show IPv6 as well for LAN interface (IF) devices. .TP -.B -x -I -- Show system GCC, default. With \-xx, also show other installed GCC versions. +.B \-x \-I +\- Show system GCC, default. With \-xx, also show other installed GCC versions. .TP -.B -x -I -- If in shell (not in IRC client, that is), show shell version number (if available). +.B \-x \-I +\- If in shell (not in IRC client, that is), show shell version number (if available). .TP -.B -x -N -- Adds version/port(s)/driver version (if available) for each Network card; +.B \-x \-N +\- Adds version/port(s)/driver version (if available) for each Network card; .TP -.B -x -N -- Shows PCI Bus ID/Usb ID number of each Network card. +.B \-x \-N +\- Shows PCI Bus ID/Usb ID number of each Network card. .TP -.B -x -R -- md-raid: Shows component raid id. Adds second RAID Info line: raid level; report on drives +.B \-x \-R +\- md\-raid: Shows component raid id. Adds second RAID Info line: raid level; report on drives (like 5/5); blocks; chunk size; bitmap (if present). Resync line, shows blocks synced/total blocks. -- zfs-raid: Shows raid array full size; available size; portion allocated to RAID (ie, not available as storage)." +\- zfs\-raid: Shows raid array full size; available size; portion allocated to RAID (ie, not available as storage)." .TP -.B -x -S -- Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version. +.B \-x \-S +\- Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version. .TP -.B -x -t -- Adds memory use output to cpu (\fB-xt c\fR), and cpu use to memory (\fB-xt m\fR). +.B \-x \-t +\- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory (\fB\-xt m\fR). .TP -.B -xx -A -- Adds vendor:product ID of each Audio device. +.B \-x \-w +\- Adds wind speed and time zone, and makes output go to two lines. .TP -.B -xx -D -- Adds disk serial number. +.B \-xx \-A +\- Adds vendor:product ID of each Audio device. .TP -.B -xx -G -- Adds vendor:product ID of each Graphics card. +.B \-xx \-D +\- Adds disk serial number. .TP -.B -xx -I -- Adds other detected installed gcc versions to primary gcc output (if present). +.B \-xx \-G +\- Adds vendor:product ID of each Graphics card. .TP -.B -xx -I -- Adds parent program (or tty) that started shell, if not IRC client, to shell information. +.B \-xx \-I +\- Adds other detected installed gcc versions to primary gcc output (if present). .TP -.B -xx -M -- Adds chassis information, if any data for that is available. Also shows BIOS rom size if using dmidecode. +.B \-xx \-I +\- Adds parent program (or tty) that started shell, if not IRC client, to shell information. .TP -.B -xx -N -- Adds vendor:product ID of each Network card. +.B \-xx \-M +\- Adds chassis information, if any data for that is available. Also shows BIOS rom size if using dmidecode. .TP -.B -xx -R -- md-raid: Adds superblock (if present); algorythm, U data. Adds system info line (kernel support, +.B \-xx \-N +\- Adds vendor:product ID of each Network card. +.TP +.B \-xx \-R +\- md\-raid: Adds superblock (if present); algorythm, U data. Adds system info line (kernel support, read ahead, raid events). Adds if present, unused device line. If device is resyncing, shows resync progress line as well. .TP -.B -xx -S -- Adds, if run in X, display manager type to Desktop information, if present. If none, shows N/A. +.B \-xx \-S +\- Adds, if run in X, display manager type to Desktop information, if present. If none, shows N/A. Supports most known display managers, like xdm, gdm, kdm, slim, lightdm, or mdm. .TP -.B -xx -@ <11-14> -- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR. +.B \-xx \-w +\- Adds humidity and barometric pressure. .TP -.B -xxx -S -- Adds, if run in X, shell/panel type info to Desktop information, if present. If none, shows nothing. -Supports some current desktop extras like gnome-panel, lxde-panel, and others. Added mainly for Mint support. +.B \-xx \-@ <11\-14> +\- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR. +.TP +.B \-xxx \-S +\- Adds, if run in X, shell/panel type info to Desktop information, if present. If none, shows nothing. +Supports some current desktop extras like gnome\-panel, lxde\-panel, and others. Added mainly for Mint support. +.TP +.B \-xxx \-w +\- Adds third line of information: location (city state country), weather observation time, altitude of system. +If wind chill, heat index, or dew point are available, adds a line for to hold that data as well. .SH ADVANCED OPTIONS .TP -.B -! 31 -Turns off hostname in System line. Useful, with \fB-z\fR, for anonymizing your inxi output for posting on +.B \-! 31 +Turns off hostname in System line. Useful, with \fB\-z\fR, for anonymizing your inxi output for posting on forums or IRC. .TP -.B -! 32 +.B \-! 32 Turns on hostname in System line. Overrides inxi config file value (if set): B_SHOW_HOST='false'. +.TP +.B \-! location= +With \-w, get weather for an alternate location. Accepts postal/zip code, city,state pair, or latitude,longitude. +Examples: \-! location=95623 OR \-! location=Boston,MA OR \-! location=\-122.6762 + .SH DEBUGGING OPTIONS .TP -.B -% +.B \-% Overrides defective or corrupted data. .TP -.B -@ -Triggers debugger output. Requires debugging level \fB1-14\fR (\fB8-10\fR - logging of data). +.B \-@ +Triggers debugger output. Requires debugging level \fB1\-14\fR (\fB8\-10\fR \- logging of data). Less than 8 just triggers inxi debugger output on screen. .TP -.B -@ \fR[\fB1\fR-\fB7\fR] -- On screen debugger output. +.B \-@ \fR[\fB1\fR\-\fB7\fR] +\- On screen debugger output. .TP -.B -@ 8 -- Basic logging. Check \fI /home/yourname/.inxi/inxi*.log +.B \-@ 8 +\- Basic logging. Check \fI /home/yourname/.inxi/inxi*.log .TP -.B -@ 9 -- Full file/sys info logging. +.B \-@ 9 +\- Full file/sys info logging. .TP -.B -@ 10 -- Color logging. +.B \-@ 10 +\- Color logging. .TP -.B -@ <11-14> +.B \-@ <11\-14> The following create a tar.gz file of system data, plus collecting the inxi output to file: -To automatically upload debugger data tar.gz file to \fIftp.techpatterns.com\fR: \fBinxi \-xx@ <11-14>\fR +To automatically upload debugger data tar.gz file to \fIftp.techpatterns.com\fR: \fBinxi \-xx@ <11\-14>\fR For alternate ftp upload locations: Example: -.B inxi -! \fIftp.yourserver.com/incoming\fB -xx@ 14\fR +.B inxi \-! \fIftp.yourserver.com/incoming\fB \-xx@ 14\fR .TP -.B -@ 11 -- With data file of xiin read of /sys +.B \-@ 11 +\- With data file of xiin read of /sys .TP -.B -@ 12 -- With xorg conf and log data, xrandr, xprop, xdpyinfo, glxinfo etc. +.B \-@ 12 +\- With xorg conf and log data, xrandr, xprop, xdpyinfo, glxinfo etc. .TP -.B -@ 13 -- With data from dev, disks, partitions, etc., plus xiin data file. +.B \-@ 13 +\- With data from dev, disks, partitions, etc., plus xiin data file. .TP -.B -@ 14 -- Everything, full data collection. +.B \-@ 14 +\- Everything, full data collection. .SH SUPPORTED IRC CLIENTS BitchX, Gaim/Pidgin, ircII, Irssi, Konversation, Kopete, KSirc, KVIrc, Weechat, and Xchat. Plus any others that @@ -418,9 +437,9 @@ To trigger inxi output in your IRC client, pick the appropriate method from the .TP .B Xchat, irssi \fR(and many other IRC clients) -.B /exec -o inxi \fR[\fBoptions\fR] +.B /exec \-o inxi \fR[\fBoptions\fR] -If you leave off the \fB-o\fR, only you will see the output on your local IRC client. +If you leave off the \fB\-o\fR, only you will see the output on your local IRC client. .TP .B Konversation .B /cmd inxi \fR[\fBoptions\fR] @@ -428,7 +447,7 @@ If you leave off the \fB-o\fR, only you will see the output on your local IRC cl To run inxi in konversation as a native script if your distribution or inxi package did not do this for you, create this symbolic link: -.B ln -s /usr/local/bin/inxi /usr/share/kde4/apps/konversation/scripts/inxi +.B ln \-s /usr/local/bin/inxi /usr/share/kde4/apps/konversation/scripts/inxi If inxi is somewhere else, change the path /usr/local/bin to wherever it is located. @@ -437,10 +456,10 @@ Then you can start inxi directly, like this: .B /inxi \fR[\fBoptions\fR] .TP .B WeeChat -.B /shell -o inxi \fR[\fBoptions\fR] +.B /shell \-o inxi \fR[\fBoptions\fR] Before WeeChat can run external scripts like inxi, you need to install the -weechat-plugins package. This is automatically installed for Debian users. +weechat\-plugins package. This is automatically installed for Debian users. Next, if you don't already have it, you need to install shell.py, which is a python script. @@ -453,14 +472,14 @@ Make the script executable by Move it to your home folder: \fI/.weechat/python/autoload/\fR then logout, and start WeeChat with -.B weechat-curses +.B weechat\-curses Top of screen should say what pythons scripts have loaded, and should include shell. Then to run inxi, you would enter a command like this: -.B /shell -o inxi -bx +.B /shell \-o inxi \-bx -If you leave off the \fB-o\fR, only you will see the output on your local weechat. WeeChat +If you leave off the \fB\-o\fR, only you will see the output on your local weechat. WeeChat users may also like to check out the weeget.py .SH INITIALIZATION FILE @@ -487,7 +506,7 @@ inxi main website/svn/wiki, file an issue report: .I http://code.google.com/p/inxi/issues/list .TP post on inxi developer forums: -.I http://techpatterns.com/forums/forum-32.html +.I http://techpatterns.com/forums/forum\-32.html .TP You can also visit .I irc.oftc.net \fRchannel:\fI #smxi @@ -502,17 +521,17 @@ to post issues. is is a fork of locsmif's largely unmaintained yet very clever, infobash script. Original infobash author and copyright holder: -Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif +Copyright (C) 2005\-2007 Michiel de Boer a.k.a. locsmif -inxi version: Copyright (C) 2008-13 Scott Rogers & Harald Hope +inxi version: Copyright (C) 2008\-13 Scott Rogers & Harald Hope Further fixes (listed as known): Horst Tritremmel -Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch. -Jarett.Stevens - dmidecode -M patch for older systems with no /sys +Steven Barrett (aka: damentz) \- usb audio patch; swap percent used patch. +Jarett.Stevens \- dmidecode \-M patch for older systems with no /sys -And a special thanks to the nice people at irc.oftc.net channels #linux-smokers-club and #smxi, -who all really have to be considered to be co-developers because of their non-stop enthusiasm +And a special thanks to the nice people at irc.oftc.net channels #linux\-smokers\-club and #smxi, +who all really have to be considered to be co\-developers because of their non\-stop enthusiasm and willingness to provide real time testing and debugging of inxi development. Without a wide range of diverse Linux kernel based Free Desktop systems to test on, we could diff --git a/inxi.changelog b/inxi.changelog index ffd409e..d22a577 100755 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,34 @@ +===================================================================================== +Version: 1.9.00 +Patch Version: 00 +Script Date: May 17 2013 +----------------------------------- +Changes: +----------------------------------- +New version, new tarball, new man page. Unless disabled by distribution maintainers, offers +weather -w option. With -x, -xx-, -xxx, shows more information. Basic line is just weather +and system time there. -x adds time zone, which is useful for servers, particurly web servers. +-x also adds wind speed. -xx adds humidity and barometric pressure. -xxx adds a possible new line, +if data is available, heat index, wind chill, and dew point. +-xxx also adds a line for location (blocked by irc/-z) / weather observation time. + +-z filter applies as usual to location data, removes it in irc by default. -Z overrides override. + +The api this uses is probably going to be dropped at some point, so this is just going to work +while it works, then it will need to be updated at some point, so don't get very attached to it. + +Also adds option to, with -w: -! location= +This lets users send an alternate location using either or +or (commas for city,state and latitude,longitude are not optional, and the order +must be as listed. + +If There is a developer flag if distro maintainers do not want this enabled, simply set: +B_ALLOW_WEATHER='false' +before packaging and the weather feature will be disabled. + +----------------------------------- +-- Harald Hope - Fri, 17 May 2013 18:47:24 -0700 + ===================================================================================== Version: 1.8.47 Patch Version: 00