Coder Social home page Coder Social logo

tracboat's Introduction

image

TracBoat

A life boat to escape the Trac ocean liner.

TracBoat is a toolbox for exporting whole Trac instances, saving them and migrating them to other platforms.

Features

  • Export Trac projects along with issues, issue changelogs (with attachments) and wiki pages (with attachments)
  • Export Trac projects to local files (in json, toml, Python literal or Python pickle formats)
  • Migrate Trac projects directly from remote instances as well as from previously created export files
  • Migrate Trac projects to a live GitLab instance
  • Migrate Trac projects to a mocked GitLab on the file system to check for correctness

Installation

TracBoat is available on pypi, so to install it just type:

$ pip install tracboat

If you want to install from source, doing it in a virtualenv is highly recommended. After having this repo cloned, just type:

$ cd tracboat
$ virtualenv -p python2.7 VENV
$ source VENV/bin/activate
$ pip install -r requirements.txt
$ pip install -e .

Dependencies

Getting started

Every command line option can be specified as an evironment variable, so the following command:

$ tracboat users --trac-uri=https://mytrac/xmlrpc --no-ssl-verify

...is exactly the same as the following:

$ export TRACBOAT_TRAC_URI=https://mytrac/xmlrpc
$ export TRACBOAT_SSL_VERIFY=0
$ tracboat users

Another way to conveniently configure tracboat is with a configuration file in TOML format. Providing a file

$ cat mytrac.toml
[tracboat]
trac_uri = "https://mytrac/xmlrpc"
ssl_verify = false
$ tracboat --config-file=mytrac.toml users

Please note that when a value is specified more that once, the priority order considered is the following:

  1. command line option;
  2. environment variable;
  3. configuration file;
  4. default value.

If you are very curious about how to play with command line options, have a look to the click documentation.

Collecting Trac users

$ tracboat users --trac-uri=http://localhost/xmlrpc

Export a Trac instance

$ tracboat export --trac-uri=http://localhost/xmlrpc --format=json --out-file=myproject.json

Migrate to GitLab

$ cat awesomemigration.toml
[tracboat]
from-export-file = "myexportedtracproject.json"
gitlab-project-name = "migrated/myproject"
gitlab-version = "9.0.0"
gitlab_db_password = "Բարեւ աշխարհ"
$ tracboat --config-file=awesomemigration.toml migrate

Credits

The initial inspiration and core migration logic comes from the trac-to-gitlab project by Maël Lavault: this project was born from heavy cleanup and refactoring of that original code, so this is why this spinoff inherited its GPLv3 license.

Changes

0.1.0 (unreleased)

Added

  • Project import.

tracboat's People

Contributors

nazavode avatar

Watchers

James Cloos avatar  avatar

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.