Skip to content

Commit 19c17f1

Browse files
committed
Readme: add more thorough instructions
1 parent 1b02f0e commit 19c17f1

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,41 @@ 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+
12+
https://laravel.com/docs/5.8/installation#installing-laravel
13+
mkdir ~/Code/MyLaravelProject
14+
cd ~/Code/MyLaravelProject
15+
composer global require laravel/installer
16+
# on Ubuntu 18.04 and Debian 9+:
17+
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc
18+
# on other systems this might be
19+
# echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
20+
# apply PATH:
21+
source ~/.bashrc
22+
# create the laravel project for this app:
23+
laravel new StackExchangeBackupLaravel
24+
1. Add this package into your Laravel project:
25+
26+
composer require ryancwalsh/stack-exchange-backup-laravel:dev-master --prefer-source
27+
1. Run _artisan_ in the parent folder of the app folder, and if it gives you a choice, choose to publish from this package
28+
29+
cd StackExchangeBackupLaravel/
30+
php artisan vendor:publish
1131
1. Edit your Laravel project's `.env` file to have your own StackApps values. A non-working sample is below.
1232
1. Run `php artisan exportStackExchange`. (Note that `php artisan exportStackExchange --flushCache` is an available option to clear the cached access code value.)
1333
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.
1434
1. Finished! The JSON files will appear in your `/storage/app/StackExchange` folder.
1535

1636
```
1737
# These are sample .env values:
18-
STACKAPPS_CLIENT_ID=12227
19-
STACKAPPS_CLIENT_SECRET=ydxGSDFHDF4DtZqCesr)yJIw((
20-
STACKAPPS_KEY=JuWsTgfG2CqjdghkhdgBkQ((
38+
STACKAPPS_CLIENT_ID=<your Client Id>
39+
STACKAPPS_CLIENT_SECRET=<your Client Secret>
40+
STACKAPPS_KEY=<your Key>
2141
AWS_ACCESS_KEY_ID=AKIAmb3mbn56mn6
2242
AWS_SECRET_ACCESS_KEY=jl234k5jl23k45j23lj5
2343
AWS_DEFAULT_REGION=us-east-1

0 commit comments

Comments
 (0)