Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

A tool to migrate a Trac wiki to a git repository while preserving history

License

Notifications You must be signed in to change notification settings

ggainey/tracwiki2githubwiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

tracwiki2githubwiki

This tool exists to migrate a Trac wiki to a git repository, preserving history (including authors, dates, and comments)

It requires:

  • A sqlite3 export from the existing Trac instance
  • The 'root name' for said Trac (e.g., http://fedorahosted.org/spacewalk)
  • A local git-repository

To use it effectively, one should:

  • Use --extract-trac-authors to extract Trac authors
  • USER: turn into a CSV of "trac-author,github-first github-last login@email" format, preserving matching github authors as we can, and submit to --author-map
  • Use --extract-trac-attachments to get the URLs of every Trac attachment
  • USER: wget all into images/ in the root wiki directory so we can find them later

With this information, it will:

  • Extract every version from trac.wiki:
  • Convert special characters in the 'name' field to '_'
  • git add that file
  • git commit -m --author <authormap.get(trac-author) --date
  • rename converted files to .md and commit
  • convert all files from Trac markup to Markdown markup and commit

What does it convert?

  • Blockquotes
  • Fenced ("code formatted") content
  • "code formatted" inlines
  • Headers
  • Image links
  • Lists
  • Tables

TO-DOs

  • manpage
  • specfile
  • make everything more Python-y
  • Py3 please

ATTRIBUTIONS

The _convert() code is based on SGK's Gist, as informed by modifications made in the following clones:

About

A tool to migrate a Trac wiki to a git repository while preserving history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages