Skip to content

Commit

Permalink
Paramenters and some text adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
lucamauri authored Mar 14, 2020
1 parent ecdfac0 commit c92b85c
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[![Daily Downloads](https://poser.pugx.org/lucamauri/page-to-github/d/daily)](https://packagist.org/packages/lucamauri/page-to-github)
[![composer.lock](https://poser.pugx.org/lucamauri/page-to-github/composerlock)](https://packagist.org/packages/lucamauri/page-to-github)

MediaWiki extension to automatically transfer code from a MediaWiki wiki to GitHub
PageToGitHub, P2G in short, is a MediaWiki extension to automatically transfer code from a MediaWiki wiki to GitHub.
It was originally conceived and written by [Luca Mauri](https://github.com/lucamauri) for use in [Wikitrek](https://github.com/WikiTrek): it is released as open source here in case it can be useful to anybody else.

## Features

Expand All @@ -21,12 +22,24 @@ In the `LocalSettigs.php` file add:

```
$wgP2GNameSpace = 'Module';
$wgP2GRepo = 'Repository';
$wgP2GAuthToken = 'GitHubToken';
$wgP2GOwner = 'ProjectOrPerson';
$wgP2GRepo = 'Repository';
$wgP2GKeyword = 'Keyword';
```
### $wgP2GNameSpace
P2G will upload pages only belonging to the namespace spedified in this variable
### $wgP2GRepo
The name of the repository where the codes must be uploaded
### $wgP2GAuthToken
The GitHub token needed to authenticate and made modification the the repository. You can generate one in your GitHub account in *Settings* > *Developer settings* > *Personal access tokens*
### $wgP2GOwner
The Person or Organization owner of the repository
### $wgP2GKeyword
An optional keyword to check into the page. When present, P2G will *not* upload pages if the keyword is not written in the page. If the parameter is omitted, P2G will upload all pages in the Namespace specified above.

## Troubleshoot
To read detailed logging messages, intercept the [log group](https://www.mediawiki.org/wiki/Manual:$wgDebugLogGroups) named `PageToGitHub`, for instace with the following configuration:
To read detailed logging messages, you can intercept the [log group](https://www.mediawiki.org/wiki/Manual:$wgDebugLogGroups) named `PageToGitHub`: for instace with the following configuration into `LocalSetting.php`:

```
$wgShowExceptionDetails = true;
Expand All @@ -38,4 +51,7 @@ $wgDebugLogGroups['PageToGitHub'] = "/var/log/mediawiki/PageToGitHub-{$wgDBname}
[GNU General Public License, version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)

## Maintainers
[Luca Mauri](https://github.com/lucamauri)

## Contributors
[Luca Mauri](https://github.com/lucamauri)

0 comments on commit c92b85c

Please sign in to comment.