Skip to content

Commit

Permalink
update genArtifacts, readme, light refactor
Browse files Browse the repository at this point in the history
This also marks the 1.3.0 release
  • Loading branch information
fastily committed Mar 31, 2017
1 parent 53be2eb commit 1aa0715
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 49 deletions.
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ jwiki is a simple Java client library wrapping the [MediaWiki](https://www.media
* [Recipe Book/Cheatsheet](https://github.com/fastily/jwiki/wiki/Recipe-Book)
* [Javadocs](https://fastily.github.io/jwiki/docs/jwiki/)

### Example Code
```java
import fastily.jwiki.core.Wiki;

//Edit a Wikipedia page by replacing its text with text of your choosing.
public class JwikiExample
{
public static void main(String[] args) throws Throwable
{
Wiki wiki = new Wiki("Username", "Password", "en.wikipedia.org"); // login
wiki.edit("Wikipedia:Sandbox", "SomeText", "EditSummary"); // edit
}
}
```

### Download
jwiki is available via [bintray/jcenter](https://bintray.com/fastily/maven/jwiki)

Expand All @@ -36,14 +21,14 @@ Maven:
<dependency>
<groupId>fastily</groupId>
<artifactId>jwiki</artifactId>
<version>1.2.1</version>
<version>1.3.0</version>
<type>pom</type>
</dependency>
```

Gradle:
```groovy
compile 'fastily:jwiki:1.2.1'
compile 'fastily:jwiki:1.3.0'
```

### Minimum Requirements
Expand Down
4 changes: 3 additions & 1 deletion ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
* May want to back color log with log4j

* Could cached Wiki objects be keyed by HttpUrl?
* Fix purge()
* Fix purge()

* WikiGen needs refactor
18 changes: 1 addition & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'maven'
// apply plugin: 'maven-publish'

version="1.2.2"
version="1.3.0"
description="jwiki build script"
group="fastily"

Expand All @@ -12,21 +11,6 @@ compileJava {
targetCompatibility = "1.8"
}

/*publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
model {
tasks.generatePomFileForMavenCustomPublication {
destination = file("$buildDir/generated-pom.xml")
}
}
}
*/

repositories {
jcenter()
}
Expand Down
16 changes: 11 additions & 5 deletions genArtifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@

#: Generates Maven artifacts for jwiki.
#:
#: PRECONDITION: gradle build succeeded. Minimum gradle version >= 3.0
#:
#: Tested on OS X 10.11.6
#: Tested on macOS 10.12.4
#: Author: Fastily

version="1.2.2"
version="1.3.0"
name="jwiki"
outputDir="build/artifacts"

cd "${0%/*}"
cd "${0%/*}" &> /dev/null

gradle clean build -x test

if ! gradle writeNewPom genJavadoc ; then
printf "ERROR: Build Failed\n"
exit 1
fi

mkdir -p "$outputDir"

## Copy sources
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fastily/jwiki/core/WQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @author Fastily
*
*/
public class WQuery
class WQuery
{
/**
* Default parameters for getting category size info
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fastily/jwiki/dwrap/RCEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class RCEntry extends DataEntry
{
/**
* The type of entry this RCEntry represents (e.g. log, edit, new)
* The type of entry this RCEntry represents (ex: log, edit, new)
*/
public final String type;

Expand Down
7 changes: 1 addition & 6 deletions src/main/java/fastily/jwiki/util/FSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ public final class FSystem
* The default separator for pathnames by OS. For Windows it is '\' for Mac/Unix it is '/'
*/
public static final String psep = FileSystems.getDefault().getSeparator();

/**
* The user's home directory.
*/
public static final String home = System.getProperty("user.home");


/**
* All static methods, no constructors allowed.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fastily/jwiki/util/WikiGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class WikiGen
/**
* An additional location to save credentials under.
*/
private static final String homefmt = FSystem.home + FSystem.psep;
private static final String homefmt = System.getProperty("user.home") + FSystem.psep;

/**
* The default WikiGen object created at run time.
Expand Down

0 comments on commit 1aa0715

Please sign in to comment.