Output info to the console
This commit is contained in:
parent
24edb96242
commit
d000295c63
2 changed files with 3 additions and 0 deletions
|
@ -43,12 +43,14 @@ class ParseCachedWebMentions extends Command
|
||||||
foreach ($HTMLfiles as $file) {
|
foreach ($HTMLfiles as $file) {
|
||||||
if ($file->getExtension() != 'backup') { //we don’t want to parse.backup files
|
if ($file->getExtension() != 'backup') { //we don’t want to parse.backup files
|
||||||
$filepath = $file->getPathname();
|
$filepath = $file->getPathname();
|
||||||
|
$this->info('Loading HTML from: ' . $filepath);
|
||||||
$html = $filesystem->get($filepath);
|
$html = $filesystem->get($filepath);
|
||||||
$url = $this->URLFromFilename($filepath);
|
$url = $this->URLFromFilename($filepath);
|
||||||
$microformats = \Mf2\parse($html, $url);
|
$microformats = \Mf2\parse($html, $url);
|
||||||
$webmention = WebMention::where('source', $url)->firstOrFail();
|
$webmention = WebMention::where('source', $url)->firstOrFail();
|
||||||
$webmention->mf2 = json_encode($microformats);
|
$webmention->mf2 = json_encode($microformats);
|
||||||
$webmention->save();
|
$webmention->save();
|
||||||
|
$this->info('Saved the microformats to the database.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ class ReDownloadWebMentions extends Command
|
||||||
{
|
{
|
||||||
$webmentions = WebMention::all();
|
$webmentions = WebMention::all();
|
||||||
foreach ($webmentions as $webmention) {
|
foreach ($webmentions as $webmention) {
|
||||||
|
$this->info('Initiation re-download of ' . $webmention->source);
|
||||||
$this->dispatch(new DownloadWebMention($webmention->source));
|
$this->dispatch(new DownloadWebMention($webmention->source));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue