KrISS feed 8.7 - A simple and smart (or stupid) feed reader. By Tontof
  • Monday 25 June 2018 - 17:05
  • Tuesday 26 June 2018 - 13:31

    Une bonne analyse de ce qu'implique l'achat de Github par cro$oft.
    Migrez vers une plateforme libre !
    Permalink

  • Thursday 28 June 2018 - 00:53

    Sans compter le fait que les logiciels métier qui te permettent de piloter des machines (accélérateurs pour radiothérapie par exemple) sont écrits pour windows et t'obligent à utiliser windows. Et sans aucune alternative libre ou portable sur Linux...
    Permalink

  • Thursday 28 June 2018 - 21:44

    Si un problème a une solution, il ne sert à rien de s'inquiéter.
    S'il n'en a pas, alors s'inquiéter ne change rien.
    Permalink

  • Wednesday 04 July 2018 - 16:09

    Pour faire de la capture d'écran et bien plus.
    Permalink

  • Wednesday 04 July 2018 - 17:54

    Une gallerie minimaliste en php (1 fichier), écrite par Timo.
    Permalink

  • Friday 06 July 2018 - 14:41

    Via Erase qui vient d'obtenir le niveau expert. Comme l'a dit Bronco, ça claque sa couille !
    Permalink

  • Friday 06 July 2018 - 14:50
  • Saturday 07 July 2018 - 19:42

    Dire qu'il n'y a que les plus grosses, c'est faux. J'ai passe commande la semaine dernière et me suis fait livrer dans une librairie de taille moyenne voire petite, tenue par un couple fort sympathique.

    Sinon, pour celles et ceux qui possèdent une tablette sous ubports, j'ai fait une petite webapp pour ce site (à télécharger dans l'openstore)
    Permalink

  • Sunday 08 July 2018 - 15:17
    • Vous n'avez rien ressenti, lorsque vous avez coupé votre femme en morceaux avant de la mettre à cuire, demande le juge au comdamné ?
    • Si, Si, à un moment je me suis mis à pleurer.
    • Ah quand même! et à quel moment ?
    • Quand j'ai coupé les oignons !

    Permalink

  • Tuesday 10 July 2018 - 14:34
  • Wednesday 11 July 2018 - 23:55

    youtube-dl is running in the background, but it is still sending output to your terminal, and producing quite a lot of it to inform you of its progress. There are a number of ways to change this, but you'll probably either want to make youtube-dl produce less output, or cause its output to be sent to a file (or discarded altogether) instead of appearing in your terminal.

    Way 1: Run youtube-dl -q to suppress status messages.

    If you don't want to see the progress messages, you can pass the -q flag (or --quiet, which does the same thing) to the youtube-dl command:

    youtube-dl -q https ://www.youtube.com/watch?v=NZ-ElsvYKyo &

    You'd have to replace that URL with whatever you're trying to download, of course. Some messages may still be printed, including errors and warnings. But it's likely you want to see those.

    If you don't want youtube-dl to produce any warnings, you can run youtube-dl with the --no-warnings flag. I don't suggest doing that, though, unless you're sure that's what you want.

    youtube-dl -q --no-warnings https ://www.youtube.com/watch?v=NZ-ElsvYKyo &

    To learn more about the command-line options accepted by youtube-dl, you can run man youtube-dl or read its manual page online.

    Way 2: Redirect standard output of youtube-dl to a file.

    To append the output to dl.log in the current directory (you can name this what you want, and it will be created if it doesn't already exist), run:

    youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo >> dl.log&

    If you want to overwrite dl.log instead of appending text to the end, use > instead of >>:

    youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo > dl.log &

    Normal output will then be redirected to dl.log (or whatever file you tell it to use). Error output, however, will still be shown on your terminal. For example, when I ran that command, I got one warning printed to my terminal:

    ek@Io:~$ youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo >> dl.log &
    [1] 14456
    ek@Io:~$ WARNING: Requested formats are incompatible for merge and will be merged into mkv
    Everything else went into the log file:
    
    ek@Io:~$ cat dl.log
    [youtube] NZ-ElsvYKyo: Downloading webpage
    [youtube] NZ-ElsvYKyo: Downloading video info webpage
    [youtube] NZ-ElsvYKyo: Extracting video information
    [youtube] NZ-ElsvYKyo: Downloading MPD manifest
    [download] Destination: Lecture 1 _ Topics in String Theory-NZ-ElsvYKyo.f244.webm
    [download]  23.2% of 359.52MiB at 204.49KiB/s ETA 23:02ek@Io:~$

    You can view the output with cat (as I've done above) at any time, to check the progress.

    When you run youtube-dl without -q, it produces output that is primarily meant for a terminal. This output includes control characters that tell a terminal to erase the previous progress message, so that it may be visually replaced with the new progress message. Some ways of viewing the file, like cat dl.log, will not show the "erased" messages or the control characters. They're still part of the file, though, and you can view them with some other utilities; for example, view dl.log works.

    Way 2a: Redirect the output to /dev/null to get rid of it.

    If you want the output to just be discarded rather than saved in an actual file, then you can redirect it to /dev/null:

    youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo > /dev/null &

    With /dev/null, it doesn't matter if you "overwrite" (>) or "append" (>>).

    This is a handy technique in general, though probably unnecessary with youtube-dl. If you want to suppress progress, you can just run youtube-dl -q instead.

    Way 3: Redirect standard error, too.

    Regular output and error output are separate. It's common for youtube-dl to produce both. The above method redirected only standard output. You can also redirect standard error. There's a lot you can do with redirection, including redirecting the two output streams to separate files. For our purposes here, I'll just show how to send both standard output and standard error to the same file:

    youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo &>> dl.log &

    When I ran that, my shell showed only

    [2] 15009
    ...and both regular output and error output appeared in dl.log:

    ek@Io:~$ cat dl.log
    [youtube] NZ-ElsvYKyo: Downloading webpage
    [youtube] NZ-ElsvYKyo: Downloading video info webpage
    [youtube] NZ-ElsvYKyo: Extracting video information
    [youtube] NZ-ElsvYKyo: Downloading MPD manifest
    WARNING: Requested formats are incompatible for merge and will be merged into mkv.
    [download] Destination: Lecture 1 _ Topics in String Theory-NZ-ElsvYKyo.f244.webm
    [download]   0.0% of 359.52MiB at 107.65KiB/s ETA 56:59ek@Io:~$

    The above example used &>>, which appends to dl.log. To overwrite the file instead, use &> (or >&, which also works) instead of &>>:

    youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo &> dl.log &

    Way 3a: Redirect both normal and error output to /dev/null.

    If you really want to, you can redirect both standard output and standard error to /dev/null so it is all simply discarded:

    youtube-dl https ://www.youtube.com/watch?v=NZ-ElsvYKyo &> /dev/null &

    You probably want to see actual error messages, though. If it's just status messages and warnings you don't want, then you don't need any redirection. In that case you can use youtube-dl -q --no-warnings as described above. (See Way 1.)
    Permalink

  • Thursday 12 July 2018 - 00:27
    #!/bin/bash
    
    # NAME:         YAD Youtube Downloader
    #
    # DESCRIPTION:  youtube-dl frontend for YT videos
    #
    # This script is a fork of the script by "damo" from BunsenLabs
    # MAINTAINER: Misko_2083 <Miloš Pavlović> June 2016
    #
    # June 2016 
    # New: Format selection dialog
    #      Multiprogress bars
    #      *  Progress bar method is improved version of Glutanimate's yad_wget script
    #      *  yad-wget <a href="https://github.com/Glutanimate/misc-scripts/blob/master/Internet/yad_wget">https://github.com/Glutanimate/misc-scripts/blob/master/Internet/yad_wget</a>
    #      New GUI with multi-download options
    #      Simultaneous downloads of videos
    #      Option to chose the number of simultaneous downloads
    #
    # August 2016
    # New: Support for lists
    #      Auto-detection if a URL is a list or a video
    #      Option to download videos from a list
    #      An option to select all/none
    # Improved: Format selection dialog data
    #
    # March 2017
    # New:  Progress bar while loading the format info
    #       Window icon is stored in the script
    #   Check for youtube-dl version
    # Improved: Dialog Wording and appearance
    
    # ***********************
    # INITIALIZATION
    # ***********************
    
    declare -i SIMULTANEOUS
    declare -i FIELDS
    SVG='<''svg width="48" height="48" viewBox="0 0 245 245">
        <radialGradient fx="5%" fy="5%" id="rg" r="65%">
          <stop offset="0%" stop-color="white"/>
          <stop offset="100%" stop-color="lightgray"/>
        </radialGradient>
        <radialGradient fx="5%" fy="5%" id="gr" r="65%">
          <stop offset="0%" stop-color="#932420"/>
          <stop offset="100%" stop-color="#CB322C"/>
        </radialGradient>
        <linearGradient id="lg" gradientUnits="userSpaceOnUse">
          <stop offset="0" stop-color="#932420"/>
          <stop offset="1" stop-color="#CB322C"/>
        </linearGradient>
      <rect width="235" x="5" y="5" fill="url(#rg)" rx="30" 
      height="235" ry="30" stroke="white" stroke-width="4" 
      stroke-opacity="0.4"/>
      <rect width="215" x="16" y="115" fill="url(#gr)" rx="50" 
      height="115" ry="50" stroke="white" stroke-width="2" 
      stroke-opacity="0.4"/>
      <g>
       <text x="50%" y="42%" text-anchor="middle" stroke="none" fill="black"
        font-family="Sans" font-size="90" font-weight="800">You</text>
       <text x="50%" y="82%" text-anchor="middle" stroke="none" fill="white"
        font-family="Sans" font-size="70" font-weight="800">Tube</text>
       </g>
    </svg>'
    
    # Set GUI variables up
    TITLE="YAD YouTube Downloader"    # dialog title
    # Progress dialog text
    TEXT="<b>Downloads</b> in progress...
    Cancel and Clean- removes *.part files
    Cancel - Cancels the download"
    ICON="/tmp/yt.svg"
    if [ ! -f "$ICON" ]; then
        echo "SVG file not found. Creating it."
        echo "$SVG" > "$ICON"
    fi
    
    IMAGE="$ICON"
    declare -i MODE
    MODE=1     # Defaiult dialog mode: 0 - Multi, 1 - Manual
    #Multy download dialog options
    SIMULTANEOUS=2    # set default number of simultaneous downloads (1-5)
    FIELDS=8          #  number of URL fields 
    # List checkboxes (default mode) TRUE/FALSE
    SELECT_ALL="TRUE"
    # Set global variables (Do not change)
    FORMAT=""  # Set global variable for the format selection
    ENTRY=""   # Set global variable for the entry
    # Check if yad is installed
    if ! hash yad &>/dev/null;then
        echo "yad has not been found"
        echo "Install it first and run the script again"
        exit
    fi
    # Check if youtube-dl is installed
    if ! hash youtube-dl &>/dev/null;then
        DLG=$(yad --form \
            --borders=10 --image-on-top \
            --text="   youtube-dl not found\n\n  Install it first and run the script again" --button="gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" \
        )
        exit
    fi
    # Check if ffmpeg is installed
    if ! hash ffmpeg &>/dev/null;then
        DLG=$(yad --form \
            --borders=10 --image-on-top \
            --text="   ffmpeg not found\n\n  Install it first and run the script again" --button="gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" \
        )
        exit
    fi
    # Check if jq is installed
    if ! hash jq &>/dev/null;then
        DLG=$(yad --form \
            --borders=10 --image-on-top \
            --text="   jq not found\n\n  Install it first and run the script again" --button="gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" \
        )
        exit
    fi
    
    # ***********************
    # END INITIALIZATION
    # ***********************
    
    # ***********************
    # FUNCTIONS
    # ***********************
    
    # ------------------
    function download()
    # ------------------
    {
        # Download function
        # Passed: $1 - TYPE
        #         $2 - URL
        #         $3 - COUNTER (to identify the bar)
    
        # Checks if the TYPE is a playlist
        #  and adds apropriate option to UTYPE variable
        if [[ "$1" == "playlist?list" ]]; then
        UTYPE="--yes-playlist"                # if a playlist
        else
        UTYPE=""                              # if a video
        fi
        cd "$SAVEDIR"   # Changes current path
        # Starts the download and pipes the output to a loop
        # Loop is used to display the text in multi-progressbar
        youtube-dl ${UTUBE} ${UTYPE} --newline -i -o "%(title)s-%(id)s.%(ext)s" "<a href="https://www.youtube.com/$1=$2&quot">https://www.youtube.com/$1=$2&quot</a>; 2>&1 \
        | while read -r line; do
            if [[ "$(echo $line | grep '[0-9]*%')" ]];then
                percent=$(echo $line | awk '{print $2}')
                if [[ ! "$(echo "${percent}" | grep "100")" ]]; then  # do not print 100% yet in case of conversion (mp3) or playlist
                    echo "$3:${percent%.*}"                            # sends percentage to the progress bar
                fi
            fi
            if [[ "$(echo $line | grep -E '\[download\]|\[ffmpeg\]')" ]];then
                progress=$(echo $line | awk '{$1=""; print substr ($0, 0, 75)}')
                echo "$3:#$progress"       # sends text to the progressbar
            fi
        done
        RET_YT="${PIPESTATUS[0]}"
        if [[ "$RET_YT" = 0 ]]
          then
              echo "$3:100%"
              echo "$3:#Download completed."
    
          else
              echo "$3:#Download error."
        fi
    }
    
    # ------------------
    function format_selection()
    # ------------------
    {
        # Format selection
    
        # Temp file to store the items for the list
        res=$(mktemp --tmpdir ytlist.XXXXXXXX)
       CNT=0
       while [  $CNT -lt 1 ]; do
            echo "5"
        # Fetching available format data and redirecting to res temp file
        youtube-dl -j --skip-download --all-formats "$YTEMP" --newline \
        | jq -r '.format_id, .format, .ext, 
        if .vcodec == "none" then "audio only" else .vcodec end,
        if .acodec == "none" then "video only" else .acodec end,
        if .filesize == null then "" else .filesize/1024/1024 end' > $res
        # Checks youtube-dl return status
        if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
            yad --form \
            --borders=10 --image-on-top \
            --text="Available formats could not be retreived\nCheck your connection or update youtube-dl" --button="gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE"
            rm -f $res  # rm temp file
            main        # go back
        fi
        # temp file for awk to write to
        res2=$(mktemp --tmpdir ytlist.XXXXXXXX)
        # awk converts  every sixth line (if not empty) to two decimal places and adds MiB
        awk '{if (NR % 6 == 0 && $1 !=""){printf("%.2f MiB\n", $1)} else {print $0}}' $res > $res2
        cp -f $res2 $res
        rm -f $res2
            CNT=$(($CNT+1))
        done | yad --progress --pulsate --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" --auto-close \
                            --borders=10 --button="Cancel!gtk-no:1" --text="Downloading format info..."
        RET=$?
        case "$RET" in
            0) # Continue
            ;;
            1) # Canceled
                rm -f $res2  # rm temp file
                rm -f $res  # rm temp file
                main
            ;;
            *)
                rm -f $res2  # rm temp file
                rm -f $res  # rm temp file
                main
            ;;
        esac
        # Calls format (list) selection dialog
        FORMAT="$(yad --list --width=600 --height=500 --hide-column=1 --column="format"  \
           --column="format" --column="extension" --column=video --column="audio" --column="filesize" \
           --button="back!back:2" --button="Refresh!reload:3" --button="Exit!gtk-cancel:1" --button="Download!gtk-ok:0" \
           --window-icon="$ICON" --image="$IMAGE" --image-on-top \
           --text "$FILENAME\nSelect a format to download" --borders=10 \
           --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" \
           < "$res" )"
        RET=$?
        case "$RET" in
            0) # Continue
            ;;
            1) # Canceled
                rm -f $res  # rm temp file
                exit
            ;;
            2) # Back
                rm -f $res  # rm temp file
                main
            ;;
            3) # Refresh
                rm -f $res  # rm temp file
                format_selection
            ;;
            *) # Default
                rm -f $res  # rm temp file
                exit
            ;;
        esac
        rm -f $res  # rm temp file
        FORMAT=$(echo "$FORMAT" | cut -d '|' -f 1)
        if [[ -z $FORMAT ]];then
            yad --text="You haven't selected a download format\nDo you want to return to the main window?" \
            --borders=10 --form --button="No!gtk-cancel:1" --button="Yes!gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE"
            RET=$?
            case "$RET" in
            0)          # Back
                main
            ;;
            *)          # Cancelled
                exit
            ;;
            esac
        fi
    }
    
    # ------------------
    function list_selection()
    # ------------------
    {
        # Temp file to store the items from a list
        res=$(mktemp --tmpdir ytlist.XXXXXXXX)
        youtube-dl -j --flat-playlist "<a href="https://www.youtube.com/playlist?list=${YTEMP}&quot">https://www.youtube.com/playlist?list=${YTEMP}&quot</a>; \
        | jq -r '.title, .id' | sed '1~2s/^/'"$SELECT_ALL"'\n/' \
        | yad --text='Select items to download' --list --checklist --column "Select" --column "Title" --column "Url" --no-markup \
           --button="$(if [[ "$SELECT_ALL" = "TRUE" ]]; then echo Select None; else echo Select All; fi)!gtk-yes:4" \
           --button="back!back:2" --button="Refresh!reload:3" --button="Exit!gtk-cancel:1" --button="Download!gtk-ok:0" \
           --window-icon="$ICON" --image="$IMAGE" --image-on-top \
           --borders=10 --width=600 --height=500 --print-column=3 --separator=" " \
           --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" > $res
        RET=$?
        case "$RET" in
           0)          # Continue
           ;;
           1)          # Canceled
           rm -f $res  # rm temp file
           exit
           ;;
           2)          # Back
           rm -f $res  # rm temp file
           main
           ;;
           3)          # Refresh
           list_selection
           ;;
           4)          # Select All/None
           if [[ "$SELECT_ALL" = "TRUE" ]]; then
              SELECT_ALL="FALSE"
           else
              SELECT_ALL="TRUE"
           fi
           list_selection
           ;;
           *)
           rm -f $res  # rm temp file
           exit
           ;;
       esac
        # Checks if temp file is empty
        if [[ ! -s "$res" ]];then
            yad --text="At least one item needs to be selected\nDo you want to return to the main window?" \
            --borders=10 --form --button="No!gtk-cancel:1" --button="Yes!gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE"
            RET=$?
            case "$RET" in
               0)          # Back
               rm -f $res  # rm temp file
               main
               ;;
               *)          # Canceled
               rm -f $res  # rm temp file
               exit
               ;;
            esac
        fi
        # Starts the download function
        list_download
    }
    
    # ------------------
    list_download()
    # ------------------
    {
        i=0
        TOTAL=$(wc -l "$res" | cut -d ' ' -f 1)
        cd "$SAVEDIR"
        while read -r line || [[ -n "$line" ]]; do
            i=$(($i+1))
            PERCENT=$(($i*100/${TOTAL}))           # Calculates percentage
            echo "#Downloading $i/$TOTAL: $line"   # Writes to the progress-bar
            youtube-dl ${UTUBE} --newline -i -o "%(title)s-%(id)s.%(ext)s" "<a href="https://www.youtube.com/watch?v=${line}&quot">https://www.youtube.com/watch?v=${line}&quot</a>;   2>&1  &
            PID="$!"
            wait "$PID"
            echo "$PERCENT"
        done < "$res" | yad --progress --center --text="Downloading list items" --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" --auto-close \
                            --borders=10 --button="Cancel!gtk-no:1"
        if (( $? == 1 ));then                 # Download canceled, so clean up
            kill "$PID" &>/dev/null         # Kills any running download process
    
            notify-send -t 3000 --icon "dialog-info" "Download cancelled"
            while read -r line || [[ -n "$line" ]]; do
                rm "$(find "$SAVEDIR" -type f -name "*-$line.*" | grep part)" &>/dev/null   # Finds & removes the part file
                echo "#$line"
                sleep "0.1"
            done < "$res" | yad --progress --pulsate --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" --auto-close \
                            --borders=10 --button="Cancel!gtk-no:1" --text="Cleaning part files"
        fi
        rm -f $res  # rm temp file
        exit        # exit here
    }
    
    # ------------------
    function download_format()
    # ------------------
    {
        FILENAME="$(youtube-dl --get-filename "$1")"   # Get filename
        YTEMP="$1"                                     # Temp variable
        format_selection                               # Start format selection dialog
    }
    
    # ------------------
    check_version()
    # ------------------
    {
        wget --spider --user-agent="Mozilla/5.0 Gecko/20100101" --timeout=30 -q "<a href="https://rg3.github.io/youtube-dl/&quot">https://rg3.github.io/youtube-dl/&quot</a>; -O /dev/null
            if [[ "$?" -ne "0" ]]; then
            yad --text="Can't connect to youtube-dl server site\nMake sure the internet connection is up and active" \
            --borders=10 --form --button="Ok!gtk-ok:0" \
            --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE"
                    main
            fi
        ytdlcv=$(youtube-dl --version)
        ytdllv=$(wget -O- -q "<a href="https://rg3.github.io/youtube-dl/update/LATEST_VERSION&quot">https://rg3.github.io/youtube-dl/update/LATEST_VERSION&quot</a>;)
        if [[ "$ytdlcv" == "$ytdllv" ]]; then
        yad --text="Installed version of youtube-dl - <b>$ytdlcv</b>\nAvailable version of youtube-dl - <b>$ytdllv</b>\n\nyoutube-dl is up-to-date" \
        --borders=10 --form --button="Ok!gtk-ok:0" \
        --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE"
        else
        yad --text="Installed version of youtube-dl - <b>$ytdlcv</b>\nAvailable version of youtube-dl - <b>$ytdllv</b>\n\nyoutube-dl update is available" \
        --borders=10 --form --button="Ok!gtk-ok:0" \
        --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE"
        fi
    }
    
    # ------------------
    dialog()
    # ------------------
    {
    # Dialogs
        if [[ "$MODE" = "0" ]]; then
            OIFS=$IFS # save Internal Field Separator
            IFS=$'\n' # separator is "\n" in returned choices
            c=0
            YADFIELD=()
            while [[ ${c} -lt $FIELDS ]];do
                 c=$(($c+1))
                 YADFIELD+=($(echo "--field=<b>YouTube url\:</b>          ${c}:NORM"; echo ""))    # Store yad form fields in an array
            done
            ENTRY="$(yad --form --columns=1 --window-icon "$ICON" --center \
               --borders=10 --title "$TITLE" --image "$IMAGE" --image-on-top \
               --text "<b>Select a folder to download\n and paste URL(s) in the appropriate field(s)</b>" \
               --button="Switch GUI!reload:2" $(if hash wget &>/dev/null;then echo "--button=youtube-dl:3";fi) \
               --button="Exit!gtk-cancel:1" --button="Download!gtk-ok:0" \
               --field="Enter Save directory:DIR" "$HOME/Downloads" \
               --field="Download Options:CB" "Audio only (mp3)!Video (22/18/17)" \
               --field="Simultaneous Downloads:NUM" "$SIMULTANEOUS!1..5!1" \
               ${YADFIELD[@]} \
                )"
            RET=$?
            IFS=$OIFS # reset IFS back to default
            case "$RET" in
                0) # Continue
                ;;
                1) # Canceled
                    exit
                ;;
                2)
                    MODE=1
                    dialog
                ;;
                3)
                    check_version
                    main
                ;;
                *)
                    exit
                ;;
           esac
        elif [[ "$MODE" = "1" ]]; then
            ENTRY="$(yad --form --columns=1 --window-icon "$ICON" --center \
               --borders=10 --title "$TITLE" --image "$IMAGE" --image-on-top \
               --text "<b>Select a folder to download\n and paste URL into the appropriate field</b>" \
               --button="Switch GUI!reload:2" $(if hash wget &>/dev/null;then echo "--button=youtube-dl:3";fi) \
               --button="Exit!gtk-cancel:1" --button="Download!gtk-ok:0" \
               --field="Enter Save directory:DIR" "$HOME/Downloads" \
               --field="Download Options:CB" "Custom!Audio only (mp3)!Video (22/18/17)" \
               --field="Simultaneous Downloads:NUM" "1!1..1!1" \
               --field="<b>YouTube url</b>:" "" \    # Only one url field for the Manual format selection
               )"
            RET=$?
            case "$RET" in
               0)      # Continue
               ;;
               1)      # Canceled
               exit
               ;;
               2)
               MODE=0
               dialog
               ;;
               3)
                check_version
                main
               ;;
               *)
               exit
               ;;
            esac
        fi
    }
    
    # ------------------
    main()
    # ------------------
    {
        while :; do
            dialog     # calls the main dialog
            OIFS=$IFS # save Internal Field Separator
            IFS="|"   # separator is "|" in returned choices
            i=0
            retChoice=()
            e=0
            URLIST=()
            for ret in $ENTRY;do
                retChoice[$i]="$ret"
                i=$(($i+1))                    # iterate i
                if [[ "$i" -gt 3 ]] && [[ "$ret" != "" ]];then   # get form fields if they are not empty
                   retType="${ret%%'='*}"                        # trim to the '=', TYPE position
                   TYPE[$e]="${retType##*'/'}"                   # extract type, playlist or video
                   retUrl="${ret%%'&'*}"                         # trim to the '&' character, URL position
                   URLIST[$e]="${retUrl##*'='}"                  # extract filename
                   YADBARS="$YADBARS --bar=${URLIST[$e]}:NORM"   # add bars to a yad multiprogress dialog
                   e=$(($e+1))                                   # iterate e
                fi
            done
            IFS=$OIFS # reset IFS back to default
            SAVEDIR=${retChoice[0]} # directory path
            OPTION=${retChoice[1]}
          case $OPTION in
            "Video (22/18/17)")
               UTUBE="-f 22/18/17"
            ;;
            "Audio only (mp3)")
               UTUBE="--extract-audio --audio-format mp3 --audio-quality 0"
            ;;
          esac
            MAXDLS=${retChoice[2]}  # maximum number of simultaneous downloads
    
            if [[ -z $SAVEDIR ]] || [[ ${#URLIST[@]} -eq 0 ]];then
                yad --form --text="<b>Enter at least one url field\nand select a folder</b>" --borders=10 \
                --center --title "$TITLE" --window-icon "$ICON" --image "$IMAGE" --button="gtk-ok:0"
            else
                break
            fi
        done
        if [[ "$MODE" = "1" ]] && [[ "$OPTION" == "Custom" ]]; then
           if [[ "${TYPE[@]}" == "watch?v" ]];then
                for URL in ${URLIST[@]}; do
                    download_format "<a href="https://www.youtube.com/watch?v=$URL&quot">https://www.youtube.com/watch?v=$URL&quot</a>; # call format selection dialog
                    UTUBE="-f $FORMAT"
                done   
            else
                YTEMP="${URLIST[0]}"
                list_selection
            fi
        fi
    }
    
    # ------------------
    function progress()
    # ------------------
    {
        OIFS=$IFS # save Internal Field Separator
        IFS=" "   # separator is " " in returned choices
        COUNTER="1"
        DYNAMIC_COUNTER="1"
        PID=()
        c=0
        for URL in ${URLIST[@]}; do
            if [[ "$DYNAMIC_COUNTER" = "$MAXDLS" ]] # only download n files at a time
              then
                  download "${TYPE[$c]}" "$URL" "$COUNTER" &     # pass TYPE, URL and COUNTER to download function
                  PID+=("$!")                                    # gets process pid
                  max="$(($COUNTER-1))"                          # -1, since start counter is 1, and arrays begin at 0
                  MAX_PID=${PID[$max]}                           # sets the variable pid from array PID
                  wait $MAX_PID                                  # wait until process with MAX_PID finishes
                  DYNAMIC_COUNTER="1"                            # reset dynamic counter
              else
                  download "${TYPE[$c]}" "$URL" "$COUNTER" &     # pass TYPE, URL and counter number to download function
                  PID+=("$!")                      
                  DYNAMIC_COUNTER="$(($DYNAMIC_COUNTER+1))"      # iterate dinamic counter
            fi
            c=$(($c+1))                                          # iterate TYPE counter
            COUNTER="$[$COUNTER+1]"                              # iterate counter
        done | yad --multi-progress $YADBARS --title "$TITLE" --button="Cancel and Clean!gtk-close:1" --button="Cancel!gtk-close:0" \
                   --text "$TEXT" --center --window-icon "$ICON" --image "$IMAGE" --image-on-top --auto-close
        if (( $? == 1 ));then                 # Download canceled, so clean up
            for pid in ${PID[@]};do
                kill $pid &>/dev/null         # Kills any running download process
            done
            for url in ${URLIST[@]}; do
                rm "$(find "$SAVEDIR" -type f -name "*-$url.*" | grep part)" &>/dev/null   # Finds & removes the part file
            done
            notify-send -t 3000 --icon "dialog-info" "Download cancelled"
            exit
        fi
        IFS=$OIFS # reset IFS back to default
    }
    
    # ***********************
    # END FUNCTIONS
    # ***********************
    
    # ***********************
    # MAIN
    # ***********************
    
    main     # Calls the main loop
    progress # Starts the download
    
    # ***********************
    # END MAIN
    # ***********************

    Permalink

  • Thursday 12 July 2018 - 01:12

    Un tutoriel assez bien fait sur les droits et les permissions d’accès aux fichiers.
    Permalink

  • Thursday 12 July 2018 - 11:36
  • Tuesday 17 July 2018 - 12:26

    Un visualiseur de fichier sqlite en ligne
    Permalink

  • Thursday 19 July 2018 - 12:23

    Ce que la CNIL ne précise pas, c'est que c'est le comportement par défaut des ordiphones et que l'on ne peut pas l'empêcher même en les paramétrant. Google et Apple savent tout de nos déplacements, sans que la géolocalisation soit active : il suffit de 3 antennes relais et le tour est joué.

    Permalink

  • Thursday 19 July 2018 - 12:44

    Je viens de voir Ant-Man et la Guêpe et c'est évident !

    Le Dr Hank Pym :
    Dr Hank Pym
    c'est Tortue Géniale
    Tortue Géniale
    Il a inventé la miniaturisation et l'a vendue à la capsule corp.
    Capsule Corp
    Comme il a passé 30 ans sans sa femme, il a développé un goût prononcé pour les jeunes filles. Du coup, sa femme qu'il venait de retrouver, est dégoûtée de ses manières et le quitte.
    Il finit seul sur son ile.
    Et donc Hope Van Dyme,
    Hope Van Dyme
    C'est bulma !
    Bulma

    Tout est lié...

    Sources images :

  • Thursday 19 July 2018 - 15:21

    J'applaudirai quand Google aura payé les 6,7 milliards qu'il doit...
    Permalink

  • Tuesday 24 July 2018 - 01:45

    C'est vraiment un super projet. La tablette BQ Aquaris M10 FHD ubuntu edition est vraiment un excellent rapport qualité/prix. C'est vraiment dommage qu'Ubuntu ait laissé tomber.
    Mais la communauté est heureusement là pour que le phenix renaisse de ses cendres.
    Permalink

  • Tuesday 24 July 2018 - 02:28

    You may write a .desktop file. Read: http://www.mail-archive.com/ubuntu-phone%40lists.launchpad.net/msg18884.html

    Following the suggestion the asker created a .desktop file in .local/share/applications with the following contents:

    [Desktop Entry]
    Name=Usage statistics
    Type=Application
    Exec=webapp-container /home/phablet/Usage/index.html
    Terminal=false
    X-Ubuntu-Touch=true

    The asker says it does the trick for him. It is not very flexible but suits his needs.

    Permalink

  • Tuesday 24 July 2018 - 11:41

    PHP-Spider Features :

    • supports two traversal algorithms: breadth-first and depth-first
    • supports crawl depth limiting, queue size limiting and max downloads limiting
    • supports adding custom URI discovery logic, based on XPath, CSS selectors, or plain old PHP
    • comes with a useful set of URI filters, such as Domain limiting
    • supports custom URI filters, both prefetch (URI) and postfetch (Resource content)
    • supports custom request handling logic
    • comes with a useful set of persistence handlers (memory, file. Redis soon to follow)
    • supports custom persistence handlers
    • collects statistics about the crawl for reporting
    • dispatches useful events, allowing developers to add even more custom behavior
    • supports a politeness policy
    • will soon come with many default discoverers: RSS, Atom, RDF, etc.
    • will soon support multiple queueing mechanisms (file, memcache, redis)
    • will eventually support distributed spidering with a central queue

    Permalink

  • Tuesday 24 July 2018 - 11:47

    Couscous turns Markdown documentation into beautiful websites. It's GitHub Pages on steroids.
    Permalink

  • Wednesday 25 July 2018 - 17:50

    Autant le dongle USB peut être sécurisé, autant les empreintes ou la reconnaissance faciale peuvent être assez facilement falsifiées.

    Le problème est comment fera-t-on, lorsque l'on perdra sa clef ou qu'elle tombera en panne, pour s'authentifier et prouver que c'est bien nous qui souhaitons nous connecter ?

    Quand c'est dans une entreprise, c'est assez facile : on va voir le service informatique (des gens que l'on peut voir physiquement et qui ont la possibilité de nous identifier), et ils peuvent nous fournir une nouvelle clé et désactiver l'ancienne.

    Mais pour un site web tiers, quels seront les autres éléments à fournir pour nous identifier formellement ? Est-ce qu'une navigation "anonyme" sera toujours possible ?
    Permalink

  • Friday 27 July 2018 - 14:17
  • Friday 27 July 2018 - 14:18
  • Monday 13 August 2018 - 11:33

    Pour supprimer des applications pré-installées même sans être root !
    (Mais faites BIEN ATTENTION à ce que vous faites, sans quoi vous risquez de vous retrouver avec un téléphone qui ne démarre plus !)

    Via SebSauvage
    Permalink

  • Monday 13 August 2018 - 16:43

    Voir si le plugin multilangue de PluXml l'utilise de façon correcte
    Permalink

  • Wednesday 15 August 2018 - 12:02

    C'est sûr que 2 precautions valent mieux qu'une. Mais c'est encore sacrifier sa vie privée au profit de la sacro-sainte sécurité en donnant son mobile à tout va.

    Ceci étant, ça oblige à avoir un tel. Ça parait évident mais ça ne l'est pas forcement : Plus le temps passe, et plus je me dis que lorsque le mien lâchera, je ne le remplacerai pas. Je m'en sers de moins en moins et cela m’évitera d'avoir un boulet numerique à me trimballer (pour info, avant, c'etait les repris de justice qui devaient porter ce genre de dispositifs de tracage).
    De plus il faut l'avoir en permanence sur soi avec une connexion valable. Ce qui l'a non plus n'est pas d'une évidence évidente...
    Ce n'est pas un dispositif neutre vis à vis du net.

    Ensuite, envoyer le code de sécurité sur l’email, si celui-ci est corrompu, c'est un peu moyen j'en conviens.
    Permalink

  • Wednesday 15 August 2018 - 12:35

    Ça m'a l'air pas mal comme principe mais est-ce que les entreprises l'utiliseront?
    Il y a une ptite faute dans le titre "crée pour vos équipes". Il faut lire créé.
    Permalink