• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..Today-

conf/H21-Feb-2019-5620

docker/H21-Feb-2019-143126

lang/H21-Feb-2019-11676

LICENSEH A D20-Feb-20191.1 KiB2217

MenuItem.phpH A D20-Feb-2019809 3516

README.mdH A D20-Feb-20193.7 KiB9955

action.phpH A D20-Feb-201920 KiB612298

plugin.info.txtH A D20-Feb-2019213 87

writer.svgH A D20-Feb-2019411 11

README.md

1# dokuwiki-plugin-file2dw
2
3Create a dokuwiki page by importing a file.
4
5- More information about file2dw at http://www.dokuwiki.org/plugin:file2dw
6- More information about dokuwiki at http://www.dokuwiki.org
7- More information about pandoc at http://pandoc.org
8- More information about LibreOffice at https://www.libreoffice.org/
9
10## Description
11
12file2dw is a plugin for dokuwiki. This plugin lets you import a document into Dokuwiki. It supports (at least) .odt, .doc, .docx formats. It should also work with any other document format that pandoc supports (they are a lot).
13
14## Usage
15
16From a Dokuwiki page, click on the "Import file" button in the Page Tools. Select a File and click upload.
17
18## Installation
19
20### *Direct* install
21
22**External requirements:** This plugin requires the following additional components that must be installed separately:
23
24- pandoc
25- soffice (example: libreoffice-writer)
26
27If you run the Dokuwiki server on Debian, you can accomplish this requirements following this directions:
28
29- Install some packages needed:
30
31`sudo apt-get wget default-jre libreoffice-writer`
32
33- If you wish, you can execute the script `installLatestPandoc.sh` (included with this plugin in `docker/dokuwikiapp` folder) to install the latest version of pandoc. Or you can install pandoc any other way (check that version installed is not very outdated, or conversion may fail).
34
35#### soffice conversion (.doc support)
36
37PHP code (at least in my system) is executed by the user `www-data`. I had problems running a Java application with this user (it seems soffice is a Java application) so I decided to run the soffice conversion using `sudo`. To make it work, I had to add a line to the file `/etc/sudoers`. You can do the same executing:
38
39`sudo echo "www-data ALL=(root)NOPASSWD:/usr/bin/soffice" >> /etc/sudoers`
40
41I'm not a security expert, but I think that this should not be a problem for anybody. If you do not use the soffice conversion (.doc support), you don't need to do this.
42
43If PHP code is executed by any other user on your system, you only have to change it in the previous command.
44
45### Docker
46
47If you want, you can use Docker to deploy Dokuwiki and meet the requirements mentioned above "for free". If you are new to Docker, you will probably need to search the web for information before you can use it. See https://www.docker.com/
48
49You will have to make several changes in `docker-compose-yml` files (at least in one of them). I hope you will find usefull the comments on the file. To prevent errors, you can copy the `docker` folder contents elsewhere in your system, so you don't lose these changes when you get updates. `docker-compose-yml` files use the files in `docker/dokuwikiapp`, so take care when moving this arround.
50
51**Note**: This creates an "empty" Dokuwiki, so you will have to follow the install instructions in https://www.dokuwiki.org/install (from step 4) to make it usable.
52
53Two "flavours" are provided:
54
55- `simple`
56- `proxy`
57
58#### Simple
59
60Path: `docker/simple`.
61
62A simple `docker-compose.yml` that will create a container with Dokuwiki installed on it.
63
64To run this, execute:
65
66```
67cd docker/simple
68docker-compose up -d
69```
70
71#### Proxy
72
73Path: `docker/proxy`.
74
75A `docker-compose.yml` that will create a container with Dokuwiki installed on it and a reverse proxy that allows `https` access to it.
76
77It uses Let's Encrypt services (https://letsencrypt.org/) so you will have to do a little reserach to know how it works.
78
79To run this, execute:
80
81```
82cd docker/proxy
83docker-compose up -d
84```
85
86## Usage
87
88From a Dokuwiki page, click on the "Import file" button in the Page Tools. Select a File and click upload.
89
90## Configuration and Settings
91
92They are almost self-explanatory.
93
94## Change Log
95
96### v0.1 beta
97
98- Initial version.
99