Giter Site home page Giter Site logo

site2ikiwiki's Introduction

site2ikiwiki

A general simple html or wiki converter to markdown and so to ikiwiki (http://ikiwiki.info/).

Initially, designed to migrate/import PmWiki and pure HTML websites into ikiwiki.

Usage

Configuration

  • Create a configuration file:
cd /path/to/site2ikiwiki
cp default.json yoursite.json

Example of config file (json format)

{
 "sitename": "yoursite",
 "source_dir": "/path/to/your-old-site",
 "source_address": "http://localhost/your-old-site",
 "source_type": "pmwiki",
 "ikiwiki_source": "/path/to/mdwn-files-of-new-site",
 "ikiwiki_dest": "/path/to/your-new-site",
 "ikiwiki_address": "http://localhost/your-new-site",
 "ikiwiki": "True",
 "ikiwiki_version_control": "git"
}
  • sitename: put your site name (no spaces)
  • source_dir: put here the source files of your page/wiki
  • source_address: put here the web address (http) of your page/wiki
  • source_type: pmwiki|html|...
  • ikiwiki_source: directory to generate the markdown of your new ikiwiki site
  • ikiwiki_dest: directory for ikiwiki parse html
  • ikiwiki_address: web directory of your new ikiwiki site
  • ikiwiki: True|False -> default is true, but if you only want to generate markdown, fill it with "False"
  • ikiwiki_version_control: default is GIT, could be others (check it at http://ikiwiki.info/ikiwiki-makerepo/)

IMPORTANT: because of Json format, every values must me put "inside commas". Otherwise, the config load will fail.

Running the import

  • On a terminal, run:
$ python convert.py yoursite.json

site2ikiwiki's People

Contributors

fernao avatar

Stargazers

Sharon Howard avatar  avatar jq avatar

Watchers

James Cloos avatar  avatar

Forkers

prisnormando

site2ikiwiki's Issues

Add a place for custom scripts that will run

In some cases, it's necessary to run specific scripts during the conversion to markdown. It could be nice to create a folder or some place else so user can put it's specific website scripts.

Encoding problems

The script mst detect and try to solve encoding problems in order to generate good quality import.

import uploads from pmwiki

Uploads on pmwiki are centralized on one directory (i.e.: uploads/). On ikiwiki, each file is placed inside the folder of the page (Main.NameOfPage).
https://ikiwiki.info/plugins/attachment/

An upload import will consist of:

  • step 1:
    • detect if the page has any attachment
    • if yes, download then to a temp folder;
    • rewrite the link in ikiwiki format
    • write a temporary file mapping the image directions (Main.NameOfPage: nameofimage.jpg)
  • step 2:
    • after ikiwiki sync, all files must be moved to the directories of the pages
    • delete temporary mapping file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.