|
| 1 | +# Plotline |
| 2 | + |
| 3 | +Plotline is an application to assist in the creation of a novel. While this does |
| 4 | +not fully replace the old-school P&P (pencil & paper) method, it is nice to have |
| 5 | +everything in one place. Some of the [planned] features include: |
| 6 | + |
| 7 | +- Planning the novel plot arc, form inciting incident to the climax. |
| 8 | +- Adding characters, with prompts for character biographies. |
| 9 | +- Creating plotlines for the novel, and assigning characters as part of the |
| 10 | + plotlines. |
| 11 | +- Adding scenes to the novel to plan out exactly how the novel will work out. |
| 12 | +- Best feature: a full-fleged editor, with markdown syntax highlighting support |
| 13 | + and a distraction-free mode. |
| 14 | +- Better feature: binding the novel content into a various format, ebook or |
| 15 | + otherwise. |
| 16 | + |
| 17 | +## Current State |
| 18 | + |
| 19 | +The back-end works fine and passes all tests. If someone wants to go for more |
| 20 | +test coverage I wouldn't complain. |
| 21 | + |
| 22 | +After a revamp to refactor the code into the seperate tab frames I've been |
| 23 | +reconnecting the signals. The basic theory looks like this: |
| 24 | + |
| 25 | + [Main App, *novel] |
| 26 | + | |
| 27 | + +---------+--------+-----------+-----------+ |
| 28 | + | | | | | |
| 29 | + Novel Character Plotline Scene Chapter |
| 30 | + Frame Frame Frame frame frame |
| 31 | + [*novel] [*novel] [*novel] [*novel] [*novel] |
| 32 | + |
| 33 | +Each frame will contain a pointer to the currently-opened novel stored in the |
| 34 | +pointer `novel`. Each frame corresponds to the named backend class, so |
| 35 | +`NovelFrame` is the view for the `Novel` class, `CharacterFrame` is the view for |
| 36 | +the `Character` class and so-on. |
| 37 | + |
| 38 | +Each frame is a subclass `PlotlineAppFrame`, which inherits the signal |
| 39 | +`novelModified()` (which will notify the `MainWindow` when a change occurs) |
| 40 | +and the slots `noNovelLoad()` (which will update the frame fields when a new |
| 41 | +novel is loaded) and `onNovelNew()` (which will clear the frame's fields). |
| 42 | + |
| 43 | +## Getting a Development Environment Set Up |
| 44 | + |
| 45 | +### Getting Qt |
| 46 | + |
| 47 | +Plotline was developed in Qt, a C++ applicaiton framework. If you're new to Qt, |
| 48 | +now is the best time to learn! |
| 49 | + |
| 50 | +Side note: if you're new to Qt, Qt doesn't use a conventional build system like |
| 51 | +CMake or Make. Instead, it uses QMake, which generates the Make files and meta |
| 52 | +objects. So if you try to load the project in KDevelop or Eclipse or try to |
| 53 | +compile on the command line it might get kind of frustrating. QtCreator was used |
| 54 | +to develop this application, and that's what I would recommend. |
| 55 | + |
| 56 | +Okay, back to set-up. |
| 57 | + |
| 58 | +First thing's first, you'll need to install Qt5. Either install it with your |
| 59 | +distribution's package manager (in the case of Linux) or download from |
| 60 | +[Qt.io](http://www.qt.io/) and install that way. |
| 61 | + |
| 62 | +### Getting the source. |
| 63 | + |
| 64 | +Installing Qt should have also installed QtCreator. Open QtCreator and go to |
| 65 | +**File > New File or Project > Import Project > Git Clone**. In *Repository* |
| 66 | +enter `https://github.com/plotline.git`. Check **Recursive** --this will import |
| 67 | +submodules. If the current version doesn't have submodules, most likely others |
| 68 | +will. |
| 69 | + |
| 70 | +#### Command line |
| 71 | + |
| 72 | +Alternatively, if you're a command-line mastro, you can git clone the |
| 73 | +repository: |
| 74 | + |
| 75 | + $ git clone https://github.com/plotline.git |
| 76 | + $ cd plotline |
| 77 | + $ git submodule init |
| 78 | + $ git submdoule sync |
| 79 | + |
| 80 | +And then open the project with **File > Open File or Project**, and open the |
| 81 | +Project (`.pro`) file. |
| 82 | + |
| 83 | + |
| 84 | +### Important!!! Set the Library path |
| 85 | + |
| 86 | +One more thing needs to be attended to. The core application code (in **lib** ) |
| 87 | +is a static library in order to allow linking with either the **test** |
| 88 | +subproject or the **app** subproject. |
| 89 | + |
| 90 | +To add this path to the library, go to the **Projects** tab along the lefthand |
| 91 | +side of QtDesigner. Up at the top click on the **Run** tab. Expand the |
| 92 | +**Environment** section and modify the `LD_LIBRARY_PATH` variable to append the |
| 93 | +path `../lib/`. For example, if the original value was |
| 94 | + |
| 95 | + /usr/lib/x86_64-linux-gnu/ |
| 96 | + |
| 97 | +Modify the value to look like this: |
| 98 | + |
| 99 | + /usr/lib/x86_64-linux-gnu/:../lib/ |
| 100 | + |
| 101 | +Remember, `:` means "append" in make. ;-) |
| 102 | + |
| 103 | +Do the same for the other subprojects by selecting the run button (that looks |
| 104 | +like this: |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +) |
0 commit comments