summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile17
-rw-r--r--README.md8
-rwxr-xr-xscripts/myhtml.py (renamed from scripts/html.py)46
-rw-r--r--wiki/css8
-rw-r--r--wiki/top.wiki67
5 files changed, 139 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 0070d73..827f7b7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
-HTML = ./scripts/html.py
+HTML = ./scripts/myhtml.py
FIND = ./scripts/find.py
ALLYAML = $(shell ${FIND} -all)
-FOLDERS = $(subst ./,,$(shell cd ./projects; find -type d))
-HTMLDIR = $(addprefix html/, ${FOLDERS})
+PROJECT = $(subst ./,,$(shell cd ./projects; find -type d))
+WIKI = $(shell find wiki -name "*.wiki")
+WIKIDIR = html/wiki
+HTMLDIR = $(addprefix html/, ${PROJECT})
PRODIR = $(shell find ./projects -type d)
TEAM = Core IO MM
MEMBER = BSP Geert Jacopo Kaneko Kieran Laurent Magnus Marek Morimoto Niklas Shimoda Simon Ulrich Wolfram NoAssignee
@@ -11,13 +13,14 @@ NOPARAM = menu subindex body index
all:
@make -s .git/hooks/pre-commit
- @make -s ${HTMLDIR}
+ @make -s ${HTMLDIR} ${WIKIDIR}
@make -s LISTS="${MEMBER}" TARGET=finds EXP1=member EXP2=-a loop
@make -s LISTS="${STATUS}" TARGET=finds EXP1=status EXP2=-s loop
@make -s LISTS="${TEAM}" TARGET=finds EXP1=team EXP2=-t loop
@make -s LISTS="${ALLYAML}" TARGET=file loop
@make -s LISTS="${NOPARAM}" TARGET=noparam loop
- @make -s LISTS="${FOLDERS}" TARGET=summary loop
+ @make -s LISTS="${PROJECT}" TARGET=summary loop
+ @make -s LISTS="${WIKI}" TARGET=wikis loop
@make -s bsp
@make -s index.html
@@ -27,7 +30,7 @@ all:
index.html:
@ln html/index.html .
-${HTMLDIR}:
+${HTMLDIR} ${WIKIDIR}:
mkdir -p $@
${FILE}: ${HTML_OPTION2} ${HTML}
@@ -50,6 +53,8 @@ bsp:
make HTML_OPTION1=bsp HTML_OPTION2="${ALLYAML}" FILE=html/bsp.html basic
finds:
make HTML_OPTION1="${EXP1} ${PARAM}" HTML_OPTION2="$(shell ${FIND} ${EXP2} ${PARAM})" FILE=html/${PARAM}.html basic
+wikis:
+ make HTML_OPTION1=wiki HTML_OPTION2="${PARAM}" FILE=$(addprefix html/,$(subst .wiki,.html,${PARAM})) basic
clean:
@rm -fr html
@rm -fr *.html
diff --git a/README.md b/README.md
index e3dd89a..68086f4 100644
--- a/README.md
+++ b/README.md
@@ -65,3 +65,11 @@ You can add it by
> git remote add bsp git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git
+# Wiki
+
+## How to create Wiki ?
+It is easy ! just "wiki"
+
+You need to install "textile" first
+
+ > pip install textile
diff --git a/scripts/html.py b/scripts/myhtml.py
index 07727d0..d395cb8 100755
--- a/scripts/html.py
+++ b/scripts/myhtml.py
@@ -5,6 +5,7 @@
#
# 2019/02/18 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
#===============================
+import textile
import sys
import os
import re
@@ -13,7 +14,6 @@ import base
import find
import view
import datetime
-
#====================================
#
# html
@@ -257,6 +257,13 @@ class periject_html(base.base):
self.__summary(dir, self.top() + "/" + dir, find.find([dir]).get())
#--------------------
+ # menu_wiki
+ #--------------------
+ def menu_wiki(self):
+ html("a", {"target":"_blank",
+ "href":"./wiki/top.html"}).print("Peri Peri Wiki")
+
+ #--------------------
# menu_folder
#--------------------
def menu_folder(self, current):
@@ -319,6 +326,9 @@ class periject_html(base.base):
def menu(self):
with html("body"):
+ html("h1").print("Wiki")
+ self.menu_wiki()
+
html("h1").print("Folder")
with html("ul"):
self.menu_folder("./projects")
@@ -339,6 +349,38 @@ class periject_html(base.base):
datetime.datetime.now().strftime("%Y/%m/%d %H:%M")))
#--------------------
+ # wiki
+ #--------------------
+ def wiki(self, argv):
+
+ with open(argv[0], "r") as f:
+ text = f.read()
+
+ # parse http[s]
+ text = re.sub(r'(\s+)http://(.*)(\s+)', r'\1"http://\2":http://\2\3', text)
+ text = re.sub(r'(\s+)https://(.*)(\s+)', r'\1"https://\2":https://\2\3', text)
+
+ # parse img
+ text = re.sub(r'!(\S+)!', r'!../../wiki/\1!', text)
+
+ # [[foo bar]]
+ # -> "foo bar":foo_bar.html
+ while 1:
+ hit = re.search(r'\[\[.*\]\]', text)
+
+ if (not hit):
+ break;
+
+ link = text[hit.start()+2:hit.end()-2]
+ link = "\"{}\":{}.html".format(link, re.sub(r' ', r'_', link))
+
+ text = text[:hit.start()] + link + text[hit.end():]
+
+ # textile
+ print("<link rel=\"stylesheet\" type=\"text/css\" href=\"../../wiki/css\">")
+ print(textile.textile(text))
+
+ #--------------------
# body
#--------------------
def body(self):
@@ -657,6 +699,8 @@ class periject_html(base.base):
elif (cmd == "bsp"):
# ./script/find.py -a | xargs ./script/html.py bsp
self.bsp(sys.argv)
+ elif (cmd == "wiki"):
+ self.wiki(sys.argv)
#====================================
#
diff --git a/wiki/css b/wiki/css
new file mode 100644
index 0000000..3d25415
--- /dev/null
+++ b/wiki/css
@@ -0,0 +1,8 @@
+table {
+ border-collapse: collapse;
+ border: solid 1px gray;
+}
+
+table th, table td {
+ border: solid 1px gray;
+}
diff --git a/wiki/top.wiki b/wiki/top.wiki
new file mode 100644
index 0000000..681bccc
--- /dev/null
+++ b/wiki/top.wiki
@@ -0,0 +1,67 @@
+h1. "PeriJect":https://osdg.renesas.com/periperi/periject
+
+h1. [[member info]]
+
+h1. Core group
+
+* member
+** *Geert*
+** Laurent
+** Magnus
+** Morimoto
+** Shimoda
+** Ulrich
+** Niklas
+
+* [[core-todo-list]]
+* [[core-chat-meeting]]
+
+h1. I/O group
+
+* member
+** Geert
+** Marek
+** Niklas
+** Shimoda
+** Ulrich
+** *Wolfram*
+
+* [[io-chat-meeting]]
+
+* [[sdhi scratchpad]]
+
+h1. Multimedia group
+
+* members
+** Jacopo
+** Kieran
+** *Laurent*
+** Magnus
+** Morimoto
+** Niklas
+** Ulrich
+
+* [[Ongoing Multimedia Development]]
+* [[GMSL Camera Setup]]
+* [[multimedia-todo-list]]
+* [[multimedia-chat-meeting]]
+
+h1. [[Hardware]]
+
+h1. Renesas Information
+
+* [[R-Car-Gen3]]
+
+h1. PeriPeriCon
+
+* [[periperi-2016-02]]
+* [[miniperi-2016-07]]
+* [[renesas-2016-07]]
+* [[miniperi-2016-10]]
+* [[miniperi-2017-02]]
+* [[miniperi-2017-05]]
+* [[periperi-2017-09]]
+* [[miniperi-2017-10]]
+* [[periperi-2018-02]]
+* [[periperi-2018-10]]
+* [[periperi-2019-02]]