This commit is contained in:
2025-01-26 17:56:09 +01:00
parent 4b5d07fd12
commit fc7dcd107c
6 changed files with 60 additions and 18 deletions

View File

@@ -1,8 +1,7 @@
#### 1. Genera una pagina html con il link aggiornato di streamingcommunity
Le istruzioni di installazione/settaggio sono uguali sia per [make_index.sh](./make_index.sh) che per [make_index_without_stats.sh](./make_index_without_stats.sh), entrambi richiedono [attuale.txt](attuale.txt): <br>
- [make_index.sh](./make_index.sh): Genera la index scaricando le stats ([make_stats.sh](make_stats.sh)), quindi ne mostra i link sulla index come in [questo link](http://streamingcommunity.accol.li)<br>
- [make_index_without_stats.sh](./make_index_without_stats.sh): Genera la index senza scaricare e mostrare le stats
[make_index.sh](./make_index.sh) Genera una index come in [questo link](http://streamingcommunity.accol.li)<br>
```bash
# (richiede "attuale.txt")

44
deprecati/README.md Normal file
View File

@@ -0,0 +1,44 @@
#### 1. Genera una pagina html con il link aggiornato di streamingcommunity
Le istruzioni di installazione/settaggio sono uguali sia per [make_index.sh](./make_index.sh) che per [make_index_without_stats.sh](./make_index_without_stats.sh), entrambi richiedono [attuale.txt](attuale.txt): <br>
- [make_index.sh](./make_index.sh): Genera la index scaricando le stats ([make_stats.sh](make_stats.sh)), quindi ne mostra i link sulla index come in [questo link](http://streamingcommunity.accol.li)<br>
- [make_index_without_stats.sh](./make_index_without_stats.sh): Genera la index senza scaricare e mostrare le stats
```bash
# (richiede "attuale.txt")
# Setta la variabile "PWD_SC" in testa allo script o lasciala con "PWD" per provare in locale
nano make_index.sh
# Avvia lo script manualmente
./make_index.sh
# oppure mettilo in cron
0 0 * * * /path/to/make_index.sh
```
Se vuoi pubblicarla sul web: aggiusta la variabile <code>PWD_SC</code> in testa allo script [make_index.sh](./make_index.sh), decommenta i comandi in fondo allo stesso script e metti la tua cartella (quella che hai messo in <code>PWD_SC</code>) dietro a un reverse proxy
<br>
#### 2. Crea un feed rss con il link:
```bash
# (richiede "attuale.txt")
# Setta la variabile "PWD_SC" in testa allo script o lasciala con "PWD" per provare in locale
nano rss_generator.sh
# Avvia lo manualmente
./rss_generator.sh
# oppure mettilo in cron
0 0 * * * /path/to/rss_generator.sh
```
<br>
#### 3. Se vuoi semplicemente sapere qual'è il link giusto aggiornato:
```bash
# (richiede "attuale.txt")
# esgui lo script:
./show_link.sh
```

View File

@@ -64,17 +64,18 @@ cat <<- _EOF > $PWD_SC/index.html
height: 200wj;
}
h1 {
font-size: 36px;
/* Default size */
}
@media (max-width: 480px) {
h1 {
font-size: 17px;
/* Size mobile phones */
}
}
@media (max-width: 480px) {
h3 {
font-size: 15px;
@@ -83,10 +84,8 @@ cat <<- _EOF > $PWD_SC/index.html
}
</style>
</head>
<body>
<center>
<br><br>
<div class="link">
@@ -106,22 +105,25 @@ cat <<- _EOF > $PWD_SC/index.html
<div class="link">
<h3> Link aggiornato per Streaming Community: </h3>
<h1> <a href=$formatted> $formatted </a> </h1>
<h3> (cambia circa una volta al mese) </h3>
<h3> (cambia circa una volta al mese) </h3><br>
<h5> stats di $attuale (non di mywebsite.com): <a href=./stats1.html>stats1</a> e <a href=./stats2.html>stats2 </a> </h5>
</div>
<br><br>
</center>
</body>
</html>
_EOF
# Genera le stats scrapate da streaming community sui client più altre cose da capire
./make_stats.sh
# Da i permessi alla cartella (decommentare se hostato)
#chown -R root:root $PWD_SC; echo "la cartella $PWD_SC è di root"
#chmod +x $PWD_SC ; echo "permetto di leggere dentro a $PWD_SC"
#chmod 740 $PWD_SC/*; echo "reset permessi per tutti i file dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.html; chmod -R 744 $PWD_SC/*.html; echo "do i permessi agli html dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.json; chmod -R 744 $PWD_SC/*.json; echo "do i permessi ai json dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.xml; chmod -R 744 $PWD_SC/*.xml; echo "do i permessi agli xml dentro a $PWD_SC"
#chown root:root ./*.sh; chmod 740 ./*.sh; echo "do i permesi agli sh dentro $PWD_SC"
#chown www-data:www-data ./splash.gif; chmod 740 ./splash.gif; echo "do i permesi alla gif splash"

View File

@@ -64,18 +64,17 @@ cat <<- _EOF > $PWD_SC/index.html
height: 200wj;
}
h1 {
font-size: 36px;
/* Default size */
}
@media (max-width: 480px) {
h1 {
font-size: 17px;
/* Size mobile phones */
}
}
@media (max-width: 480px) {
h3 {
font-size: 15px;
@@ -84,8 +83,10 @@ cat <<- _EOF > $PWD_SC/index.html
}
</style>
</head>
<body>
<center>
<br><br>
<div class="link">
@@ -105,25 +106,22 @@ cat <<- _EOF > $PWD_SC/index.html
<div class="link">
<h3> Link aggiornato per Streaming Community: </h3>
<h1> <a href=$formatted> $formatted </a> </h1>
<h3> (cambia circa una volta al mese) </h3><br>
<h5> stats di $attuale (non di mywebsite.com): <a href=./stats1.html>stats1</a> e <a href=./stats2.html>stats2 </a> </h5>
<h3> (cambia circa una volta al mese) </h3>
</div>
<br><br>
</center>
</body>
</html>
_EOF
# Genera le stats scrapate da streaming community sui client più altre cose da capire
./make_stats.sh
# Da i permessi alla cartella (decommentare se hostato)
#chown -R root:root $PWD_SC; echo "la cartella $PWD_SC è di root"
#chmod +x $PWD_SC ; echo "permetto di leggere dentro a $PWD_SC"
#chmod 740 $PWD_SC/*; echo "reset permessi per tutti i file dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.html; chmod -R 744 $PWD_SC/*.html; echo "do i permessi agli html dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.json; chmod -R 744 $PWD_SC/*.json; echo "do i permessi ai json dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.xml; chmod -R 744 $PWD_SC/*.xml; echo "do i permessi agli xml dentro a $PWD_SC"
#chown root:root ./*.sh; chmod 740 ./*.sh; echo "do i permesi agli sh dentro $PWD_SC"
#chown www-data:www-data ./splash.gif; chmod 740 ./splash.gif; echo "do i permesi alla gif splash"

View File

@@ -36,7 +36,6 @@ _EOF
#chmod +x $PWD_SC ; echo "permetto di leggere dentro a $PWD_SC"
#chmod 740 $PWD_SC/*; echo "reset permessi per tutti i file dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.html; chmod -R 744 $PWD_SC/*.html; echo "do i permessi agli html dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.json; chmod -R 744 $PWD_SC/*.json; echo "do i permessi ai json dentro a $PWD_SC"
#chown -R www-data:www-data $PWD_SC/*.xml; chmod -R 744 $PWD_SC/*.xml; echo "do i permessi agli xml dentro a $PWD_SC"
#chown root:root ./*.sh; chmod 740 ./*.sh; echo "do i permesi agli sh dentro $PWD_SC"
#chown www-data:www-data ./splash.gif; chmod 740 ./splash.gif; echo "do i permesi alla gif splash"