Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
/ Trac2Gollum Public archive

Trac wiki to gollum wiki converter script (gollum as used by github)

License

Notifications You must be signed in to change notification settings

hinnerk/Trac2Gollum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Trac Wiki to git-based Gollum Wiki

A very simple script to convert Trac wiki pages to a git repository suitable for use as a Gollum wiki (as used by Github).

Warning: Don't blame me

This is intended as a starting point for a migration from Trac. You may use it as base for your own implementation, play with it, fork it and if you extend it I'll be very pleased to receive pull requests.

But I'm not reponsible if you use it and anything happens that you don't like, expected or not.

Features

  • imports most Trac wiki pages including directories and subpages (i.e. any but pages edited by "trac", no trac documentation litters the new wiki)
  • keeps original history of pages
  • keeps author, date and change comments
  • sets committer to "Trac2Gollum"
  • converts only the most recent revision, so conversion shouldn't be able to irrevocably destroy data.
  • converts most of trac formatting to Github extended markdown:
    • inline code
    • code paragraphs with optional language identifier
    • header 1-4
    • most urls (CamelCase and !CamelCase should work)
    • text markup: strong, italic
    • ordered and unordered lists
    • macros won't work but are marked and thus easy to find
  • easily customizable by editing the source code ;-)

Bugs / Enhancements / Comments

Please feel free to provide feedback, bug reports and enhancement requests via the Github issue tracker

Known Bugs / Limitations

  • it's quite slow (> 12 regexps and at least two external processes per revision)
  • not all wiki format translations are supported (no macros, images, links to tickets, ...)
  • trac time is interpreted as UTC
  • won't work with directory (a.k.a. subpage) names containing unicode chars. There's a crude workaround for when the file system changes unicode encoding of files (Mac OS X), so file names containing unicode should work.

Installation

Requirements: Python (tested with 2.7)

You may want to modify the source code, especially these:

  • GIT: Path to git binary.
  • format_user(): Formats user id for git log messages. Includes the IP if the address does not contain a "@".
  • format_comment(): Formats the comment.

Usage

git init MyProject.wiki
./trac2gollum.py trac.db MyProject.wiki

About

Trac wiki to gollum wiki converter script (gollum as used by github)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages