VSIDO Community

VSIDO Support => Scripts and How To's => Scripts => Topic started by: Sector11 on January 14, 2013, 05:57:52 PM

Title: Relegated /lost/bin
Post by: Sector11 on January 14, 2013, 05:57:52 PM
This come from "johnraff" over on #!.  I use cbs (the original) and ubs (UBU, sit Ubu, sit) as well.

And while this forum is very young it does work.

It will get better as Google's bots roam around.  ( See, I use Google   :lol: )

vos = VsidO Search - I have it in my path (~/bin) and a simple search:

sector11 @ sector11
13 Jan 13 | 00:26:01 ~
         $ vos Debian
sector11 @ sector11
13 Jan 13 | 00:26:10 ~
         $

gave me:
(http://t.imgbox.com/acfD0tWa.jpg) (http://imgbox.com/acfD0tWa)


#!/bin/bash
# search the VSIDO forums
# by johnraff

USAGE='USAGE:
search words  - search the forum with several words, other google stuff like OR also OK.
"search phrase" - search for fixed phrase
-t topic word - search for topic in title, word anywhere
-t "topic phrase" word - search for "topic phrase" in title, word anywhere
-t topic -t subject - search for topic AND subject in title
-h or --help - this message
etc...'

unset q
while [[ $1 ]]
do
    case $1 in
        -t)
        shift
        if [[ $(echo $1 | wc -w) -eq 1 ]]
        then
            q="$q intitle:$1"
        else
            q="$q intitle:\"$1\""
        fi
        ;;

        -h|--help)
        echo "$USAGE"
        exit 0
        ;;

        *)
        if [[ $(echo $1 | wc -w) -eq 1 ]]
        then
            q="$q $1"
        else
            q="$q \"$1\""
        fi
        ;;
    esac
    shift
done

iceweasel "http://www.google.com/search?q=site:http://vsido.org/forum/ $q"

exit 0

Title: Spanish - English Dictionary
Post by: Sector11 on January 14, 2013, 05:59:08 PM
Now this was a great find.  A terminal based Spanish - English Dictionary using text files.

Smittypaddler - Spanish/English Dictionary for Linux (http://smittypaddler.com/spanish/index.htm)

And I'd like to take this opportunity to thank Tom Smith for this gem!  Thanks Tom!

I installed it in my ~/ (~/spanish) and created a bash function to run it, took a while with Google to learn how to do that.  I'm a noob what can I say.

# Spanish - English dictionary #################################################
function se()
{
  cd $HOME/spanish; ./se "$@" | fold -s ; cd ..
}


the function allows for parameters and words:
se -h
23 Oct 12 | 15:27:16 ~
         $ se -h
Description:  English/Spanish dictionary.

Syntax: se [-a] [-b] [-c] [-e] [-f] [-g[n]] [-h] [-l] [-v] [word or phrase]

Where -

-a    Causes an accent (`) to be inserted before succeeding characters
    in the word or phrase until a hit is found, or the end of the
    word or phrase is encountered.

-b    Builds the (*.i) files used to detect irregular verb forms.  Use this
    switch anytime you add or change and irregular verb form in the
    dictionary.  See the README file.

-c    Builds the (*.e) files used to find the Spanish words for a given
    English word.  This process takes a long time.    As it's
    creating these files, it prints a pound sign (#) on stdout
    for every 100 words processed, so you can have some indication
    it's actually doing something.

-e    List the Spanish words with the equivalent meaning to the word or
    phrase given in english.

-f    Give all of 57 simple conjugate forms of the specified verb, with
    addition description, plus the complex verb forms (see also -k).

-g[n]    The n that follows -g is optional, and takes a default of 1 if
    -g is specified, and 0 otherwise. For various values of n, here's
    the action:

    2    Try to identify all of the actions(verbs) and objects
        that might be either doing or receiving the action,
        but don't attempt to combine prepositional phrases, or
        to combine objects and actions.
    1    Look for translations to individual words and phrases, but
        don't attempt to combine words based on context. 
    0    Try as hard as possible to combine all of the words in
        the Spanish phrase into a single, equivalent English phrase.   

-h    Prints this help text.

-k    Give all of 57 conjugate forms of the specified verb, in a form
    acceptable for a dictionary entry between the lines "conjugate"
    and "end conjugate" (see also -f).

-l    Lists the "like verb" table.  This is a table of some seventy-odd
    numbered entries each listing the infinitive of an irregular
    verb.  If the dictionary entry for another verb lists an
    index into this table using the like() keyword, it's also an
    irregular verb, conjugated in the same fashion as the verb
    indexed in the "like verb" table.

-n    Prevents translation of the output to Unicode characters, e.g. á
    becomes the single lower case a with an acute mark on top.

-p 'category'
    Lists stastics, plus all the spanish words in the given
    category:
        adjective, adverb, article, conjunction, interjection, noun,
        phrase, preposition, pronoun, verb, other, -ar verb, -er verb,
        -ir verb, reflexive verb, regular verb, irregular verb

-s    Lists statistics about the dictionary such as how many verbs,
    pronouns, etc., it contains.

-u    Replace existing old entries in the dictionary files or add new
    entries using the dictionary entries specified on STDIN.

-v    Indicates verbose mode, listing additional information in addition
    to the normal listing of the english meanings for a given Spanish
    word or phrase.

-V    Print the version number, and exit.

-w <regular expression>
    prints all the words in the dictionary that match the given
    regular expression (see the man page perlre, describing perl
    regular expressions). For example, se -w '^lech' would print
    out all the Spanish words beginning with the prefix lech-.

23 Oct 12 | 15:27:24 ~
         $


se casa
23 Oct 12 | 15:46:29 ~
         $ se casa
Result for 'casa':
    Casa is a feminine noun.
    type='feminine noun'
    meaning: (house | home)
Result for 'casa':
    Casa is present indicative(presente de indicativo) of casar(transitive).
    There is a related reflexive verb, casarse.
    Third and second person singular formal.
    type='verb'
    meaning: (you wed | (he | she | it) weds | you marry | (he | she | it)
marries | you impose | (he | she | it) imposes)
Result for 'casa':
    Casa is imperative(imperativo) of casar(transitive).
    There is a related reflexive verb, casarse.
    type='verb'
    meaning: You, (wed! | marry! | impose!)
Result for 'casa':
    Casa is present indicative(presente de indicativo) of
casar(intransitive).
    There is a related reflexive verb, casarse.
    Third and second person singular formal.
    type='verb'
    meaning: (you marry | (he | she | it) marries)
Result for 'casa':
    Casa is imperative(imperativo) of casar(intransitive).
    There is a related reflexive verb, casarse.
    type='verb'
    meaning: You, marry!
Result for 'casa':
    Casa is imperative(imperativo) of casarse.
    type='verb'
    meaning: You, get married!

23 Oct 12 | 15:46:33 ~
         $



Help with English too: se -e house
23 Oct 12 | 15:28:54 ~
         $ se -e house
Result for 'house':
    house = albergar
    house = alojar
    house = ama
    house = banco de liquidación
    house = casa
    house = casa de apartamentos
    house = casa de barro
    house = casal
    house = casco
    house = caserío
    house = caserón
    house = casita
    house = casón
    house = casona
    house = castillo de niepes
    house = chalet
    house = conventillo
    house = dueña
    house = editorial
    house = estancia
    house = garito
    house = gazapón
    house = gobierno
    house = granja
    house = hogar
    house = hostal
    house = huasicama
    house = imprenta
    house = impresor
    house = limpiar la casa entera
    house = mandracho
    house = martillo
    house = mi casa es su casa
    house = mi casa es su casa
    house = morada
    house = palacete
    house = pensión
    house = quinta
    house = sala

23 Oct 12 | 15:29:01 ~
         $


The verb "to be" in Spanish there are two: ser & estar
23 Oct 12 | 15:32:14 ~
         $ se ser
Result for 'ser':
    Ser is a masculine noun.
    type='masculine noun'
    meaning: (being | essence)
Result for 'ser':
    Ser is a verb infinitive(intransitive).
    type='verb'
    meaning: to be

23 Oct 12 | 15:32:16 ~
         $ se estar
Result for 'estar':
    Estar is a verb infinitive(intransitive).
    type='verb'
    meaning: to be

23 Oct 12 | 15:33:21 ~
         $


From 'se -h'
Quote-p 'category'
    Lists stastics, plus all the spanish words in the given
    category:
        adjective, adverb, article, conjunction, interjection, noun,
        phrase, preposition, pronoun, verb, other, -ar verb, -er verb,
        -ir verb, reflexive verb, regular verb, irregular verb
Take a look:
23 Oct 12 | 15:38:42 ~
         $ se -p -ar verb

There are 35590 dictionary entries, of which:
7223 are adjectives
1370 are adverbs
8 are articles
51 are conjunctions
62 are interjections
19271 are nouns
376 are phrases
184 are prepositions
81 are pronouns
6964 are verbs
4102 are -ar verbs
371 are -er verbs
391 are -ir verbs
1356 are reflexive verbs
5514 are regular verbs
1450 are irregular verbs

23 Oct 12 | 15:39:07 ~
         $ se -p -er verb

There are 35590 dictionary entries, of which:
7223 are adjectives
1370 are adverbs
8 are articles
51 are conjunctions
62 are interjections
19271 are nouns
376 are phrases
184 are prepositions
81 are pronouns
6964 are verbs
4102 are -ar verbs
371 are -er verbs
391 are -ir verbs
1356 are reflexive verbs
5514 are regular verbs
1450 are irregular verbs

23 Oct 12 | 15:39:24 ~
         $ se -p -ir verb

There are 35590 dictionary entries, of which:
7223 are adjectives
1370 are adverbs
8 are articles
51 are conjunctions
62 are interjections
19271 are nouns
376 are phrases
184 are prepositions
81 are pronouns
6964 are verbs
4102 are -ar verbs
371 are -er verbs
391 are -ir verbs
1356 are reflexive verbs
5514 are regular verbs
1450 are irregular verbs

23 Oct 12 | 15:39:35 ~
         $


Mistype something!  It will tell you what you typed, not what you meant to type, BUT sometimes a wrong word gives a right answer.  :D
23 Oct 12 | 15:48:14 ~
         $ se ecasar
Result for 'ecasar':
    No hits on 'ecasar'
    type='unknown'
    meaning: ecasar

23 Oct 12 | 15:48:27 ~
         $ se linux
Result for 'linux':
    No hits on 'linux'
    type='unknown'
    meaning: linux

23 Oct 12 | 15:48:40 ~
         $

Yea, that's what I meant: linux

I hope others find it useful.
Title: inxi the super script - bash aliases
Post by: Sector11 on January 14, 2013, 06:00:13 PM
VSIDO comes with inxi :: a full featured system information script (http://code.google.com/p/inxi/) already installed.

I have to admit I kinda pushed for it a bit.  I think you'll like it.
here are some bash aliases I have created:

### inxi ###
## System info using inxi
## Short ##
alias s11='inxi -Fz -c24' ## filtered
alias S11='inxi -F -c24' ## not filtered
## Full ##
alias SYS='inxi -ACDfGIpluNrsSt cm3 -x -v7 -c24' ## not filtered
alias sys='inxi -ACDfGIpluNrsSt cm3 -x -v7 -c24 -z' ## Filtered
## Pieces ##
alias aud='inxi -A -x -c24'
alias cpu='inxi -Cf -x -c24'
alias hdd='inxi -Dd -x -c24'
alias mac='inxi -M -x -c24'
alias nwk='inxi -N -x -c24'
alias par='inxi -plu -x -c24'
alias sen='inxi -s -x -c24'
alias sou='inxi -A -x -c24'
alias vid='inxi -Gx -x -c24'
### inxi ###


Some samples:

A short output:
sector11 @ sector11
28 Dec 12 | 23:11:17 ~
         $ s11
Resuming in non X mode: glxinfo not found. For package install advice run: inxi --recommends
System:    Host: sector11 Kernel: 3.7.0-1.dmz.2-liquorix-amd64 x86_64 (64 bit)
           Desktop: Openbox 3.5.0 Distro: Debian GNU/Linux 7.0
Machine:   Mobo: ECS model: MCP61M-M3 version: 7.0 Bios: American Megatrends version: 080015 date: 11/03/2010
CPU:       Triple core AMD Athlon II X3 450 (-MCP-) cache: 1536 KB flags: (lm nx sse sse2 sse3 sse4a svm)
           Clock Speeds: 1: 3214.368 MHz 2: 3214.368 MHz 3: 3214.368 MHz
Graphics:  Card: NVIDIA GT218 [GeForce 210] X.org: 1.12.4 driver: nvidia Resolution: 132x44
Audio:     Card-1: NVIDIA MCP61 High Definition Audio driver: snd_hda_intel Sound: ALSA ver: k3.7.0-1.dmz.2-liquorix-amd64
           Card-2: NVIDIA High Definition Audio Controller driver: snd_hda_intel
Network:   Card: NVIDIA MCP61 Ethernet driver: forcedeth
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 250.1GB (23.5% used) 1: id: /dev/sda model: WDC_WD2500AAJS size: 250.1GB
Partition: ID: / size: 15G used: 7.1G (51%) fs: ext4 ID: /home size: 15G used: 3.8G (27%) fs: ext4
           ID: swap-1 size: 4.00GB used: 0.00GB (0%) fs: swap
Sensors:   System Temperatures: cpu: 50.0C mobo: 42.0C gpu: 47C
           Fan Speeds (in rpm): cpu: 3067 fan-2: 0 fan-3: 0
Info:      Processes: 145 Uptime: 30 min Memory: 598.5/5962.6MB Runlevel: 2 Client: Shell inxi: 1.8.19
sector11 @ sector11
28 Dec 12 | 23:11:24 ~
         $


Partition Information:
sector11 @ sector11
28 Dec 12 | 23:12:13 ~
         $ par
Resuming in non X mode: glxinfo not found. For package install advice run: inxi --recommends
Partition: ID: / size: 15G used: 7.1G (51%) fs: ext4 dev: /dev/sda8
           label: N/A uuid: dbb1fb09-8afe-46ef-978e-35fb8a1c6a8c
           ID: /media/5 size: 115G used: 35G (33%) fs: ext4 dev: /dev/sda5
           label: N/A uuid: 6fc763f2-2587-4572-bc51-39726ab34fc6
           ID: /media/sda6 size: 9.2G used: 4.3G (50%) fs: ext4 dev: /dev/sda6
           label: N/A uuid: 62874c9e-7f1b-4204-a273-f0699e31c62c
           ID: /media/sda7 size: 14G used: 4.9G (38%) fs: ext4 dev: /dev/sda7
           label: N/A uuid: fff46aa2-f36b-4e78-8135-736f1754a2a3
           ID: /home size: 15G used: 3.8G (27%) fs: ext4 dev: /dev/sda9
           label: N/A uuid: 93e5a130-792c-4883-9104-08c1af32da2a
           ID: swap-1 size: 4.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
           label: N/A uuid: 251904d7-8bd5-4da6-8dec-fb942ac57f98
sector11 @ sector11
28 Dec 12 | 23:12:16 ~
         $


Machine info:
sector11 @ sector11
28 Dec 12 | 23:13:46 ~
         $ mac
Resuming in non X mode: glxinfo not found. For package install advice run: inxi --recommends
Machine:   Mobo: ECS model: MCP61M-M3 version: 7.0 Bios: American Megatrends version: 080015 date: 11/03/2010
sector11 @ sector11
28 Dec 12 | 23:13:54 ~
         $

hmmmmmm glxinfo not installed... I installed it: mesa-utils
sector11 @ sector11
28 Dec 12 | 23:17:19 ~
         $ mac
Machine:   Mobo: ECS model: MCP61M-M3 version: 7.0 Bios: American Megatrends version: 080015 date: 11/03/2010
sector11 @ sector11
28 Dec 12 | 23:17:23 ~
         $

one more just for fun - drive info:
sector11 @ sector11
28 Dec 12 | 23:18:18 ~
         $ hdd
Drives:    HDD Total Size: 250.1GB (23.5% used) 1: id: /dev/sda model: WDC_WD2500AAJS size: 250.1GB
           Optical: /dev/sr0 model: N/A rev: N/A dev-links: cdrom,cdrw,dvd,dvdrw
           Features: speed: 48x multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: N/A
sector11 @ sector11
28 Dec 12 | 23:18:21 ~
         $


The full box:
sector11 @ sector11
28 Dec 12 | 23:20:19 ~
         $ sys
System:    Host: sector11 Kernel: 3.7.0-1.dmz.2-liquorix-amd64 x86_64 (64 bit, gcc: 4.7.2)
           Desktop: Openbox 3.5.0 dm: lightdm Distro: Debian GNU/Linux 7.0
Machine:   Mobo: ECS model: MCP61M-M3 version: 7.0 Bios: American Megatrends version: 080015 date: 11/03/2010
CPU:       Triple core AMD Athlon II X3 450 (-MCP-) cache: 1536 KB bmips: 19286.2
           Clock Speeds: 1: 3214.368 MHz 2: 3214.368 MHz 3: 3214.368 MHz
           CPU Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx
           fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid
           pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate
           npt lbrv svm_lock nrip_save
Graphics:  Card: NVIDIA GT218 [GeForce 210] bus-ID: 02:00.0 X.Org: 1.12.4 driver: nvidia Resolution: 1280x1024@60.0hz
           GLX Renderer: GeForce 210/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 310.19 Direct Rendering: Yes
Audio:     Card-1: NVIDIA MCP61 High Definition Audio driver: snd_hda_intel bus-ID: 00:05.0
           Card-2: NVIDIA High Definition Audio Controller driver: snd_hda_intel bus-ID: 02:00.1
           Sound: Advanced Linux Sound Architecture ver: k3.7.0-1.dmz.2-liquorix-amd64
Network:   Card: NVIDIA MCP61 Ethernet driver: forcedeth port: d480 bus-ID: 00:07.0
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
           WAN IP: <filter> IF: eth0 ip: <filter> ip-v6: <filter>
Drives:    HDD Total Size: 250.1GB (23.5% used)
           1: id: /dev/sda model: WDC_WD2500AAJS size: 250.1GB serial: WD-WCARY1442084
           Optical: /dev/sr0 model: N/A rev: N/A dev-links: cdrom,cdrw,dvd,dvdrw
           Features: speed: 48x multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: N/A
Partition: ID: / size: 15G used: 7.1G (51%) fs: ext4 dev: /dev/sda8
           label: N/A uuid: dbb1fb09-8afe-46ef-978e-35fb8a1c6a8c
           ID: /media/5 size: 115G used: 35G (33%) fs: ext4 dev: /dev/sda5
           label: N/A uuid: 6fc763f2-2587-4572-bc51-39726ab34fc6
           ID: /media/sda6 size: 9.2G used: 4.3G (50%) fs: ext4 dev: /dev/sda6
           label: N/A uuid: 62874c9e-7f1b-4204-a273-f0699e31c62c
           ID: /media/sda7 size: 14G used: 4.9G (38%) fs: ext4 dev: /dev/sda7
           label: N/A uuid: fff46aa2-f36b-4e78-8135-736f1754a2a3
           ID: /home size: 15G used: 3.8G (27%) fs: ext4 dev: /dev/sda9
           label: N/A uuid: 93e5a130-792c-4883-9104-08c1af32da2a
           ID: swap-1 size: 4.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
           label: N/A uuid: 251904d7-8bd5-4da6-8dec-fb942ac57f98
RAID:      No RAID data available - /proc/mdstat is missing - is md_mod kernel module loaded?
Unmounted: ID: /dev/sda1 size: 10.00G label: N/A uuid: 0aab8b5f-76b5-4207-9bb8-cfac874667fe
           ID: /dev/sda2 size: 15.00G label: N/A uuid: 6de75be6-fb69-41a5-a073-d75e7098323d
           ID: /dev/sda10 size: 16.11G label: N/A uuid: f3281308-3831-47b0-aae0-991fc8b9b60c
           ID: /dev/sda11 size: 22.74G label: N/A uuid: 026f316b-6ee1-4452-a406-2aa3f31498da
           ID: /dev/sr0 size: 1.07G label: N/A uuid: N/A
Sensors:   System Temperatures: cpu: 50.0C mobo: 42.0C gpu: 0.0:49C
           Fan Speeds (in rpm): cpu: 3018 fan-2: 0 fan-3: 0
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://ftp.us.debian.org/debian/ sid main contrib non-free
           deb-src ftp://ftp.us.debian.org/debian/ sid main contrib non-free
           deb http://www.deb-multimedia.org sid main non-free
           deb http://ftp.us.debian.org/debian/ experimental main contrib non-free
           deb http://mozilla.debian.net/ experimental iceweasel-aurora
           Active apt sources in file: /etc/apt/sources.list.d/ignorantguru.list
           deb http://ignorantguru.github.com/debian/ unstable main
           Active apt sources in file: /etc/apt/sources.list.d/liquorix.list
           deb http://liquorix.net/debian/ sid main
           Active apt sources in file: /etc/apt/sources.list.d/xfcenext.list
           deb http://ftp.spline.de/pub/siduction/xfcenext unstable main
Processes: CPU - % used - top  3 active
           1: cpu: 14.2% command: X pid: 3509 mem: 55.86MB (0.9%)
           2: cpu: 10.8% command: firefox-bin pid: 3929 mem: 257.48MB (4.3%)
           3: cpu: 6.6% command: conky pid: 4141 mem: 7.63MB (0.1%)
           Memory - MB / % used - top  3 active
           1: mem: 257.48MB (4.3%) command: firefox-bin pid: 3929 cpu: 10.8%
           2: mem: 70.00MB (1.1%) command: synaptic pid: 19855 cpu: 1.4%
           3: mem: 55.86MB (0.9%) command: X pid: 3509 cpu: 14.2%
Info:      Processes: 150 Uptime: 40 min Memory: 637.9/5962.6MB Runlevel: 2 Gcc sys: 4.7.2 alt: 4.4/4.6
           Client: Shell inxi: 1.8.19
sector11 @ sector11
28 Dec 12 | 23:20:53 ~
         $


I hope you enjoy it.
Title: Re: inxi the super script - bash aliases
Post by: jedi on January 14, 2013, 09:32:31 PM
Very nice HowTo Sector11.  I'll be using the ssc.sh script myself!  Great idea.  Thanks for this.
Title: Re: inxi the super script - bash aliases
Post by: jst_joe on January 14, 2013, 10:01:46 PM
Quote from: Sector11 on January 14, 2013, 06:00:13 PM
I hope you enjoy it.

Yes I do!
Thank You
Title: man pages to pdf
Post by: Sector11 on February 07, 2013, 11:55:27 PM
I've been using it ever since johnraff posted it:

pman
#!/bin/bash
# oneliner from commandlinefu.com
# man -t $1 | ps2pdf - - | epdfview -
# bash script from johnraff
# pman filename
# convert man page to pdf & show on epdfview/evince

file=$(mktemp)
man -t $1 | ps2pdf - $file
epdfview $file
rm $file
exit



Usage: pman wget

(http://t.imgbox.com/adnZRq1k.jpg) (http://imgbox.com/adnZRq1k)

One thing to note, closing the terminal closes the pdf and it's gone, it's is a temproary file.
Title: Re: man pages to pdf
Post by: VastOne on February 07, 2013, 11:59:15 PM
^ Very cool...

A couple of questions...

Name the file pman and save it in a path location? And then does it need to be made executable?
Title: Re: man pages to pdf
Post by: Sector11 on February 08, 2013, 12:01:50 AM
Oops, yes, it needs to be executable and in the path.

I keep all my bash files in ~/bin that is in my path, that way I own them and never have a problem with them.
Title: sfetch to sf -> with VSIDO
Post by: Sector11 on February 10, 2013, 05:49:41 PM
The bash script 'sfetch' wraps the kernel line in my default terminal, grrrrrr:

(http://t.imgbox.com/abmFVEvC.jpg) (http://imgbox.com/abmFVEvC)

so while the 'machine' did the laundry, I played with 'sf'.

First I went to Text to ASCII Art Generator (TAAG) (http://patorjk.com/software/taag/#p=testall&h=1&v=1&f=TRaC%20Tiny&t=V%0AS%0AI%0AD%0AO) where I loaded and went through all 304 samples:


  *   )           )                   (    (  (   
` )  /(  (     ( /((        (  (      )\   )\ )\ 
( )(_))))\(   )\())\  (    )\))(  ((((_)(((_)(_)
(_(_())/((_)\ (_))((_) )\ )((_))\   )\ _ )\)_()_)
|_   _(_))((_)| |_ (_)_(_/( (()(_)  (_)_\(_) || |
  | | / -_|_-<|  _|| | ' \)) _` |    / _ \ | || |
  |_| \___/__/ \__||_|_||_|\__, |   /_/ \_\|_||_|
                           |___/                 

Loaded: 304 of 304


and made a selection, there are a lot that would work, this is what I chose.

(http://t.imgbox.com/abfklBzS.jpg) (http://imgbox.com/abfklBzS)

Next I copied /usr/local/bin/sfetch to ~/bin/sf. Now that's mine to bend, fold and mutilate as I choose.

Then I went to where VSIDO was getting it's LOGO and personalized it:
"VSIDO")
c1="\e[1;37m" # White
c2="\e[1;31m" # Light Red
if [ -n "${my_lcolor}" ]; then c1="${my_lcolor}"; c2="${my_lcolor}"; fi
startline="0"
fulloutput=("  $c1  __  _,  %s"
"  $c1 (-\  /  %s"
"  $c1   _\/   %s"
"  $c1  (___,  %s"
"  $c1 (-(__   %s"
"  $c1  ____)  %s"
"  $c1 ( __,   %s"
"  $c1  (-|    %s"
"  $c1   _|_,  %s"
"  $c1  (___,  %s"
"  $c1 (-|  \  %s"
"  $c1  _|__/  %s"
"  $c1 (____,  %s"
"  $c1 (-/  \  %s"
"  $c1  _\__/, %s"
"  $c1 (       %s"
"  $c1         ")
;;

"CrunchBang")


Just because I could.

Another interesting thing I have noticed is that /usr/local/bin/sfetch says:

OS: Unknown 1_2 VSIDO


while ~/bin/sf says:

OS: VSIDO 1_2 VSIDO

which simply does not make sense.  sf is a copy of sfetch with only the logo changed.

Oh well, my next move is to install the latest VSIDO over this one (keeping home), that should fix it.
Title: Re: sfetch to sf -> with VSIDO
Post by: VastOne on February 10, 2013, 06:08:58 PM
It is possible you are not in sync with what is the latest

There are 4 things that are needed for both sfetch and archey to display properly

/usr/local/bin/sfetch  - Is a modified screenfetch that I tweaked to add VSIDO, which I had to do the same for /usr/bin/archey

The correct sfetch and archey are attached to this message

The additional files needed are these:

/etc/lsb-release

DISTRIB_ID=VSIDO
DISTRIB_RELEASE=1_2
DISTRIB_CODENAME=VSIDO
DISTRIB_DESCRIPTION="VSIDO 1_2"


/etc/os-release

PRETTY_NAME="VSIDO"
NAME="VSIDO"
VERSION_ID="1.2"
VERSION="1.2"
ID=debian
ANSI_COLOR="1;31"


/etc/vsido-release

DISTRIB_ID=VSIDO
DISTRIB_RELEASE=1_2
DISTRIB_CODENAME=VSIDO
DISTRIB_DESCRIPTION="VSIDO 1_2"


Title: Re: sfetch to sf -> with VSIDO
Post by: Sector11 on February 10, 2013, 07:07:01 PM
Now this is even more confusing.  I knew my "sfetch" was not the latest.  So I loaded sudo spacefm and copied  '/media/sda1/usr/local/bin/sfetch', which is root for the latest ISO I installed yesterday.

The results are what you see above.  Funny, the version saved as 'sf', from the copied  '/media/sda1/usr/local/bin/sfetch' saved to my '/usr/local/bin/sfetch' worked but sfetched didn't.

The other three files are already here ... exactly as shown.

The two files downloaded work just fine.

Take a look, is Rod Serling standing behind me?  I hear the music...

I still like the little "sf" version though  :D
Title: Re: sfetch to sf -> with VSIDO
Post by: VastOne on February 10, 2013, 07:41:18 PM
Sounds like a path issue...

I would make sure you are running the correct sfetch with it's absolute path

/usr/local/bin/sfetch

If all files are correctly in place, there is no way that will fail...

Title: Re: sfetch to sf -> with VSIDO
Post by: Sector11 on February 10, 2013, 08:04:20 PM
I've been using screenfetch and archey for years now, but always had them in ~/bin.

When you mentioned that VSIDO had them I dropped the ~/bin versions and ran then from /usr/local/bin/ even though that seems strange to me.   Those are owned by root, where in ~/bin I one them and I can edit them.  BUT, I want to get used to how VSIDO works.  I still have plenty of other scripts in ~/bin.

Including inxi as I don't need root with it there, still can't figure that out.  Some of us need root others don't.
Title: Re: sfetch to sf -> with VSIDO
Post by: VastOne on February 10, 2013, 08:16:06 PM
That is a very cool ascii rendition of VSIDO...

I wanted to keep it as a debian swirl in both sfetch and archey, I think VSIDO is more debian than anything and want to make sure everyone knows that

As far as /usr/local/bin, it is the one place that I can put scripts and know they will be in the path.  There have been issues with /sbin and /usr/sbin being seen in the path in the past and I believe /usr/local/bin resolves it

Of course you can edit those files in /usr/local/bin as root at anytime with the same results.  One of the things I really like about SpaceFM is the ability to edit as root with a simple right click on the file
Title: Re: sfetch to sf -> with VSIDO
Post by: Sector11 on February 10, 2013, 09:42:11 PM
Yes, I know you want to keep the Debian swirl.  I only did this because the line is so long in sfetch it ruins the symmetric balance.  Just some thing do do and to try an learn something.

Sfetch says "kernel" but has non-kernel info on that line:
Kernel: x86_64 Linux 3.7.0-6.dmz.2-liquorix-amd64
x86_64 & Linux are not the kernel

Archie on the other hand has it as only the kernel:
Kernel: 3.7.0-6.dmz.2-liquorix-amd64

And just so you know, this is not based on archey nor sfetch - another I'm "playing" with.


sector11 @ sector11
10 Feb 13 | 18:39:45 ~
         $ vsido
df: '/root/.gvfs': Permission denied
   ____     
  ||V ||    OS: GNU/Linux x86_64
  ||__||    Hostname: sector11
  |____|    Kernel: 3.7.0-6.dmz.2-liquorix-amd64
   ____     Uptime: 11:22
  ||S ||    Window Manager: Openbox
  ||__||    Packages: Unknown
  |____|    RAM: 624 MB / 5962 MB
   ____     CPU: AMD Athlon(tm) II X3 450 Processor
  ||I ||    CPU Freq: 3214.607 MHz
  ||__||    Shell: Bash
  |____|    Root: 7.4G / 15G (53%) (ext4)
   ____     Home: 1.6G / 15G (12%) (ext4)
  ||D ||    5: 37G / 115G (34%) (ext4)
  ||__||    Sda1: 6.1G / 9.2G (70%) (ext4)
  |____|    Sda2: 338M / 14G (3%) (ext4)
   ____     Cdrom: 3.7G / 3.7G (udf)
  ||O || 
  ||__|| 
  |____| 

sector11 @ sector11
10 Feb 13 | 18:39:48 ~
         $



No idea where that
df: '/root/.gvfs': Permission denied
is coming from though.

I'll find it.  :D
Title: Re: sfetch to sf -> with VSIDO
Post by: VastOne on February 10, 2013, 09:49:19 PM
I used to see that but just increased the size of my terminal to match it...   :D

Archie correctly uses uname-r to get the kernel, sfectch uses a variation of uname -a to pull it

Archey uses the more standard linux conventions while sfetch went in several different directions

It took me 2 minutes to get archey to work with vsido and 3 days to get sfetch done

Guess you can imagine which one I prefer
Title: Re: sfetch to sf -> with VSIDO
Post by: Sector11 on February 10, 2013, 10:54:01 PM
  Well, archey was first, and then he published it with a .deb - then that stopped.  It's a python script, I have never touched it.

Then screenfetch came out, displayed a little different info. Bash script, never really understood how it does things either, but every now and then I play with it.  Like I did today, nothing serious just for fun.  I usually mess it up so bad I have to start over again.  :D

Guess huh ... archey, jughead ... Oh I know, veronica (http://vsido.org/index.php/topic,53.msg2179.html#msg2179), in the rain with black pants and VSIDO on them. ???

... now I need glasses!  -->> archey of course.
Title: Re: sfetch to sf -> with VSIDO
Post by: VastOne on February 10, 2013, 11:20:59 PM
The archey python is actually done very nicely so that it is easy to edit, you will see it looking at it ..  It is not much different than a bash file and you can copy and paste from the existing to create what you want

What I am saying is that it is not really that difficult   :P
Title: Re: sfetch to sf -> with VSIDO
Post by: Sector11 on February 11, 2013, 10:38:59 PM
Yea, but programming languages are a bit deep for me.  Someday, maybe, I'll take a boo.  :D
Title: Re: sfetch to sf -> with VSIDO
Post by: VastOne on February 11, 2013, 11:16:24 PM
Python is very similar to bash ... I would suggest opening archey and you will see the code is just as easy to copy and paste from one area to another and make the format you would want

I do not know how to code in python, but I know how to manipulate it to do what I want it to do
Title: Re: sfetch to sf -> with VSIDO
Post by: Sector11 on February 11, 2013, 11:42:00 PM
Hahahahaha after a few years of bugging the hell out of Mark (conkyForecast - python) I know when it walking knee deep in mud.  And bugging mrpeachy for what seemed like forever on siple things with LUA - like how do I run it - MANY TIMES, I revisited the mud level again.  :D

Like I said ... someday.
Title: conkyForecast - but not conky!
Post by: Sector11 on March 29, 2013, 10:04:38 PM
OK when Kaivalagi created conkyForcast it was for - well - conky.  But it does have a command line function as well.
in a terminal:
conkyForecast
you will see a temperature.

So Habitual created a 4 day forcast bash script - nothing for today - I added today and gave it six more days.

The original code:
#!/bin/bash
# 4 Day Weather forecast script for Boardman, OH
# Written by John Jones ie: Habitual
# 11.01.2010 12:10:07

# Clear the screen
tput clear

# Tomorrow...(Top-Left Quadrant of output)
tput cup 0 0
echo "Forecast for" `date --date="1 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
tput cup 1 0
echo "----------------------------"
tput cup 2 0
echo "Low: " `conkyForecast --location=ARBA0009 -d LT --startday 1`
tput cup 3 0
echo "High:" `conkyForecast --location=ARBA0009 -d HT --startday 1`
tput cup 4 0
echo "Humidity:" `conkyForecast --location=ARBA0009 -d HM  --startday 1`
tput cup 5 0
echo `conkyForecast --location=ARBA0009 -d CT --startday 1`
tput cup 6 0
tput bold; tput setaf 1;
echo "Precipitation:" `conkyForecast --location=ARBA0009 -d PC --startday 1`
tput sgr0

# Tomorrow +1...(Top-Right Quadrant of output)
tput cup 0 40
echo "Forecast for" `date --date="2 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
tput cup 1 40
echo "----------------------------"
tput cup 2 40
echo "Low: " `conkyForecast --location=ARBA0009 -d LT --startday 2`
tput cup 3 40
echo "High:" `conkyForecast --location=ARBA0009 -d HT --startday 2`
tput cup 4 40
echo "Humidity:" `conkyForecast --location=ARBA0009 -d HM  --startday 2`
tput cup 5 40
echo `conkyForecast --location=ARBA0009 -d CT --startday 2`
tput cup 6 40
tput bold; tput setaf 1;
echo "Precipitation:" `conkyForecast --location=ARBA0009 -d PC --startday 2`
tput sgr0

# Tomorrow +2...(Bottom-Left Quadrant of output)
tput cup 9 0
echo "Forecast for" `date --date="3 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
tput cup 10 0
echo "----------------------------"
tput cup 11 0
echo "Low: " `conkyForecast --location=ARBA0009 -d LT --startday 3`
tput cup 12 0
echo "High:" `conkyForecast --location=ARBA0009 -d HT --startday 3`
tput cup 13 0
echo "Humidity:" `conkyForecast --location=ARBA0009 -d HM  --startday 3`
tput cup 14 0
echo `conkyForecast --location=ARBA0009 -d CT --startday 3`
tput cup 15 0
tput bold; tput setaf 1;
echo "Precipitation:" `conkyForecast --location=ARBA0009 -d PC --startday 3`
tput sgr0

# Tomorrow +3...(Bottom-Right Quadrant of output)
tput cup 9 40
echo "Forecast for" `date --date="4 day" | awk '{print $1 ", " $2 " "$3 "  "$6}'`
tput cup 10 40
echo "----------------------------"
tput cup 11 40
echo "Low: " `conkyForecast --location=ARBA0009 -d LT --startday 4`
tput cup 12 40
echo "High:" `conkyForecast --location=ARBA0009 -d HT --startday 4`
tput cup 13 40
echo "Humidiy:" `conkyForecast --location=ARBA0009 -d HM  --startday 4`
tput cup 14 40
echo `conkyForecast --location=ARBA0009 -d CT --startday 4`
tput cup 15 40
tput bold; tput setaf 1;
echo "Precipitation:" `conkyForecast --location=ARBA0009 -d PC --startday 4`
tput sgr0

tput cup 17 0


The output:
Forecast for Mon, Jan 14 2013           Forecast for Tue, Jan 15 2013
----------------------------            ----------------------------
Low:  20°C                              Low:  22°C
High: 32°C                              High: 33°C
Humidity: 51%                           Humidity: 46%
Partly Cloudy                           Clear
Precipitation: 0%                       Precipitation: 0%


Forecast for Wed, Jan 16 2013           Forecast for Thu, Jan 17 2013
----------------------------            ----------------------------
Low:  22°C                              Low:  21°C
High: 33°C                              High: 31°C
Humidity: 48%                           Humidiy: 58%
Partly Cloudy                           Scattered Thunderstorms
Precipitation: 0%                       Precipitation: 30%

sector11 @ sector11
13 Jan 13 | 18:38:28 ~
         $


My altered version I call cf7
#!/bin/bash
# --- original ---
# 4 Day Weather forecast script for Boardman, OH
# Written by John Jones ie: Habitual
# 11.01.2010 12:10:07
# --- Edited by Sector11 ---
# 7 Day Forecast
# ~/bin/cf7
# 13 Jan 2013 14:08 UTC
# conkyForecast by: Kaivalagi


# Clear the screen
tput clear
# Today (Left 1st Group)
tput cup 0 0
echo "Today" `date --date="0 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 1 0
echo "----------------------------------"
tput cup 2 0
tput bold; tput setaf 2;
echo "C" `conkyForecast --location=ARBA0009 -d HT --hideunits`
tput cup 2 8
tput bold; tput setaf 6;
echo "±" `conkyForecast --location=ARBA0009 -d LT --hideunits`
tput sgr0
tput cup 2 16
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 0`
tput cup 2 25
echo "CoR" `conkyForecast --location=ARBA0009 -d PC --startday 0`
tput cup 3 0
echo `conkyForecast --location=ARBA0009 -d CT --startday 0`


# Today Forcast (Right 1st Group)
tput cup 0 40
echo "Today Continues"
tput cup 1 40
echo "----------------------------------"
tput cup 2 40
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 0`
tput cup 2 48
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 0`
tput sgr0
tput cup 2 56
echo "SR" `conkyForecast --location=ARBA0009 -d SR  --startday 0`
tput cup 2 65
echo "SS" `conkyForecast --location=ARBA0009 -d SS --startday 0`
tput cup 3 40
tput bold; tput setaf 2;
echo "Bar" `conkyForecast --location=ARBA0009 -d BR`
tput cup 3 53
tput bold; tput setaf 6;
echo `conkyForecast --location=ARBA0009 -d BD`
tput sgr0
tput cup 3 64
echo "Day" `conkyForecast --location=ARBA0009 -d DL --startday 0`


# Tomorrow (Left - 2nd Group)
tput cup 5 0
echo `date --date="1 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 6 0
echo "----------------------------------"
tput cup 7 0
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 1`
tput cup 7 8
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 1`
tput sgr0
tput cup 7 16
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 1`
tput cup 7 25
echo "CoR" `conkyForecast --location=ARBA0009 -d PC --startday 1`
tput cup 8 0
echo `conkyForecast --location=ARBA0009 -d CT --startday 1`
tput sgr0

# Tomorrow +1...(Right - 2nd Group)
tput cup 5 40
echo `date --date="2 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 6 40
echo "----------------------------------"
tput cup 7 40
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 2`
tput cup 7 48
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 2`
tput sgr0
tput cup 7 56
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 2`
tput cup 7 65
echo "CoR" `conkyForecast --location=ARBA0009 -d PC --startday 2`
tput cup 8 40
echo `conkyForecast --location=ARBA0009 -d CT --startday 2`
tput sgr0

# Tomorrow +2...(Left 3rd Group)
tput cup 10 0
echo `date --date="3 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 11 0
echo "----------------------------------"
tput cup 12 0
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 3`
tput cup 12 8
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 3`
tput sgr0
tput cup 12 16
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 3`
tput cup 12 25
echo "CoR " `conkyForecast --location=ARBA0009 -d PC --startday 3`
tput cup 13 0
echo `conkyForecast --location=ARBA0009 -d CT --startday 3`

# Tomorrow +3...(Right 3rd Group)
tput cup 10 40
echo `date --date="4 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 11 40
echo "----------------------------------"
tput cup 12 40
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 4`
tput cup 12 48
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 4`
tput sgr0
tput cup 12 56
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 4`
tput cup 12 65
echo "CoR" `conkyForecast --location=ARBA0009 -d PC --startday 4`
tput cup 13 40
echo `conkyForecast --location=ARBA0009 -d CT --startday 4`

# Tomorrow +4...(Left 4th Group)
tput cup 15 0
echo `date --date="5 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 16 0
echo "----------------------------------"
tput cup 17 0
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 5`
tput cup 17 8
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 5`
tput sgr0
tput cup 17 16
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 5`
tput cup 17 25
echo "CoR " `conkyForecast --location=ARBA0009 -d PC --startday 5`
tput cup 18 0
echo `conkyForecast --location=ARBA0009 -d CT --startday 5`

# Tomorrow +5...(Right 4th Group)
tput cup 15 40
echo `date --date="6 day" | awk '{print $1", "$3" "$2" "$6}'`
tput cup 16 40
echo "----------------------------------"
tput cup 17 40
tput bold; tput setaf 2;
echo "H" `conkyForecast --location=ARBA0009 -d HT --hideunits --startday 6`
tput cup 17 48
tput bold; tput setaf 6;
echo "L" `conkyForecast --location=ARBA0009 -d LT --hideunits --startday 6`
tput sgr0
tput cup 17 56
echo "Hum" `conkyForecast --location=ARBA0009 -d HM  --startday 6`
tput cup 17 65
echo "CoR" `conkyForecast --location=ARBA0009 -d PC --startday 6`
tput cup 18 40
echo `conkyForecast --location=ARBA0009 -d CT --startday 6`

tput sgr0
tput cup 22 0


The output:
Today Sun, 13 Jan 2013                  Today Continues
----------------------------------      ----------------------------------
C 28°   ± 29°   Hum 64%  CoR 0%         H N/A   L 20°   SR 05:55 SS 20:09
Partly Cloudy                           Bar 1013.9mb falling    Day 14:14

Mon, 14 Jan 2013                        Tue, 15 Jan 2013
----------------------------------      ----------------------------------
H 32°   L 20°   Hum 51%  CoR 0%         H 33°   L 22°   Hum 46%  CoR 0%
Partly Cloudy                           Clear

Wed, 16 Jan 2013                        Thu, 17 Jan 2013
----------------------------------      ----------------------------------
H 33°   L 22°   Hum 48%  CoR  0%        H 31°   L 21°   Hum 58%  CoR 30%
Partly Cloudy                           Scattered Thunderstorms

Fri, 18 Jan 2013                        Sat, 19 Jan 2013
----------------------------------      ----------------------------------
H 29°   L 21°   Hum 64%  CoR  20%       H 28°   L 19°   Hum 60%  CoR 0%
Partly Cloudy                           Partly Cloudy



sector11 @ sector11
13 Jan 13 | 18:40:31 ~
         $


or in colour!
(http://t.imgbox.com/adfFAKzc.jpg) (http://imgbox.com/adfFAKzc)

Thanks to Kaivalagi for conkyForecast and habitual for the bash script!
Title: Re: man pages to pdf
Post by: GrouchyGaijin on April 17, 2013, 12:19:33 PM
Very cool indeed S11 8)
Title: Re: man pages to pdf
Post by: Sector11 on April 17, 2013, 01:58:40 PM
@ GrouchyGaijin,

Thanks but all kudos go to:
# bash script from johnraff
over on #!, he wrote it, I just use it.
Title: Re: man pages to pdf
Post by: GrouchyGaijin on April 17, 2013, 02:13:09 PM
I know - but you posted it. John wrote a great script.