Emacs with Fountain Mode

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Centos
    replied
    Re: Emacs with Fountain Mode

    And now fountain-mode 3.0.x supports 'afterwriting, wrap, screenplain and... whatever, directly from within Emacs. It's on its way to being a full-fledged screenplay application.

    Here's a one minute video of this new feature. Here I used 'afterwriting to export to standard PDF and then a PDF with bold headings. I could have (should have) used the Fountain Menu for this video, but I'm used to using the keystrokes (Ctrl+c Ctrl+e to export and Ctrl+c Ctrl+v to view). I also typed in the profile names "after" and "afterb" but found out later I could just use the down arrow and "walk through" the choices.

    https://drive.google.com/file/d/1en_...ew?usp=sharing

    Leave a comment:


  • Centos
    replied
    Re: Emacs with Fountain Mode

    Originally posted by ComicBent View Post
    Yeah, I do a lot of that, too.

    Except that I am writing a book, so I guess that counts as something.
    I wasn't referring to you. You're actually in the business of fixing scripts. I'm just in the "business" of messing around with applications and writing about it. I'm having fun though. I've streamlined my scripts a little more (set up a list of Fountain files to choose from and then open both the Fountain file in both Emacs and Atril at the same time). The new script is named...

    emfx ("em" Emacs, "f" fountain and "x" for xreader, even though I now use Atril (which is basically the same thing))

    Here's a little video of it (again using my little $22 (or so) laptop.

    https://drive.google.com/file/d/1JoX...view?usp=shari

    Leave a comment:


  • ComicBent
    replied
    Re: Emacs with Fountain Mode

    Centos: (This is what people do who can't write... they write about writing and the tools involved in writing.)
    Yeah, I do a lot of that, too.

    Except that I am writing a book, so I guess that counts as something.

    Leave a comment:


  • Centos
    replied
    Re: Emacs with Fountain Mode

    Writing in Fountain-Mode with Emacs (refined)

    (I picked up an ancient laptop (Dell Latitude D430) on Shop Goodwill (shopgoodwill.com) for $8 (plus s/h), added a GB of memory for $7.50 (now maxed out at a "whopping 2 GBs!) and picked a 60 GB Zif hard drive (what they used to use in the Apple iPods) for $8. Installed Linux Mint Mate 19.3 (newest version) on it and am having fun making it into a "writing" (screwing around) laptop. What I like about it is that's very small. At any rate, you don't have to spend much to get a good writing computer - this one also has Trelby, KIT Scenarist, and (currently) the Demo version of Fade In Pro installed and all work fine on it. Even though this computer shipped in 2008, it's still 64 bit.)

    As I continue to "refine" my Emacs Fountain Syntax process, I'm finding I like it more and more. I've added and enhanced my Shell Scripts to help streamline the process. It produces high quality PDFs.

    At this point I start with the following command from a terminal...

    source emf

    ...Which runs the following shell script, line by line. (I use "source" because I want the terminal to automatically close after it opens Emacs, which won't happen if you just run the script.)

    Code:
    #!/bin/bash  
    cd ~/Documents/scripts
    clear
    lst lfount
    read -p 'file: ' uservar
    em $uservar 2> errors.txt &
    exit
    The first line identifies the file as a bash script.

    The second line moves to the scripts directory.

    The third line clears the screen (so the directory will display at the top of the page).

    The fourth line calls another shell script lst, which I use for listing files in my scripts directory. It's a shell script that uses a case function. I use this script all the time, it allows me to keep all my screenplay related files in one directory and quickly sort them by extension. "lfont" is short for "long fountain" (which means it uses the "long directory" format). It also sorts by newest files on top. Here's a portion of the shell script...

    Code:
    #!/bin/bash  
    clear
    cd ~/Documents/scripts
    while :
    do
      case $1 in
        fount)
          clear
          echo '---------------------'
          ls *.fountain
          echo '---------------------'
          break
          ;; 
        lfount)
          clear
          echo '---------------------'
          ls -lt *.fountain
          echo '---------------------'
          break
          ;;
        trelby)
          clear
          echo '---------------------'
          ls *.trelby
          echo '---------------------'
          break
          ;;
    ...
    I could just type the command "ls -lt *.fountain" but I don't see why as its easier to just call the lst shell script.

    The fifth line prompts you for a file name and assigns it to the uservar variable.

    The sixth line uses another script, em, which starts emacs using the specified file. I use this on its own as well. For example, I can type...

    source em challenge

    ...and the script will open the "challenge.fountain" in Emacs. The shell script provides the ".fountain" extension. Here's the em script.

    Code:
    #!/bin/bash  
    cd ~/Documents/scripts
    emacs $1".fountain" 2> errors.txt &
    exit
    Certain X Window applications throw errors when started in a terminal, that's what the ">2 errors.txt" takes care of. It "pipes" the errors to a file instead of displaying them on the screen. The "&" tells the terminal to release the application and let you run something else (in this case, "exit").

    Line seven (exit) closes the terminal so you don't have that hanging around in the background.

    And that's it for getting the fountain file into Emacs. (Emacs automatically opens in Fountain-Mode if you use the fountain extension.) Once there you'll want to print to and display PDF, and that takes another shell script.

    source wrxr filename

    This script does two things. It uses wrap to convert a Fountain file to a PDF, then it opens the file in Atril (the PDF viewer available in Linux Mint). You can keep this PDF on screen for testing your script every now an then. Since the terminal has a history feature, you just hit the up arrow when you want rerun the script. (You'll also need to save the file in Emacs before running this script, otherwise you won't see the changes. Emacs saves files withe the CTL-x CTL-s combination.)

    Here's the wrxr shell script (two scripts joined together, the one line (cd) is redundant)...

    Code:
    #!/bin/bash  
    cd ~/Documents/scripts
    wrap pdf $1".fountain"
    clear
    cd ~/Documents/scripts
    atril $1.pdf 2> errors.txt &
    exit
    Again, I use "source" so the terminal will close. It's not absolutely necessary. And that's it. The following video will show how well this works.

    (I open the terminal with the shortcut key combination, CTL+m. You never have to use the mouse, if you don't want to.)

    https://drive.google.com/file/d/1Ykn...ew?usp=sharing

    (This is what people do who can't write... they write about writing and the tools involved in writing.)

    Leave a comment:


  • Centos
    replied
    Re: Emacs with Fountain Mode

    Originally posted by ComicBent View Post
    Glad to hear that you are going to buy Fade In. You will not regret it.
    Awwk... Got your screen name wrong. Sorry. (Now corrected.) As for Fade In Pro, I figure if I'm going to talk about it I should at least have the full version. (Doesn't necessarily mean I'll use it, though, as I'm pretty happy with what I've got.) What I like about Fade In Pro is that it is small (like Trelby). Kit Scenarist is pretty big, and WriterSolo (the other full-featured Linux screenplay writing software) is big and clunky. It doesn't make PDFs with the proper fonts in Linux.

    Leave a comment:


  • ComicBent
    replied
    Re: Emacs with Fountain Mode

    Glad to hear that you are going to buy Fade In. You will not regret it.

    Leave a comment:


  • Centos
    replied
    Re: Emacs with Fountain Mode

    I've been messing around Emacs Fountain-Mode some more and wrote the following "review" of sorts. I really like it. (Something close to this has been posted on Reddit as well.)


    Emacs Fountain-Mode and the End of My Highland/Slugline Envy

    A couple (few?) years ago I found out about Fountain for writing screenplays have been intrigued ever since. I like writing in pure text using Jstar (where I'm writing this) so the idea that I could write screenplay format in a text editor seemed too good to be true.

    A few years later and I'm still plugging away at Fountain, I still like the concept and am generally happy with the process. I've moved from mostly using Screenplain and 'Afterwriting online to "transform" Fountain syntax into PDF to using CLI versions of Screenplain, 'Afterwriting and the relatively new, Wrap. Using shell scripts I can move from one to the other with little effort. 'Afterwriting gives me lots of options so I have eight separate shell scripts for it. Wrap has two, one script for Courier Prime, one for Courier Screenplay. Since Screenplain outputs plain jane Courier, I mostly use it for converting Fountain to HTML or Final Draft format. It works well for that.

    As an example, let's say I want a title page in an 'Afterwriting PDF, with bold, double-spaced sluglines — I would use this script...

    aftertdsb
    File: filename

    The script prompts me for the filename ("after" for 'afterwriting, "t" for title page, "ds" for double space headers and "b" for bold headers.) The shell script also knows to go to my scripts directory and it adds the ".fountain" extension (or PDF, or FDX or HTML, depending on what I'm doing and what shell script I'm using), so I don't have to type that in. Kind of nice.

    But, as much as I like writing in Jstar, it is a bit "draining" to retype the scene headings and character names every time. (Can also introduce new characters with slightly different spelling.) I've been customizing and revamping Trelby (the old standby) and figuring I might go that direction again. (Not that I can't use with Fountain with Trelby, which I do.) (Note to ComicBent, in a month (or so) I'm probably going to buy the Fade In Pro because (at the very least) I want to be able to compare it with my software in its non-demo form.)

    But everything just got better. I finally tried Emacs Fountain-Mode. I've avoided it because I thought "Emacs? I'm not a programmer." Turns out I don't have to be one (Emacs and Fountain-Mode are both in my Linux Mint repositories). It would probably help to know more about Emacs, but for the one thing I really want to use Fountain-Mode for, to input text, Emacs Fountain-Mode was easy to install, customize and use (the theme is "Deeper Blue" with a gray cursor instead of lime green(?) one and the font is Courier Screenplay). I've tried to get some of the more advanced features to work (like export to Final Draft) but it just sits there "parsing" forever. No biggie. I've got shell scripts and other applications for that. I also have Jstar for spell checking (I know Emacs does that also, but I like the way Jstar does it better) and I also use Jstar for "touching up" changing double hyphens into em dashes, etc.

    So, enough of what I don't do in Emacs Fountain-Mode. Here's what I do do with it and why I like it better. I enter text with it. That's really about it. And I get colorful output in "pseudo" screenplay format (I've linked a short video, showing the process). It helps to see the character names and dialogue indented. I also get auto-completion for names and scene headings. And that makes a big difference. And these are the two reasons why I "envied" Mac users' ability to use Highland 2 and Slugline. That was basically it.

    If I've got a lot of names, I can enter the first letter and hit TAB and Emacs Fountain-Mode will only toggle between the names that start with that letter (or just enter a couple letters and TAB for more selective choices). Once I save the file, it's just a regular, "flat" Fountain file, usable anywhere. Or, vice-versa I can enter a Fountain file into Emacs Fountain-Mode and have a colorful "pseudo" screenplay formatted file on display. Other editors (like Atom and Visual Studio Code) also have Fountain add-ons. I tried Visual Studio Code and its "Better Fountain" add-in, but it doesn't indent and the auto-completion is a little wonky. (Each scene restarts the list of characters from scratch and the drop-down for scene headings only lists "INT." "EXT." etc., it doesn't pull down the locations, which seems kind of pointless — but it's possible I didn't know what I was doing. I also couldn't see how to turn off line numbering.)

    At any rate, for what it's worth, here's a link to a short-ish video showing how I use Emacs Fountain-Mode (along with my scripts). I'm very happy with the combination. (This is all being done on my "fabulous" $30, 2008, Dell Latitude D430 laptop (Core2 Duo, 2 GBs, 12.1" screen) running Linux Mint Mate 19.3, (the newest available.))


    https://drive.google.com/file/d/1UFn...nhpjMdmnP/view

    In this video, I started with this Jstar document, opened a new terminal tab where I loaded the Fountain document into Jstar (to show the "flat" Fountain file), then used a script to start Emacs (Fountain-Mode starts automatically if you use the Fountain extension, which was added by the shell script). I tried entering new dialogue (the FADE OUT: transition got in the way a bit here, my apologies, it's usually a smooth operation) and then opened a terminal window to use Wrap/Atril shell script to convert the Fountain file to PDF and then automatically load the new PDF into Atril PDF reader (in inverse mode, which I like because I'm usually writing at night). You can do this easily over and over again while making additions or corrections to your text.

    And now I'll quit yammering. (The subject is interesting to me, anyhow.)
    Last edited by Centos; 01-28-2020, 05:47 PM. Reason: Corrected ComiBent's name. Sorry.

    Leave a comment:


  • Centos
    started a topic Emacs with Fountain Mode

    Emacs with Fountain Mode

    Finally tried Emacs and Fountain Mode. Nice for writing in Fountain format, when wanting to view something that looks (kind of) like a screenplay (like Slugline or Highland 2). So far I haven't tried any of the advanced features (of either Emacs or Fountain Mode) but just installed the two and opened a Fountain file. It automatically indents for characters, dialog, etc. When starting a new document, just name it filename.fountain and it will automatically open the Fountain Mode add-in. Save the file and use it anywhere Fountain files are accepted. The screen capture shows customized colors (this feature is built-in in Emacs) and I've got the Menu hidden — which gives Emacs a clean look. (F-10 opens the Menu when needed.)

    https://drive.google.com/file/d/1Rla...ew?usp=sharing

    Should add, the italics are there just because I wanted to try it out and see how it worked in Fountain Mode.
Working...
X