•  
  • Web Radio
  • Configurazione di Gnump3d su Linux, Server Appearance Settings

Configurazione di Gnump3d su Linux, Server Appearance Settings

Categorie: Web Radio
Tag: ,
Commenti: 1 commento
Pubblicato il: 15 novembre 2007

Specchio
Quarantasettesimo articolo dedicato alle web radio.

In questo articolo ci occuperemo delle impostazioni estetiche, vediamo quali.

# All the output the server produces is generated with the help of
# some HTML template files, these are referred to throughout the
# program and each collection of templates is referred to collectively
# as a ‘theme’.

Il server produce output in forma di pagine web. Tali pagine sono personalizzabili, e sono identificate come “temi”.

# This next option allows you to specify which theme should be used
# by default. (Any client can select one of the available themes by
# the use of cookies).

L’opzione successiva permette di scegliere qual’è il tema di default, ogni client può sceglierne uno.

# For each theme there are a collection of HTML files which are read
# and used for the server output. There are several basic files which
# must be supplied to be considered a theme:
#
# index.html -> Used for displaying individual directories.
# search.html -> Used for displaying the search form.
# results.html -> Used for displaying the results of a search.
# stats.html -> Used for customising the server statistics page.

Ogni tema è composto da alcuni files. I principali sono i 4 sopra indicati.

* index.html viene utilizzato per visualizzare le directory individuali.
* search.html viene utilizzato per il modulo di ricerca.
* results.html viene utilizzato per visualizzare il risultato della ricerca.
* stats.html mostra e personalizza la pagina delle statistiche.

# In addition to those each plugin reads in it’s own template file
# and uses that. For example the statistics plugin is accessed via
# the URL http://server.host.name:port/stats/, and reads in a template
# called ‘stats.html’

Oltre a queste pagine, ogni plugin legge il suo template e lo usa.

# The theme directory defaults to /usr/share/gnump3d – but may be
# changed via the ‘theme_directory’ setting given below.
#
# When the server is running you may set the theme from your browser
# via the preferences page, simply visit the link:
#
# http://server.host.name:port/prefs

Si può settare un plugin anche via web, tramite l’indirizzo sopra mostrato.

# NOTE
# —-
#
# If you create a theme I’d be happy to include it in future releases
# if you wish – see the online theme creation docs at:
#
# http://www.gnump3d.org/theme.html
#
theme = Tabular

L’ultima riga è quella da modificare, a piacere dell’utente, tra i temi installati.

##
#
# Set the base theme directory if you wish to place them in a non-standard
# location.
#
##
theme_directory = /usr/share/gnump3d/
##

Piazza in questa directory i temi non standard del server. Puoi scegliere di piazzarli in un altra cartella a tuo piacimento, in tal caso, occorre modificare questa riga.

# This next option controls how directories are displayed on the index
# pages.
#
# There are several defined variables which you can choose to use:
#
# $LINK = The actual URL of the directory.
#
# $DIR_NAME = The name of the directory.
#
# $SONG_COUNT = The number of songs contained in the directory.
#
# $DIR_COUNT = The number of subdirectories in the directory.
#
# $RECURSE = A link to play the contents of the directory recursively.
#
# $NEW = Will insert the text specified by ‘new_format’ if the
# directory is recently modified.
#
# NOTE: you can also specify “directory_format2″ as an alternative display
# format. Directories are then listed with alternating display formats.
# This is useful if you want to have alternating background colors for
# each entry in a table, for example.
#
directory_format = <tr><td width=”10%”> </td><td><a href=”$LINK”>$DIR_NAME</a> $NEW</td><td>$SONG_COUNT</td><td>$DIR_COUNT</td><td>[$RECURSE]</td></tr></a>

Nella creazione della pagina web, il server utilizza delle variabili, similarmente a Sam Broadcaster, a Shoutcast e in generale a tutti i server di streaming. Tali variabili sono spiegate in questa porzione del testo.

$LINK: L’attuale url della directory.
$DIR_NAME: Il nome della directory
$SONG_COUNT: Il numero di canzoni contenute nella directory.
$DIR_COUNT: Il numero di sottodirectory della cartella corrente.
$RECURSE: è un link per suonare la directory ricorsivamente
$NEW: è un testo che viene inserito se la directory è stata recentemente modificata.

E’ possibile creare anche un directory_format2, che permetterà di avere due impostazioni alternate, qualora ci dovesse piacere così. Possiamo modificare il codice HTML, ma conviene settarlo sempre come riga di una tabella.

Ci sono degli altri esempi sotto, che possono essere d’aiuto per la modifica, potete anche ovviamente fare ad libitum.

##
# Text to insert if the directory is recently modified.
##
new_format = <font color=”red”><b>New</b></font>

Se la directory è stata modificata per qualsivoglia motivo, questo testo comparirà. Potete modificarlo come meglio volete, ma è sempre meglio non strafare.

##
# If a directory hasn’t been modifed in more than ‘x’ days then
# it isn’t considered ‘new’.
##
new_days = 7

Per quanti giorni una directory è considerata nuova, in seguito ad una modifica? Potete settarlo.

# File format
##
#
# This option is analogous to the ‘directory_format’ option above.
#
# It specifies how the files should be listed.
#
# $LINK Is the link to the track itself
#
# $SONG_FORMAT Is a template string which is described below.
#
# NOTE: you can also specify “file_format2″ as an alternative display
# format. Files are then listed with alternating display formats.
# This is useful if you want to have alternating background colors for
# each entry in a table, for example.
#
file_format = <tr><td width=”10%”> </td><td><a href=”$LINK”>$SONG_FORMAT</a></td><td align=”right”>[<a href="/info$PLAINLINK">Info</a>] [<a href="$PLAINLINK">Download</a>]</td></tr>

In modo simile al formato directory, potete settare la formattazione dei files. Anche in questo caso ci sono delle variabili.

$LINK: E’ il link al file stesso
$SONG_FORMAT: è una stringa che sarà discussa dopo.

Come nel caso delle directory, è possibile settare un file_format2, qualora ci piaccia alternare layout diversi. Si consiglia sempre di mantenere l’impostazione tabulare del codice HTML. Un buon modo per personalizzare tutto, è quello di italianizzare.

# This next setting, `song_format’, allows you to configure how the
# MP3 and OGG Vorbis files are displayed.
#
# If the file which has been found contains any tag information then
# the following values will be available to you:
#
# $ARTIST -> The artist of the song.
#
# $ALBUM -> The album the song came from.
#
# $COMMENT -> The comment string attached to the song, if any.
# NOT AVAILABLE FOR OGG FILES.
#
# $SONGNAME -> The name of the song.
#
# $YEAR -> The year the song was recorded.
# NOT AVAILABLE FOR OGG FILES.
#
# $GENRE -> The genre of the track.
# NOT AVAILABLE FOR OGG FILES.
#
# $BPS -> The sample rate of the song – if non-variable.
# NOT AVAILABLE FOR OGG FILES.
#
# $LENGTH -> The length of the track in MM:SS
# NOT AVAILABLE FOR OGG FILES, OR VBR MP3′s.
#
# $SECONDS -> The length of the track in seconds
# NOT AVAILABLE FOR OGG FILES, OR VBR MP3′s.
#
# $SIZE -> The size of the audio stream.
# NOT AVAILABLE FOR OGG FILES, OR VBR MP3′s.
#
# $TRACK -> The number of the track
#
# $FILENAME will always be available. (This is the name of the file
# without any suffix or directory information).
#
song_format = $TRACK – $ARTIST – $ALBUM – $SONGNAME [ $GENRE - $LENGTH / $SIZE ] $NEW

Questa opzione permette di settare la visualizzazione dei brani. Ci sono molte variabili, esaminiamole insieme.

$ARTIST: L’autore del brano
$ALBUM: L’album da cui è tratto il brano
$COMMENT: Commenti sul brano, inseriti nel tag id3, e non disponibili per i file OGG
$SONGNAME: Il nome del brano
$YEAR: L’anno di composizione del brano, non disponibile per file OGG
$GENRE: Genere del brano, non disponibile per file OGG
$BPS: Bitrate del file, disponibile solo per file non VBR, mai nel caso di file OGG
$LENGHT: Durata del brano in MM:SS, non disponibile per VBR e OGG files.
$SECONDS: Durata del brano in secondi, non disponibile per VBR e OGG files
$SIZE: Grandezza del file, non disponibile per VBR e OGG files
$TRACK: Numero di sequenza della canzone.
$FILENAME: il nome del brano senza suffissi e altri artifizi.

Settate queste variabili come meglio vi aggrada.

# If you wish to change the text displayed on the ‘Play’
# link you should uncomment the following option, and change the
# text appropriately.
#
##
#
# play_recursively_text = Play
##

Se gradite cambiare il testo visualizzato sul link Play, potete semplicemente decommentare questa riga e modificare il testo.

# This next option controls how songs are sorted prior to display,
# and used in the playlists.
#
# You may use any of the $ values which are listed above in
# the ‘song_format’ setting, eg:
#
# Sort by the song name.
# sort_order = $SONGNAME
#
# Sort by artist if present.
# sort_order = $ARTIST
##
# Default to sorting by the track number, due to popular.
sort_order = $TRACK

Metodologia d’ordinamento della visualizzazione delle tracce. Potete ordinare per qualsiasi delle variabili settate per SONG_FORMAT. Di default si ordina per track number. Voi potete fare come volete.


Condividilo
1 commento - Lascia un commento
  1. daemonia scrive:

    vedo ke nn ti arrendi ancora per il fatto delle radio :D spero ke qualcuno prenda in considerazione la tua grande guida della costruzione di una web radio :) .
    Tornando al mio blog, beh, ho voluto fare un restyling ed ampliare gli argomenti, cmq nn immaginavo assolutamente ke un winzozz così moderno potesse avere così poco spazio totale su disco, anke perkè si occuperebbe subito lo spazio ed andrebbe in continua formattazione. Resta il fatto ke circa 7 gigabyte sono da cavernicoli :(

Lascia un commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

*

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">


Benvenuto , oggi è lunedì, 6 febbraio 2012