# SOME DESCRIPTIVE TITLE. # Copyright (C) Kovid Goyal # This file is distributed under the same license as the calibre package. # # Translators: # Junghee Lee , 2021-2022 # Junghee Lee , 2021 msgid "" msgstr "" "Project-Id-Version: calibre\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-04-08 13:52+0000\n" "PO-Revision-Date: 2014-06-17 08:34+0000\n" "Last-Translator: Junghee Lee , 2021-2022\n" "Language-Team: Korean (http://app.transifex.com/calibre/calibre/language/ko/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ko\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../../__w/calibre/calibre/manual/template_lang.rst:4 msgid "The calibre template language" msgstr "calibre 템플릿 언어" #: ../../../__w/calibre/calibre/manual/template_lang.rst:6 msgid "" "The calibre template language is a calibre-specific language used throughout" " calibre for tasks such as specifying file paths, formatting values, and " "computing the value for user-specified columns. Examples:" msgstr "calibre 템플릿 언어는 파일 경로 지정, 값 서식 지정, 사용자가 지정한 열의 값 계산 같은 작업에 calibre 전반에서 사용되는 calibre 전용 언어이다. 예:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:8 msgid "" "Specify the folder structure and file names when saving files from the " "calibre library to the disk or e-book reader." msgstr "calibre 라이브러리의 파일을 디스크나 전자책 리더에 저장할 때 폴더 구조와 파일 이름을 지정한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:9 msgid "Define rules for adding icons and colors to the calibre book list." msgstr "calibre 책 목록에 아이콘과 색상을 추가하는 규칙을 정의한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:10 msgid "Define `virtual columns` that contain data from other columns." msgstr "다른 열의 데이터를 담는 `가상 열`을 정의한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:11 msgid "Advanced library searching." msgstr "고급 라이브러리 검색." #: ../../../__w/calibre/calibre/manual/template_lang.rst:12 msgid "Advanced metadata search and replace." msgstr "고급 메타데이터 검색 및 바꾸기." #: ../../../__w/calibre/calibre/manual/template_lang.rst:14 msgid "" "The language is built around the notion of a `template`, which specifies " "which book metadata to use, computations on that metadata, and how it is to " "be formatted." msgstr "이 언어는 `템플릿`이라는 개념을 중심으로 구성되어 있으며, 어떤 책 메타데이터를 사용할지, 그 메타데이터에 대해 어떤 계산을 수행할지, 그리고 어떻게 서식화할지를 지정한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:17 msgid "Basic templates" msgstr "기본 템플릿" #: ../../../__w/calibre/calibre/manual/template_lang.rst:19 msgid "" "A basic template consists of one or more ``template expressions``. A " "``template expression`` consists of text and names in curly brackets " "(``{}``) that is replaced by the corresponding metadata from the book being " "processed. For example, the default template in calibre used for saving " "books to device has 4 ``template expressions``::" msgstr "기본 템플릿은 하나 이상의 ``template expression``으로 구성된다. ``template expression``은 텍스트와 중괄호(``{}``) 안의 이름으로 이루어지며, 처리 중인 책의 해당 메타데이터로 치환된다. 예를 들어 calibre에서 기기로 책을 저장할 때 사용하는 기본 템플릿에는 4개의 ``template expression``이 있다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:23 msgid "For the book \"The Foundation\" by \"Isaac Asimov\" the template will become::" msgstr "\"The Foundation\"의 저자가 \"Isaac Asimov\"인 책에 대해 이 템플릿은 다음과 같이 된다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:27 msgid "" "The slashes are not ``template expressions`` because they are not in between" " ``{}``. Such text is left where it appears. For example, if the template " "is::" msgstr "슬래시는 ``{}`` 사이에 있지 않으므로 ``template expression``이 아니다. 이런 텍스트는 있는 위치에 그대로 남는다. 예를 들어 템플릿이 다음과 같다면::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:31 msgid "then for \"The Foundation\" the template produces::" msgstr "그러면 \"The Foundation\"에 대해 템플릿은 다음을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:35 msgid "" "A ``template expression`` can access all the metadata available in calibre, " "including custom columns (columns you create yourself), by using a column's " "``lookup name``. To find the lookup name for a `column` (sometimes called " "`fields`), hover your mouse over the column header in calibre's book list. " "Lookup names for custom columns always begin with ``#``. For series type " "columns there is an additional field named ``#lookup name_index`` that is " "the series index for that book in the series. For example, if you have a " "custom series column named ``#myseries``, there will also be a column named " "``#myseries_index``. The standard series column's index is named " "``series_index``." msgstr "``template expression``은 열의 ``lookup name``을 사용하여 calibre에서 사용할 수 있는 모든 메타데이터(사용자가 직접 만든 사용자 정의 열 포함)에 접근할 수 있다. `column`(때로는 `fields`라고도 부름)의 lookup name을 찾으려면 calibre 책 목록의 열 머리글 위에 마우스를 올리면 된다. 사용자 정의 열의 lookup name은 항상 ``#``으로 시작한다. 시리즈 형식 열에는 추가로 ``#lookup name_index``라는 필드가 있으며, 이 값은 해당 책의 시리즈 내 번호이다. 예를 들면::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:37 msgid "In addition to the standard column based fields, you also can use:" msgstr "표준 열 기반 필드 외에 다음도 사용할 수 있다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:39 msgid "" "``{formats}`` - A list of formats available in the calibre library for a " "book" msgstr "``{formats}`` - 책에 대해 calibre 라이브러리에서 사용 가능한 형식 목록" #: ../../../__w/calibre/calibre/manual/template_lang.rst:40 msgid "``{identifiers:select(isbn)}`` - The ISBN of the book" msgstr "``{identifiers:select(isbn)}`` - 책의 ISBN" #: ../../../__w/calibre/calibre/manual/template_lang.rst:42 msgid "" "If the metadata for the field for a given book is not defined then the field" " in the template is replaced by the empty string (``''``). For example, " "consider the following template::" msgstr "주어진 책에 대해 해당 필드의 메타데이터가 정의되어 있지 않으면 템플릿의 그 필드는 빈 문자열(``''``)로 치환된다. 예를 들어 다음 템플릿을 보자::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:46 msgid "" "If Asimov's book \"Second Foundation\" is in the series \"Foundation\" then " "the template produces::" msgstr "아시모프의 책 \"Second Foundation\"이 \"Foundation\" 시리즈에 속해 있다면 템플릿은 다음을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:50 msgid "" "If a series has not been entered for the book then the template produces::" msgstr "책에 시리즈가 입력되어 있지 않으면 템플릿은 다음을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:54 msgid "" "The template processor automatically removes multiple slashes and leading or" " trailing spaces." msgstr "템플릿 처리기는 여러 개의 슬래시와 앞뒤 공백을 자동으로 제거한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:57 msgid "Advanced formatting" msgstr "고급 서식 지정" #: ../../../__w/calibre/calibre/manual/template_lang.rst:59 msgid "" "In addition to metadata substitution, templates can conditionally include " "additional text and control how substituted data is formatted." msgstr "메타데이터 치환 외에도 템플릿은 추가 텍스트를 조건부로 포함하고, 치환된 데이터의 서식을 제어할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:61 msgid "**Conditionally including text**" msgstr "**조건부 텍스트 포함**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:63 msgid "" "Sometimes you want text to appear in the output only if a field is not " "empty. A common case is ``series`` and ``series_index`` where you want " "either nothing or the two values separated by a hyphen. calibre handles this" " case using a special ``template expression`` syntax." msgstr "필드가 비어 있지 않을 때만 출력에 텍스트를 표시하고 싶을 때가 있다. 흔한 예는 ``series``와 ``series_index``로, 아무것도 출력하지 않거나 하이픈으로 구분된 두 값을 출력하고 싶을 수 있다. calibre는 이 경우를 특별한 ``template expression`` 문법으로 처리한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:65 msgid "" "For example and using the above Foundation example, assume you want the " "template to produce `Foundation - 3 - Second Foundation`. This template " "produces that output:" msgstr "예를 들어 위의 Foundation 예제를 사용해 템플릿이 `Foundation - 3 - Second Foundation`을 만들기를 원한다고 하자. 다음 템플릿은 그 출력을 만든다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:67 msgid "``{series} - {series_index} - {title}``" msgstr "``{series} - {series_index} - {title}``" #: ../../../__w/calibre/calibre/manual/template_lang.rst:69 msgid "" "However, if a book has no series the template will produce `- - the title`, " "which is probably not what you want. Generally, people want the result be " "the title without the extraneous hyphens. You can accomplish this using the " "following template syntax:" msgstr "하지만 책에 시리즈가 없으면 템플릿은 `- - the title`을 만들며, 이는 보통 원하는 결과가 아니다. 일반적으로는 불필요한 하이픈 없이 제목만 나오기를 원한다. 다음 템플릿 문법을 사용하면 그렇게 할 수 있다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:71 msgid "``{field:|prefix_text|suffix_text}``" msgstr "``{field:|prefix_text|suffix_text}``" #: ../../../__w/calibre/calibre/manual/template_lang.rst:73 msgid "" "This ``template expression`` says that if ``field`` has the value `XXXX` " "then the result will be `prefix_textXXXXXsuffix_text`. If ``field`` is empty" " (has no value) then the result will be the empty string (nothing) because " "the prefix and suffix are ignored. The prefix and suffix can contain blanks." msgstr "이 ``template expression``은 ``field``의 값이 `XXXX`이면 결과가 `prefix_textXXXXXsuffix_text`가 된다는 뜻이다. ``field``가 비어 있으면(값이 없으면) 접두사와 접미사는 무시되므로 결과는 빈 문자열(아무것도 없음)이다. 접두사와 접미사에는 공백이 들어갈 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:75 msgid "" "**Do not use subtemplates (`{ ... }`) or functions (see below) in the prefix" " or the suffix.**" msgstr "**접두사나 접미사에 서브템플릿(`{ ... }`)이나 함수(아래 참조)를 사용하지 마라.**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:77 msgid "" "Using this syntax, we can solve the above no-series problem with the " "template::" msgstr "이 문법을 사용하면 위의 시리즈 없음 문제를 다음 템플릿으로 해결할 수 있다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:81 msgid "" "The hyphens will be included only if the book has a series index, which it " "has only if it has a series. Continuing the Foundation example again, the " "template will produce `Foundation - 1 - Second Foundation`." msgstr "하이픈은 책에 시리즈 번호가 있을 때만 포함되며, 시리즈 번호는 시리즈가 있을 때만 존재한다. Foundation 예제를 계속 사용하면 템플릿은 `Foundation - 1 - Second Foundation`을 만든다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:83 #: ../../../__w/calibre/calibre/manual/template_lang.rst:293 #: ../../../__w/calibre/calibre/manual/template_lang.rst:469 msgid "Notes:" msgstr "참고:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:85 msgid "" "You must include the colon after the ``lookup name`` if you are using a " "prefix or a suffix." msgstr "접두사나 접미사를 사용할 경우 ``lookup name`` 뒤에 콜론을 반드시 넣어야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:86 msgid "" "You must use either no or both ``|`` characters. Using one, as in ``{field:|" " - }``, is not allowed." msgstr "``|`` 문자는 둘 다 쓰거나 아예 쓰지 말아야 한다. ``{field:| - }``처럼 하나만 쓰는 것은 허용되지 않는다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:87 msgid "" "It is OK to provide no text for either the prefix or the suffix, such as in " "``{series:|| - }``. The template ``{title:||}`` is the same as ``{title}``." msgstr "``{series:|| - }``처럼 접두사나 접미사 중 하나에 텍스트를 넣지 않아도 된다. 템플릿 ``{title:||}``는 ``{title}``와 같다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:89 msgid "**Formatting**" msgstr "**서식 지정**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:91 msgid "" "Suppose you want the ``series_index`` to be formatted as three digits with " "leading zeros. This does the trick:" msgstr "``series_index``를 앞을 0으로 채운 세 자리 숫자로 표시하고 싶다고 하자. 다음과 같이 하면 된다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:93 msgid "``{series_index:0>3s}`` - Three digits with leading zeros" msgstr "``{series_index:0>3s}`` - 앞을 0으로 채운 세 자리" #: ../../../__w/calibre/calibre/manual/template_lang.rst:95 msgid "For trailing zeros, use:" msgstr "뒤를 0으로 채우려면 다음을 사용한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:97 msgid "``{series_index:0<3s}`` - Three digits with trailing zeros" msgstr "``{series_index:0<3s}`` - 뒤를 0으로 채운 세 자리" #: ../../../__w/calibre/calibre/manual/template_lang.rst:99 msgid "" "If you use series indices with fractional values, e.g., 1.1, you might want " "the decimal points to line up. For example, you might want the indices 1 and" " 2.5 to appear as 01.00 and 02.50 so that they will sort correctly on a " "device that does lexical sorting. To do this, use:" msgstr "시리즈 번호에 1.1 같은 소수 값이 포함되어 있다면 소수점 위치를 맞추고 싶을 수 있다. 예를 들어 1과 2.5를 01.00과 02.50으로 표시해, 사전식 정렬을 사용하는 기기에서도 올바르게 정렬되게 하고 싶을 수 있다. 이 경우 다음을 사용한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:101 msgid "" "``{series_index:0>5.2f}`` - Five characters consisting of two digits with " "leading zeros, a decimal point, then 2 digits after the decimal point." msgstr "``{series_index:0>5.2f}`` - 앞을 0으로 채운 두 자리 숫자, 소수점, 그리고 소수점 이하 두 자리로 구성된 총 5자" #: ../../../__w/calibre/calibre/manual/template_lang.rst:103 msgid "If you want only the first two letters of the data, use:" msgstr "데이터의 처음 두 글자만 원한다면 다음을 사용한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:105 msgid "" "``{author_sort:.2}`` - Only the first two letters of the author sort name" msgstr "``{author_sort:.2}`` - 저자 정렬 이름의 처음 두 글자만" #: ../../../__w/calibre/calibre/manual/template_lang.rst:107 msgid "" "Much of the calibre template language formatting comes from Python. For more" " details on the syntax of these advanced formatting operations see the " "`Python documentation " "`_." msgstr "calibre 템플릿 언어의 서식 지정 상당수는 Python에서 왔다. 이러한 고급 서식 지정 연산의 문법에 대한 자세한 내용은 `Python 문서 `_를 참조하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:111 msgid "Using templates to define custom columns" msgstr "템플릿을 사용해 사용자 정의 열 정의하기" #: ../../../__w/calibre/calibre/manual/template_lang.rst:113 msgid "" "Templates can be used to display information that isn't in calibre metadata," " or to display metadata differently from calibre's normal format. For " "example, you might want to show the ``ISBN``, a field that calibre does not " "display. You can accomplish this creating a custom column with the type " "`Column built from other columns` (hereafter called `composite columns`) and" " providing a template to generate the displayed text. The column will " "display the result of evaluating the template. For example, to display the " "ISBN, create the column and enter ``{identifiers:select(isbn)}`` in the " "template box. To display a column containing the values of two series custom" " columns, separated by a comma, use ``{#series1:||,}{#series2}``." msgstr "템플릿은 calibre 메타데이터에 없는 정보를 표시하거나, 메타데이터를 calibre의 기본 형식과 다르게 표시하는 데 사용할 수 있다. 예를 들어 calibre가 표시하지 않는 ``ISBN`` 필드를 보여주고 싶을 수 있다. 이를 위해 `다른 열로부터 만들어진 열` 형식(이하 `합성 열`)의 사용자 정의 열을 만들고, 표시할 텍스트를 생성하는 템플릿을 제공하면 된다. 이 열에는 템플릿 평가 결과가 표시된다. 예를 들면::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:115 msgid "Composite columns can use any template option, including formatting." msgstr "복합 열은 템플릿을 포함한 모든 템플릿 옵션을 사용할 수 있습니다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:117 msgid "" "Note: You cannot edit the data displayed in a composite column. Instead you " "edit the source columns. If you edit a composite column, for example by " "double-clicking it, calibre will open the template for editing, not the " "underlying data." msgstr "참고: 합성 열에 표시되는 데이터는 직접 편집할 수 없다. 대신 원본 열을 편집해야 한다. 합성 열을 더블클릭하는 등으로 편집하려 하면 calibre는 실제 데이터가 아니라 템플릿 편집기를 연다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:121 msgid "Templates and plugboards" msgstr "템플릿과 플러그보드" #: ../../../__w/calibre/calibre/manual/template_lang.rst:123 msgid "" "Plugboards are used for changing the metadata written into books during " "send-to-device and save-to-disk operations. A plugboard permits you to " "specify a template to provide the data to write into the book's metadata. " "You can use plugboards to modify the following fields: authors, author_sort," " language, publisher, tags, title, title_sort. This feature helps people who" " want to use different metadata in books on devices to solve sorting or " "display issues." msgstr "플러그보드는 기기로 보내기와 디스크에 저장 작업 중 책에 기록되는 메타데이터를 변경하는 데 사용한다. 플러그보드를 사용하면 책 메타데이터에 쓸 데이터를 제공하는 템플릿을 지정할 수 있다. 수정 가능한 필드는 authors, author_sort, language, publisher, tags, title, title_sort이다. 이 기능은 정렬이나 표시 문제를 해결하기 위해 기기의 책에 다른 메타데이터를 쓰고 싶은 사용자에게 유용하다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:125 msgid "" "When you create a plugboard, you specify the format and device for which the" " plugboard is to be used. A special device is provided, ``save_to_disk``, " "that is used when saving formats (as opposed to sending them to a device). " "Once you have chosen the format and device, you choose the metadata fields " "to change, providing templates to supply the new values. These templates are" " `connected` to their destination fields, hence the name `plugboards`. You " "can of course use composite columns in these templates." msgstr "플러그보드를 만들 때는 해당 플러그보드가 사용될 형식과 장치를 지정한다. 형식을 저장할 때(기기로 보내는 것이 아니라) 사용하는 특수 장치로 ``save_to_disk``가 제공된다. 형식과 장치를 선택한 후에는 변경할 메타데이터 필드를 선택하고, 새 값을 제공할 템플릿을 지정한다. 이 템플릿들은 대상 필드에 `연결`되므로 `plugboards`라는 이름이 붙었다. 물론 이러한 템플릿에서 합성 열을 사용할 수도 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:127 msgid "" "Plugboards are quite flexible and can be written in Single Function Mode, " "Template Program Mode, General Program Mode, or Python Template mode." msgstr "플러그보드는 매우 유연하며 Single Function Mode, Template Program Mode, General Program Mode, Python Template mode로 작성할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:129 msgid "" "When a plugboard might apply (Content server, save to disk, or send to " "device), calibre searches the defined plugboards to choose the correct one " "for the given format and device. For example, to find the appropriate " "plugboard for an EPUB book being sent to an ANDROID device, calibre searches" " the plugboards using the following search order:" msgstr "플러그보드가 적용될 수 있을 때(콘텐츠 서버, 디스크에 저장, 기기로 보내기) calibre는 정의된 플러그보드를 검색하여 해당 형식과 장치에 맞는 올바른 플러그보드를 선택한다. 예를 들어 EPUB 책을 ANDROID 장치로 보낼 때 적절한 플러그보드를 찾기 위해 calibre는 다음 순서로 플러그보드를 검색한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:133 msgid "" "a plugboard with an exact match on format and device, e.g., ``EPUB`` and " "``ANDROID``" msgstr "형식과 장치가 정확히 일치하는 플러그보드. 예: ``EPUB`` 및 ``ANDROID``" #: ../../../__w/calibre/calibre/manual/template_lang.rst:134 msgid "" "a plugboard with an exact match on format and the special ``any device`` " "choice, e.g., ``EPUB`` and ``any device``" msgstr "형식은 정확히 일치하고 장치는 특수 선택인 ``any device``인 플러그보드. 예: ``EPUB`` 및 ``any device``" #: ../../../__w/calibre/calibre/manual/template_lang.rst:135 msgid "" "a plugboard with the special ``any format`` choice and an exact match on " "device, e.g., ``any format`` and ``ANDROID``" msgstr "특수 선택인 ``any format``과 장치의 정확한 일치가 있는 플러그보드. 예: ``any format`` 및 ``ANDROID``" #: ../../../__w/calibre/calibre/manual/template_lang.rst:136 msgid "a plugboard with ``any format`` and ``any device``" msgstr "``any format`` 및 ``any device``가 지정된 플러그보드" #: ../../../__w/calibre/calibre/manual/template_lang.rst:138 msgid "" "The tags and authors fields have special treatment, because both of these " "fields can hold more than one item. A book can have many tags and many " "authors. When you specify that one of these two fields is to be changed, the" " template's result is examined to see if more than one item is there. For " "tags, the result is cut apart wherever calibre finds a comma. For example, " "if the template produces the value ``Thriller, Horror``, then the result " "will be two tags, ``Thriller`` and ``Horror``. There is no way to put a " "comma in the middle of a tag." msgstr "tags 필드와 authors 필드는 둘 다 여러 항목을 담을 수 있기 때문에 특별하게 처리된다. 한 책에는 여러 태그와 여러 저자가 있을 수 있다. 이 두 필드 중 하나를 변경하도록 지정하면 템플릿 결과를 검사하여 항목이 둘 이상인지 확인한다. 태그의 경우 calibre는 쉼표가 있는 곳에서 결과를 분리한다. 예를 들어 템플릿이 ``Thriller, Horror``를 만들면 결과는 ``Thriller``와 ``Horror`` 두 개의 태그가 된다. 태그에 쉼표를 넣는 방법은 없다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:141 msgid "" "The same thing happens for authors, but using a different character for the " "cut, a `&` (ampersand) instead of a comma. For example, if the template " "produces the value ``Blogs, Joe&Posts, Susan``, then the book will end up " "with two authors, ``Blogs, Joe`` and ``Posts, Susan``. If the template " "produces the value ``Blogs, Joe;Posts, Susan``, then the book will have one " "author with a rather strange name." msgstr "저자도 같은 방식으로 처리되지만, 구분 문자로 쉼표 대신 `&`(앰퍼샌드)를 사용한다. 예를 들어 템플릿이 ``Blogs, Joe&Posts, Susan``을 만들면 책에는 ``Blogs, Joe``와 ``Posts, Susan`` 두 명의 저자가 들어간다. 템플릿이 ``Blogs, Joe;Posts, Susan``을 만들면 책에는 다소 이상한 이름을 가진 한 명의 저자만 들어간다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:143 msgid "" "Plugboards affect the metadata written into the book when it is saved to " "disk or written to the device. Plugboards do not affect the metadata used by" " ``save to disk`` and ``send to device`` to create the file names. Instead, " "file names are constructed using the templates entered on the appropriate " "preferences window." msgstr "플러그보드는 디스크에 저장하거나 장치에 쓸 때 책에 기록되는 메타데이터에 영향을 준다. 하지만 ``디스크에 저장``과 ``기기로 보내기``가 파일 이름을 만들 때 사용하는 메타데이터에는 영향을 주지 않는다. 파일 이름은 대신 해당 환경설정 창에 입력된 템플릿을 사용해 구성된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:148 msgid "Using functions in templates - Single Function Mode" msgstr "템플릿에서 함수 사용하기 - Single Function Mode" #: ../../../__w/calibre/calibre/manual/template_lang.rst:150 msgid "" "Suppose you want to display the value of a field in upper case when that " "field is normally in title case. You can do this using `template functions`." " For example, to display the title in upper case use the ``uppercase`` " "function, as in ``{title:uppercase()}``. To display it in title case, use " "``{title:titlecase()}``." msgstr "일반적으로 제목 형식인 필드 값을 대문자로 표시하고 싶다고 하자. 이 경우 `template functions`를 사용할 수 있다. 예를 들어 제목을 대문자로 표시하려면 ``{title:uppercase()}``처럼 ``uppercase`` 함수를 사용한다. 제목 형식으로 표시하려면 ``{title:titlecase()}``를 사용한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:152 msgid "" "Functions go into the format part of the template, after the ``:`` and " "before the first ``|`` or the closing ``}`` if no prefix/suffix is used. If " "you have both a format and a function reference, the function comes after a " "second ``:``. Functions return the value of the column specified in the " "template, suitably modified." msgstr "함수는 템플릿의 형식 부분, 즉 ``:`` 뒤이자 첫 번째 ``|`` 앞(접두사/접미사가 없으면 닫는 ``}`` 앞)에 들어간다. 형식과 함수 참조를 둘 다 사용할 경우 함수는 두 번째 ``:`` 뒤에 온다. 함수는 템플릿에서 지정한 열의 값을 적절히 수정하여 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:154 msgid "The syntax for using functions is one of::" msgstr "함수 사용 문법은 다음 중 하나이다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:161 msgid "" "Function names must always be followed by opening and closing parentheses. " "Some functions require extra values (arguments), and these go inside the " "parentheses. Arguments are separated by commas. Literal commas (commas as " "text, not argument separators) must be preceded by a backslash (``\\``) . " "The last (or only) argument cannot contain a textual closing parenthesis." msgstr "함수 이름 뒤에는 항상 여는 괄호와 닫는 괄호가 와야 한다. 일부 함수는 추가 값(인수)을 요구하며, 이 값들은 괄호 안에 넣는다. 인수는 쉼표로 구분한다. 문자 그대로의 쉼표(인수 구분자가 아닌 쉼표)는 백슬래시(``\\``)를 앞에 붙여야 한다. 마지막 인수(또는 유일한 인수)에는 문자 그대로의 닫는 괄호를 넣을 수 없다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:163 msgid "" "Functions are evaluated before format specifications and the prefix/suffix. " "See further down for an example of using both a format and a function." msgstr "함수는 형식 지정과 접두사/접미사보다 먼저 평가된다. 형식과 함수를 함께 사용하는 예는 아래를 참조하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:165 msgid "" "**Important**: If you have programming experience, please note that the " "syntax in `Single Function Mode` is not what you expect. Strings are not " "quoted and spaces are significant. All arguments are considered to be " "constants; there are no expressions." msgstr "**중요**: 프로그래밍 경험이 있다면 `Single Function Mode`의 문법이 예상과 다르다는 점에 주의하라. 문자열은 따옴표로 감싸지지 않으며 공백이 중요하다. 모든 인수는 상수로 간주되며 식은 없다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:167 msgid "" "**Do not use subtemplates (`{ ... }`) as function arguments.** Instead, use " ":ref:`Template Program Mode ` and :ref:`General Program Mode " "`." msgstr "**함수 인수로 서브템플릿(`{ ... }`)을 사용하지 마라.** 대신 :ref:`Template Program Mode `와 :ref:`General Program Mode `를 사용하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:169 msgid "Notes on calling functions in Single Function Mode:" msgstr "Single Function Mode에서 함수 호출 시 참고 사항:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:171 msgid "" "When functions are used in Single Function Mode, the first parameter, " "``value``, is automatically replaced by the content of the field specified " "in the template. For example, when the template ``{title:capitalize()}`` is " "processed, the content of the ``title`` field is passed as the parameter " "``value`` to the capitalize function." msgstr "Single Function Mode에서 함수를 사용할 때 첫 번째 매개변수 ``value``는 템플릿에 지정된 필드의 내용으로 자동 대체된다. 예를 들어 템플릿 ``{title:capitalize()}``를 처리할 때 ``title`` 필드의 내용이 capitalize 함수의 ``value`` 매개변수로 전달된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:172 msgid "" "In the function documentation, the notation ``[something]*`` means that " "``something`` can be repeated zero or more times. The notation " "``[something]+`` means that the ``something`` is repeated one or more times " "(must exist at least one time)." msgstr "함수 문서에서 ``[something]*`` 표기는 ``something``이 0회 이상 반복될 수 있음을 의미한다. ``[something]+`` 표기는 ``something``이 1회 이상 반복됨을 의미한다(최소 한 번은 있어야 함)." #: ../../../__w/calibre/calibre/manual/template_lang.rst:173 msgid "" "Some functions use regular expressions. In the template language regular " "expression matching is case-insensitive." msgstr "일부 함수는 정규식을 사용한다. 템플릿 언어에서 정규식 일치는 대소문자를 구분하지 않는다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:175 msgid "" "Functions are documented in :ref:`template_functions_reference`. The " "documentation tells you what arguments the functions require and what the " "functions do. For example, here is the documentation of the " ":ref:`ff_ifempty` function." msgstr "함수는 :ref:`template_functions_reference`에 문서화되어 있다. 문서는 함수에 필요한 인수와 함수가 수행하는 일을 알려 준다. 예를 들어 다음은 :ref:`ff_ifempty` 함수의 문서이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:179 msgid "" "You see that the function requires two arguments, ``value`` and " "``text_if_empty``. However, because we are using Single Function Mode, we " "omit the ``value`` argument, passing only ``text_if_empty``. For example, " "this template::" msgstr "이 함수는 ``value``와 ``text_if_empty`` 두 인수를 요구한다. 하지만 지금은 Single Function Mode를 사용하고 있으므로 ``value`` 인수는 생략하고 ``text_if_empty``만 전달한다. 예를 들어 이 템플릿은::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:183 msgid "" "shows the tags for a book, if any. If it has no tags then it shows `No tags " "on this book`." msgstr "책에 태그가 있으면 태그를 표시한다. 태그가 없으면 `이 책에는 태그가 없습니다`를 표시한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:185 msgid "" "The following functions are usable in Single Function Mode because their " "first parameter is ``value``." msgstr "다음 함수들은 첫 번째 매개변수가 ``value``이므로 Single Function Mode에서 사용할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:227 msgid "**Using functions and formatting in the same template**" msgstr "**같은 템플릿에서 함수와 서식 함께 사용하기**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:229 msgid "" "Suppose you have an integer custom column ``#myint`` that you want displayed" " with leading zeros, as in ``003``. One way to do this is to use a format of" " ``0>3s``. However, by default if a number (integer or float) equals zero " "then the value is displayed as the empty string so zero values will produce " "the empty string, not ``000``. If you want to see ``000`` values then you " "use both the format string and the ``ifempty`` function to change the empty " "value back to a zero. The template would be::" msgstr "정수 사용자 정의 열 ``#myint``를 ``003``처럼 앞을 0으로 채워 표시하고 싶다고 하자. 한 가지 방법은 ``0>3s`` 형식을 사용하는 것이다. 하지만 기본적으로 숫자(정수 또는 부동소수점)가 0이면 값은 빈 문자열로 표시되므로, 0 값은 ``000``이 아니라 빈 문자열이 된다. ``000``을 보고 싶다면 형식 문자열과 ``ifempty`` 함수를 함께 사용해 빈 값을 다시 0으로 바꾸면 된다. 템플릿은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:233 msgid "" "Note that you can use the prefix and suffix as well. If you want the number " "to appear as ``[003]`` or ``[000]``, then use the template::" msgstr "접두사와 접미사도 함께 사용할 수 있다. 숫자를 ``[003]`` 또는 ``[000]``처럼 보이게 하려면 다음 템플릿을 사용한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:240 msgid "General Program Mode" msgstr "General Program Mode" #: ../../../__w/calibre/calibre/manual/template_lang.rst:242 msgid "" "`General Program Mode` (`GPM`) replaces `template expressions` with a " "program written in the `template language`. The syntax of the language is " "defined by the following grammar::" msgstr "`General Program Mode`(`GPM`)는 `template expressions`를 `template language`로 작성한 프로그램으로 대체한다. 이 언어의 문법은 다음과 같이 정의된다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:295 msgid "" "a ``top_expression`` always has a value. The value of an ``expression_list``" " is the value of the last ``top_expression`` in the list. For example, the " "value of the expression list ``1;2;'foobar';3`` is ``3``." msgstr "``top_expression``은 항상 값을 가진다. ``expression_list``의 값은 목록에서 마지막 ``top_expression``의 값이다. 예를 들어 식 목록 ``1;2;'foobar';3``의 값은 ``3``이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:296 msgid "In a logical context, any non-empty value is ``True``" msgstr "논리 문맥에서 비어 있지 않은 값은 모두 ``True``이다" #: ../../../__w/calibre/calibre/manual/template_lang.rst:297 msgid "In a logical context, the empty value is ``False``" msgstr "논리 문맥에서 빈 값은 ``False``이다" #: ../../../__w/calibre/calibre/manual/template_lang.rst:298 msgid "" "Strings and numbers can be used interchangeably. For example, ``10`` and " "``'10'`` are the same thing." msgstr "문자열과 숫자는 서로 바꾸어 사용할 수 있다. 예를 들어 ``10``과 ``'10'``은 같은 것이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:299 msgid "" "Comments are lines starting with a '#' character, possibly preceded by " "blanks or tabs." msgstr "주석은 빈칸이나 탭이 앞에 있을 수 있는, ``#`` 문자로 시작하는 줄이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:301 msgid "**Operator precedence**" msgstr "**연산자 우선순위**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:303 msgid "" "The operator precedence (order of evaluation) from highest (evaluated first)" " to lowest (evaluated last) is:" msgstr "연산자 우선순위(평가 순서)는 가장 높은 것(가장 먼저 평가)부터 가장 낮은 것(가장 나중에 평가)까지 다음과 같다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:305 msgid "" "Function calls, constants, parenthesized expressions, statement expressions," " assignment expressions, field references." msgstr "함수 호출, 상수, 괄호로 묶인 식, 문장 식, 할당 식, 필드 참조." #: ../../../__w/calibre/calibre/manual/template_lang.rst:306 msgid "" "Unary plus (``+``) and minus (``-``). These operators evaluate right to " "left." msgstr "단항 플러스(``+``)와 마이너스(``-``). 이 연산자들은 오른쪽에서 왼쪽으로 평가된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:308 msgid "" "These and all the other arithmetic operators return integers if the " "expression results in a fractional part equal to zero. For example, if an " "expression returns ``3.0`` it is changed to ``3``." msgstr "이 연산자들과 다른 모든 산술 연산자는 식의 결과에 소수 부분이 없으면 정수를 반환한다. 예를 들어 식이 ``3.0``을 반환하면 ``3``으로 바뀐다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:309 msgid "" "Multiply (``*``) and divide (``/``). These operators are associative and " "evaluate left to right. Use parentheses if you want to change the order of " "evaluation." msgstr "곱하기(``*``)와 나누기(``/``). 이 연산자들은 결합법칙이 적용되며 왼쪽에서 오른쪽으로 평가된다. 평가 순서를 바꾸고 싶다면 괄호를 사용하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:310 msgid "" "Add (``+``) and subtract (``-``). These operators are associative and " "evaluate left to right." msgstr "더하기(``+``)와 빼기(``-``). 이 연산자들은 결합법칙이 적용되며 왼쪽에서 오른쪽으로 평가된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:311 msgid "" "Numeric and string comparisons. These operators return ``'1'`` if the " "comparison succeeds, otherwise the empty string (``''``). Comparisons are " "not associative: ``a < b < c`` is a syntax error." msgstr "숫자 및 문자열 비교. 이 연산자들은 비교가 성공하면 ``'1'``을, 그렇지 않으면 빈 문자열(``''``)을 반환한다. 비교는 결합적이지 않으므로 ``a < b < c``는 문법 오류이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:312 msgid "" "String concatenation (``&``). The ``&`` operator returns a string formed by " "concatenating the left-hand and right-hand expressions. Example: ``'aaa' & " "'bbb'`` returns ``'aaabbb'``. The operator is associative and evaluates left" " to right." msgstr "문자열 연결(``&``). ``&`` 연산자는 왼쪽 식과 오른쪽 식을 이어 붙인 문자열을 반환한다. 예: ``'aaa' & 'bbb'``는 ``'aaabbb'``를 반환한다. 이 연산자는 결합법칙이 적용되며 왼쪽에서 오른쪽으로 평가된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:313 msgid "" "Unary logical not (``!``). This operator returns ``'1'`` if the expression " "is False (evaluates to the empty string), otherwise ``''``." msgstr "단항 논리 부정(``!``). 이 연산자는 식이 False(빈 문자열로 평가됨)면 ``'1'``을, 그렇지 않으면 ``''``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:314 msgid "" "Logical and (``&&``). This operator returns '1' if both the left-hand and " "right-hand expressions are True, or the empty string ``''`` if either is " "False. It is associative, evaluates left to right, and does `short-" "circuiting `_." msgstr "논리곱(``&&``). 이 연산자는 왼쪽 식과 오른쪽 식이 모두 True이면 '1'을, 둘 중 하나라도 False이면 빈 문자열 ``''``을 반환한다. 결합법칙이 적용되며 왼쪽에서 오른쪽으로 평가되고, `단락 평가 `_를 수행한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:315 msgid "" "Logical or (``||``). This operator returns ``'1'`` if either the left-hand " "or right-hand expression is True, or ``''`` if both are False. It is " "associative, evaluates left to right, and does `short-circuiting " "`_. It is an " "`inclusive or`, returning ``'1'`` if both the left- and right-hand " "expressions are True." msgstr "논리합(``||``). 이 연산자는 왼쪽 식이나 오른쪽 식 중 하나라도 True이면 ``'1'``을, 둘 다 False이면 ``''``을 반환한다. 결합법칙이 적용되며 왼쪽에서 오른쪽으로 평가되고, `단락 평가 `_를 수행한다. 이는 `포괄적 or`이므로 왼쪽과 오른쪽 식이 모두 True여도 ``'1'``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:317 msgid "**Field references**" msgstr "**필드 참조**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:319 msgid "" "A ``field_reference`` evaluates to the value of the metadata field named by " "lookup name that follows the ``$`` or ``$$``. Using ``$`` is equivalent to " "using the :ref:`ff_field` function. Using ``$$`` is equivalent to using the " ":ref:`ff_raw_field` function. Examples::" msgstr "``field_reference``는 ``$`` 또는 ``$$`` 뒤에 오는 lookup name으로 지정된 메타데이터 필드의 값을 평가한다. ``$`` 사용은 :ref:`ff_field` 함수를 사용하는 것과 같다. ``$$`` 사용은 :ref:`ff_raw_field` 함수를 사용하는 것과 같다. 예::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:326 msgid "**If expressions**" msgstr "**If 식**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:328 msgid "" "``If`` expressions first evaluate the ``condition``. If the ``condition`` is" " True (a non-empty value) then the ``expression_list`` in the ``then`` " "clause is evaluated. If it is False then if present the ``expression_list`` " "in the ``elif`` or ``else`` clause is evaluated. The ``elif`` and ``else`` " "parts are optional. The words ``if``, ``then``, ``elif``, ``else``, and " "``fi`` are reserved; you cannot use them as identifier names. You can put " "newlines and white space wherever they make sense. The ``condition`` is a " "``top_expression`` not an ``expression_list``; semicolons are not allowed. " "The ``expression_lists`` are semicolon-separated sequences of " "``top_expressions``. An ``if`` expression returns the result of the last " "``top_expression`` in the evaluated ``expression_list``, or the empty string" " if no expression list was evaluated." msgstr "``If`` 식은 먼저 ``condition``을 평가한다. ``condition``이 True(비어 있지 않은 값)이면 ``then`` 절의 ``expression_list``를 평가한다. False이면 ``elif`` 또는 ``else`` 절이 있을 경우 그 안의 ``expression_list``를 평가한다. ``elif``와 ``else`` 부분은 선택 사항이다. ``if``, ``then``, ``elif``, ``else``, ``fi``는 예약어이므로 식별자 이름으로 사용할 수 없다. 줄바꿈과 공백은 의미가 통하는 위치라면 어디든 넣을 수 있다. 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:330 msgid "Examples::" msgstr "예::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:343 msgid "Nested ``if`` example::" msgstr "중첩된 ``if`` 예제::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:356 msgid "" "As said above, an ``if`` produces a value. This means that all the following" " are equivalent::" msgstr "위에서 말했듯이 ``if``는 값을 생성한다. 즉, 다음 예들은 모두 동일하다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:362 msgid "" "For example, this program returns the value of the ``series`` column if the " "book has a series, otherwise the value of the ``title`` column::" msgstr "예를 들어 다음 프로그램은 책에 시리즈가 있으면 ``series`` 열의 값을, 없으면 ``title`` 열의 값을 반환한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:366 msgid "**For expressions**" msgstr "**For 식**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:368 msgid "" "The ``for`` expression iterates over a list of values, processing them one " "at a time. The ``list_expression`` must evaluate either to a metadata field " "``lookup name`` e.g., ``tags`` or ``#genre``, or to a list of values. The " ":ref:`ff_range` generates a list of numbers. If the result is a valid " "``lookup name`` then the field's value is fetched and the separator " "specified for that field type is used. If the result isn't a valid lookup " "name then it is assumed to be a list of values. The list is assumed to be " "separated by commas unless the optional keyword ``separator`` is supplied, " "in which case the list values must be separated by the result of evaluating " "the ``separator_expr``. A separator cannot be used if the list is generated " "by ``range()``. Each value in the list is assigned to the specified variable" " then the ``expression_list`` is evaluated. You can use ``break`` to jump " "out of the loop, and ``continue`` to jump to the beginning of the loop for " "the next iteration." msgstr "``for`` 식은 값 목록을 순회하면서 한 번에 하나씩 처리한다. ``list_expression``은 메타데이터 필드 ``lookup name``(예: ``tags`` 또는 ``#genre``) 또는 값 목록으로 평가되어야 한다. :ref:`ff_range`는 숫자 목록을 생성한다. 결과가 유효한 ``lookup name``이면 해당 필드의 값을 가져오고, 그 필드 형식에 지정된 구분자를 사용한다. 결과가 유효한 ``lookup name``이 아니면 값 목록으로 간주한다. 목록은 쉼표로 분리되어 있다고 가정한다. 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:370 msgid "" "Example: This template removes the first hierarchical name for each value in" " Genre (``#genre``), constructing a list with the new names::" msgstr "예: 이 템플릿은 Genre(``#genre``)의 각 값에서 첫 번째 계층 이름을 제거하여 새 이름 목록을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:380 msgid "" "If the original Genre is `History.Military, Science Fiction.Alternate " "History, ReadMe` then the template returns `Military, Alternate History, " "ReadMe`. You could use this template in calibre's :guilabel:`Edit metadata " "in bulk -> Search & replace` with :guilabel:`Search for` set to ``template``" " to strip off the first level of the hierarchy and assign the resulting " "value to Genre." msgstr "원래 Genre가 `History.Military, Science Fiction.Alternate History, ReadMe`라면 템플릿은 `Military, Alternate History, ReadMe`를 반환한다. 이 템플릿을 calibre의 :guilabel:`메타데이터 일괄 편집 -> 검색 및 바꾸기`에서 :guilabel:`검색 대상`을 ``template``으로 설정하여 사용하면, 계층 구조의 첫 번째 수준을 제거하고 그 결과 값을 Genre에 할당할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:383 msgid "" "Note: the last line in the template, ``new_tags``, isn't strictly necessary " "in this case because ``for`` returns the value of the last top_expression in" " the expression list. The value of an assignment is the value of its " "expression, so the value of the ``for`` statement is what was assigned to " "``new_tags``." msgstr "참고: 이 경우 템플릿의 마지막 줄인 ``new_tags``는 엄밀히 말해 필요하지 않다. ``for``는 식 목록에서 마지막 top_expression의 값을 반환하기 때문이다. 할당의 값은 그 식의 값이므로 ``for`` 문의 값은 ``new_tags``에 할당된 값이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:385 msgid "**with expressions**" msgstr "**with 식**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:387 msgid "The ``with`` expression:" msgstr "``with`` 식은:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:389 msgid "" "changes the current book to the book with calibre book id (an integer) " "produced by evaluating the ``top_expression``." msgstr "``top_expression``을 평가해 얻은 calibre 책 ID(정수)를 가진 책으로 현재 책을 바꾼다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:390 msgid "runs the ``expression_list``." msgstr "``expression_list``를 실행한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:391 msgid "then resets the current book back to what it was." msgstr "그런 다음 현재 책을 원래 값으로 되돌린다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:393 msgid "" "The ``with`` expression returns the result of the last ``top_expression`` in" " the evaluated ``expression_list``, or the empty string if no expression " "list was evaluated." msgstr "``with`` 식은 평가된 ``expression_list``의 마지막 ``top_expression`` 결과를 반환하며, 식 목록이 평가되지 않았다면 빈 문자열을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:396 msgid "" "For example, this template returns a list of the titles of each book " "selected in the GUI::" msgstr "예를 들어 다음 템플릿은 GUI에서 선택된 각 책의 제목 목록을 반환한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:408 msgid "**Return stmt**" msgstr "**Return 문**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:410 msgid "" "Return the value of the ``expression``. If executed in a function then it " "returns the value of the expression to the caller. If executed in the " "outermost context (the template) then it sets the value of the template to " "the value of the expression and exits the template." msgstr "``expression``의 값을 반환한다. 함수 안에서 실행되면 그 값을 호출자에게 반환한다. 가장 바깥 문맥(템플릿)에서 실행되면 템플릿의 값을 해당 식의 값으로 설정하고 템플릿 실행을 종료한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:412 msgid "**Function definition**" msgstr "**함수 정의**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:414 msgid "" "If you have repeated code in a template then you can put that code into a " "local function. The ``def`` keyword starts the definition. It is followed by" " the function name, the argument list, then the code in the function. The " "function definition ends with the ``fed`` keyword." msgstr "템플릿에 반복되는 코드가 있다면 그 코드를 지역 함수로 만들 수 있다. ``def`` 키워드가 정의를 시작한다. 그 뒤에 함수 이름, 인수 목록, 그리고 함수 본문의 코드가 온다. 함수 정의는 ``fed`` 키워드로 끝난다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:416 msgid "" "Arguments are positional. When a function is called the supplied arguments " "are matched left to right against the defined parameters, with the value of " "the argument assigned to the parameter. It is an error to provide more " "arguments than defined parameters. Parameters can have default values, such " "as ``a = 25``. If an argument is not supplied for that parameter then the " "default value is used, otherwise the parameter is set to the empty string." msgstr "인수는 위치 기반이다. 함수를 호출하면 전달된 인수는 정의된 매개변수와 왼쪽에서 오른쪽으로 대응되며, 해당 인수의 값이 매개변수에 할당된다. 정의된 매개변수보다 많은 인수를 전달하면 오류이다. 매개변수는 ``a = 25``처럼 기본값을 가질 수 있다. 그 매개변수에 인수가 전달되지 않으면 기본값이 사용되고, 그렇지 않으면 빈 문자열이 설정된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:418 msgid "The ``return`` statement can be used in a local function." msgstr "지역 함수 안에서는 ``return`` 문을 사용할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:420 msgid "A function must be defined before it can be used." msgstr "함수는 사용하기 전에 정의되어 있어야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:422 msgid "" "Example: This template computes an approximate duration in years, months, " "and days from a number of days. The function ``to_plural()`` formats the " "computed values. Note that the example also uses the ``&`` operator::" msgstr "예: 이 템플릿은 일 수를 기준으로 대략적인 기간을 연, 월, 일 단위로 계산한다. 함수 ``to_plural()``은 계산된 값을 서식화한다. 이 예에서는 ``&`` 연산자도 사용한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:437 msgid "**Relational operators**" msgstr "**관계 연산자**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:439 msgid "" "Relational operators return ``'1'`` if the comparison is true, otherwise the" " empty string (``''``)." msgstr "관계 연산자는 비교가 참이면 ``'1'``을, 그렇지 않으면 빈 문자열(``''``)을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:441 msgid "" "There are two forms of relational operators: string comparisons and numeric " "comparisons." msgstr "관계 연산자는 문자열 비교와 숫자 비교 두 종류가 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:443 msgid "" "String comparisons do case-insensitive string comparison using lexical " "order. The supported string comparison operators are ``==``, ``!=``, ``<``, " "``<=``, ``>``, ``>=``, ``in``, ``inlist``, and ``inlist_field``. For the " "``in``, ``inlist``, and ``inlist_field`` operators, the result of the left " "hand expression is interpreted as a regular expression pattern. They are " "true if the value of left-hand regular expression matches the value of the " "right hand expression. The regular expressions are case-insensitive." msgstr "문자열 비교는 사전식 순서를 사용하며 대소문자를 구분하지 않는다. 지원되는 문자열 비교 연산자는 ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``, ``in``, ``inlist``, ``inlist_field``이다. ``in``, ``inlist``, ``inlist_field`` 연산자에서는 왼쪽 식의 결과를 정규식 패턴으로 해석한다. 왼쪽 정규식이 오른쪽 식의 값과 일치하면 참이다. 정규식은 대소문자를 구분하지 않는다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:446 msgid "" "The ``inlist`` operator is true if the left hand regular expression matches " "any one of the items in the right hand list where the items in the list are " "separated by commas. The ``inlist_field`` operator is true if the left hand " "regular expression matches any of the items in the field (column) named by " "the right hand expression, using the separator defined for the field. NB: " "the ``inlist_field`` operator requires the right hand expression to evaluate" " to a field name, while the ``inlist`` operator requires the right hand " "expression to evaluate to a string containing a comma-separated list. " "Because of this difference, ``inlist_field`` is substantially faster than " "``inlist`` because no string conversions or list constructions are done." msgstr "``inlist`` 연산자는 왼쪽 정규식이 오른쪽 목록의 항목 중 하나라도 일치하면 참이다. 이 목록의 항목은 쉼표로 구분된다. ``inlist_field`` 연산자는 오른쪽 식이 가리키는 필드(열)의 항목 중 하나라도 왼쪽 정규식과 일치하면 참이며, 필드에 정의된 구분자를 사용한다. 참고로 ``inlist_field``는 오른쪽 식이 필드 이름으로 평가되어야 하지만, ``inlist``는 단순 문자열 목록을 기대한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:448 msgid "" "The numeric comparison operators are ``==#``, ``!=#``, ``<#``, ``<=#``, " "``>#``, ``>=#``. The left and right expressions must evaluate to numeric " "values with two exceptions: both the string value \"None\" (undefined field)" " and the empty string evaluate to the value zero." msgstr "숫자 비교 연산자는 ``==#``, ``!=#``, ``<#``, ``<=#``, ``>#``, ``>=#``이다. 왼쪽과 오른쪽 식은 숫자 값으로 평가되어야 한다. 단, 두 가지 예외가 있다. 문자열 값 \"None\"(정의되지 않은 필드)과 빈 문자열은 모두 값 0으로 평가된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:450 msgid "Examples:" msgstr "예:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:452 msgid "" "``program: field('series') == 'foo'`` returns ``'1'`` if the book's series " "is `foo`, otherwise ``''``." msgstr "``program: field('series') == 'foo'`` 는 책의 시리즈가 `foo`이면 ``'1'``을, 그렇지 않으면 ``''``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:453 msgid "" "``program: 'f.o' in field('series')`` returns ``'1'`` if the book's series " "matches the regular expression ``f.o`` (e.g., `foo`, `Off Onyx`, etc.), " "otherwise ``''``." msgstr "``program: 'f.o' in field('series')`` 는 책의 시리즈가 정규식 ``f.o``(예: `foo`, `Off Onyx` 등)와 일치하면 ``'1'``을, 그렇지 않으면 ``''``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:454 msgid "" "``program: 'science' inlist $#genre`` returns ``'1'`` if any of the values " "retrieved from the book's genres match the regular expression ``science``, " "e.g., `Science`, `History of Science`, `Science Fiction` etc., otherwise " "``''``." msgstr "``program: 'science' inlist $#genre`` 는 책의 장르 값 중 하나라도 정규식 ``science``(예: `Science`, `History of Science`, `Science Fiction` 등)와 일치하면 ``'1'``을, 그렇지 않으면 ``''``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:455 msgid "" "``program: '^science$' inlist $#genre`` returns ``'1'`` if any of the book's" " genres exactly match the regular expression ``^science$``, e.g., `Science`," " otherwise ``''``. The genres `History of Science` and `Science Fiction` " "don't match." msgstr "``program: '^science$' inlist $#genre`` 는 책의 장르 중 하나라도 정규식 ``^science$``와 정확히 일치하면(예: `Science`) ``'1'``을, 그렇지 않으면 ``''``을 반환한다. `History of Science`와 `Science Fiction`은 일치하지 않는다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:456 msgid "" "``program: 'asimov' inlist $authors`` returns ``'1'`` if any author matches " "the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac Asimov`, " "otherwise ``''``." msgstr "``program: 'asimov' inlist $authors`` 는 저자 중 하나라도 정규식 ``asimov``와 일치하면(예: `Asimov, Isaac` 또는 `Isaac Asimov`) ``'1'``을, 그렇지 않으면 ``''``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:457 msgid "" "``program: 'asimov' inlist_field 'authors'`` returns ``'1'`` if any author " "matches the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac " "Asimov`, otherwise ``''``." msgstr "``program: 'asimov' inlist_field 'authors'`` 는 저자 중 하나라도 정규식 ``asimov``와 일치하면(예: `Asimov, Isaac` 또는 `Isaac Asimov`) ``'1'``을, 그렇지 않으면 ``''``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:458 msgid "" "``program: 'asimov$' inlist_field 'authors'`` returns ``'1'`` if any author " "matches the regular expression ``asimov$``, e.g., `Isaac Asimov`, otherwise " "``''``. It doesn't match `Asimov, Isaac` because of the ``$`` anchor in the " "regular expression." msgstr "``program: 'asimov$' inlist_field 'authors'`` 는 저자 중 하나라도 정규식 ``asimov$``와 일치하면(예: `Isaac Asimov`) ``'1'``을, 그렇지 않으면 ``''``을 반환한다. 정규식의 ``$`` 앵커 때문에 `Asimov, Isaac`에는 일치하지 않는다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:459 msgid "" "``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` returns" " ``'bar'`` if the book's series is not `foo`. Otherwise it returns " "``'mumble'``." msgstr "``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` 는 책의 시리즈가 `foo`가 아니면 ``'bar'``를 반환한다. 그렇지 않으면 ``'mumble'``을 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:460 msgid "" "``program: if field('series') == 'foo' || field('series') == '1632' then " "'yes' else 'no' fi`` returns ``'yes'`` if series is either `foo` or `1632`, " "otherwise ``'no'``." msgstr "``program: if field('series') == 'foo' || field('series') == '1632' then 'yes' else 'no' fi`` 는 시리즈가 `foo` 또는 `1632`이면 ``'yes'``를, 그렇지 않으면 ``'no'``를 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:461 msgid "" "``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` " "returns ``'yes'`` if series is either `foo` or `1632`, otherwise ``'no'``." msgstr "``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` 는 시리즈가 `foo` 또는 `1632`이면 ``'yes'``를, 그렇지 않으면 ``'no'``를 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:462 msgid "" "``program: if 11 > 2 then 'yes' else 'no' fi`` returns ``'no'`` because the " "``>`` operator does a lexical comparison." msgstr "``program: if 11 > 2 then 'yes' else 'no' fi`` 는 ``>`` 연산자가 사전식 비교를 수행하므로 ``'no'``를 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:463 msgid "" "``program: if 11 ># 2 then 'yes' else 'no' fi`` returns ``'yes'`` because " "the ``>#`` operator does a numeric comparison." msgstr "``program: if 11 ># 2 then 'yes' else 'no' fi`` 는 ``>#`` 연산자가 숫자 비교를 수행하므로 ``'yes'``를 반환한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:465 msgid "**Functions in General Program Mode**" msgstr "**General Program Mode의 함수**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:467 msgid "" "See :ref:`template_functions_reference` for the list of functions built into" " the template language." msgstr "`template language`에 내장된 함수 목록은 :ref:`template_functions_reference`를 참조하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:471 msgid "" "As opposed to :ref:`Single Function Mode `, in General Program " "Mode you must specify the first parameter ``value``." msgstr ":ref:`Single Function Mode `와 달리 General Program Mode에서는 첫 번째 매개변수 ``value``를 반드시 지정해야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:472 msgid "All parameters are expression_lists (see the grammar above)." msgstr "모든 매개변수는 expression_list이다(위 문법 참조)." #: ../../../__w/calibre/calibre/manual/template_lang.rst:477 msgid "More complex programs in template expressions - Template Program Mode" msgstr "템플릿 식에서 더 복잡한 프로그램 사용하기 - Template Program Mode" #: ../../../__w/calibre/calibre/manual/template_lang.rst:479 msgid "" "`Template Program Mode` (`TPM`) is a blend of :ref:`General Program Mode " "` and :ref:`Single Function Mode `. `TPM` differs" " from Single Function Mode in that it permits writing template expressions " "that refer to other metadata fields, use nested functions, modify variables," " and do arithmetic. It differs from `General Program Mode` in that the " "template is contained between ``{`` and ``}`` characters and doesn't begin " "with the word ``program:``. The program portion of the template is a General" " Program Mode expression list." msgstr "`Template Program Mode`(`TPM`)는 :ref:`General Program Mode `와 :ref:`Single Function Mode `를 결합한 형태이다. `TPM`은 다른 메타데이터 필드를 참조하고, 중첩 함수를 사용하고, 변수를 수정하고, 산술 연산을 할 수 있다는 점에서 Single Function Mode와 다르다. `General Program Mode`와는 템플릿이 ``{`` 와 ``}`` 사이에 들어가며 ``program:``이라는 단어로 시작하지 않는다는 점이 다르다. 템플릿의 프로그램 부분은 다음과 같이 구문 분석된다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:482 msgid "" "Example: assume you want a template to show the series for a book if it has " "one, otherwise show the value of a custom field #genre. You cannot do this " "in the :ref:`Single Function Mode ` because you cannot make " "reference to another metadata field within a template expression. In `TPM` " "you can, as the following expression demonstrates::" msgstr "예: 책에 시리즈가 있으면 시리즈를 표시하고, 없으면 사용자 정의 필드 #genre 값을 표시하는 템플릿을 원한다고 하자. :ref:`Single Function Mode `에서는 템플릿 식 안에서 다른 메타데이터 필드를 참조할 수 없기 때문에 이를 할 수 없다. `TPM`에서는 가능하며, 다음 식이 그 예이다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:487 msgid "The example shows several things:" msgstr "이 예는 여러 가지를 보여 준다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:489 msgid "" "`TPM` is used if the expression begins with ``:'`` and ends with ``'}``. " "Anything else is assumed to be in :ref:`Single Function Mode `." msgstr "식이 ``:'``로 시작하고 ``'}``로 끝나면 `TPM`이 사용된다. 그 외의 경우는 :ref:`Single Function Mode `로 간주된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:491 msgid "" "If the template contains a prefix and suffix, the expression ends with " "``'|`` where the ``|`` is the delimiter for the prefix. Example::" msgstr "템플릿에 접두사와 접미사가 있으면 식은 접두사의 구분자인 ``|``가 붙은 ``'|``로 끝난다. 예::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:495 msgid "" "Functions must be given all their arguments. For example, the standard " "built-in functions must be given the initial parameter ``value``." msgstr "함수에는 모든 인수를 제공해야 한다. 예를 들어 표준 내장 함수에는 초기 매개변수 ``value``를 전달해야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:496 msgid "" "The variable ``$`` is usable as the ``value`` argument and stands for the " "value of the field named in the template, ``series`` in this case." msgstr "변수 ``$``는 ``value`` 인수로 사용할 수 있으며, 여기서는 템플릿에 지정된 필드 ``series``의 값을 뜻한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:497 msgid "white space is ignored and can be used anywhere within the expression." msgstr "식 내부에서는 공백이 무시되므로 어디에든 사용할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:498 msgid "" "constant strings are enclosed in matching quotes, either ``'`` or ``\"``." msgstr "상수 문자열은 짝이 맞는 따옴표, 즉 ``'`` 또는 ``\"``로 감싼다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:500 msgid "" "In `TPM`, using ``{`` and ``}`` characters in string literals can lead to " "errors or unexpected results because they confuse the template processor. It" " tries to treat them as template expression boundaries, not characters. In " "some but not all cases you can replace a ``{`` with ``[[`` and a ``}`` with " "`]]`. Advice: if your program contains ``{`` and ``}`` characters then you " "should use `General Program Mode`." msgstr "`TPM`에서 문자열 리터럴 안에 ``{`` 와 ``}`` 문자를 사용하면 템플릿 처리기가 이를 문자 대신 템플릿 식 경계로 해석하려 하므로 오류나 예상치 못한 결과가 날 수 있다. 경우에 따라 ``{``를 ``[[``로, ``}``를 `]]`로 바꿀 수 있지만 항상 되는 것은 아니다. 조언: 프로그램에 ``{`` 와 ``}`` 문자가 포함되어 있다면 `General Program Mode`를 사용하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:505 msgid "Python Template Mode" msgstr "Python Template Mode" #: ../../../__w/calibre/calibre/manual/template_lang.rst:507 msgid "" "Python Template Mode (PTM) lets you write templates using native Python and " "the `calibre API `_. The database API will be of " "most use; further discussion is beyond the scope of this manual. PTM " "templates are faster and can do more complicated operations but you must " "know how to write code in Python using the calibre API." msgstr "Python Template Mode(PTM)는 네이티브 Python과 `calibre API `_를 사용해 템플릿을 작성할 수 있게 해 준다. 가장 유용한 것은 데이터베이스 API이며, 자세한 설명은 이 매뉴얼 범위를 벗어난다. PTM 템플릿은 더 빠르고 더 복잡한 작업을 수행할 수 있지만, calibre API를 사용해 Python 코드를 작성하는 법을 알아야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:509 msgid "A PTM template begins with:" msgstr "PTM 템플릿은 다음으로 시작한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:527 msgid "" "You can add the above text to your template using the context menu, usually " "accessed with a right click. The comments are not significant and can be " "removed. You must use python indenting." msgstr "보통 오른쪽 클릭으로 여는 문맥 메뉴를 사용해 위 텍스트를 템플릿에 추가할 수 있다. 주석은 의미가 없으므로 제거해도 된다. Python 들여쓰기를 사용해야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:529 msgid "" "The context object supports ``str(context)`` that returns a string of the " "context's contents, and ``context.attributes`` that returns a list of the " "attribute names in the context." msgstr "context 객체는 문맥 내용 문자열을 반환하는 ``str(context)``와, 문맥의 속성 이름 목록을 반환하는 ``context.attributes``를 지원한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:531 msgid "" "The ``context.funcs`` attribute allows calling Built-in and User template " "functions, and Stored GPM/Python templates, so that you can execute them " "directly in your code. The functions are retrieved using their names. If the" " name conflicts with a Python keyword, add an underscore to the end of the " "name. Examples:" msgstr "``context.funcs`` 속성을 사용하면 Built-in 및 User 템플릿 함수, 저장된 GPM/Python 템플릿을 호출할 수 있어 코드 안에서 직접 실행할 수 있다. 함수는 이름으로 가져온다. 이름이 Python 키워드와 충돌하면 끝에 밑줄을 하나 붙여라. 예:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:538 msgid "" "Here is an example of a PTM template that produces a list of all the authors" " for a series. The list is stored in a `Column built from other columns, " "behaves like tags`. It shows in :guilabel:`Book details` and has the " ":guilabel:`on separate lines` checked (in :guilabel:`Preferences->Look & " "feel->Book details`). That option requires the list to be comma-separated. " "To satisfy that requirement the template converts commas in author names to " "semicolons then builds a comma-separated list of authors. The authors are " "then sorted, which is why the template uses author_sort." msgstr "다음은 어떤 시리즈의 모든 저자 목록을 만드는 PTM 템플릿 예이다. 이 목록은 `다른 열로부터 만들어진 열, 태그처럼 동작`하는 열에 저장된다. 이 값은 :guilabel:`책 정보`에 표시되며 :guilabel:`각 줄에 별도 표시` 옵션이 켜져 있다(:guilabel:`환경설정->모양새->책 정보`). 이 옵션은 목록이 쉼표로 구분되어 있어야 한다. 이 요구를 만족시키기 위해 템플릿은 저자 이름 안의 쉼표를 세미콜론으로 바꾼 다음, 저자들의 쉼표 구분 목록을 만든다. 이 과정은 함수 ``get_item_names()``의 결과를 `authors` 필드에 있는 값으로 제한한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:559 msgid "The output in :guilabel:`Book details` looks like this:" msgstr ":guilabel:`책 정보`의 출력은 다음과 같다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:561 msgid "E-book conversion dialog" msgstr "전자책 변환 대화상자" #: ../../../__w/calibre/calibre/manual/template_lang.rst:569 msgid "Templates and URLs" msgstr "템플릿과 URL" #: ../../../__w/calibre/calibre/manual/template_lang.rst:571 msgid "You can use templates to construct URLs. Two cases are described here:" msgstr "템플릿을 사용해 URL을 구성할 수 있다. 여기서는 두 가지 경우를 설명한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:573 msgid "Custom column :guilabel:`Book details` search URLs" msgstr "사용자 정의 열 :guilabel:`책 정보` 검색 URL" #: ../../../__w/calibre/calibre/manual/template_lang.rst:574 msgid "The calibre URL scheme" msgstr "calibre URL 스킴" #: ../../../__w/calibre/calibre/manual/template_lang.rst:576 msgid "**Custom column book details search URLs**" msgstr "**사용자 정의 열 책 정보 검색 URL**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:578 msgid "" "When you create a custom column you can provide a URL to be used in " ":guilabel:`Book details` using a template. For example, if you have a custom" " column for `Translators` you can define a URL to take you to a site for " "translators. Book details search URLs can be provided for `Text`, " "`Enumerated`, `Series`, and `Column built from other column` column types." msgstr "사용자 정의 열을 만들 때 템플릿을 사용해 :guilabel:`책 정보`에서 사용할 URL을 지정할 수 있다. 예를 들어 `번역가`용 사용자 정의 열이 있다면 번역가 사이트로 이동하는 URL을 정의할 수 있다. 책 정보 검색 URL은 `Text`, `Enumerated`, `Series`, `Column built from other column` 형식 열에 제공할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:580 msgid "" "When an item with a `search template` is clicked in :guilabel:`Book details`" " the template is evaluated. It is provided the normal book metadata. It is " "also provided three additional fields:" msgstr ":guilabel:`책 정보`에서 `검색 템플릿`이 있는 항목을 클릭하면 템플릿이 평가된다. 이때 일반적인 책 메타데이터와 함께 다음 세 개의 추가 필드도 제공된다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:582 msgid "``item_value``: the value of the clicked item." msgstr "``item_value``: 클릭한 항목의 값." #: ../../../__w/calibre/calibre/manual/template_lang.rst:583 msgid "" "``item_value_quoted``: the value of clicked item, URL-encoded. Special " "characters are escaped to make them valid in URLs and spaces are replaced by" " ``'+'`` (plus) signs." msgstr "``item_value_quoted``: 클릭한 항목의 URL 인코딩된 값. 특수 문자는 URL에서 유효하도록 이스케이프되며 공백은 ``'+'``(플러스) 기호로 바뀐다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:584 msgid "" "``item_value_no_plus``: the value of clicked item, URL-encoded. Special " "characters are escaped to make them valid in URLs and spaces are replaced by" " the ``%20``, not plus." msgstr "``item_value_no_plus``: 클릭한 항목의 URL 인코딩된 값. 특수 문자는 URL에서 유효하도록 이스케이프되며 공백은 플러스가 아닌 ``%20``으로 바뀐다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:586 msgid "" "There are several ways to construct the URL. The following use Wikipedia as " "an example." msgstr "URL을 구성하는 방법은 여러 가지가 있다. 다음 예에서는 Wikipedia를 사용한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:588 msgid "The simplest is a basic template::" msgstr "가장 단순한 방법은 기본 템플릿이다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:592 msgid "" "In some cases you might want to do more processing. There are four template " "functions you can use, depending on the complexity of the processing." msgstr "경우에 따라 더 많은 처리가 필요할 수 있다. 처리 복잡도에 따라 사용할 수 있는 템플릿 함수는 네 가지이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:599 msgid "" "For example, assume you have a custom column `Translators` " "(``#translators``) where the names are `Last name, First name`. You might " "need to convert the name to `First name Last name` when creating the URL. " "You can use the :ref:`ff_make_url` function to do this::" msgstr "예를 들어 `성, 이름` 형식으로 이름을 저장하는 사용자 정의 열 `Translators`(``#translators``)가 있다고 하자. URL을 만들 때 이 이름을 `이름 성` 형식으로 바꿔야 할 수 있다. 이때 :ref:`ff_make_url` 함수를 사용할 수 있다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:603 msgid "" "If we assume that the translator's name is `Boy-Żeleński, Tadeusz` then the " "above template produces the link::" msgstr "번역가 이름이 `Boy-Żeleński, Tadeusz`라고 가정하면 위 템플릿은 다음 링크를 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:607 msgid "" "Note that the person's first name is now first, the space is now a plus, and" " that the non-English characters in the last name are URL-encoded." msgstr "이제 사람 이름은 이름이 먼저 오고, 공백은 플러스로 바뀌며, 성에 있는 비영어 문자는 URL 인코딩된다는 점에 유의하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:609 msgid "" "The functions :ref:`ff_make_url_extended`, :ref:`ff_query_string`, and " ":ref:`ff_encode_for_url` might be useful depending upon any additional " "processing complexity." msgstr "추가 처리의 복잡도에 따라 :ref:`ff_make_url_extended`, :ref:`ff_query_string`, :ref:`ff_encode_for_url` 함수도 유용할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:611 msgid "**The calibre URL scheme**" msgstr "**calibre URL 스킴**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:613 msgid "" "Calibre supports several different URLs to navigate your calibre libraries. " "This section shows how to use templates to construct some of the URLs. See " ":doc:`url_scheme` for details on the URLs available." msgstr "Calibre는 calibre 라이브러리를 탐색하기 위한 여러 종류의 URL을 지원한다. 이 절에서는 템플릿을 사용해 일부 URL을 구성하는 방법을 보여 준다. 사용 가능한 URL의 자세한 내용은 :doc:`url_scheme`를 참조하라." #: ../../../__w/calibre/calibre/manual/template_lang.rst:616 msgid "Switch to a specific library. The syntax of this URL is::" msgstr "특정 라이브러리로 전환한다. 이 URL의 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:620 msgid "" "``Library_Name`` must be replaced with the name of the calibre library you " "wish to open. The library name is shown in the title bar of the window. It " "is a simple name, not the file path to the library. You must spell it as " "shown in the title bar, including letter case. The character ``_`` " "(underscore) stands for the current library. If the name contains any spaces" " or special characters then it must be hex encoded using the " ":ref:`ff_to_hex` function, as in the following example::" msgstr "``Library_Name``은 열고 싶은 calibre 라이브러리의 이름으로 바꿔야 한다. 라이브러리 이름은 창의 제목 표시줄에 표시된다. 이것은 라이브러리의 파일 경로가 아니라 단순한 이름이다. 제목 표시줄에 보이는 대로, 대소문자까지 포함해 정확히 입력해야 한다. 문자 ``_``(밑줄)는 현재 라이브러리를 뜻한다. 이름에 공백이나 특수 문자가 포함되어 있다면 다음 예와 같이 :ref:`ff_to_hex` 함수를 사용해 hex 인코딩해야 한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:628 msgid "The template generates the URL::" msgstr "이 템플릿은 다음 URL을 생성한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:632 msgid "" "You can replace the ``current_library_name()`` function with the actual name" " of the library, as in::" msgstr "``current_library_name()`` 함수를 실제 라이브러리 이름으로 바꿔 쓸 수도 있다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:636 msgid "" "Links to show books. These links select a book in the calibre library. The " "syntax for this URL is::" msgstr "책을 표시하는 링크. 이 링크는 calibre 라이브러리에서 특정 책을 선택한다. 이 URL의 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:640 msgid "" "The ``book id`` is the numeric calibre id for the book, available to " "templates as ``$id``. As above, the library name might need to be hex " "encoded. Here is an example::" msgstr "``book id``는 책의 숫자형 calibre ID이며 템플릿에서는 ``$id``로 사용할 수 있다. 위와 마찬가지로 라이브러리 이름은 hex 인코딩이 필요할 수 있다. 예::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:645 msgid "It produces the URL::" msgstr "이 템플릿은 다음 URL을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:649 msgid "" "Searching for books. These links search for books in the specified calibre " "library. The syntax for this URL is::" msgstr "책 검색하기. 이 링크는 지정된 calibre 라이브러리에서 책을 검색한다. 이 URL의 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:654 msgid "" "where `query` is any valid calibre search expression. You must hex encode " "any query containing spaces or special characters, which generally means all" " of them. For example, the calibre search expression for searching for a " "hierarchical tag beginning with 'AA' is ``tags:\"=.AA\"``. This template " "constructs a search URL for that expression::" msgstr "`query`는 유효한 calibre 검색 식이면 무엇이든 될 수 있다. 공백이나 특수 문자가 들어간 질의는 반드시 hex 인코딩해야 하며, 실제로는 거의 모두 해당된다. 예를 들어 'AA'로 시작하는 계층형 태그를 찾는 calibre 검색 식은 ``tags:\"=.AA\"``이다. 다음 템플릿은 이 식의 검색 URL을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:660 msgid "The resulting URL is::" msgstr "결과 URL은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:664 msgid "" "Here is an example of the same URL built using the " ":ref:``ff_make_url_extended`` function instead of :ref:`ff_strcat`::" msgstr "다음은 :ref:`ff_strcat` 대신 :ref:``ff_make_url_extended`` 함수를 사용해 같은 URL을 만든 예이다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:669 msgid "" "Open a book details window on a book in some library. The syntax for this " "URL is::" msgstr "어떤 라이브러리의 특정 책에 대한 책 정보 창을 연다. 이 URL의 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:673 msgid "An example template is::" msgstr "예시 템플릿은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:677 #: ../../../__w/calibre/calibre/manual/template_lang.rst:694 msgid "which produces the URL::" msgstr "이 템플릿은 다음 URL을 만든다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:681 msgid "" "Open the notes associated with an author/series/etc. The syntax of the URL " "is::" msgstr "저자/시리즈 등의 값에 연결된 노트를 연다. 이 URL의 문법은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:686 msgid "" "``Field_Name`` is the lookup name of the field. If the field is a custom " "column then replace the ``#`` character with an underscore (``_``). " "``Item_Id`` is the internal numeric ID of the value in the field. There " "isn't a template function that returns the ``Item_Id``, so templates will " "normally use the second form, ``Hex_Encoded_Item_Name``. Here is a sample " "template that opens the note for the person ``Boy-Żeleński, Tadeusz`` in the" " field ``#authtest``::" msgstr "``Field_Name``은 필드의 lookup name이다. 필드가 사용자 정의 열이면 ``#`` 문자를 밑줄(``_``)로 바꿔야 한다. ``Item_Id``는 그 필드 값의 내부 숫자 ID이다. ``Item_Id``를 반환하는 템플릿 함수는 없으므로, 템플릿에서는 보통 두 번째 형식인 ``Hex_Encoded_Item_Name``을 사용한다. 다음은 ``#authtest`` 필드에서 ``Boy-Żeleński, Tadeusz``의 노트를 여는 예시 템플릿이다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:700 msgid "Stored templates" msgstr "저장된 템플릿" #: ../../../__w/calibre/calibre/manual/template_lang.rst:702 msgid "" "Both :ref:`General Program Mode ` and :ref:`Python Template " "Mode ` support saving templates and calling those templates " "from another template, much like calling stored functions. You save " "templates using :guilabel:`Preferences->Advanced->Template functions`. More " "information is provided in that dialog. You call a template the same way you" " call a function, passing positional arguments if desired. An argument can " "be any expression. Examples of calling a template, assuming the stored " "template is named ``foo``:" msgstr ":ref:`General Program Mode `와 :ref:`Python Template Mode `는 모두 템플릿을 저장하고 다른 템플릿에서 마치 저장된 함수처럼 그 템플릿을 호출하는 기능을 지원한다. 템플릿은 :guilabel:`환경설정->고급->템플릿 함수`에서 저장한다. 자세한 정보는 해당 대화상자에 나와 있다. 템플릿 호출은 함수 호출과 동일하게 하며, 필요하면 위치 인수를 전달할 수 있다. 인수는 어떤 식이든 될 수 있다. 저장된 템플릿 이름이 ``foo``라고 가정할 때의 호출 예는 다음과 같다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:704 msgid "``foo()`` -- call the template passing no arguments." msgstr "``foo()`` -- 인수 없이 템플릿을 호출한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:705 msgid "" "``foo(a, b)`` call the template passing the values of the two variables " "``a`` and ``b``." msgstr "``foo(a, b)`` -- 두 변수 ``a``와 ``b``의 값을 인수로 전달하며 템플릿을 호출한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:706 msgid "" "``foo(if field('series') then field('series_index') else 0 fi)`` -- if the " "book has a ``series`` then pass the ``series_index``, otherwise pass the " "value ``0``." msgstr "``foo(if field('series') then field('series_index') else 0 fi)`` -- 책에 ``series``가 있으면 ``series_index``를 전달하고, 그렇지 않으면 값 ``0``을 전달한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:708 msgid "" "In GPM you retrieve the arguments passed in the call to the stored template " "using the ``arguments`` function. It both declares and initializes local " "variables, effectively parameters. The variables are positional; they get " "the value of the parameter given in the call in the same position. If the " "corresponding parameter is not provided in the call then ``arguments`` " "assigns that variable the provided default value. If there is no default " "value then the variable is set to the empty string. For example, the " "following ``arguments`` function declares 2 variables, ``key``, " "``alternate``::" msgstr "GPM에서는 ``arguments`` 함수를 사용해 저장된 템플릿 호출 시 전달된 인수를 가져온다. 이 함수는 지역 변수를 선언하고 초기화하므로 사실상 매개변수 역할을 한다. 변수는 위치 기반이며, 호출에서 같은 위치에 전달된 매개변수 값을 받는다. 해당 매개변수가 전달되지 않았으면 ``arguments``는 그 변수에 제공된 기본값을 할당한다. 기본값도 없다면 빈 문자열이 설정된다. 예를 들면::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:712 msgid "Examples, again assuming the stored template is named ``foo``:" msgstr "예, 다시 저장된 템플릿 이름이 ``foo``라고 가정하면:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:714 msgid "" "``foo('#myseries')`` -- argument ``key`` is assigned the value " "``'myseries'`` and the argument ``alternate`` is assigned the default value " "``'series'``." msgstr "``foo('#myseries')`` -- 인수 ``key``에는 값 ``'myseries'``가 할당되고, 인수 ``alternate``에는 기본값 ``'series'``가 할당된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:715 msgid "" "``foo('series', '#genre')`` the variable ``key`` is assigned the value " "``'series'`` and the variable ``alternate`` is assigned the value " "``'#genre'``." msgstr "``foo('series', '#genre')`` -- 변수 ``key``에는 값 ``'series'``가, 변수 ``alternate``에는 값 ``'#genre'``가 할당된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:716 msgid "" "``foo()`` -- the variable ``key`` is assigned the empty string and the " "variable ``alternate`` is assigned the value ``'series'``." msgstr "``foo()`` -- 변수 ``key``에는 빈 문자열이, 변수 ``alternate``에는 값 ``'series'``가 할당된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:718 msgid "" "In PTM the arguments are passed in the ``arguments`` parameter, which is a " "list of strings. There isn't any way to specify default values. You must " "check the length of the ``arguments`` list to be sure that the number of " "arguments is what you expect." msgstr "PTM에서는 인수가 ``arguments`` 매개변수로 전달되며, 이는 문자열 목록이다. 기본값을 지정하는 방법은 없다. ``arguments`` 목록 길이를 확인해 인수 개수가 기대한 것과 맞는지 직접 검사해야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:720 msgid "" "An easy way to test stored templates is using the ``Template tester`` " "dialog. For ease of access give it a keyboard shortcut in " ":guilabel:`Preferences->Advanced->Keyboard shortcuts->Template tester`. " "Giving the ``Stored templates`` dialog a shortcut will help switching more " "rapidly between the tester and editing the stored template's source code." msgstr "저장된 템플릿을 쉽게 시험하는 방법은 ``Template tester`` 대화상자를 사용하는 것이다. 쉽게 접근하려면 :guilabel:`환경설정->고급->키보드 단축키->Template tester`에서 단축키를 지정하라. ``Stored templates`` 대화상자에도 단축키를 지정하면 테스터와 저장된 템플릿 소스 편집 사이를 더 빠르게 오갈 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:723 msgid "Providing additional information to templates" msgstr "템플릿에 추가 정보 제공하기" #: ../../../__w/calibre/calibre/manual/template_lang.rst:725 msgid "" "A developer can choose to pass additional information to the template " "processor, such as application-specific book metadata or information about " "what the processor is being asked to do. A template can access this " "information and use it during the evaluation." msgstr "개발자는 응용프로그램별 책 메타데이터나 프로세서가 수행해야 하는 작업 같은 추가 정보를 템플릿 처리기에 전달하도록 선택할 수 있다. 템플릿은 이 정보에 접근하여 평가 중에 사용할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:727 msgid "**Developer: how to pass additional information**" msgstr "**개발자: 추가 정보를 전달하는 방법**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:729 msgid "" "The additional information is a Python dictionary containing pairs " "``variable_name: variable_value`` where the values must be strings. The " "template can access the dictionary, creating template local variables named " "``variable_name`` containing the value ``variable_value``. The user cannot " "change the name so it is best to use names that won't collide with other " "template local variables, for example by prefixing the name with an " "underscore." msgstr "추가 정보는 ``variable_name: variable_value`` 쌍을 담은 Python 사전이며, 값은 문자열이어야 한다. 템플릿은 이 사전에 접근하여 ``variable_name``이라는 이름의 지역 변수를 만들고 그 값으로 ``variable_value``를 넣을 수 있다. 사용자는 그 이름을 바꿀 수 없으므로, 다른 템플릿 지역 변수와 충돌하지 않도록 앞에 밑줄을 붙이는 등 안전한 이름을 쓰는 것이 좋다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:731 msgid "" "This dictionary is passed to the template processor (the ``formatter``) " "using the named parameter ``global_vars=your_dict``. The full method " "signature is::" msgstr "이 사전은 이름 있는 매개변수 ``global_vars=your_dict``를 사용해 템플릿 처리기(``formatter``)에 전달된다. 전체 메서드 시그니처는 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:739 msgid "**Template writer: how to access the additional information**" msgstr "**템플릿 작성자: 추가 정보에 접근하는 방법**" #: ../../../__w/calibre/calibre/manual/template_lang.rst:741 msgid "" "You access the additional information (the ``globals`` dictionary) in a " "template using the template function::" msgstr "템플릿에서는 다음 템플릿 함수를 사용해 추가 정보(``globals`` 사전)에 접근한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:745 msgid "" "where ``id`` is any legal variable name. This function checks whether the " "additional information provided by the developer contains the name. If it " "does then the function assigns the provided value to a template local " "variable with that name. If the name is not in the additional information " "and if an ``expression`` is provided, the ``expression`` is evaluated and " "the result is assigned to the local variable. If neither a value nor an " "expression is provided, the function assigns the empty string (``''``) to " "the local variable." msgstr "여기서 ``id``는 합법적인 변수 이름이면 무엇이든 된다. 이 함수는 개발자가 제공한 추가 정보에 해당 이름이 있는지 확인한다. 있다면 제공된 값을 같은 이름의 템플릿 지역 변수에 할당한다. 그 이름이 추가 정보에 없고 ``expression``이 제공되면 그 식을 평가한 결과를 지역 변수에 할당한다. 값도 식도 없으면 이 함수는 지역 변수에 빈 문자열을 할당한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:747 msgid "" "A template can set a value in the ``globals`` dictionary using the template " "function::" msgstr "템플릿은 다음 템플릿 함수를 사용해 ``globals`` 사전에 값을 설정할 수 있다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:751 msgid "" "This function sets the ``globals`` dictionary key:value pair ``id:value`` " "where ``value`` is the value of the template local variable ``id``. If that " "local variable doesn't exist then ``value`` is set to the result of " "evaluating ``expression``." msgstr "이 함수는 ``globals`` 사전에 ``id:value`` 키:값 쌍을 설정한다. 여기서 ``value``는 템플릿 지역 변수 ``id``의 값이다. 해당 지역 변수가 존재하지 않으면 ``expression``을 평가한 결과가 ``value``로 사용된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:754 msgid "Notes on the difference between modes" msgstr "모드 간 차이점에 대한 참고" #: ../../../__w/calibre/calibre/manual/template_lang.rst:756 msgid "" "The three program modes, :ref:`Single Function Mode ` (SFM), " ":ref:`Template Program Mode ` (`TPM`), and :ref:`General " "Program Mode ` (`GPM`), work differently. SFM is intended to " "be 'simple' so it hides a lot of programming language bits." msgstr "세 가지 프로그램 모드, 즉 :ref:`Single Function Mode `(SFM), :ref:`Template Program Mode `(`TPM`), :ref:`General Program Mode `(`GPM`)는 서로 다르게 동작한다. SFM은 '단순함'을 목표로 하기 때문에 프로그래밍 언어의 많은 요소를 숨긴다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:758 msgid "Differences:" msgstr "차이점:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:760 msgid "" "In SFM the value of the column is always passed as an 'invisible' first " "argument to a function included in the template." msgstr "SFM에서는 열의 값이 템플릿에 포함된 함수의 첫 번째 인수로 항상 '보이지 않게' 전달된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:761 msgid "" "SFM doesn't support the difference between variables and strings; all values" " are strings." msgstr "SFM은 변수와 문자열의 차이를 지원하지 않으며, 모든 값은 문자열이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:762 msgid "" "The following SFM template returns either the series name or the string \"no" " series\"::" msgstr "다음 SFM 템플릿은 시리즈 이름 또는 문자열 \"no series\"를 반환한다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:766 msgid "The equivalent template in `TPM` is ::" msgstr "`TPM`에서 이에 해당하는 템플릿은 다음과 같다 ::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:770 msgid "The equivalent template in `GPM` is::" msgstr "`GPM`에서 이에 해당하는 템플릿은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:774 msgid "" "The first argument to ``ifempty`` is the value of the field ``series``. The " "second argument is the string ``no series``. In SFM the first argument, the " "value of the field, is automatically passed (the invisible argument)." msgstr "``ifempty``의 첫 번째 인수는 ``series`` 필드의 값이다. 두 번째 인수는 문자열 ``no series``이다. SFM에서는 첫 번째 인수, 즉 필드 값이 자동으로 전달된다(보이지 않는 인수)." #: ../../../__w/calibre/calibre/manual/template_lang.rst:775 msgid "" "Several template functions, for example ``booksize()`` and " "``current_library_name()``, take no arguments. Because of the 'invisible " "argument' you cannot use these functions in SFM." msgstr "``booksize()`` 및 ``current_library_name()``처럼 인수를 받지 않는 템플릿 함수도 여럿 있다. 하지만 '보이지 않는 인수' 때문에 이런 함수는 SFM에서 사용할 수 없다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:776 msgid "" "Nested functions, where a function calls another function to compute an " "argument, cannot be used in SFM. For example this template, intended to " "return the first 5 characters of the series value uppercased, won't work in " "SFM::" msgstr "한 함수가 다른 함수를 호출해 인수를 계산하는 중첩 함수는 SFM에서 사용할 수 없다. 예를 들어 시리즈 값을 대문자로 바꾼 뒤 처음 5글자만 반환하려는 다음 템플릿은 SFM에서 동작하지 않는다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:780 msgid "" "`TPM` and `GPM` support nested functions. The above template in `TPM` would " "be::" msgstr "`TPM`과 `GPM`은 중첩 함수를 지원한다. 위의 템플릿을 `TPM`으로 쓰면 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:784 msgid "In `GPM` it would be::" msgstr "`GPM`에서는 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:788 msgid "" "As noted in the above :ref:`Template Program Mode ` section, " "using ``{`` and ``}`` characters in `TPM` string literals can lead to errors" " or unexpected results because they confuse the template processor. It tries" " to treat them as template boundaries, not characters. In some but not all " "cases you can replace a ``{`` with ``[[`` and a ``}`` with `]]`. Generally, " "if your program contains ``{`` and ``}`` characters then you should use " "`General Program Mode`." msgstr "위 :ref:`Template Program Mode ` 절에서 언급했듯이, `TPM` 문자열 리터럴 안에서 ``{`` 와 ``}`` 문자를 사용하면 템플릿 처리기가 이를 문자 대신 템플릿 경계로 취급하려 하기 때문에 오류나 예상치 못한 결과가 날 수 있다. 경우에 따라 ``{``를 ``[[``로, ``}``를 `]]`로 바꿀 수 있지만 항상 되는 것은 아니다. 일반적으로 프로그램에 ``{`` 와 ``}`` 문자가 포함되어 있다면 `General Program Mode`를 사용해야 한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:792 msgid "User-defined Python template functions" msgstr "사용자 정의 Python 템플릿 함수" #: ../../../__w/calibre/calibre/manual/template_lang.rst:794 msgid "" "You can add your own Python functions to the template processor. Such " "functions can be used in any of the three template programming modes. The " "functions are added by going to :guilabel:`Preferences -> Advanced -> " "Template functions`. Instructions are shown in that dialog. Note that you " "can use `Python Templates` for a similar purpose. As calling user-defined " "functions is faster than calling a Python template, user-defined functions " "might be more efficient depending on the complexity of what the function or " "template does." msgstr "사용자는 템플릿 처리기에 자신만의 Python 함수를 추가할 수 있다. 이런 함수는 세 가지 템플릿 프로그래밍 모드 어디에서나 사용할 수 있다. 함수는 :guilabel:`환경설정 -> 고급 -> 템플릿 함수`로 가서 추가한다. 해당 대화상자에 지침이 표시된다. 비슷한 목적으로 `Python Templates`를 사용할 수도 있다. 사용자 정의 함수 호출은 Python 템플릿 호출보다 빠르므로, 작업 복잡도에 따라 더 효율적일 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:797 msgid "Special notes for using templates in different contexts" msgstr "서로 다른 문맥에서 템플릿을 사용할 때의 특별 참고사항" #: ../../../__w/calibre/calibre/manual/template_lang.rst:799 msgid "" "In the GUI (:guilabel:`Columns made from other columns` and " ":guilabel:`Template searches`):" msgstr "GUI에서(:guilabel:`다른 열로부터 만들어진 열` 및 :guilabel:`템플릿 검색`):" #: ../../../__w/calibre/calibre/manual/template_lang.rst:801 msgid "GPM templates work as before." msgstr "GPM 템플릿은 이전과 같이 동작한다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:802 msgid "Python templates have full access to the calibre database." msgstr "Python 템플릿은 calibre 데이터베이스에 완전히 접근할 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:804 msgid "In icon rules:" msgstr "아이콘 규칙에서:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:806 msgid "" "icon rule templates have no book data so field-based functions such as " ":ref:`ff_format_date_field`, :ref:`ff_list_count_field`, and " ":ref:`ff_check_yes_no` won't work." msgstr "아이콘 규칙 템플릿에는 책 데이터가 없으므로 :ref:`ff_format_date_field`, :ref:`ff_list_count_field`, :ref:`ff_check_yes_no` 같은 필드 기반 함수는 동작하지 않는다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:808 msgid "In the Content server:" msgstr "콘텐츠 서버에서:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:810 msgid "" "Templates have access to the new API but not the old API (LibraryDatabase)." msgstr "템플릿은 새 API에는 접근할 수 있지만 이전 API(LibraryDatabase)에는 접근할 수 없다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:811 msgid "" "Because of the above, the following formatter functions are not guaranteed " "to work in GPM templates (composite columns, icon rules, etc) and should be " "avoided if you use the content server:" msgstr "위 이유로 인해 다음 formatter 함수들은 GPM 템플릿(합성 열, 아이콘 규칙 등)에서 정상 동작이 보장되지 않으므로 콘텐츠 서버를 사용할 경우 피해야 한다:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:813 msgid ":ref:`ff_connected_device_name`" msgstr ":ref:`ff_connected_device_name`" #: ../../../__w/calibre/calibre/manual/template_lang.rst:814 msgid ":ref:`ff_connected_device_uuid`" msgstr ":ref:`ff_connected_device_uuid`" #: ../../../__w/calibre/calibre/manual/template_lang.rst:815 msgid ":ref:`ff_current_virtual_library_name`" msgstr ":ref:`ff_current_virtual_library_name`" #: ../../../__w/calibre/calibre/manual/template_lang.rst:816 msgid ":ref:`ff_is_marked`" msgstr ":ref:`ff_is_marked`" #: ../../../__w/calibre/calibre/manual/template_lang.rst:817 msgid ":ref:`ff_virtual_libraries`" msgstr ":ref:`ff_virtual_libraries`" #: ../../../__w/calibre/calibre/manual/template_lang.rst:820 msgid "Special notes for save/send templates" msgstr "저장/전송 템플릿에 대한 특별 참고사항" #: ../../../__w/calibre/calibre/manual/template_lang.rst:822 msgid "" "Special processing is applied when a template is used in a :guilabel:`Save " "to disk` or :guilabel:`Send to device` template. The values of the fields " "are cleaned, replacing characters that are special to file systems with " "underscores, including slashes. This means that field text cannot be used to" " create folders. However, slashes are not changed in prefix or suffix " "strings, so slashes in these strings will cause folders to be created. " "Because of this, you can create variable-depth folder structure." msgstr "템플릿을 :guilabel:`디스크에 저장` 또는 :guilabel:`기기로 보내기` 템플릿으로 사용할 때는 특별한 처리가 적용된다. 필드 값은 슬래시를 포함해 파일 시스템에서 특별한 의미를 가진 문자를 밑줄로 바꾸는 방식으로 정리된다. 즉, 필드 텍스트로 폴더를 만들 수 없다. 그러나 접두사/접미사 문자열의 슬래시는 바뀌지 않으므로, 이 문자열에 슬래시가 있으면 폴더가 생성된다. 이 점을 이용하면 시리즈 정보나 사용자 정의 열 값을 기준으로 가변 깊이의 폴더 구조를 만들 수 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:824 msgid "" "For example, assume we want the folder structure `series/series_index - " "title`, with the caveat that if series does not exist, then the title should" " be in the top folder. The template to do this is::" msgstr "예를 들어 `series/series_index - title`이라는 폴더 구조를 원한다고 하자. 단, 시리즈가 없으면 제목이 최상위 폴더에 있어야 한다. 이를 위한 템플릿은 다음과 같다::" #: ../../../__w/calibre/calibre/manual/template_lang.rst:828 msgid "The slash and the hyphen appear only if series is not empty." msgstr "슬래시와 하이픈은 series가 비어 있지 않을 때만 나타난다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:830 msgid "" "The lookup function lets us do even fancier processing. For example, assume " "that if a book has a series, then we want the folder structure " "`series/series index - title.fmt`. If the book does not have a series then " "we want the folder structure `genre/author_sort/title.fmt`. If the book has " "no genre then we want to use 'Unknown'. We want two completely different " "paths, depending on the value of series." msgstr "lookup 함수를 사용하면 더 복잡한 처리도 가능하다. 예를 들어 책에 시리즈가 있으면 `series/series index - title.fmt` 구조를 원하고, 시리즈가 없으면 `genre/author_sort/title.fmt` 구조를 원한다고 하자. 장르도 없으면 'Unknown'을 사용하고 싶다. 즉, series 값에 따라 완전히 다른 두 경로를 사용하고 싶은 것이다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:832 msgid "To accomplish this, we:" msgstr "이를 위해 우리는:" #: ../../../__w/calibre/calibre/manual/template_lang.rst:834 msgid "" "Create a composite field (give it lookup name #aa) containing " "``{series}/{series_index} - {title}``. If the series is not empty, then this" " template will produce `series/series_index - title`." msgstr "``{series}/{series_index} - {title}``를 담는 합성 필드(lookup name은 #aa)를 만든다. 시리즈가 비어 있지 않으면 이 템플릿은 `series/series_index - title`을 만든다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:835 msgid "" "Create a composite field (give it lookup name #bb) containing " "``{#genre:ifempty(Unknown)}/{author_sort}/{title}``. This template produces " "`genre/author_sort/title`, where an empty genre is replaced with `Unknown`." msgstr "``{#genre:ifempty(Unknown)}/{author_sort}/{title}``를 담는 합성 필드(lookup name은 #bb)를 만든다. 이 템플릿은 `genre/author_sort/title`을 만들며, 비어 있는 장르는 `Unknown`으로 대체된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:836 msgid "" "Set the save template to ``{series:lookup(.,#aa,#bb)}``. This template " "chooses composite field ``#aa`` if series is not empty and composite field " "``#bb`` if series is empty. We therefore have two completely different save " "paths, depending on whether or not `series` is empty." msgstr "저장 템플릿을 ``{series:lookup(.,#aa,#bb)}``로 설정한다. 이 템플릿은 series가 비어 있지 않으면 합성 필드 ``#aa``를, 비어 있으면 합성 필드 ``#bb``를 선택한다. 따라서 `series`가 비어 있는지 여부에 따라 완전히 다른 두 저장 경로를 가지게 된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:839 msgid "Tips" msgstr "팁" #: ../../../__w/calibre/calibre/manual/template_lang.rst:841 msgid "" "Use the Template Tester to test templates. Add the tester to the context " "menu for books in the library and/or give it a keyboard shortcut." msgstr "Template Tester를 사용해 템플릿을 시험하라. 라이브러리의 책 문맥 메뉴에 테스터를 추가하거나 키보드 단축키를 지정해 두면 편리하다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:842 msgid "" "Templates can use other templates by referencing composite columns built " "with the desired template. Alternatively, you can use Stored Templates." msgstr "템플릿은 원하는 템플릿으로 만들어진 합성 열을 참조함으로써 다른 템플릿을 사용할 수 있다. 또는 Stored Templates를 사용할 수도 있다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:843 msgid "" "In a plugboard, you can set a field to empty (or whatever is equivalent to " "empty) by using the special template ``{}``. This template will always " "evaluate to an empty string." msgstr "플러그보드에서는 특수 템플릿 ``{}``를 사용해 필드를 빈 값(또는 빈 값에 해당하는 값)으로 설정할 수 있다. 이 템플릿은 항상 빈 문자열로 평가된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:844 msgid "" "The technique described above to show numbers even if they have a zero value" " works with the standard field series_index." msgstr "위에서 설명한, 값이 0이어도 숫자를 표시하는 기법은 표준 필드 series_index에도 적용된다." #: ../../../__w/calibre/calibre/manual/template_lang.rst:849 msgid "Template function reference" msgstr "템플릿 기능 참조"