forked from axiom-team/astroport
ouah tout ça
This commit is contained in:
parent
b1c2dee9a0
commit
0c769eaa0b
|
@ -271,12 +271,12 @@ log "__SUB:sms_INIT_ACCOUNT: ($1=phone, $2=NOSMS)"
|
|||
# GIVE NAME TO WALLET
|
||||
#######################
|
||||
# 6 derniers chiffres du numéro de téléphone (login > 8 char)
|
||||
TAIL=${PHONE:6:6}
|
||||
TAIL=${PHONE:8:4}
|
||||
# No UIDNA yet. Create new
|
||||
UIDNA=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs)
|
||||
UIDNA=N1$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs)
|
||||
# Check if already existing among all swarm wallets
|
||||
while [[ $(grep -Rwl "$UIDNA$TAIL" /home/$YOU/.zen/ipfs_swarm/.*/G1SMS/_uidna 2>/dev/null) ]]; do
|
||||
UIDNA=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs); done
|
||||
UIDNA=N1$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 1 | xargs); done
|
||||
UIDNA="$UIDNA$TAIL"
|
||||
echo "$UIDNA" > "$UIDNAFILE"
|
||||
|
||||
|
@ -284,7 +284,7 @@ log "__SUB:sms_INIT_ACCOUNT: ($1=phone, $2=NOSMS)"
|
|||
# Create Account Files
|
||||
#######################
|
||||
|
||||
PIN=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh | xargs)
|
||||
PIN=$(/home/$YOU/.zen/astroport/zen/tools/diceware.sh 4 | xargs)
|
||||
|
||||
python3 /home/$YOU/.zen/astroport/zen/tools/key_create_dunikey.py "$UIDNA" "$PIN" ## Copy PubSec file to /tmp/secret.dunikey
|
||||
mv /tmp/secret.dunikey /home/$YOU/.zen/g1sms/$PHONE/
|
||||
|
@ -362,6 +362,9 @@ log "__SUB:sms_INIT_ACCOUNT: ($1=phone, $2=NOSMS)"
|
|||
AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR")
|
||||
|
||||
case "$UNIT" in
|
||||
ZEN)
|
||||
AMOUNT=$(bc <<< "$AMOUNTG1 * 100" | cut -d ".")
|
||||
;;
|
||||
G1)
|
||||
AMOUNT=$AMOUNTG1
|
||||
;;
|
||||
|
@ -400,6 +403,9 @@ AMOUNTDU=$(bc <<< "scale=2; $AMOUNTG1 / $DUFACTOR")
|
|||
AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR")
|
||||
|
||||
case "$UNIT" in
|
||||
ZEN)
|
||||
AMOUNT=$(bc <<< "scale=0; $AMOUNTG1 * 100" | cut -d ".")
|
||||
;;
|
||||
G1)
|
||||
AMOUNT=$AMOUNTG1
|
||||
;;
|
||||
|
@ -422,6 +428,9 @@ echo ${aaa[@]}
|
|||
function make_accounting (){
|
||||
# CONVERT AMOUNT UNIT to VIR G1
|
||||
case "$UNIT" in
|
||||
ZEN)
|
||||
VIR=$(bc <<< "$AMOUNT / 100")
|
||||
;;
|
||||
G1)
|
||||
VIR=$AMOUNT;
|
||||
;;
|
||||
|
|
|
@ -34,7 +34,7 @@ echo $SONG
|
|||
# %EDlmG9QW2U2wYnvIIKf//GrDxYoQWGL/Jk3Nw0obi8M=.sha256
|
||||
# http://golly.sourceforge.net/
|
||||
mysearch="$ARTIST $SONG"
|
||||
su $YOU -c mkdir -p /home/$YOU/.zen/music/${artist}/${song}/
|
||||
su $YOU -c mkdir -p /home/$YOU/.zen/audio/${ARTIST}/${SONG}/
|
||||
su $YOU -c youtube-dl --default-search ytsearch1: --download-archive /home/$YOU/.ytdl.list --write-thumbnail --continue --no-overwrites --write-info-json --no-mtime --metadata-from-title "$artist - %(title)s" --embed-thumbnail --ignore-errors --audio-format mp3 --extract-audio -o "/home/$YOU/.zen/music/${artist}/${song}/%(id)s.%(title)s.%(uploader_id)s.%(ext)s" "$mysearch" >> /tmp/youtube-dl.log 2>&1
|
||||
|
||||
# Finaly this is made directly....
|
||||
|
|
|
@ -82,7 +82,7 @@ g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://piwik.p2p.l
|
|||
<p>Réunion de nos mondes...^3000 Ceux de nos <strong>savoir(s) être(s)^2000</strong></p>
|
||||
<p>Ensemble! <strong>l'Internet des gens</strong> EXISTE !^3000 !!!^3000</p>
|
||||
<p>une [PLANETE] Heureu(x)se(s) ^3000un<strong> Futur PLUS Humain(s)</strong></p>
|
||||
<p>Découvrez <a href="https://astroport.com">Astroport</a>^3000 programmé pour défendre votre liberté</p>
|
||||
<p><strong><em><a href="https://astroport.com">Astroport</a></em></strong>^3000 est programmé pour défendre votre liberté</p>
|
||||
</div>
|
||||
<span id="typed"></span></h3>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
/*
|
||||
* TIS CODE IS REALTED TO zen/_CopyLaRadio shell's
|
||||
* THIS CODE IS RELATED TO zen/_CopyLaRadio shell's
|
||||
DONE!!!? WRITE THAT CODE IN infobar2.js : arrount line 158 before "return lines;"
|
||||
// ZEEBOX HACK ZONE
|
||||
var reclink = './youtube-dl.php?q=REC&artist=' + escape(encodeURIComponent(npinfo.Artist)) + '&title=' + escape(encodeURIComponent(npinfo.Title)) + '&radio='+ escape(encodeURIComponent(npinfo.stream)) +'&maxResults=1';
|
||||
var zcopylink = ' <a id="REC" title="Enregistrer sur Youtube" href="#" onclick=\'javascript:window.open("'+ reclink +'","REC","menubar=no, scrollbars=no, top=10, left=10, width=384, height=546");return false;\'>[REC]</a>';
|
||||
zcopylink += ' <a title="RECHERCHE LIBRE" href="./youtube-dl.php" target="youtube">*</a>';
|
||||
var host = window.location.hostname;
|
||||
var reclink = 'http://' + host + ':10010/_CopyLaRadio/youtube-dl.php?q=REC&artist=' + escape(encodeURIComponent(npinfo.Artist)) + '&title=' + escape(encodeURIComponent(npinfo.Title)) + '&radio='+ escape(encodeURIComponent(npinfo.Album)) +'&maxResults=1';
|
||||
var zcopylink = ' <a id="REC" title="Enregistrer sur Youtube" href="#" onclick=\'javascript:window.open("'+ reclink +'","REC","menubar=no, scrollbars=no, top=10, left=10, width=320, height=400");return false;\'>[REC]</a>';
|
||||
zcopylink += ' <a title="RECHERCHE LIBRE" href="'+ reclink +'" target="youtube">*</a>';
|
||||
lines[0].text += zcopylink;
|
||||
// ZEEBOX HACK ZONE
|
||||
*/
|
||||
|
@ -14,7 +15,7 @@ $search=$radio=$artist=$title=$lnk=$lnkform=$cmd=$len="";
|
|||
$search = trim(urldecode($_REQUEST['q']));
|
||||
|
||||
$radio = urldecode($_REQUEST['radio']);
|
||||
$artist = urldecode($_REQUEST['artist']);
|
||||
$artist = urldecode($_REQUEST['artist']);
|
||||
$title = urldecode($_REQUEST['title']);
|
||||
$lnk = trim(urldecode($_REQUEST['lnk']));
|
||||
$cmd="$radio|$artist|$title";
|
||||
|
@ -38,7 +39,7 @@ if( $search == "REC" ) {
|
|||
if( ! exec('grep '.escapeshellarg($lnk).' /tmp/ytdl.list') ) {
|
||||
// file_put_contents("/tmp/ytdl.list","CopyLibre||$lnk\n", FILE_APPEND);
|
||||
// instead of using a relay daemon to monitor a /tmp shared file, we are going to send sbot message to make it. #zenyta SSB message.
|
||||
shell_exec('/var/www/loveland/_CopyLaRadio/sbotc_zenyta.sh'. $lnk);
|
||||
shell_exec('/var/www/loveland/_CopyLaRadio/sbotc_zenyta.sh '. $lnk);
|
||||
}
|
||||
$result.='<p><a href="'.$lnk.'" target="check">LIEN: '.$lnk.'</a></p>';
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ echo '
|
|||
tstamp="$1"
|
||||
|
||||
# for tstamp in $(ls ~/.zen/miam/); do
|
||||
[[ $tstamp == "" ]] && echo "NO tstamp $tstamp" && exit 1
|
||||
[[ $tstamp == "" ]] && echo "MISSING tstamp $tstamp" && exit 1
|
||||
[ ! -d ~/.zen/miam/$tstamp ] && echo "NOT FOUND ~/.zen/miam/$tstamp" && exit 1
|
||||
[ -f ~/.zen/miam/$tstamp/msg_key ] && msg_key=$(cat ~/.zen/miam/$tstamp/msg_key) || echo "HEY I cannot find source SSB message in $tstamp" || exit 1
|
||||
|
||||
|
|
|
@ -65,9 +65,10 @@ do
|
|||
|
||||
# SWARM REFRESH
|
||||
$MY_PATH/ipfs_SWARM_refresh.sh
|
||||
# SWARM ALREADY DONE
|
||||
# SWARM ALREADY DONE IT ??
|
||||
# IS LIKE "SELECT FROM ipfs_swarm WHERE _tag.zensource=$timestamp"(or something like that in SQL), means a ZenTag already exists.
|
||||
CHECKSWARM=$(grep -Rwl "$timestamp" ~/.zen/ipfs_swarm/.Qm*/TAG/*/_tag.zensource | tail -n 1 | cut -f 6 -d '/')
|
||||
# OR SWARM PROCESS IN ACTION
|
||||
# OR SWARM PROCESS IN ACTION (NB: copy tasks must be asynchronous in swarm)
|
||||
[[ ! $CHECKSWARM ]] && CHECKSWARM=$(grep -Rwl "$timestamp" ~/.zen/ipfs_swarm/.Qm*/TAG/process.timestamp.ssb | tail -n 1 | cut -f 6 -d '/')
|
||||
[[ $CHECKSWARM ]] \
|
||||
&& echo "$timestamp ALREADY on NODE $CHECKSWARM CONTINUE" \
|
||||
|
|
Loading…
Reference in New Issue