Edited again the help text to make it clearer and more complete; made the post date grey; bumped version to 0.2
This commit is contained in:
parent
a9aff7a756
commit
3c7146c4d8
1 changed files with 12 additions and 6 deletions
18
pfaltgall
18
pfaltgall
|
@ -38,10 +38,12 @@ $help=
|
||||||
[[[ DESCRIPTION ]]]
|
[[[ DESCRIPTION ]]]
|
||||||
|
|
||||||
This is {$SCRIPTNAME} v{$SCRIPTVERSION}, a CLI PHP script that can generate an html file with
|
This is {$SCRIPTNAME} v{$SCRIPTVERSION}, a CLI PHP script that can generate an html file with
|
||||||
a gallery from your Pixelfed profile. The gallery loads each image
|
a gallery from your Pixelfed profile. The html gallery file will load images
|
||||||
dynamically, displays it using almost all the available screen space and lets
|
dynamically, display each one using almost all the available screen space and
|
||||||
you jump right from the start to any point in the timeline. It also preserves
|
will let you jump right from the start to any point in the timeline. It will
|
||||||
each post’s text content and any possible image description (alt-text).
|
also show each post’s text content, its date, and each image description
|
||||||
|
(alt-text), if present.
|
||||||
|
See my example gallery here: https://rame.altervista.org/foto-pixelfed
|
||||||
In order to create the html gallery file, you just need to login to your
|
In order to create the html gallery file, you just need to login to your
|
||||||
Pixelfed account and get an app token (Settings -> Applications -> Create new
|
Pixelfed account and get an app token (Settings -> Applications -> Create new
|
||||||
token), then create a configuration file for {$SCRIPTNAME} like this (don’t write
|
token), then create a configuration file for {$SCRIPTNAME} like this (don’t write
|
||||||
|
@ -61,7 +63,7 @@ token=as7f8a7s0d89f7as97df09a8s7d90f81jkl2h34lkj12h3jkl4
|
||||||
|
|
||||||
Then run {$SCRIPTNAME} with the path of the configuration file you have created
|
Then run {$SCRIPTNAME} with the path of the configuration file you have created
|
||||||
and the path of an output file as arguments (if the output file exists, it
|
and the path of an output file as arguments (if the output file exists, it
|
||||||
will be overwritten) - e.g.: «{$SCRIPTNAME} goofy@pixelfed.social.conf index.html».
|
will be overwritten), e.g.: «{$SCRIPTNAME} goofy@pixelfed.social.conf index.html».
|
||||||
This will create an html file that will be ready to be put where you want
|
This will create an html file that will be ready to be put where you want
|
||||||
(you’ll also be able to see it locally, obviously).
|
(you’ll also be able to see it locally, obviously).
|
||||||
|
|
||||||
|
@ -158,7 +160,7 @@ do {
|
||||||
foreach ($res['content'] as $status) {
|
foreach ($res['content'] as $status) {
|
||||||
if (isset($status['created_at']) && preg_match('#^\s+$#',$status['created_at'])!==1) {
|
if (isset($status['created_at']) && preg_match('#^\s+$#',$status['created_at'])!==1) {
|
||||||
$date=strtotime($status['created_at']);
|
$date=strtotime($status['created_at']);
|
||||||
$date=' ['.date('Y/m/d',$date).']';
|
$date=' <span class="grey">['.date('Y/m/d',$date).']</span>';
|
||||||
} else {
|
} else {
|
||||||
$date='';
|
$date='';
|
||||||
}
|
}
|
||||||
|
@ -277,6 +279,10 @@ p.center {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grey {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
display: block;
|
display: block;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
Loading…
Reference in a new issue