Skip to content

Commit

Permalink
release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kikkomep committed May 16, 2018
2 parents a1d564d + b79aee3 commit 9e7fefe
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 176 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "bin/markdown2html"]
path = bin/markdown2html
url = https://github.com/phnmnl/markdown2html.git
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#Federated Git Wiki
Version 0.3
# Federated Git Wiki
Version 1.1.0

#Installation

## Installation
Make sure Python is install in the unix based system.

Install markdown 2
Expand All @@ -16,23 +17,33 @@ Initialise by running the following under your hosting folder

./bin/run.sh

Setting permission of `bin` `conf` to be 644, other folders can be set as 755

Setting permission of `bin` `conf` to be 644, other folders can be set as 755
`path` in `bin` needs to be set.

## Note

If crontab is used, markdown2 needs to specify location
## Notes

* This repository uses a Git submodule. To easily initialize and update
the submodule pass the option `--recurse-submodules`
to the `git clone` command.

* If crontab is used, the absolute location of markdown2 needs to be specified

## Changelog

##### Updates v1.1.0
* Improve functions to get wiki data
* Integrate `markdown2html` as a conversion tool

##Updates v0.3.1
Improve bash
Add full text search
##### Updates v0.3.1
* Improve bash
* Add full text search

##Updates v0.2.2
Add query string to redirect pages
##### Updates v0.2.2
* Add query string to redirect pages

##Updates v0.2.1
Production version
##### Updates v0.2.1
* Production version

##Updates v0.2
Data can be pulled across and displayed
##### Updates v0.2
* Data can be pulled across and displayed
1 change: 1 addition & 0 deletions bin/markdown2html
Submodule markdown2html added at 7ade94
37 changes: 13 additions & 24 deletions bin/run.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
#!/usr/bin/env bash

# configuration
path="/var/www/html/php-phenomenal-portal-wiki"
markdownFolder="$path/wiki-markdown"
htmlFolder="$path/wiki-html"
markdownFolder="$path/wiki-markdown"
gitList="$path/conf/gitList.txt"
extension=".html"

mkdir -p $markdownFolder
mkdir -p $htmlFolder

cd $markdownFolder && rm -rf *

echo $gitList
gitBranch="master"

while IFS= read line
do
git clone "$line"
done <"$gitList"
# path of this script
current_path="$( cd "$(dirname "${0}")" ; pwd -P )"

for dir in `ls ./`;
do
for file in `ls ./$dir`;
do
if [[ -f "$dir/$file" ]]; then
filename="${file%.*}"
mkdir -p "$htmlFolder/$dir" && markdown2 --extras fenced-code-blocks "$dir/$file" > "$htmlFolder/$dir/$filename"
markdown2 --extras fenced-code-blocks "$dir/$file" > "$htmlFolder/$dir/$filename$extension"
fi
done
done
# launch converter
"${current_path}/markdown2html/run.sh" \
--force-cleanup \
--html "${htmlFolder}" \
--md "${markdownFolder}" \
--git-branch "${gitBranch}" \
"${gitList}"
Loading

0 comments on commit 9e7fefe

Please sign in to comment.