Skip to content

Commit d6c4a56

Browse files
committed
fix FILENAME_SAFE_FORMAT const
1 parent bdc8caf commit d6c4a56

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Allows you to export JSON files of your most important data (questions, answers,
55

66
1. I think this project requires PHP 7.3 or later, so be sure that your system complies.
77
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/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.1`
8+
1. Create a Laravel project, and make sure that it works: https://laravel.com/docs/6.0/installation (e.g. `composer create-project --prefer-dist laravel/laravel stackExchangeBackupDemo`)
9+
1. Add this package into your Laravel project: `vagrant@vboxHomestead:~/Code/MyLaravelProject$ composer require ryancwalsh/stack-exchange-backup-laravel:^2.0.2`
1010
1. Run `php artisan vendor:publish`, and if it gives you a choice, choose to publish from this package.
1111
1. Edit your Laravel project's `.env` file to have your own StackApps values. A non-working sample is below.
1212
1. Run `php artisan exportStackExchange`. There are also these options available:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ryancwalsh/stack-exchange-backup-laravel",
33
"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).",
44
"type": "package",
5-
"version": "2.0.1",
5+
"version": "2.0.2",
66
"require": {
77
"guzzlehttp/guzzle": "^6.3",
88
"php": "^7.3",

src/ExportStackExchangeCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class ExportStackExchangeCommand extends Command {
1111

1212
const CODE_CACHE_KEY = 'stackAppsCode';
1313
const ENDPOINTS = ['answers' => 'activity', 'questions' => 'activity', 'comments' => 'creation', 'mentioned' => 'creation', 'favorites' => 'creation'];
14+
const FILENAME_SAFE_FORMAT = "Y-m-d_His_T";
1415
const SE_URL_BEGINNING = 'https://stackexchange.com/oauth/login_success?code=';
1516

1617
/**
@@ -44,7 +45,7 @@ public function handle() {
4445
try {
4546
$this->handleStackExchangeCode();
4647
$this->info(Carbon::now() . ' Starting.');
47-
$this->exportStackExchangeHelper->setMomentString(Carbon::now()->format(\App\Helpers\ExtraTools::FILENAME_SAFE_FORMAT));
48+
$this->exportStackExchangeHelper->setMomentString(Carbon::now()->format(self::FILENAME_SAFE_FORMAT));
4849
$mySites = $this->exportStackExchangeHelper->getMyAssociatedSites();
4950
$this->showListOfMySites($mySites);
5051
$this->info('===');

0 commit comments

Comments
 (0)