Remove obsolete files
These files are not used anymore, remove them. Change-Id: Icd8cd564f21e972e856754393fe677b839ba0cb9
This commit is contained in:
parent
9e21e9fa43
commit
f679b56fdb
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
TARGET=$1
|
||||
|
||||
echo "copying pom.xml for $TARGET"
|
||||
cp pom.xml generated/$TARGET/pom.xml
|
@ -1,90 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
|
||||
import os, sys
|
||||
from xml2po import Main
|
||||
from xml2po.modes.docbook import docbookXmlMode
|
||||
|
||||
class myDocbookXmlMode(docbookXmlMode):
|
||||
def __init__(self):
|
||||
self.lists = ['itemizedlist', 'orderedlist', 'variablelist',
|
||||
'segmentedlist', 'simplelist', 'calloutlist', 'varlistentry', 'userinput',
|
||||
'computeroutput','prompt','command','screen']
|
||||
self.objects = [ 'figure', 'textobject', 'imageobject', 'mediaobject',
|
||||
'screenshot','literallayout', 'programlisting',
|
||||
'option' ]
|
||||
|
||||
default_mode = 'docbook'
|
||||
operation = 'pot'
|
||||
options = {
|
||||
'mark_untranslated' : False,
|
||||
'expand_entities' : True,
|
||||
'expand_all_entities' : False,
|
||||
}
|
||||
|
||||
ignore_folder = {"docbkx-example", "training-guide"}
|
||||
ignore_file = {"api-examples.xml"}
|
||||
|
||||
root = "./"
|
||||
|
||||
def generatePoT (folder):
|
||||
if (folder==None) :
|
||||
path = root
|
||||
else :
|
||||
generateSinglePoT(folder)
|
||||
return
|
||||
|
||||
if (not os.path.isdir(path)) :
|
||||
return
|
||||
|
||||
files = os.listdir(path)
|
||||
for aFile in files :
|
||||
if (not (aFile in ignore_folder)):
|
||||
generateSinglePoT (aFile)
|
||||
|
||||
def generateSinglePoT(folder):
|
||||
xmlfiles = []
|
||||
abspath = os.path.join(root, folder)
|
||||
if (os.path.isdir(abspath)) :
|
||||
os.path.walk(abspath, get_all_xml, xmlfiles)
|
||||
else:
|
||||
return
|
||||
|
||||
if len(xmlfiles)>0 :
|
||||
output = os.path.join(abspath,"locale")
|
||||
if (not os.path.exists(output)) :
|
||||
os.mkdir(output)
|
||||
output = os.path.join(output, folder+".pot")
|
||||
try:
|
||||
xml2po_main = Main(default_mode, operation, output, options)
|
||||
xml2po_main.current_mode = myDocbookXmlMode()
|
||||
except IOError:
|
||||
print("Error: cannot open aFile %s for writing." % (output))
|
||||
sys.exit(5)
|
||||
#print(xmlfiles)
|
||||
#print(">>>outout: %s ", output)
|
||||
xml2po_main.to_pot(xmlfiles)
|
||||
|
||||
def get_all_xml (sms, dr, flst):
|
||||
if ((flst == "target") or (flst == "wadls")) :
|
||||
return
|
||||
if (dr.find("target")>-1) :
|
||||
return
|
||||
if (dr.find("wadls")>-1) :
|
||||
return
|
||||
|
||||
for f in flst:
|
||||
if (f.endswith(".xml") and (f != "pom.xml") and (not (f in ignore_file))) :
|
||||
sms.append(os.path.join(dr,f))
|
||||
|
||||
def main():
|
||||
try:
|
||||
folder = sys.argv[1]
|
||||
except:
|
||||
folder = None
|
||||
generatePoT(folder)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user