You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,16 @@ Allows you to export JSON files of your most important data (questions, answers,
5
5
6
6
1. I think this project requires PHP 7.3 or later, so be sure that your system complies.
7
7
1. Sign up at https://stackapps.com/apps/oauth/register to receive a Client ID, Client Secret, and Key. (It's free, easy, and fast.)
8
-
1. Create a Laravel project, and make sure that it works: https://laravel.com/docs/5.8/installation#installing-laravel
9
-
1. Add this package into your Laravel project: `vagrant@vboxHomestead:~/Code/MyLaravelProject$ composer require ryancwalsh/stack-exchange-backup-laravel:dev-master --prefer-source`
8
+
1. Create a Laravel project, and make sure that it works: https://laravel.com/docs/6.0/installation
9
+
1. Add this package into your Laravel project: `vagrant@vboxHomestead:~/Code/MyLaravelProject$ composer require ryancwalsh/stack-exchange-backup-laravel:^2.0.0`
10
10
1. Run `php artisan vendor:publish`, and if it gives you a choice, choose to publish from this package.
11
11
1. Edit your Laravel project's `.env` file to have your own StackApps values. A non-working sample is below.
12
-
1. Run `php artisan exportStackExchange`. (Note that `php artisan exportStackExchange --flushCache` is an available option to clear the cached access code value.)
12
+
1. Run `php artisan exportStackExchange`. There are also these options available:
13
+
1.`php artisan exportStackExchange --forgetCache` is an available option to clear the cached access code value.
14
+
1.`php artisan exportStackExchange --code=YOUR_CODE` is an available option to provide a code that you've already retrieved from StackExchange.
15
+
1.`php artisan exportStackExchange --S3=false` is an available option to skip uploading to Amazon S3.
13
16
1. Following the instructions in the terminal, you'll use your browser to visit a URL that will provide you with a temporary access token to paste into the terminal.
14
-
1. Finished! The JSON files will appear in your `/storage/app/StackExchange` folder.
17
+
1. Finished! The JSON files will appear in your `/storage/app/StackExchange` folder, and a zip of those files will appear in S3.
"description": "My aim is to back up all of my questions and answers and anything else valuable in my accounts across all of the StackExchange sites (StackOverflow, SuperUser, https://apple.stackexchange.com/, https://askubuntu.com/, etc).",
$code = $this->ask('Then, the browser will bounce to a new URL, which will contain a `code` parameter at the end. Copy the value of just the `code` parameter from the URL. Paste it here:');
77
+
$codePasted = $this->ask('Then, the browser will bounce to a new URL. Copy the value of the `code` parameter in the URL. Paste it here:');
78
+
$code = str_replace(self::SE_URL_BEGINNING, '', $codePasted); //just in case the user accidentally pasted the entire URL instead of just the `code` parameter.
0 commit comments