Skip to content

Commit 47f1a25

Browse files
committed
Readme: add more thorough instructions
1 parent 1b02f0e commit 47f1a25

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,38 @@ Allows you to export JSON files of your most important data (questions, answers,
33

44
## Installation
55

6-
1. I think this project requires PHP 7.3 or later, so be sure that your system complies.
6+
There is no need to clone this repository, the installation works with PHP composer.
7+
8+
1. This is only tested on PHP 7.3, so be sure that your system complies.
79
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`
10-
1. Run `php artisan vendor:publish`, and if it gives you a choice, choose to publish from this package.
10+
1. Create a Laravel project, and make sure that it works:
11+
https://laravel.com/docs/5.8/installation#installing-laravel
12+
mkdir ~/Code/MyLaravelProject
13+
cd ~/Code/MyLaravelProject
14+
composer global require laravel/installer
15+
# on Ubuntu 18.04 and Debian 9+:
16+
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc
17+
# on other systems this might be
18+
# echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
19+
# apply PATH:
20+
source ~/.bashrc
21+
# create the laravel project for this app:
22+
laravel new StackExchangeBackupLaravel
23+
1. Add this package into your Laravel project:
24+
composer require ryancwalsh/stack-exchange-backup-laravel:dev-master --prefer-source
25+
1. Run _artisan_ in the parent folder of the app folder, and if it gives you a choice, choose to publish from this package
26+
cd StackExchangeBackupLaravel/
27+
php artisan vendor:publish
1128
1. Edit your Laravel project's `.env` file to have your own StackApps values. A non-working sample is below.
1229
1. Run `php artisan exportStackExchange`. (Note that `php artisan exportStackExchange --flushCache` is an available option to clear the cached access code value.)
1330
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.
1431
1. Finished! The JSON files will appear in your `/storage/app/StackExchange` folder.
1532

1633
```
1734
# These are sample .env values:
18-
STACKAPPS_CLIENT_ID=12227
19-
STACKAPPS_CLIENT_SECRET=ydxGSDFHDF4DtZqCesr)yJIw((
20-
STACKAPPS_KEY=JuWsTgfG2CqjdghkhdgBkQ((
35+
STACKAPPS_CLIENT_ID=<your Client Id>
36+
STACKAPPS_CLIENT_SECRET=<your Client Secret>
37+
STACKAPPS_KEY=<your Key>
2138
AWS_ACCESS_KEY_ID=AKIAmb3mbn56mn6
2239
AWS_SECRET_ACCESS_KEY=jl234k5jl23k45j23lj5
2340
AWS_DEFAULT_REGION=us-east-1

0 commit comments

Comments
 (0)