Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add outfile and infile commands to dump/load tables with mysql infile/outfile #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
keywords='tdf pootle tools extensions plugins',
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
include_package_data=True,
install_requires=['pootle'])
install_requires=['pootle', 'th_pootle'])
Empty file.
38 changes: 38 additions & 0 deletions tdf_pootle/management/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.

import os

from th_pootle.management.commands import MySqlCommand


class TDFMySqlCommand(MySqlCommand):

def fpath_revisions(self, path, name):
return os.path.join(
path, "revisions.%s.txt" % name)

def fpath_unit_revisions(self, path, name):
return os.path.join(
path, "unit-revisions.%s.txt" % name)

def fpath_new_subs_data(self, path, name):
return os.path.join(
path, "new-subs-data.%s.txt" % name)

def fpath_subs_by_unit(self, path, name):
return os.path.join(
path, "subs-by-unit.%s.txt" % name)

def fpath_subs_data(self, path, name):
return os.path.join(
path, "subs-data.%s.txt" % name)

def fpath_submission_meta(self, path, name):
return os.path.join(
path, "submission-meta.%s.txt" % name)
Loading