mirror of
https://github.com/systemd/systemd
synced 2026-03-15 09:34:47 +01:00
Compare commits
No commits in common. "a2031de849da52aa85b7e4326c0112ed7e5b5672" and "7df7ba457c476b3fa0d0e88f88e03b6355012303" have entirely different histories.
a2031de849
...
7df7ba457c
@ -666,10 +666,6 @@ mouse:bluetooth:v0000p0000:name:Surface Mouse:*
|
||||
mouse:usb:v045ep0823:name:Microsoft Microsoft?? Classic IntelliMouse??:*
|
||||
MOUSE_DPI=3200@1000
|
||||
|
||||
# Microsoft Pro Intellimouse
|
||||
mouse:usb:v045ep082a:name:Microsoft Microsoft Pro Intellimouse Mouse:*
|
||||
MOUSE_DPI=1600@1000
|
||||
|
||||
##########################################
|
||||
# Mionix
|
||||
##########################################
|
||||
|
||||
94
po/ko.po
94
po/ko.po
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# Korean translation for the systemd.
|
||||
# Seong-ho Cho <shcho@gnome.org>, 2015, 2021.
|
||||
# Seong-ho Cho <shcho@gnome.org>, 2015.
|
||||
# Dongsu Park <dongsu@endocode.com>, 2015.
|
||||
# simmon <simmon@nplob.com>, 2021.
|
||||
msgid ""
|
||||
@ -70,7 +70,7 @@ msgstr "홈 영역 생성"
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:14
|
||||
msgid "Authentication is required to create a user's home area."
|
||||
msgstr "사용자 홈 영역을 만들려면 인증이 필요합니다."
|
||||
msgstr "사용자 홈 영역을 생성하기 위해서는 인증이 필요합니다."
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:23
|
||||
msgid "Remove a home area"
|
||||
@ -78,7 +78,7 @@ msgstr "홈 영역 제거"
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:24
|
||||
msgid "Authentication is required to remove a user's home area."
|
||||
msgstr "사용자 홈 영역을 제거하려면 인증이 필요합니다."
|
||||
msgstr "사용자 홈 영역을 제거하기 위해서는 인증이 필요합니다."
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:33
|
||||
msgid "Check credentials of a home area"
|
||||
@ -87,7 +87,7 @@ msgstr "홈 영역 자격증명 확인"
|
||||
#: src/home/org.freedesktop.home1.policy:34
|
||||
msgid ""
|
||||
"Authentication is required to check credentials against a user's home area."
|
||||
msgstr "사용자 홈 영역의 자격 증명을 확인하려면 인증이 필요합니다."
|
||||
msgstr "사용자 홈 영역의 자격증명 확인하려면 인증이 필요합니다."
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:43
|
||||
msgid "Update a home area"
|
||||
@ -99,20 +99,20 @@ msgstr "사용자 홈 영역을 최신화 하려면 인증이 필요합니다."
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:53
|
||||
msgid "Resize a home area"
|
||||
msgstr "홈 영역을 조정"
|
||||
msgstr "홈 영역을 조절"
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:54
|
||||
msgid "Authentication is required to resize a user's home area."
|
||||
msgstr "사용자 홈 영역을 조정하려면 인증이 필요합니다."
|
||||
msgstr "사용자 홈 영역의 크기를 조절하려면 인증이 필요합니다."
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:63
|
||||
msgid "Change password of a home area"
|
||||
msgstr "홈 영역 암호 변경"
|
||||
msgstr "홈 영역의 비밀번호를 변경"
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:64
|
||||
msgid ""
|
||||
"Authentication is required to change the password of a user's home area."
|
||||
msgstr "사용자 홈 영역의 암호를 바꾸려면 인증이 필요합니다."
|
||||
msgstr "사용자 홈 영역의 비밀번호를 변경하려면 비밀번호가 필요합니다."
|
||||
|
||||
#: src/hostname/org.freedesktop.hostname1.policy:20
|
||||
msgid "Set hostname"
|
||||
@ -142,11 +142,11 @@ msgstr "로컬 머신 정보를 설정하려면 인증이 필요합니다."
|
||||
|
||||
#: src/hostname/org.freedesktop.hostname1.policy:51
|
||||
msgid "Get product UUID"
|
||||
msgstr "제품 UUID 가져오기"
|
||||
msgstr "제품 UUID를 획득"
|
||||
|
||||
#: src/hostname/org.freedesktop.hostname1.policy:52
|
||||
msgid "Authentication is required to get product UUID."
|
||||
msgstr "제품 UUID를 가져오려면 인증이 필요합니다."
|
||||
msgstr "제품 UUID를 얻기 위해서는 인증이 필요합니다."
|
||||
|
||||
#: src/import/org.freedesktop.import1.policy:22
|
||||
msgid "Import a VM or container image"
|
||||
@ -166,11 +166,11 @@ msgstr "가상 머신 또는 컨테이너의 이미지를 내보내려면 인증
|
||||
|
||||
#: src/import/org.freedesktop.import1.policy:42
|
||||
msgid "Download a VM or container image"
|
||||
msgstr "가상 머신 또는 컨테이너 이미지 다운로드"
|
||||
msgstr "가상머신 또는 컨테이너 이미지 내려받기"
|
||||
|
||||
#: src/import/org.freedesktop.import1.policy:43
|
||||
msgid "Authentication is required to download a VM or container image"
|
||||
msgstr "가상 머신 또는 컨테이너 이미지를 다운로드하려면 인증이 필요합니다"
|
||||
msgstr "가상머신 또는 컨테이너 이미지를 내려받기하려면 인증이 필요합니다"
|
||||
|
||||
#: src/locale/org.freedesktop.locale1.policy:22
|
||||
msgid "Set system locale"
|
||||
@ -282,13 +282,13 @@ msgstr ""
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:117
|
||||
msgid "Allow applications to inhibit system handling of the reboot key"
|
||||
msgstr "프로그램의 재부팅 키 시스템 동작 방지 허용"
|
||||
msgstr "응용프로그램이 리부트 키 처리하는 시스템 방지 허용"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:118
|
||||
msgid ""
|
||||
"Authentication is required for an application to inhibit system handling of "
|
||||
"the reboot key."
|
||||
msgstr "프로그램의 재부팅 키 시스템 동작 방지를 허용하려면 인증이 필요합니다."
|
||||
msgstr "응용프로그램이 시스템 리부트 키 처리 방지 요청을 허용하려면 인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:128
|
||||
msgid "Allow non-logged-in user to run programs"
|
||||
@ -399,19 +399,17 @@ msgstr "다른 사용자가 로그인 했을 때 시스템이 정지 상태진
|
||||
msgid ""
|
||||
"Authentication is required to halt the system while other users are logged "
|
||||
"in."
|
||||
msgstr ""
|
||||
"다른 사용자가 로그인 했을 때 시스템을 정지 상태로 놓으려면 인증이 필요합니다."
|
||||
msgstr "다른 사용자가 로그인 했을 때 시스템을 정지 상태로 놓으려면 인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:257
|
||||
msgid "Halt the system while an application is inhibiting this"
|
||||
msgstr "프로그램에서 전원 끄기를 막을 때 시스템 전원 끄기"
|
||||
msgstr "응용프로그램이 이와 같이 금지 상태일 때에 시스템 정지 상태 진입"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:258
|
||||
msgid ""
|
||||
"Authentication is required to halt the system while an application is "
|
||||
"inhibiting this."
|
||||
msgstr ""
|
||||
"프로그램에서 전원 끄기를 막을 때 시스템 전원을 끄려면 인증이 필요합니다."
|
||||
msgstr "응용프로그램이 이와 같이 금지 할 때에는 시스템을 정지 할 때에는인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:268
|
||||
msgid "Suspend the system"
|
||||
@ -434,15 +432,15 @@ msgstr ""
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:289
|
||||
msgid "Suspend the system while an application is inhibiting this"
|
||||
msgstr "프로그램에서 대기 모드 진입을 막을 때 시스템 대기 상태 진입"
|
||||
msgstr "프로그램이 절전 상태 진입을 못하게 요청할 때 시스템 절전 상태 진입"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:290
|
||||
msgid ""
|
||||
"Authentication is required to suspend the system while an application is "
|
||||
"inhibiting this."
|
||||
msgstr ""
|
||||
"프로그램에서 대기 모드 진입을 막을 때 시스템을 대기 상태로 설정하려면 인증이 "
|
||||
"필요합니다."
|
||||
"프로그램이 절전 상태 진입을 못하게 요청할 때 시스템을 절전 상태로 놓으려면 인"
|
||||
"증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:300
|
||||
msgid "Hibernate the system"
|
||||
@ -461,21 +459,21 @@ msgid ""
|
||||
"Authentication is required to hibernate the system while other users are "
|
||||
"logged in."
|
||||
msgstr ""
|
||||
"다른 사용자가 로그인 했을 때 시스템을 최대 절전 상태로 설정하려면 인증이 필요"
|
||||
"합니다."
|
||||
"다른 사용자가 로그인 했을 때 시스템을 최대 절전 상태로 놓으려면 인증이 필요합"
|
||||
"니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:321
|
||||
msgid "Hibernate the system while an application is inhibiting this"
|
||||
msgstr ""
|
||||
"프로그램에서 최대 절전 모드로의 진입을 막을 때 시스템 최대 절전 상태 진입"
|
||||
"프로그램이 최대 절전 상태 진입을 못하게 요청할 때 시스템 최대 절전 상태 진입"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:322
|
||||
msgid ""
|
||||
"Authentication is required to hibernate the system while an application is "
|
||||
"inhibiting this."
|
||||
msgstr ""
|
||||
"프로그램에서 최대 절전 모드로의 진입을 막을 때 시스템을 최대 절전 상태로 설정"
|
||||
"하려면 인증이 필요합니다."
|
||||
"프로그램이 최대 절전 상태 진입을 못하게 요청할 때 시스템을 최대 절전 상태로 "
|
||||
"놓으려면 인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:332
|
||||
msgid "Manage active sessions, users and seats"
|
||||
@ -495,11 +493,11 @@ msgstr "활성화 세션을 잠금 또는 잠금 해제하려면 인증이 필
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:352
|
||||
msgid "Set the reboot \"reason\" in the kernel"
|
||||
msgstr "커널에서 재시작 \"사유\" 설정"
|
||||
msgstr "커널이 재시작 \"원인\"을 설정합니다"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:353
|
||||
msgid "Authentication is required to set the reboot \"reason\" in the kernel."
|
||||
msgstr "커널에서 재시작 \"사유\"를 설정하게 하려면 인증이 필요합니다."
|
||||
msgstr "커널에서 \"reason\"으로 재동작 설정하려면 인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:363
|
||||
msgid "Indicate to the firmware to boot to setup interface"
|
||||
@ -513,23 +511,23 @@ msgstr "설정 화면으로 부팅하도록 펌웨어에게 지시하려면 인
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:374
|
||||
msgid "Indicate to the boot loader to boot to the boot loader menu"
|
||||
msgstr "부트로더에 부팅할 부트로더 메뉴 표시"
|
||||
msgstr "부트로더 메뉴에 부팅하기 위해 부트로더에 표시하기"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:375
|
||||
msgid ""
|
||||
"Authentication is required to indicate to the boot loader to boot to the "
|
||||
"boot loader menu."
|
||||
msgstr "부트로더 메뉴에 부팅할 부트로더를 나타내려면 인증이 필요합니다."
|
||||
msgstr "부트로더에 부팅하려면 부트로더 메뉴에 표시하려면 인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:385
|
||||
msgid "Indicate to the boot loader to boot a specific entry"
|
||||
msgstr "부팅할 특정 항목을 부트로더에 표시"
|
||||
msgstr "특정 항목으로 재시작 하기 위해 부트로더 표시"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:386
|
||||
msgid ""
|
||||
"Authentication is required to indicate to the boot loader to boot into a "
|
||||
"specific boot loader entry."
|
||||
msgstr "부팅할 특정 항목을 부트로더에 표시하려면 인증이 필요합니다."
|
||||
msgstr "부트로더에 지정한 부트로더 에서 부트하거나 지정한 부트로더 진입을 표시하려면 인증이 필요합니다."
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:396
|
||||
msgid "Set a wall message"
|
||||
@ -537,7 +535,7 @@ msgstr "wall 메시지 설정"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:397
|
||||
msgid "Authentication is required to set a wall message"
|
||||
msgstr "모든 사용자에게 작성할 wall 메시지를 설정하려면 인증이 필요합니다"
|
||||
msgstr "wall 메시지를 설정하려면 인증이 필요합니다"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:406
|
||||
msgid "Change Session"
|
||||
@ -545,7 +543,7 @@ msgstr "세션 변경"
|
||||
|
||||
#: src/login/org.freedesktop.login1.policy:407
|
||||
msgid "Authentication is required to change the virtual terminal."
|
||||
msgstr "가상 터미널을 바꾸려면 인증이 필요합니다."
|
||||
msgstr "가상 터미널을 변경하려면 인증이 필요합니다."
|
||||
|
||||
#: src/machine/org.freedesktop.machine1.policy:22
|
||||
msgid "Log into a local container"
|
||||
@ -581,12 +579,12 @@ msgstr "로컬 호스트의 쉘을 획득하려면 인증이 필요합니다."
|
||||
|
||||
#: src/machine/org.freedesktop.machine1.policy:64
|
||||
msgid "Acquire a pseudo TTY in a local container"
|
||||
msgstr "로컬 컨테이너에서 유사 TTY 획득"
|
||||
msgstr "로컬 컨테이너에서 의사 TTY 획득"
|
||||
|
||||
#: src/machine/org.freedesktop.machine1.policy:65
|
||||
msgid ""
|
||||
"Authentication is required to acquire a pseudo TTY in a local container."
|
||||
msgstr "로컬 컨테이너에서 유사 TTY를 획득하려면 인증이 필요합니다."
|
||||
msgstr "로컬 컨테이너에서 의사 TTY를 획득하려면 인증이 필요합니다."
|
||||
|
||||
#: src/machine/org.freedesktop.machine1.policy:74
|
||||
msgid "Acquire a pseudo TTY on the local host"
|
||||
@ -594,7 +592,7 @@ msgstr "로컬 호스트에서 유사 TTY 획득"
|
||||
|
||||
#: src/machine/org.freedesktop.machine1.policy:75
|
||||
msgid "Authentication is required to acquire a pseudo TTY on the local host."
|
||||
msgstr "로컬 호스트에서 유사 TTY를 획득하려면 인증이 필요합니다."
|
||||
msgstr "로컬 호스트에서 의사 TTY를 획득하려면 인증이 필요합니다."
|
||||
|
||||
#: src/machine/org.freedesktop.machine1.policy:84
|
||||
msgid "Manage local virtual machines and containers"
|
||||
@ -721,11 +719,11 @@ msgstr "DNS 설정을 재시작하려면 인증이 필요합니다."
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:143
|
||||
msgid "DHCP server sends force renew message"
|
||||
msgstr "DHCP 서버에서 새 메시지 강제 전송"
|
||||
msgstr "DHCP 서버는 새로운 메시지를 강제로 보냅니다"
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:144
|
||||
msgid "Authentication is required to send force renew message."
|
||||
msgstr "강제로 새 메시지를 보내려면 인증이 필요합니다."
|
||||
msgstr "새로운 메시지를 보내려면 인증이 필요합니다."
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:154
|
||||
msgid "Renew dynamic addresses"
|
||||
@ -733,15 +731,15 @@ msgstr "동적 주소 갱신"
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:155
|
||||
msgid "Authentication is required to renew dynamic addresses."
|
||||
msgstr "동적 주소를 새로 바꾸려면 인증이 필요합니다."
|
||||
msgstr "동적주소를 새로 변경하려면 인증이 필요합니다."
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:165
|
||||
msgid "Reload network settings"
|
||||
msgstr "네트워크 설정 새로 불러오기"
|
||||
msgstr "네트웍설정 다시 적재함"
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:166
|
||||
msgid "Authentication is required to reload network settings."
|
||||
msgstr "네트워크 설정을 다시 불러오려면 인증이 필요합니다."
|
||||
msgstr "네트웍 설정을 재적재하려면 인증이 필요합니다."
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:176
|
||||
msgid "Reconfigure network interface"
|
||||
@ -749,7 +747,7 @@ msgstr "네트워크 인터페이스 재설정"
|
||||
|
||||
#: src/network/org.freedesktop.network1.policy:177
|
||||
msgid "Authentication is required to reconfigure network interface."
|
||||
msgstr "네트워크 연결 장치를 다시 설정하려면 인증이 필요합니다."
|
||||
msgstr "네트웍 연결장치를 재설정하려면 인증이 필요합니다."
|
||||
|
||||
#: src/portable/org.freedesktop.portable1.policy:13
|
||||
msgid "Inspect a portable service image"
|
||||
@ -873,10 +871,12 @@ msgstr "'$(unit)' 서비스 유닛 속성을 설정하려면 인증이 필요합
|
||||
msgid ""
|
||||
"Authentication is required to delete files and directories associated with "
|
||||
"'$(unit)'."
|
||||
msgstr ""
|
||||
"'$(unit)'에 해당하는 파일 또는 디렉터리를 삭제하려면 인증이 필요합니다."
|
||||
msgstr "'$(unit)' 과 함께 지정된 파일 또는 디렉토리 삭제에는 인증이 필요합니다."
|
||||
|
||||
#: src/core/dbus-unit.c:757
|
||||
msgid ""
|
||||
"Authentication is required to freeze or thaw the processes of '$(unit)' unit."
|
||||
msgstr "'$(unit)'단위의 처리를 동결 또는 해제하려면 인증이 필요합니다."
|
||||
msgstr "'$(unit)'단위의 처리를 동결 또는 해제하기 위해서는 인증이 필요합니다."
|
||||
|
||||
#~ msgid "Authentication is required to kill '$(unit)'."
|
||||
#~ msgstr "'$(unit)' 서비스 유닛을 강제로 끝내려면 인증이 필요합니다."
|
||||
|
||||
@ -4,21 +4,18 @@
|
||||
import sys
|
||||
import collections
|
||||
import re
|
||||
import concurrent.futures
|
||||
from xml_helper import xml_parse, xml_print, tree
|
||||
from copy import deepcopy
|
||||
|
||||
COLOPHON = '''\
|
||||
This index contains {count} entries in {sections} sections,
|
||||
referring to {pages} individual manual pages.
|
||||
'''
|
||||
|
||||
def _extract_directives(page, names):
|
||||
directive_groups = {name:collections.defaultdict(set) for name in names}
|
||||
|
||||
def _extract_directives(directive_groups, formatting, page):
|
||||
t = xml_parse(page)
|
||||
section = t.find('./refmeta/manvolnum').text
|
||||
pagename = t.find('./refmeta/refentrytitle').text
|
||||
formatting = {}
|
||||
|
||||
storopt = directive_groups['options']
|
||||
for variablelist in t.iterfind('.//variablelist'):
|
||||
@ -34,7 +31,7 @@ def _extract_directives(page, names):
|
||||
if text.startswith('-'):
|
||||
# for options, merge options with and without mandatory arg
|
||||
text = text.partition('=')[0]
|
||||
stor[text].add((pagename, section))
|
||||
stor[text].append((pagename, section))
|
||||
if text not in formatting:
|
||||
# use element as formatted display
|
||||
if name.text[-1] in "= '":
|
||||
@ -45,7 +42,7 @@ def _extract_directives(page, names):
|
||||
formatting[text] = name
|
||||
extra = variablelist.attrib.get('extra-ref')
|
||||
if extra:
|
||||
stor[extra].add((pagename, section))
|
||||
stor[extra].append((pagename, section))
|
||||
if extra not in formatting:
|
||||
elt = tree.Element("varname")
|
||||
elt.text= extra
|
||||
@ -71,13 +68,13 @@ def _extract_directives(page, names):
|
||||
name.text = text
|
||||
if text.endswith('/'):
|
||||
text = text[:-1]
|
||||
storfile[text].add((pagename, section))
|
||||
storfile[text].append((pagename, section))
|
||||
if text not in formatting:
|
||||
# use element as formatted display
|
||||
formatting[text] = name
|
||||
else:
|
||||
text = ' '.join(name.itertext())
|
||||
storfile[text].add((pagename, section))
|
||||
storfile[text].append((pagename, section))
|
||||
formatting[text] = name
|
||||
|
||||
storfile = directive_groups['constants']
|
||||
@ -87,7 +84,7 @@ def _extract_directives(page, names):
|
||||
name.tail = ''
|
||||
if name.text.startswith('('): # a cast, strip it
|
||||
name.text = name.text.partition(' ')[2]
|
||||
storfile[name.text].add((pagename, section))
|
||||
storfile[name.text].append((pagename, section))
|
||||
formatting[name.text] = name
|
||||
|
||||
storfile = directive_groups['specifiers']
|
||||
@ -96,30 +93,18 @@ def _extract_directives(page, names):
|
||||
continue
|
||||
if name.attrib.get('index') == 'false':
|
||||
continue
|
||||
storfile[name.text].add((pagename, section))
|
||||
storfile[name.text].append((pagename, section))
|
||||
formatting[name.text] = name
|
||||
for name in t.iterfind(".//literal[@class='specifiers']"):
|
||||
storfile[name.text].add((pagename, section))
|
||||
storfile[name.text].append((pagename, section))
|
||||
formatting[name.text] = name
|
||||
|
||||
# Serialize to allow pickling
|
||||
formatting = {name:xml_print(value) for name, value in formatting.items()}
|
||||
|
||||
return directive_groups, formatting
|
||||
|
||||
def extract_directives(arg):
|
||||
page, names = arg
|
||||
try:
|
||||
return _extract_directives(page, names)
|
||||
except Exception:
|
||||
raise ValueError("Failed to process {}".format(page))
|
||||
|
||||
def _make_section(template, name, directives, formatting):
|
||||
varlist = template.find(".//*[@id='{}']".format(name))
|
||||
for varname, manpages in sorted(directives.items()):
|
||||
entry = tree.SubElement(varlist, 'varlistentry')
|
||||
term = tree.SubElement(entry, 'term')
|
||||
display = tree.fromstring(formatting[varname])
|
||||
display = deepcopy(formatting[varname])
|
||||
term.append(display)
|
||||
|
||||
para = tree.SubElement(tree.SubElement(entry, 'listitem'), 'para')
|
||||
@ -169,26 +154,20 @@ def make_page(template_path, xml_files):
|
||||
"Extract directives from xml_files and return XML index tree."
|
||||
template = xml_parse(template_path)
|
||||
names = [vl.get('id') for vl in template.iterfind('.//variablelist')]
|
||||
|
||||
with concurrent.futures.ProcessPoolExecutor() as pool:
|
||||
args = ((xml_file, names) for xml_file in xml_files)
|
||||
results = list(pool.map(extract_directives, args))
|
||||
|
||||
directive_groups = {name:collections.defaultdict(set) for name in names}
|
||||
directive_groups = {name:collections.defaultdict(list)
|
||||
for name in names}
|
||||
formatting = {}
|
||||
for d_g, f in reversed(results):
|
||||
for group, mapping in d_g.items():
|
||||
for name, value in mapping.items():
|
||||
directive_groups[group][name].update(value)
|
||||
|
||||
formatting.update(f)
|
||||
for page in xml_files:
|
||||
try:
|
||||
_extract_directives(directive_groups, formatting, page)
|
||||
except Exception:
|
||||
raise ValueError("failed to process " + page)
|
||||
|
||||
return _make_page(template, directive_groups, formatting)
|
||||
|
||||
def main(output, template_path, *xml_files):
|
||||
with open(output, 'wb') as f:
|
||||
if __name__ == '__main__':
|
||||
with open(sys.argv[1], 'wb') as f:
|
||||
template_path = sys.argv[2]
|
||||
xml_files = sys.argv[3:]
|
||||
xml = make_page(template_path, xml_files)
|
||||
f.write(xml_print(xml))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(*sys.argv[1:])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user