1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-30 16:07:37 -05:00

3 Commits

Author SHA1 Message Date
0e0f04dd3d fix dead link to csv export 2024-09-02 23:40:24 +02:00
ro
d3d1d56680 upgraded to lastest Laravel version
codebase was a version behind the latest laravel version, so all those
dependencies have been update to bring it up to speed

also added a small tweak to fix a firefox specific bug with rendering
CSS files
2024-06-18 13:10:54 -06:00
ro
0a02a71983 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
2024-05-16 16:07:36 -06:00
5 changed files with 782 additions and 638 deletions

View File

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

View File

@ -5,10 +5,10 @@
"keywords": ["laravel", "framework"], "keywords": ["laravel", "framework"],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.1", "php": "^8.2",
"guzzlehttp/guzzle": "^7.2", "guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10", "laravel/framework": "^11.0",
"laravel/sanctum": "^3.2", "laravel/sanctum": "^4.0",
"laravel/tinker": "^2.8", "laravel/tinker": "^2.8",
"revolution/laravel-mastodon-api": "^3.0" "revolution/laravel-mastodon-api": "^3.0"
}, },
@ -17,7 +17,7 @@
"laravel/pint": "^1.0", "laravel/pint": "^1.0",
"laravel/sail": "^1.18", "laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4", "mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0", "nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^10.1", "phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0" "spatie/laravel-ignition": "^2.0"
}, },

1387
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,9 @@
</head> </head>
<body> <body>
<script>
0
</script>
<header> <header>
<div> <div>
<div class="header-left"> <div class="header-left">

View File

@ -59,7 +59,7 @@
<h3>CSV Exports</h3> <h3>CSV Exports</h3>
For a list of the current locations being tracked, click on one of the links below to download a dynamically generated CSV file that can be consumed as a blocklist. More formats will be added over time. For a list of the current locations being tracked, click on one of the links below to download a dynamically generated CSV file that can be consumed as a blocklist. More formats will be added over time.
<br /> <br />
<a href="/exports/mastodon">For Mastodon</a> <a href="/exports">For Mastodon</a>
<h3>API</h3> <h3>API</h3>
The Bad Space has a public api that can be used to search the database programatically and return results in the JSON format. The API can be accsess at<br /> The Bad Space has a public api that can be used to search the database programatically and return results in the JSON format. The API can be accsess at<br />
<code>https://thebad.space/api/v1/search</code> <code>https://thebad.space/api/v1/search</code>