forked from STI/Astroport.ONE
Astroport ONE crypto ambassade p2p
This commit is contained in:
parent
08636b1010
commit
75283977ed
31
install.sh
31
install.sh
|
@ -37,13 +37,19 @@ MMMM0..0MMMMMX 'NMMMMMMMMMMX 'NMMMMMMMMMMM',WMMMMMMMMMMMMx OMMMMMMMMMMN dMM
|
||||||
ASTROPORT is a peer to peer friends of friends real life game based on IPFS.
|
ASTROPORT is a peer to peer friends of friends real life game based on IPFS.
|
||||||
Join the Astronaiuts Team. Learn and share how to live together on 'One Planet'
|
Join the Astronaiuts Team. Learn and share how to live together on 'One Planet'
|
||||||
|
|
||||||
|
ASTROPORT est un jeu d'amis entre amis basé sur IPFS.
|
||||||
|
Rejoignez l'équipe des astronautes. Apprenez et partagez comment vivre ensemble sur 'une seule planète'.
|
||||||
|
|
||||||
NOW INSTALLING REQUIRED TOOLS & CRYPTO STUFF
|
NOW INSTALLING REQUIRED TOOLS & CRYPTO STUFF
|
||||||
|
MAINTENANT INSTALLATION DES OUTILS NÉCESSAIRES ET DU MATÉRIEL CRYPTOGRAPHIQUE
|
||||||
"
|
"
|
||||||
|
## VERIFY SOFTWARE DEPENDENCIES
|
||||||
|
[[ ! $(which ipfs) ]] && echo "EXIT. Vous devez avoir installé ipfs CLI sur votre ordinateur" && echo "https://dist.ipfs.io/#go-ipfs" && exit 1
|
||||||
|
|
||||||
[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
for i in git fail2ban inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev printer-driver-all cups; do
|
for i in git fail2ban inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev printer-driver-all cups figlet apt-transport-https ca-certificates; do
|
||||||
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
sudo apt install -y $i
|
sudo apt install -y $i
|
||||||
fi
|
fi
|
||||||
|
@ -66,12 +72,13 @@ sudo pip3 install brother_ql
|
||||||
sudo cupsctl --remote-admin
|
sudo cupsctl --remote-admin
|
||||||
sudo usermod -aG lpadmin pi
|
sudo usermod -aG lpadmin pi
|
||||||
|
|
||||||
## CREATING GAME DIRECTORIES
|
# GAME FILES DATA STRUCTURE
|
||||||
mkdir -p ~/.zen/tmp
|
mkdir -p ~/.zen/tmp
|
||||||
mkdir -p ~/.zen/game/players
|
mkdir -p ~/.zen/game/players
|
||||||
|
mkdir -p ~/.zen/game/worlds
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "CREATING OASIS ASTROPORT STATION SPECIAL IPFSNODEID"
|
echo "INITIALISATION STATION OASIS ASTROPORT"
|
||||||
########################################################################
|
########################################################################
|
||||||
salt="$(${MY_PATH}/tools/diceware.sh 3 | xargs)"
|
salt="$(${MY_PATH}/tools/diceware.sh 3 | xargs)"
|
||||||
salto="$salt"
|
salto="$salt"
|
||||||
|
@ -79,8 +86,8 @@ salto="$salt"
|
||||||
pepper="$(${MY_PATH}/tools/diceware.sh 3 | xargs)"
|
pepper="$(${MY_PATH}/tools/diceware.sh 3 | xargs)"
|
||||||
XZUID=$(${MY_PATH}/tools/diceware.sh 1 | xargs)${RANDOM:0:2}$(${MY_PATH}/tools/diceware.sh 1 | xargs)
|
XZUID=$(${MY_PATH}/tools/diceware.sh 1 | xargs)${RANDOM:0:2}$(${MY_PATH}/tools/diceware.sh 1 | xargs)
|
||||||
|
|
||||||
echo "Gardez ou modifiez cet identifiant (passphrase 1)? $salt" && read salty && [[ $salty ]] && salt="$salty"
|
echo "Conservez ou modifiez ce identifiant (passphrase 1)? $salt" && read salty && [[ $salty ]] && salt="$salty"
|
||||||
echo "Gardez ou modifiez cet mot de passe (passphrase 2)? $pepper" && read peppery && [[ $peppery ]] && pepper="$peppery"
|
echo "Conservez ou modifiez ce mot de passe (passphrase 2)? $pepper" && read peppery && [[ $peppery ]] && pepper="$peppery"
|
||||||
[[ "$salt" != "$salto" ]] && echo "Gardez ou modifiez ce Pseudo? $XZUID" && read XZUIDy && [[ $XZUIDy ]] && XZUID="$XZUIDy"
|
[[ "$salt" != "$salto" ]] && echo "Gardez ou modifiez ce Pseudo? $XZUID" && read XZUIDy && [[ $XZUIDy ]] && XZUID="$XZUIDy"
|
||||||
|
|
||||||
g1_salt="$salt"
|
g1_salt="$salt"
|
||||||
|
@ -92,7 +99,7 @@ echo "$g1_pepper" >> /tmp/secret.june
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "CREATING STATION secret.dunikey (https://cesium.app WALLET)"
|
echo "CREATION CLEF secret.dunikey (https://cesium.app WALLET)"
|
||||||
########################################################################
|
########################################################################
|
||||||
python3 ${MY_PATH}/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
python3 ${MY_PATH}/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper"
|
||||||
g1pub=$(cat /tmp/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
|
g1pub=$(cat /tmp/secret.dunikey | grep "pub" | cut -d ' ' -f 2)
|
||||||
|
@ -100,7 +107,7 @@ g1sec=$(cat /tmp/secret.dunikey | grep "sec" | cut -d ' ' -f 2)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "CREATING config.ipfs"
|
echo "PREPARATION config.ipfs"
|
||||||
########################################################################
|
########################################################################
|
||||||
ipfs_ID=$(python3 ${MY_PATH}/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
ipfs_ID=$(python3 ${MY_PATH}/tools/create_ipfsnodeid_from_tmp_secret.dunikey.py)
|
||||||
echo $ipfs_ID > /tmp/secret.ipfs && source /tmp/secret.ipfs
|
echo $ipfs_ID > /tmp/secret.ipfs && source /tmp/secret.ipfs
|
||||||
|
@ -120,7 +127,7 @@ mkdir -p $IPFS_sync_directory
|
||||||
########################################################################
|
########################################################################
|
||||||
# INSTALL KEYS
|
# INSTALL KEYS
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "INSTALL OASIS crypto identity in ~/.zen"
|
echo "STATION CRYPTO ID ~/.zen"
|
||||||
|
|
||||||
[[ -f ~/.zen/secret.june ]] && mv ~/.zen/secret.june ~/.zen/secret.june.old.$TS
|
[[ -f ~/.zen/secret.june ]] && mv ~/.zen/secret.june ~/.zen/secret.june.old.$TS
|
||||||
mv /tmp/secret.june ~/.zen/secret.june
|
mv /tmp/secret.june ~/.zen/secret.june
|
||||||
|
@ -181,7 +188,7 @@ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
||||||
ASTROPORT ONE.
|
ASTROPORT ONE.
|
||||||
"
|
"
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "Activating ipfs DHT optimisations"
|
echo "Activation Identité $XZUID + Optimisations IPFS"
|
||||||
########################################################################
|
########################################################################
|
||||||
# DHT gossip PUBSUB mode
|
# DHT gossip PUBSUB mode
|
||||||
ipfs config Pubsub.Router gossipsub
|
ipfs config Pubsub.Router gossipsub
|
||||||
|
@ -195,19 +202,19 @@ ipfs config --json Experimental.P2pHttpProxy true
|
||||||
|
|
||||||
ipfs config Addresses.Gateway "/ip4/0.0.0.0/tcp/8080"
|
ipfs config Addresses.Gateway "/ip4/0.0.0.0/tcp/8080"
|
||||||
|
|
||||||
# CREATE IPFS BOOTSTRAP ###########
|
# REMOVE IPFS BOOTSTRAP ###########
|
||||||
ipfs bootstrap rm --all
|
ipfs bootstrap rm --all
|
||||||
|
|
||||||
## ARIES COLLECT REGULARLY OASIS ADDRESS
|
## ARIES COLLECT REGULARLY OASIS ADDRESS
|
||||||
# ARIES IPNS KEY /ip4/37.187.127.175/tcp/4001/p2p/12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx
|
# ARIES IPNS KEY /ip4/37.187.127.175/tcp/4001/p2p/12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx
|
||||||
for bootnode in $(ipfs cat /ipns/12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx/bootstrap)
|
for bootnode in $(ipfs cat /ipns/12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx/.12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx/bootstrap)
|
||||||
do
|
do
|
||||||
## ADD $bootnode TO BOOTSTRAP
|
## ADD $bootnode TO BOOTSTRAP
|
||||||
ipfs bootstrap add $bootnode
|
ipfs bootstrap add $bootnode
|
||||||
done
|
done
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "Install youtube-dl" # Avoid provider restrictions
|
echo "Installation de youtube-dl - Copions le Web avant qu'il ne ferme" # Avoid provider restrictions
|
||||||
########################################################################
|
########################################################################
|
||||||
${MY_PATH}/tools/install.youtube-dl.sh
|
${MY_PATH}/tools/install.youtube-dl.sh
|
||||||
|
|
||||||
|
|
|
@ -14,26 +14,22 @@ echo
|
||||||
sleep 1
|
sleep 1
|
||||||
echo "Vous décidez de sortir de la Sation Astroport."
|
echo "Vous décidez de sortir de la Sation Astroport."
|
||||||
echo
|
echo
|
||||||
sleep 4
|
|
||||||
echo "aAu moment où vous franchiussez le seul.."
|
|
||||||
echo "Un immense flash fait jaillir partant de vos pieds votre ombre, immense silhouète aloongée"
|
|
||||||
|
|
||||||
echoleverstate=`cat ../logic/stationlogic.ben`
|
echoleverstate=`cat ../logic/stationlogic.ben`
|
||||||
if [ "$leverstate" = "on" ]; then
|
if [ "$leverstate" = "on" ]; then
|
||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "Il ne dépend que de vous d'explorer ce nouveau futur."
|
echo "Il ne dépend que de vous d'explorer ce nouveau futur."
|
||||||
echo "Le Visa MadeInZion vous permet de découvrir celui qui vous entoure"
|
echo "Le Visa MadeInZion nous permet de découvrir ensemble le monde qui nous entoure"
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "Nous vous attendons sur notre 'bon coin' https://gchange.fr "
|
echo "Nous espérons vous voir sur notre 'bon coin' https://gchange.fr "
|
||||||
echo
|
echo
|
||||||
sleep 3
|
sleep 3
|
||||||
echo "Il vous reste maintenant à installer IPFS pour rejoindre l'autre Internet."
|
echo "Vous aussi voulez ouvrir une ambassade? Installez IPFS, faisons Internet à notre façon."
|
||||||
echo
|
echo
|
||||||
sleep 4
|
sleep 4
|
||||||
echo "Devenez ambassadeur."
|
echo "Transformez votre bout de terrain, construisez un Astroport."
|
||||||
echo "Renseignez vous sur les formations habitats posés, vissés et cousus. "
|
echo "Nous organisons des formations habitats posés, vissés et cousus. Eau potable. Biogaz, Marmite Norvégienne..."
|
||||||
echo "Apprenez à nourrir le sol et reconnaitre les plantes de votre environement. SOlDiag"
|
echo "Et par desssus tout, comment nourrir le sol, reconnaitre les plantes... Redevenir ceuilleur, créateur."
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -30,34 +30,33 @@ while true; do
|
||||||
echo "A chaque frappe d'une touche. l'écran fait défiler le texte 'SCANNEZ VISA SVP'."
|
echo "A chaque frappe d'une touche. l'écran fait défiler le texte 'SCANNEZ VISA SVP'."
|
||||||
else
|
else
|
||||||
sed -i='' 's/off/on/' ../logic/stationlogic.ben
|
sed -i='' 's/off/on/' ../logic/stationlogic.ben
|
||||||
echo "Vous appuyez sur l'interupteur de l'écran et touchez la barre espace du clavier"
|
echo "Vous appuyez sur l'interupteur de l'écran. Y apparaît alors :"
|
||||||
sleep 3
|
sleep 3
|
||||||
echo "AMBASSADE MadeInZion"
|
echo "AMBASSADE MadeInZion - TerraPi4 - 2 To -"
|
||||||
echo "TerraPi4 2 To"
|
echo ""
|
||||||
echo
|
echo
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "Avant que le GRAND RESET ne nous oblige à totalement réglementer nos information personnelles"
|
echo "INTERNET est dangereux. il vend vos information personnelles pour que vous deveniez un produit. "
|
||||||
echo "En dehors de la version payante, un INTERNET gratuit existe. Il se contruit comme on collecte les oeufs à Paques."
|
echo "Quittez INTERNET. Découvrez le Système de Fichiers Interplanétaire (IPFS)."
|
||||||
sleep 2
|
sleep 2
|
||||||
echo
|
echo
|
||||||
echo "Certains l'appelle 'Le Blob'. On y échange en pair à pair."
|
echo "Nous remplissons IPFS des identités des Astronautes qui explorent le mode de vie en forêt jardin."
|
||||||
sleep 2
|
sleep 2
|
||||||
echo
|
echo
|
||||||
echo "Cet endroit est une ambassade MadeInZion. Un crypto pays de la Nation d'Etat d'Esprit."
|
echo "On y échange en pair à pair. La monnaie y est Libre."
|
||||||
echo "Version optimisée, décentralisée, sans frontière des anciens pays et gouvernements."
|
|
||||||
sleep 4
|
sleep 4
|
||||||
file1="../art/astrored.ben"
|
file1="../art/astrored.ben"
|
||||||
while IFS= read -r line
|
while IFS= read -r line
|
||||||
do
|
do
|
||||||
echo "$line"
|
echo "$line"
|
||||||
done <"$file1"
|
done <"$file1"
|
||||||
echo "__________________ Connexion....."
|
echo "__________________ Astroport 20:12 est un programme qui permet de monter des ambassades de la 'présipauté pair à pair' MadeInZion....."
|
||||||
echo "Parcourir l'Arbre des rêves "
|
echo "Chaque Lieu porte l'Arbre des rêves de ses habitants"
|
||||||
echo "Ajouter un Astronaute au JEu."
|
echo "Chaque Astronaute apporte son 'Art des gens'"
|
||||||
|
echo "Il participe au JEu d'ingénierie DIY et propage la terraformation forêt jardin."
|
||||||
sleep 3
|
sleep 3
|
||||||
echo
|
echo
|
||||||
echo
|
echo "ASTROPORT ONE"
|
||||||
echo "INITIALISATION ASTROPORT"
|
|
||||||
echo
|
echo
|
||||||
read -p "Appuyez sur [ENTER] pour accéder au MENU"
|
read -p "Appuyez sur [ENTER] pour accéder au MENU"
|
||||||
~/.zen/game/start.sh
|
~/.zen/game/start.sh
|
||||||
|
@ -65,7 +64,7 @@ while true; do
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
|
||||||
h ) echo "Vous lisez l'inscription Wifi 'qo-op|0penS0urce!' - 192.168.220.1 - Nextcloud https://astroport.cloud - Jukebox https://astroport.music ..." ;;
|
h ) echo "'qo-op|0penS0urce!' - 192.168.220.1 - Nextcloud https://astroport.cloud - Jukebox https://astroport.music ... C'est bien une Station Astroport" ;;
|
||||||
* ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";;
|
* ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
|
@ -8,22 +8,23 @@ ts=$(date -u +%s%N | cut -b1-13)
|
||||||
################################################################################
|
################################################################################
|
||||||
# Capture la photographie satellite de la France
|
# Capture la photographie satellite de la France
|
||||||
# https://fr.sat24.com/image?type=visual5HDComplete®ion=fr
|
# https://fr.sat24.com/image?type=visual5HDComplete®ion=fr
|
||||||
# https://media.meteonews.net/sat/EURwest_1273x892_c1/sat_20220308_1500.jpg
|
|
||||||
|
|
||||||
mkdir -p ~/..zen/game/meteofrance
|
mkdir -p ~/..zen/game/meteo.anim.eu
|
||||||
rm -f ~/..zen/game/meteofrance/meteo.jpg
|
rm -f ~/..zen/game/meteo.anim.eu/meteo.png
|
||||||
curl -m 20 --output ~/..zen/game/meteofrance/meteo.jpg https://media.meteonews.net/sat/EURwest_1273x892_c1/sat_20220308_1500.jpg
|
curl -m 20 --output ~/..zen/game/meteo.anim.eu/meteo.png https://s.w-x.co/staticmaps/wu/wu/satir1200_cur/europ/animate.png
|
||||||
|
|
||||||
if [[ ! -f ~/..zen/game/meteofrance/meteo.jpg ]]; then
|
if [[ ! -f ~/..zen/game/meteo.anim.eu/meteo.png ]]; then
|
||||||
echo "Impossible de vous connecter à https://fr.sat24.com/"
|
echo "Impossible de vous connecter au service meteo"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "MIse à jour de votre archive meteo : $ts"
|
echo "NEED HTML TEMPLATING"
|
||||||
echo $ts > ~/..zen/game/meteofrance/.ts
|
echo "Mise à jour archive points meteo : $ts"
|
||||||
|
echo $ts > ~/..zen/game/meteo.anim.eu/.ts
|
||||||
|
|
||||||
|
IPFS=$(ipfs add -Rw ~/..zen/game/meteo.anim.eu/)
|
||||||
|
echo $IPFS > ~/..zen/game/meteo.anim.eu/.chain
|
||||||
|
|
||||||
|
|
||||||
IPFS=$(ipfs add -Rw ~/..zen/game/meteofrance/)
|
|
||||||
echo $IPFS > ~/..zen/game/meteofrance/.chain
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
Message de la Confédération Interplanétaire
|
Message de la Confédération Interplanétaire
|
||||||
|
|
||||||
La planète où vous vous trouvez est en danger. Une nouvelle extinction du vivant est en cours!
|
La planète où vous vous trouvez est en danger. Les menaces sont nombreuses.
|
||||||
Les gouvernements de ce monde se disputent les dernières ressources.
|
Vos gouvernements se disputent les dernières ressources. Le cycle du vivant est perturbé !
|
||||||
Le "contrat social" des 'pays civilisés' vascille. Les technocrates réclament plus de contrôle.
|
Le "contrat social" des 'pays civilisés' vascille. Les technocrates réclament plus de contrôle.
|
||||||
|
|
||||||
La commission extraterrestre est formelle. Vous êtes en danger.
|
La commission extraterrestre est formelle. Vous êtes en danger.
|
||||||
|
|
||||||
Heureusement la monnaie libre a été découverte sur votre planète!
|
Heureusement la monnaie libre a été découverte sur votre planète!
|
||||||
Elle s'utilise dans ce jeu de civilisation 'grandeur nature'. Prêt?
|
Elle s'utilise dans un jeu 'grandeur nature'. Astroport 20:12
|
||||||
Bienvenue dans l'aventure.
|
Bienvenue dans l'aventure du changement de civilisation.
|
||||||
|
|
||||||
Vos commandes pour se déplacer et interagir sont
|
Les commandes pour vous déplacer et interagir sont
|
||||||
'n' aller au nord,
|
'n' aller au nord,
|
||||||
's' aller au sud,
|
's' aller au sud,
|
||||||
'e' aller à l'est,
|
'e' aller à l'est,
|
||||||
'w' aller à l'ouest,
|
'w' aller à l'ouest,
|
||||||
'u' utiliser un objet,
|
'u' utiliser,
|
||||||
'h' observer plus en détail.
|
'h' observer plus en détail.
|
||||||
|
|
||||||
Ctrl-C pour quitter.
|
Ctrl-C pour quitter.
|
||||||
|
|
4
start.sh
4
start.sh
|
@ -27,9 +27,6 @@ ACTUAL PLAYERS
|
||||||
## VERIFY SOFTWARE DEPENDENCIES
|
## VERIFY SOFTWARE DEPENDENCIES
|
||||||
[[ ! $(which ipfs) ]] && echo "EXIT. Vous devez avoir installé ipfs CLI sur votre ordinateur" && echo "https://dist.ipfs.io/#go-ipfs" && exit 1
|
[[ ! $(which ipfs) ]] && echo "EXIT. Vous devez avoir installé ipfs CLI sur votre ordinateur" && echo "https://dist.ipfs.io/#go-ipfs" && exit 1
|
||||||
|
|
||||||
mkdir -p ~/.zen/tmp
|
|
||||||
mkdir -p ~/.zen/game/players
|
|
||||||
|
|
||||||
## CHECK CONNECTED USER
|
## CHECK CONNECTED USER
|
||||||
if [[ -e ~/.zen/game/players/.current/.pseudo ]]; then
|
if [[ -e ~/.zen/game/players/.current/.pseudo ]]; then
|
||||||
PLAYER=$(cat ~/.zen/game/players/.current/.player)
|
PLAYER=$(cat ~/.zen/game/players/.current/.player)
|
||||||
|
@ -77,6 +74,7 @@ select fav in "${choices[@]}"; do
|
||||||
;;
|
;;
|
||||||
"EXPORTER VISA")
|
"EXPORTER VISA")
|
||||||
echo "EXPORT"
|
echo "EXPORT"
|
||||||
|
ls ~/.zen/game/players/.current
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"SUPPRIMER VISA")
|
"SUPPRIMER VISA")
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>_PSEUDO_ MyVid - Astroport One</title>
|
<title>_PSEUDO_ VIDEO BLOG - Astroport One</title>
|
||||||
<link rel="stylesheet" href="/ipfs/QmSo1zVcT28GUNByvxuu5osevJQXEbZQ1sDXY8h51azikA/decoration.css" type="text/css" />
|
<link rel="stylesheet" href="./styles/decoration.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="/ipfs/QmStGmBc4mxnE4brnMcFdRCzXikxHRKnQ1aUgLetAwgen5/layout.css" type="text/css" />
|
<link rel="stylesheet" href="./styles/layout.css" type="text/css" />
|
||||||
<link rel="icon" type="image/png" href="/ipfs/QmSvZaf7foMjH4BDxTvW13JY5iVNGEbjEymqL92a9W86GQ/logo.png" />
|
<link rel="icon" type="image/png" href="./styles/logo.png" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -19,17 +19,17 @@
|
||||||
<article>
|
<article>
|
||||||
<video autoplay="autoplay" controls>
|
<video autoplay="autoplay" controls>
|
||||||
<source src="/ipfs/_IPFSID_/output.mp4" type="video/mp4">
|
<source src="/ipfs/_IPFSID_/output.mp4" type="video/mp4">
|
||||||
<a href="/ipfs/_IPFSID_/output.mp4">MyVid</a>
|
<a href="/ipfs/_IPFSID_/output.mp4">Ma Video</a>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<h1 class="video-title">
|
<h1 class="video-title">
|
||||||
MyVid _DATE_
|
Enregistrement du _DATE_
|
||||||
</h1>
|
</h1>
|
||||||
</article>
|
</article>
|
||||||
<article>
|
<article>
|
||||||
<a href="/ipfs/_OLDID_">Previous MyVid index</a>
|
<a href="/ipfs/_OLDID_">Video precedente</a>
|
||||||
<h1 class="video-title">
|
<h1 class="video-title">
|
||||||
Previous MyVid
|
Ancienne video
|
||||||
</h1>
|
</h1>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>_PSEUDO_ My First Vid - Astroport One</title>
|
<title>_PSEUDO_ VIDEO BLOG - Astroport One</title>
|
||||||
<link rel="stylesheet" href="/ipfs/QmSo1zVcT28GUNByvxuu5osevJQXEbZQ1sDXY8h51azikA/decoration.css" type="text/css" />
|
<link rel="stylesheet" href="./styles/decoration.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="/ipfs/QmStGmBc4mxnE4brnMcFdRCzXikxHRKnQ1aUgLetAwgen5/layout.css" type="text/css" />
|
<link rel="stylesheet" href="./styles/layout.css" type="text/css" />
|
||||||
<link rel="icon" type="image/png" href="/ipfs/QmSvZaf7foMjH4BDxTvW13JY5iVNGEbjEymqL92a9W86GQ/logo.png" />
|
<link rel="icon" type="image/png" href="./styles/logo.png" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@
|
||||||
<article>
|
<article>
|
||||||
<video autoplay="autoplay" controls>
|
<video autoplay="autoplay" controls>
|
||||||
<source src="/ipfs/_IPFSID_/output.mp4" type="video/mp4">
|
<source src="/ipfs/_IPFSID_/output.mp4" type="video/mp4">
|
||||||
<a href="/ipfs/_IPFSID_/output.mp4">My First Vid</a>
|
<a href="/ipfs/_IPFSID_/output.mp4">Ma Video</a>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<h1 class="video-title">
|
<h1 class="video-title">
|
||||||
MyVid _DATE_
|
Enregistrement du _DATE_
|
||||||
</h1>
|
</h1>
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -9,39 +9,51 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
ME="${0##*/}"
|
ME="${0##*/}"
|
||||||
TS=$(date -u +%s%N | cut -b1-13)
|
TS=$(date -u +%s%N | cut -b1-13)
|
||||||
|
|
||||||
|
if [[ -f ~/.zen/soundrecord.config ]]; then
|
||||||
RECTIME=12
|
source ~/.zen/soundrecord.config
|
||||||
espeak "Video record starting for $RECTIME seconds"
|
else
|
||||||
|
RECDEVICE=$(pactl list short sources | grep input | cut -f 2)
|
||||||
|
fi
|
||||||
|
espeak "Starting Video record. Press ENTER to stop."
|
||||||
# Find "input-slave" :: pactl list short sources
|
# Find "input-slave" :: pactl list short sources
|
||||||
|
|
||||||
${MY_PATH}/displaytimer.sh 12 &
|
# RECTIME=12
|
||||||
|
# ${MY_PATH}/displaytimer.sh 12 &
|
||||||
# timeout $RECTIME cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://alsa_input.usb-HD_Web_Camera_HD_Web_Camera_Ucamera001-02.analog-mono --sout "#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst=\"$HOME/.zen/tmp/MyVid.mp4\"}"
|
# timeout $RECTIME cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://alsa_input.usb-HD_Web_Camera_HD_Web_Camera_Ucamera001-02.analog-mono --sout "#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst=\"$HOME/.zen/tmp/MyVid.mp4\"}"
|
||||||
|
|
||||||
timeout $RECTIME cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://alsa_input.pci-0000_00_1f.3.analog-stereo --sout "#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst=\"$HOME/.zen/tmp/MyVid.mp4\"}"
|
cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://$RECDEVICE --sout "#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst=\"$HOME/.zen/tmp/MyVid.mp4\"}" &
|
||||||
|
processid="$!"
|
||||||
|
echo "Press ENTER to stop video recording"
|
||||||
|
read
|
||||||
|
kill -15 $processid
|
||||||
|
|
||||||
# cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://alsa_input.usb-HD_Web_Camera_HD_Web_Camera_Ucamera001-02.analog-mono --sout '#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst='~/.zen/tmp/MyVid.mp4'}' --run-time=$RECTIME --stop-time=$RECTIME cvlc://quit
|
# cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://alsa_input.usb-HD_Web_Camera_HD_Web_Camera_Ucamera001-02.analog-mono --sout '#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst='~/.zen/tmp/MyVid.mp4'}' --run-time=$RECTIME --stop-time=$RECTIME cvlc://quit
|
||||||
## RECOMMANCER ?
|
## RECOMMANCER ?
|
||||||
|
|
||||||
espeak "mp4 convert" #-acodec aac
|
espeak "mp4 transcoding" #-acodec aac
|
||||||
rm -f ~/.zen/tmp/output.mp4
|
rm -f ~/.zen/tmp/output.mp4
|
||||||
ffmpeg -i ~/.zen/tmp/MyVid.mp4 -vcodec libx264 ~/.zen/tmp/output.mp4
|
ffmpeg -i ~/.zen/tmp/MyVid.mp4 -vcodec libx264 -loglevel quiet ~/.zen/tmp/output.mp4
|
||||||
IPFSID=$(ipfs add -wrHq ~/.zen/tmp/output.mp4 | tail -n 1)
|
IPFSID=$(ipfs add -wrHq ~/.zen/tmp/output.mp4 | tail -n 1)
|
||||||
echo "NEW VIDEO FILE /ipfs/$IPFSID/output.mp4"
|
echo "NEW VIDEO FILE /ipfs/$IPFSID/output.mp4"
|
||||||
|
|
||||||
|
|
||||||
## Creating new video chain index.html
|
## Creating new video chain index.html
|
||||||
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
||||||
OLDID=$(cat ~/.zen/game/players/.current/.index 2>/dev/null)
|
OLDID=$(cat ~/.zen/game/players/.current/.vlog.index 2>/dev/null)
|
||||||
if [[ $OLDID ]]; then
|
if [[ $OLDID ]]; then
|
||||||
sed s/_OLDID_/$OLDID/g ${MY_PATH}/../templates/video_chain.html > /tmp/index.html
|
sed s/_OLDID_/$OLDID/g ${MY_PATH}/../templates/video_chain.html > /tmp/index.html
|
||||||
sed -i s/_IPFSID_/$IPFSID/g /tmp/index.html
|
sed -i s/_IPFSID_/$IPFSID/g /tmp/index.html
|
||||||
else
|
else
|
||||||
sed s/_IPFSID_/$IPFSID/g ${MY_PATH}/../templates/video_first.html > /tmp/index.html
|
sed s/_IPFSID_/$IPFSID/g ${MY_PATH}/../templates/video_first.html > /tmp/index.html
|
||||||
fi
|
fi
|
||||||
sed s/_PSEUDO_/$PSEUDO/g /tmp/index.html > ~/.zen/game/players/.current/publish/index.html
|
sed -i s/_DATE_/$(date -u "+%Y-%m-%d#%H:%M:%S")/g /tmp/index.html
|
||||||
|
sed s/_PSEUDO_/$PSEUDO/g /tmp/index.html > ~/.zen/game/players/.current/public/index.html
|
||||||
|
|
||||||
INDEXID=$(ipfs add -wrHq ~/.zen/game/players/.current/publish/index.html | tail -n 1)
|
# Copy style css
|
||||||
echo $INDEXID > ~/.zen/game/players/.current/.index
|
cp -R ${MY_PATH}/../templates/styles ~/.zen/game/players/.current/public/
|
||||||
|
|
||||||
|
INDEXID=$(ipfs add -rHq ~/.zen/game/players/.current/public | tail -n 1)
|
||||||
|
echo $INDEXID > ~/.zen/game/players/.current/.vlog.index
|
||||||
echo "LAST VIDEO INDEX http://127.0.0.1:8080/ipfs/$INDEXID"
|
echo "LAST VIDEO INDEX http://127.0.0.1:8080/ipfs/$INDEXID"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue