1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-05-06 14:41:02 -05:00

mastdon csv export edits

the csv exports for mastodon had some formatting issues that was making
importing problematic, so those issues have been fixed so importing the
doc is easier
This commit is contained in:
ro 2024-05-16 16:07:36 -06:00
parent 12c58d3f29
commit c3ce7aae65

View File

@ -46,12 +46,12 @@ class ExportController extends Controller
$sources = Source::where("active", true)->get();
if ($type == 'mastodon') {
$columns = [
'domain',
'severity',
'public_comment',
'reject_media',
'reject_reports',
'obfuscate',
'#domain',
'#severity',
'#public_comment',
'#reject_media',
'#reject_reports',
'#obfuscate',
];
};
@ -65,8 +65,13 @@ class ExportController extends Controller
//remove extra white space
$comments = str_replace(["\n\r", "\n", "\r"], " ", $comments);
$comments = str_replace(['"', "'"], "", $comments);
if ($location->rating == 'defederate') {
$rating = 'suspend';
} else {
$rating = $location->rating;
}
//add to the export list
array_push($list, [$location->url, $location->rating, $comments, "FALSE", "FALSE", "FALSE"]);
array_push($list, [$location->url, $rating, $comments, "FALSE", "FALSE", "FALSE"]);
}
}
}