Warning, /graphics/krita/plugins/python/comics_project_management_tools/README.md is written in an unsupported language. File is not indexed.
0001 0002 0003 Comics Project Management Tools 0004 =============================== 0005 0006 This is the Comics Project Management Tools python plugin for Krita. 0007 0008 CPMT aims to simplify comics creation by: 0009 0010 * Giving the artist a way to organize and quickly access their pages. 0011 * Helping the artist(s) deal with the boring bits meta data bits of a comic project by giving a meta-data editor that gives suggestions, explanation and occasionally a dab of humor. 0012 * Making export set-and-forget type of affair where a single click can export to multiple formats with proper meta-data. 0013 0014 Export-wise, CPMT aims to support: 0015 0016 Advanced Comic Book Format 0017 : An open comics format that has detailed markup as well as support for translations. 0018 0019 CBZ 0020 : the most popular comic file format, with the following meta-data schemes: 0021 0022 * ACBF - as above. 0023 * CoMet.xml 0024 * ComicBookInfo (Spec is unclear so not 100% certain) 0025 * ComicInfo.xml(Comic Rack) 0026 0027 Epub 0028 : The epub publishing format. Not the most ideal format for handling comics, but most readers can open epub. 0029 0030 Usage - quick-start guide: 0031 ------------------------- 0032 0033 First, get the comic manager docker(settings → dockers → comic Management Docker). There, select *New Project*. 0034 0035 It will show a dialog asking for: 0036 0037 The project directory. 0038 : This is where everything will be written to. 0039 0040 Concept 0041 : so a simple sentence explaining what you want to write the comic about. This concept is just for you. 0042 0043 Project name. 0044 : This is not the title, but more of a code name which will be used to create pages. For the impatient artist there is even a generator that produces code names. 0045 0046 Language 0047 : The main language, used for all the meta data. By default set to the system locale. 0048 0049 Make a new directory with the project name. 0050 : Whether to make a new project directory inside the selected directory. This allows you to have a generic comics directory that you always select and that CPMT will make directories named with the project name inside. 0051 0052 Pages 0053 : The name for the directory to store the pages. This is where new pages are placed. 0054 0055 Export 0056 : The name for the directory to store the export. This is where the comic will be exported to. 0057 0058 Templates 0059 : The name for the directory to store the template. This is where the page templates get stored. 0060 0061 It will also allow you to edit meta data if you'd want already, but this is not mandatory. 0062 0063 Then after you finish, select *Open Project*, go to the location where you have stored your comics project. There should be a "comicsConfig.json" file there, next to the new folders for the pages, templates and export. Open that. 0064 0065 Now, click *Add Page* to add your first page. You will get a dialog asking for the template. Here you can generate one, or import one. CPMT will remember this as the default one. 0066 0067 Double click the new page to open in Krita. 0068 0069 The second column in the docker allows you to see the "subject" line in the document info if it's filled in. 0070 0071 You can press the arrow next to *Add Page* to get more features, like *Add Existing Page*, *Remove Page*, or *Batch Resize*. 0072 0073 Usage - Meta Data 0074 ------------------ 0075 You can edit the meta data by clicking the dropdown next to *Project Settings* and selecting *Meta Data*. 0076 0077 There's quite a few fields here, because there's quite a few different types of meta data. Hover over the fields to get an idea of what needs to be typed. 0078 0079 The meta data is intended to be filled out over the course of the project, so don't worry too much if you cannot instantly think of what a certain entry should be. 0080 0081 The meta data fields have auto completion wherever sensible. You can add your own meta data fields as noted in the following section: 0082 0083 ### Adding extra auto-completion keys. 0084 First, you need to go to project settings, and there point the extra keys to a folder where extra keys can be found. 0085 0086 It will search that extra folder for the following folders: 0087 0088 * key_genre 0089 * key_format 0090 * key_rating 0091 * key_characters 0092 * key_author_roles 0093 * key_other 0094 0095 You can add extra auto-completion keys by adding a text file with each new key on a separate line to one of the "key" folders. The name of the text file doesn't matter. This way you can add characters by universe, or archive specific keywords by archive name. 0096 0097 So for example, the following file has three superhero names on different lines, nothing more, nothing less. 0098 0099 ``` 0100 Spider-Man 0101 Hawkeye 0102 Jean Grey 0103 ``` 0104 0105 When you then store it as marvel.txt put into the directory "key_characters", Krita will use the names from the list as suggestion for the character field in the meta-data. 0106 0107 The exception is the key_ratings, which uses CSV files, using the top row to determine the title, and then has the rating in the first column, and the description on the second. This allows the description to show up as tool-tips. 0108 0109 ### The Author list 0110 The author list is a table containing all the authors of the project. It allows a distinction between given, family, middle and nickname, as well as role, email and homepage. 0111 0112 You can rearrange the author list by drag and dropping the number at the left, as well as adding and removing authors. 0113 0114 Adding an author will always add "John Doe". You can double click the names and cells to change their contents. For the role, there are auto completion keys, so to encourage using standardized ways to describe their roles. 0115 0116 In the main docker, there's an option under the pages actions called *Scrape Authors*, this will make the comics project docker search the pages in the pages list for author info and append that to the author list. It will not attempt to check for duplicates, so be sure to the list afterwards. 0117 0118 Usage - Project Settings 0119 ----------------------- 0120 The project settings allows you to change all the technical details of the project: 0121 0122 * the project name 0123 * the concept 0124 * the location of pages, export and templates 0125 * the default template. 0126 * the location of the extra auto-completion keys(see metadata) 0127 0128 Usage - Pages 0129 ------------- 0130 There's several other things you can do with pages. You can either access these feature by clicking the drop-down next to *Add Page* or right-clicking the pages list. 0131 0132 Adding pages 0133 : You can add pages by pressing the *Add Page* button. The first time you press this, it'll ask for a template. After you create or select a template it will use this as the default. You can set the default in the project settings. 0134 0135 Adding pages from template: 0136 : Adding pages from a template will always give the template dialog. This will allow you to have several different templates in the templates directory(it will show all the kra files in the templates directory), so that you can have spread, coverpages and other pages at your finger tips. The create template dialog will allow you to make a simple two layer image with a white background, and rulers for the bleeds and guides. Import template will copy selected templates to the template directory, keeping all the necessary files inside the comics project. 0137 0138 Remove a page 0139 : This allows you to remove the selected page in the list from the pages list. It does NOT delete the page from the disk. 0140 0141 Adding existing pages 0142 : This is for when you wish to add existing pages, either because you removed the page from the list, or because you already have a project going and wish to add the pages to the list. 0143 0144 Batch Resize 0145 : This will show a window with resize options. After selecting the right options, all the pages will be resized as such. A progress dialog will pop up showing you which pages have been done and how long it will take based on the passed time. 0146 0147 View Page in Window 0148 : This will pop up a dialog with the selected page's mergedimage.png. The dialog will update when doing this for the image of another page. This is so that you can have a quick reference for a single page in the event your other referencing tools cannot open kra files. 0149 0150 Scrape Authors 0151 : This searches all the files from the pages list for author information and adds that to the author list. It will not check for copies, so you will need to clean up the author list yourself. 0152 0153 Rearranging pages 0154 : You can rearrange pages by moving the number on the left of the page up or down. 0155 0156 Usage - Copy Location 0157 -------------------- 0158 Copy location, the button underneath the export button, allows you to copy the current project location to clipboard. Just press it, and paste somewhere else. This is useful when using multiple programs and reference tools and you just want to quickly navigate to the project directory. 0159 0160 Usage - Export 0161 -------------- 0162 CPMT will not allow export without any export methods set. 0163 0164 You can configure the export settings by going to the drop-down next to *Project Settings* and selecting *Export Settings*. 0165 0166 Here you can define... 0167 0168 * how much a page needs to be cropped 0169 * which layers to remove by layer color-label 0170 * to which formats to export, in what file-format and how to resize. 0171 0172 Once you've done that, press export. Krita will pop up a progress bar for you with the estimated time and progress, so you can estimate how long you will have to wait. 0173 0174 CPMT will store the resized files and meta data in separate folders in the export folder. This is so that you can perform optimization methods afterwards and update everything quickly. 0175 0176 ### ACBF ### 0177 0178 ACBF is the advanced comic book format. It is a metadata file that can hold extra data like panels and text, and can even store translations for the text. 0179 0180 Krita has some support for frames and text. If you name a vector layer "text" or "panels" it will search those for shapes. The shapes that are text nodes will be added to the ACBF file as a text in the main language of the comic, using the bounding box of the text-shape. The shapes that aren't text will have their bounding boxes used as frames. The order of frames and text is determined by the shape z-order in Krita, with the bottom shape being the first and the top shape being the last. 0181 0182 When you generate a CBZ file, the ACBF file will be generated alongside of it. There's in fact two ACBF files being generated: The one in the metadata folder is the ACBF file as it is inside the CBZ. The other ACBF file, next to the CBZ is the standalonefile. This file has the pages embedded, but there's currently fewer viewers who can read it. 0183 0184 To fine tune the export to ACBF, you can go to file->document Information and add the following keywords: 0185 0186 acbf_title 0187 : this will flag this page to be used as a table of contents bookmark inside ACBF. The content mark will use the "title" value in the document information to create a bookmark in the project language. 0188 0189 acbf_none 0190 : Sets the page transition value to "none" explicitly. 0191 0192 acbf_fade 0193 : Sets the page transition to fade. Viewers that support it will fade to black into this page. 0194 0195 acbf_blend 0196 : Sets the page transition to blend. Viewers that support it will fade the previous page to this one. 0197 0198 acbf_horizontal 0199 : Sets the page transition to scroll_right. Viewers that support it will scroll right to a new page. 0200 0201 acbf_vertical 0202 : Sets the page transition to scroll_down. Viewers that support it will scroll down to a new page. 0203 0204 TODO: 0205 ====== 0206 Things I still want to do: 0207 0208 * Krita: 0209 - Generate text from the author list. (Requires text api) 0210 * clean up path relativeness. (Not sure how much better this can be done) 0211 * Make label removal just a list? (unsure) 0212 * PNG and JPEG export settings. 0213 * maybe use python minidom for acbf(or export in general), because then we can create a prettier xml file, which is necessary for helping people edit the files in question. [partially done, epub still needs this] 0214 0215 ACBF list: 0216 0217 * support getting text info from the vector layers. [Partially done] 0218 - Don't forget text-rotation(Needs API) 0219 - Probably also support acbf_order[n], where n is used to be the definitive value of the order. 0220 - Text class battle plan: 0221 1. Support title and desc in vector shapes(c++) 0222 2. Support editing them from a right-click "properties" window. 0223 3. Support getting those values from python. 0224 4. have acbf_textclass read from the desc. 0225 - Jump: probably not gonna support this. 0226 - text url anchors: only used for references. 0227 - Font embedding: spec is super vague about this. (Not possible with QT)