[TOOL] OSCAM picon generator script based on your E2 picons

There are 38 replies in this Thread which was already clicked 26,247 times. The last Post () by s3n0.

  • pr2: thanks for the script. Tried it on a dreambox 8K with 8GB USB.
    The dir (paths) for picons and piconsTPL are (of course) at that USB (/media/usb2).
    When running the script at my dm8K i see after some time several errors (see below). I aborted the script and immediatly did a df -h (see below)



    As you can see enough space, so why that error...?

  • Some remarks to the script.
    Script is not monkey-proof, because when you have an underscore ("_") in the directory names (as I have), script does not create the files due to the statement: "AWK - F "_" ....".


    Minor remarks:
    - why is in the script "$PWD"? $PWD is never used.
    - in the beginning the paths (variables) are checked and - if not exist - a backslash ("/") is added as last character, however this will cause double backslashes in: for file in "$PathToPiconPNG"/*.png (this is a minor remark, since if will not effect the script)

  • Quote

    When running the script at my dm8K i see after some time several errors (see below). I aborted the script and immediatly did a df -h (see below)
    ....
    As you can see enough space, so why that error...?


    Have you tried moving the tmp folder location to the USB?




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • Some remarks to the script.
    Script is not monkey-proof, because when you have an underscore ("_") in the directory names (as I have), script does not create the files due to the statement: "AWK - F "_" ....".


    Minor remarks:
    - why is in the script "$PWD"? $PWD is never used.
    - in the beginning the paths (variables) are checked and - if not exist - a backslash ("/") is added as last character, however this will cause double backslashes in: for file in "$PathToPiconPNG"/*.png (this is a minor remark, since if will not effect the script)


    If you check the script you should have mentionned that it writes to the path that you specified in the variable: "PathToTmp" so I redirect base64 output to this place so if it is unable to write there is a problem with this location. By default it writes in /tmp/ folder.



    About $PWD google is your friend to understand what it is used for. This is not useless...
    Yes double / is not a problem in Linux.
    About the "_" indeed it is not foreseen by the script to support pathname with this symbol in, so indeed the script will fails due to this.


    Pr2

  • I have also problem with this script.
    I try run it in my VU+ Duo2, but it always ends up with files on only 22 bytes.
    I have picons in correct folder, have an freshly updated oscam.srvid in also, and script creates lots of files, but as said before, they are all useless and in 22 bytes only.


    Any hints ?

  • Problem is solved.
    VU+ Duo2 dont seem to be able to run script with base64, so we had to force it to use openssl.


    I dont know the correct way to do it, but if you open file ( I used vi OscamPiconsTpl.sh ) then search for :


    Quote


    base64 "$file" > $PathToTmp/picon.tmp2 1>/dev/null 2>&1
    if [ $? -ne 0 ];


    Change that to :


    Quote


    base64 "$file" > $PathToTmp/picon.tmp2 1>/dev/null 2>&1
    if [ $? -ne 1 ];


    Save, and restart script, and it will work perfectly in VU+ Duo2


    Thanks to Pr2 for a nice script :)

  • pr2
    Just a suggestion on your great script..


    As your script works now, it goes through all picons in the designated picon folder 1 by 1 to find a match in the oscam.srvid file.
    This in most cases means a lot of unnecessary work & time for picons that are not in the oscam.srvid.
    Would it be possible to run the tpl creation in reverse? i.e. match the picon files from the oscam.srvid & generate the tpl files from the entries in srvid file.
    That would make the script a lot more efficient and in turn complete a lot quicker..


    TF




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • why when I try to download this file on windows 8 does it say its an attachment.php?
    thought it was my editor not being able to amend the text looking like code but when download with windows 7 its a .tgz open it with win.rar and edit's fine
    but with w8 it wont download as a tgz
    strange
    foz

  • adding more info to the above post sorry can not edit
    its ie11 on w8 causing the problem
    it see's it correctly downloading the file with firefox on w8 and ie11 is fine on my windows 7 machine
    if anybody else has this problem use firefox
    I will try to sort this problem out
    foz

  • Have done a test but can not get it!


    Running an ubuntu 13.04 with the same layout as thatfellow


    PathToPiconPNG="/var/OscamPicon/picon/"
    PathToOscamSrvid="/usr/local/etc/oscam.srvid"
    PathToPiconTPL="/var/OscamPicon/piconTPL"
    PathToTmp="/tmp/"


    Updated oscam.srvid and picon.


    where should I put "OscamPiconsTpl.sh" with ftp? in / tmp?
    and run comando in telnet "takes -xvzf OscamPiconsTpl - *. tgz" in / root?


    Need some help in the right direction.......

  • Hi guys...

    I have followed the tut from first post,script runs fine however,the created folder piconTPL has all 22kb picons instead of the actual picon size

    hence not showing

    what am I doing wrong??

    Hi friend,

    I too have had the same your problem.

    I solved following the directions of the post #26

  • Hi,

    I´m trying to use this script in my Virtual Machine (Ubuntu 12.04) since I´m unable to run it under my NAS.


    I´ve copied the .png picons in a folder, copied the file oscam.servid and the script is running in my home path, as it is:

    /home/nico/picon/

    /home/nico/OscamPiconsTpl.sh

    /home/nico/oscam.srvid

    /home/nico/piconTPL/


    So, the variables section is configured in this way in the script:

    PathToPiconPNG="/home/nico/picons/"

    PathToOscamSrvid="/home/nico/oscam.srvid"

    PathToPiconTPL="/home/nico/piconTPL/"

    PathToTmp="/tmp/"


    Base64 is installed in the Virtual Machine:

    Code
    nico@VirUbuntu:~$ base64 --version
    base64 (GNU coreutils) 8.13
    Copyright © 2011 Free Software Foundation, Inc.
    Licencia GPLv3+: GPL de GNU versión 3 o posterior
    <http://gnu.org/licenses/gpl.html>.
    Esto es software libre: usted es libre de cambiarlo y redistribuirlo.
    No hay NINGUNA GARANTÍA, hasta donde permite la ley.
    
    Escrito por Simon Josefsson.

    When I run the script I get this error:

    Code
    nico@VirUbuntu:~$ ./OscamPiconsTpl.sh 
    ./OscamPiconsTpl.sh: 34: ./OscamPiconsTpl.sh: Bad substitution

    EDIT:
    I´ve tried several tricks reported in the prvious posts, but without success...

    Some remarks to the script.
    Script is not monkey-proof, because when you have an underscore ("_") in the directory names (as I have), script does not create the files due to the statement: "AWK - F "_" ....".


    Minor remarks:
    - why is in the script "$PWD"? $PWD is never used.
    - in the beginning the paths (variables) are checked and - if not exist - a backslash ("/") is added as last character, however this will cause double backslashes in: for file in "$PathToPiconPNG"/*.png (this is a minor remark, since if will not effect the script)

    and this also...



    Could you tell me what I´m doing wrong?

    Edited 2 times, last by nickiman ().

  • MrFLY


    Try and see :).


    Of course the script is in Python. If you have Python installed on your Linux-PC (probably yes), it will work. However, the script is debugged for Enigma2.


    If the PIL python module is missing, you need to install it. Package manager "opkg" is used on OE2.0 Enigma, but for Linux-PC it will be necessary to use another package manager - on most Linux distributions it's "apt" (also for Debian/Ubuntu). So in this case you will have to install the Python PIL module manually.


    However, Python's "pip" manager should also work specifically on Python:

    sudo apt-get install python-pip

    The name of the python module is "pil":

    sudo pip install pil

    https://prateekvjoshi.com/2014…to-install-pil-on-ubuntu/


    BTW, I changed the script file name to avoid capitalization:


    - my profile: https://github.com/s3n0

    - source code: https://github.com/s3n0/e2scri…oscam-picons-converter.py

    - raw: https://github.com/s3n0/e2scri…oscam-picons-converter.py

  • master G

    Added the Label OSCam Tools

OSCam Support Forum

Configs, discussion, downloads and guides for OSCam Softcam.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!