[00:00.000 --> 00:24.560] Back in 2006, I was a user of Gert Hoffman's Linux framebuffer image viewer, FBI. [00:24.560 --> 00:34.560] At some point, I wanted to add Veeam-styled keys for movement, so I came up with a patch for FBI. [00:34.560 --> 00:41.560] Soon after, I wanted a simple command line and shortcuts to jump around. [00:41.560 --> 00:50.560] And then commands came, and a parser, and auto-completion, inspiration came from Veeam, [00:50.560 --> 00:58.560] mutt, the shell, and so Veeam grew, hack after hack. [00:58.560 --> 01:02.560] What is Veeam now? [01:02.560 --> 01:08.560] Veeam is a Unix tool specialized in viewing image files. [01:08.560 --> 01:14.560] Let me stress this, viewing, not editing. [01:14.560 --> 01:22.560] Veeam is customizable via configuration files, and is interoperable with other Unix tools. [01:22.560 --> 01:30.560] Veeam adheres to the Perl's logon, there's more than one way to do it. [01:30.560 --> 01:37.560] Thanks to caching and prefetching, Veeam plays well with slower computers. [01:37.560 --> 01:41.560] It spares discrete time. [01:41.560 --> 01:48.560] It has a minimalistic user interface, no buttons, no menus, and it's flexible. [01:48.560 --> 01:59.560] It displays images as pixels or characters via SSH, under screen. [01:59.560 --> 02:05.560] If invoked in the Linux framebuffer, Veeam uses it. [02:05.560 --> 02:11.560] Under X11, Veeam runs in a window or full screen. [02:11.560 --> 02:19.560] Another option is to display images as ASCII art, even in color. [02:19.560 --> 02:24.560] Runtime auto-detection will try choosing the most appropriate mode. [02:24.560 --> 02:30.560] You can also specify one yourself via the command line. [02:30.560 --> 02:38.560] Veeam offers a consistent look and feel across those different graphical modes. [02:38.560 --> 02:47.560] Invoking Veeam from the shell to open image files works as you expect. [02:47.560 --> 02:52.560] File decoding depends on file contents, not on the file name. [02:52.560 --> 02:59.560] You can also load directories, even recursively, or in the background. [02:59.560 --> 03:04.560] In scanning a directory, a file name-based selection occurs, [03:04.560 --> 03:12.560] and this is to avoid opening and inspecting contents of too many files. [03:12.560 --> 03:16.560] Interactive usage is keyboard-oriented. [03:16.560 --> 03:22.560] Arrow keys for movement, plus, minus for scale, [03:22.560 --> 03:31.560] N for next, P for previous, or pitch down to do what you expect. [03:31.560 --> 03:36.560] Each one of those keys is bound to an action. [03:36.560 --> 03:41.560] An action may be invoking a simple command [03:41.560 --> 03:47.560] or a command with expressions as arguments. [03:47.560 --> 03:51.560] An action can also contain control flow, [03:51.560 --> 03:56.560] as the one associated with pitch down on the bottom of the slide. [03:56.560 --> 04:01.560] The thing is, under the hood, there is a language interpreter. [04:01.560 --> 04:06.560] Just as in Veeam, you access it with the column key. [04:06.560 --> 04:12.560] And just as in Veeam, or the shell, there is auto-completion. [04:12.560 --> 04:20.560] Configuration files are scripts written in this language. [04:20.560 --> 04:34.560] Veeam's language consists of commands, aliases, variables, control constructs, and special shortcuts. [04:34.560 --> 04:41.560] I develop Veeam for my daily use to occasionally open files [04:41.560 --> 04:45.560] or to load a collected collection of photographs. [04:45.560 --> 04:49.560] Sometimes I come up with more tricky use cases, [04:49.560 --> 04:54.560] perhaps updating the configuration file with new aliases, [04:54.560 --> 05:03.560] or updating my shell configuration with new aliases using Veeam. [05:04.560 --> 05:08.560] So far, I talked about introductory topics. [05:08.560 --> 05:13.560] I'm also presenting another talk at this FOSDEM. [05:13.560 --> 05:16.560] That talk is about general interactive usage, [05:16.560 --> 05:19.560] and it may be of your interest too. [05:19.560 --> 05:25.560] But now, we will cover language-specific topics. [05:25.560 --> 05:30.560] Of the theme commands, the most important ones [05:30.560 --> 05:35.560] are those to move around, scale the image, and get help. [05:35.560 --> 05:42.560] The purpose of the help go-to, scale, pen commands is self-explanatory. [05:42.560 --> 05:49.560] Other important commands, like list or limit, manipulate the file list. [05:49.560 --> 05:56.560] Please check out my talk on interactive theme usage for that. [05:56.560 --> 06:01.560] How to start using theme commands effectively? [06:01.560 --> 06:07.560] You usually pick the functionality you like, experiment a bit, [06:07.560 --> 06:10.560] and express it as an alias. [06:10.560 --> 06:17.560] This can be a command with argument, like pan left, or go 2 plus 1. [06:17.560 --> 06:21.560] Or it can be a more complicated statement. [06:21.560 --> 06:27.560] Here you have next 10 for a simple slideshow loop. [06:27.560 --> 06:33.560] Notice how their arguments are quoted. [06:33.560 --> 06:38.560] The idea is to streamline your work. [06:38.560 --> 06:40.560] Do a workflow. [06:40.560 --> 06:45.560] No matter how complex an action, you should be able to encapsulate it. [06:45.560 --> 06:57.560] As Larry Wall said, easy things should be easy, and hard things should be possible. [06:57.560 --> 07:03.560] Theme has each of its commands and variables documented. [07:03.560 --> 07:07.560] The manual pages are generated from the help command. [07:07.560 --> 07:10.560] The help command is also dynamic. [07:10.560 --> 07:17.560] So you can use it to get the actual key bindings and aliases. [07:17.560 --> 07:24.560] Now certain frequent actions have direct language shortcuts. [07:24.560 --> 07:31.560] You may want to use those occasionally via the interactive command line. [07:31.560 --> 07:37.560] One is jumping to a specific position in the files list. [07:37.560 --> 07:47.560] So for the third position, enter the command line with colon, enter digit 3, and hit enter. [07:47.560 --> 07:59.560] For the first or the last one, you may recognize the carrot and dollar syntax as familiar here. [07:59.560 --> 08:09.560] The shortcuts of this slide instead are for rescaling images by specifying factors. [08:09.560 --> 08:17.560] As you see, this exploits the fine-grained control that the scale command offers. [08:17.560 --> 08:25.560] What you see are standalone theme statements, of course. [08:25.560 --> 08:32.560] Another shortcut syntax prefixes a command by a number. [08:32.560 --> 08:39.560] The command, or a block, will be repeatedly executed that specific number of times. [08:39.560 --> 08:47.560] One can interrupt the iterations by hitting escape, for instance. [08:47.560 --> 08:56.560] You can use a so-called range syntax to repeat an action on a filename interval. [08:56.560 --> 09:02.560] Just specify number, comma, number before a command. [09:02.560 --> 09:13.560] Use this to invoke commands on filenames, which will be substituted to open, close curly brackets. [09:13.560 --> 09:24.560] This usage of the brackets substitution mimics the syntax of the Unix find utility. [09:24.560 --> 09:29.560] FIM uses dynamic variables and a weak type system. [09:29.560 --> 09:36.560] Internally, a variable can be an integer, a floating point number, or a string. [09:36.560 --> 09:42.560] You can combine expressions with several operators. [09:42.560 --> 09:46.560] Strings concatenate with dot. [09:46.560 --> 09:49.560] There are two quoting styles for strings. [09:49.560 --> 09:56.560] Within single quotes, you only have to escape using backslash, single quotes. [09:56.560 --> 10:02.560] Within double quotes, we escape double quotes. [10:02.560 --> 10:09.560] FIM sets several variables, many meant to be used or internally. [10:09.560 --> 10:15.560] Some other variables are meant to be controlled by the user. [10:15.560 --> 10:21.560] These are the configuration variables, and may, for instance, control caching behavior, [10:21.560 --> 10:27.560] or customize, the status line, or the window manager caption. [10:27.560 --> 10:37.560] In the case of the special variable random, think of it as it were a function. [10:37.560 --> 10:45.560] Certain variables prefixed by i colon are contextual to the current image. [10:45.560 --> 10:52.560] They may hold its filename, size, or the current width. [10:52.560 --> 10:58.560] But also special information, like exif metadata. [10:58.560 --> 11:09.560] I, for instance, really like to have those being displayed in the status line. [11:09.560 --> 11:12.560] Variables are the glue of the language. [11:12.560 --> 11:19.560] But auto commands are the glue of the FIM internals. [11:19.560 --> 11:26.560] Auto commands, inspired by VIM, are actions that trigger [11:26.560 --> 11:32.560] if the current filename matches a pattern on a specific event. [11:32.560 --> 11:38.560] There is a dozen of specific events defined in FIM. [11:38.560 --> 11:44.560] You have a list of them in demand FIM or C. [11:44.560 --> 11:50.560] Auto commands are tricky, but also very powerful. [11:50.560 --> 11:54.560] Now, remember the special range syntax? [11:54.560 --> 12:06.560] One must say one can also use it to rudimentarily interact with the shell from within FIM. [12:06.560 --> 12:13.560] The example here repeats the copy command with a changing first argument. [12:13.560 --> 12:17.560] It copies each file into a specific directory. [12:17.560 --> 12:25.560] You can think the open-closed brackets as the i colon filename variable. [12:25.560 --> 12:33.560] This feature is to be used with lots of care. [12:33.560 --> 12:42.560] By now, you know enough of the language that you can experiment in the internal command line. [12:42.560 --> 12:49.560] You can also make FIM run custom scripts or customize the configuration. [12:49.560 --> 12:54.560] It would be useful to know that FIM has command-recording functionality. [12:54.560 --> 12:57.560] See the right script out option, for instance. [12:57.560 --> 13:02.560] With it, when terminating your usage session, [13:02.560 --> 13:10.560] FIM can save all the executed actions, along with timings, into a text file, a script. [13:10.560 --> 13:16.560] You can then replay that session by executing that output script. [13:16.560 --> 13:21.560] Just remember that only executed commands are saved. [13:21.560 --> 13:28.560] The actual invocation arguments to FIM will not be there. [13:28.560 --> 13:34.560] Also worth to know, in your scripts, you can control the exit status. [13:34.560 --> 13:38.560] This is good for interaction with shell scripts. [13:38.560 --> 13:44.560] You can signal success or failure of a script. [13:44.560 --> 13:50.560] Indeed, so far, we have mostly seen internal scriptability. [13:50.560 --> 13:53.560] But FIM has several command-line options. [13:53.560 --> 13:56.560] There are many things you can do with them. [13:56.560 --> 14:05.560] And interacting with shell pipes, you can read and execute a script via the standard input. [14:05.560 --> 14:09.560] You can read images via the standard input. [14:09.560 --> 14:15.560] Or perhaps print filename lists as output of one FIM instance. [14:16.560 --> 14:26.560] And back, reading back as input in another FIM instance. [14:26.560 --> 14:28.560] We are approaching the end of the talk. [14:28.560 --> 14:34.560] You might be curious and want to know that FIM consists of [14:34.560 --> 14:40.560] about 42,000 lines of C++ code. [14:40.560 --> 14:44.560] The language parser has been written in Bison and Flex. [14:44.560 --> 14:54.560] And, well, details of the grammar are in Man, FIM or C. [14:54.560 --> 14:59.560] FIM's language offers many possibilities. [14:59.560 --> 15:02.560] But this can still be improved a lot. [15:02.560 --> 15:06.560] Variable identifiers are not always clear. [15:06.560 --> 15:10.560] The technique mistakes in a program can be difficult. [15:10.560 --> 15:14.560] Output could be escaped or quoted better. [15:14.560 --> 15:18.560] Sometimes I wish less quoting were possible. [15:18.560 --> 15:21.560] Autocompletion could be richer. [15:21.560 --> 15:28.560] And wouldn't it be awesome to use your favorite extension or customization language [15:28.560 --> 15:33.560] instead of this one here? [15:33.560 --> 15:40.560] Well, this is the end of our tour of FIM's internal language. [15:40.560 --> 15:43.560] FIM is packaged on several Linux distributions. [15:43.560 --> 15:48.560] So you can check out yours to obtain FIM. [15:48.560 --> 15:53.560] The documentation is mostly inside two Man pages. [15:53.560 --> 15:58.560] And perhaps the other FIM talk I'm giving at this FOSDEM, [15:58.560 --> 16:04.560] specific about interactive usage, can be of your interest too. [16:04.560 --> 16:10.560] So I hope you will be enjoying FIM as much as I do. [16:10.560 --> 16:12.560] Thanks for your attention. [16:28.560 --> 16:32.560] We are live now. [16:32.560 --> 16:35.560] We don't seem to have any questions. [16:35.560 --> 16:43.560] You could add something if you have anything to add beyond the talk itself. [16:58.560 --> 17:05.560] Maybe I could ask questions. [17:05.560 --> 17:11.560] Did you consider using a Lisp-like language for FIM? [17:11.560 --> 17:17.560] And why did you choose a specific kind of syntax? [17:17.560 --> 17:26.560] I don't know if Lisp is a minimalistic language [17:26.560 --> 17:33.560] in that it requires a certain degree of parenthesis as far as I know. [17:33.560 --> 17:39.560] And that is already too much or more than what I wanted. [17:39.560 --> 17:47.560] I don't exclude the idea of having Lisp to interact with FIM in the future. [17:47.560 --> 17:52.560] But still I wanted to have minimalistic syntax, [17:52.560 --> 17:58.560] like the one that you have seen with the shortcut jump command. [17:58.560 --> 18:03.560] I think you cannot have that in Lisp. [18:03.560 --> 18:11.560] So you wanted a little bit of really short syntax. [18:11.560 --> 18:21.560] I am referring to slide 17 and 18. [18:21.560 --> 18:38.560] Okay. [18:38.560 --> 18:40.560] There is a question by Piotr. [18:40.560 --> 18:43.560] Perhaps I can answer it straight away. [18:43.560 --> 18:48.560] Yeah, good. [18:48.560 --> 18:53.560] I am not enough an Emacs user to have... [18:53.560 --> 18:56.560] Could you read up the question next? [18:56.560 --> 19:01.560] Piotr asks, do you have mappings for Emacs? [19:01.560 --> 19:07.560] And my answer is, I am not that much of an Emacs user to know it. [19:07.560 --> 19:13.560] However, the mappings, I mean, already if you tell me, Piotr, [19:13.560 --> 19:18.560] what is Emacs style in interactive usage, [19:18.560 --> 19:24.560] it's no problem for me, even to me, for me to come up with a few key mappings, [19:24.560 --> 19:31.560] because this is configurable as you will also see in the using FIM presentation this afternoon, [19:31.560 --> 19:34.560] which is less nerdy than this one. [19:34.560 --> 19:38.560] And when it comes to the language, the command line, [19:38.560 --> 19:45.560] I didn't say it, or I didn't put much emphasis on this, [19:45.560 --> 19:54.560] but FIM uses autocompletion based on libredline. [19:54.560 --> 20:00.560] Libredline is what you use in many shells [20:00.560 --> 20:04.560] and allows you to have autocompletion. [20:04.560 --> 20:14.560] So that has interactive autocompletion with Emacs style. [20:14.560 --> 20:19.560] However, that works under the frame buffer and not in X11, [20:19.560 --> 20:22.560] so it's not exactly as we should. [20:22.560 --> 20:25.560] Perhaps can be fixed. [20:25.560 --> 20:35.560] I hope I answered the two aspects of Emacs style working with FIM. [20:35.560 --> 20:52.560] Please come up with another question, please. [20:52.560 --> 20:59.560] So could you say something about your motivation for writing FIM? [20:59.560 --> 21:02.560] Why did you want to take on this project? [21:02.560 --> 21:08.560] Thanks, Arun. [21:08.560 --> 21:18.560] I wanted to be able to suit my very personal style of opening files [21:18.560 --> 21:23.560] and browsing files, especially PDFs at the beginning. [21:23.560 --> 21:31.560] I liked to have PDFs and I wanted to use a style which is more VIM oriented. [21:31.560 --> 21:37.560] At the time, I didn't have a suitable alternative that I liked. [21:37.560 --> 21:44.560] It's mostly to suit my own needs, and it continues this way. [21:44.560 --> 21:52.560] So for the fun, these are the motivations behind FIM. [21:52.560 --> 21:54.560] Okay, yeah, that makes sense. [21:54.560 --> 22:00.560] So you wanted a PDF reader and an image reader that can be used with FIM. [22:00.560 --> 22:04.560] Yeah, when it comes to the PDFs, because I didn't stick here in this talk, [22:04.560 --> 22:16.560] but there is a script which transforms images into PDFs or similar files into PNGs. [22:16.560 --> 22:22.560] It's called FIMGS, and it's nothing else than the translation of FBIGS, [22:22.560 --> 22:32.560] because FIM means to be an improvement on FBI. [22:32.560 --> 22:45.560] It can also open CBZ or tar balls to extract stuff. [22:45.560 --> 22:50.560] The extraction is not recursive, unfortunately. [22:50.560 --> 22:53.560] It's something that I wish to have at some point. [22:53.560 --> 23:01.560] It's a recursive extraction of tar balls or PDFs into images, or archives. [23:01.560 --> 23:07.560] Archives also can be opened, by the way, somewhere, yeah. [23:07.560 --> 23:16.560] Do we have any other questions? I don't see any. [23:16.560 --> 23:25.560] There seems to be a bit of lag in my question-score box, but there are no questions. [23:25.560 --> 23:27.560] So I'll ask one more. [23:27.560 --> 23:34.560] So when you convert these PDFs to images for viewing in FIM, [23:34.560 --> 23:38.560] can you search through the PDF, I mean, search through the text of the PDF? [23:38.560 --> 23:40.560] No, no. [23:40.560 --> 23:44.560] The PDF will become an image, and that's all. [23:44.560 --> 23:52.560] I think in principle, yeah, by using Poplar, which is one library which FIM uses, [23:52.560 --> 23:58.560] might be possible in the future, but I don't plan this at the moment. [23:58.560 --> 24:00.560] For now, it's about images. [24:00.560 --> 24:06.560] Use something else if you really need to use fully the F functionality. [24:06.560 --> 24:08.560] For now, stick to FIM for images. [24:08.560 --> 24:13.560] People use FIM for image frames, good for them, [24:13.560 --> 24:19.560] but I think it's a bit not using FIM at the full potential. [24:19.560 --> 24:22.560] I think FIM should be used interactively for images. [24:22.560 --> 24:30.560] And when one wants to have some special custom command, then you are welcome to configure FIM, [24:30.560 --> 24:34.560] but mostly it's meant for interactive usage, so don't take me wrong here. [24:34.560 --> 24:38.560] It's not something for programming stuff, use a library for that. [24:38.560 --> 24:42.560] This is just for viewing and viewing on steroids, hopefully. [24:42.560 --> 24:44.560] What do you mean by image frames? [24:44.560 --> 24:46.560] You said something about image frames. [24:46.560 --> 24:53.560] I mean small devices, which usually have a small screen, a very weak processor, [24:53.560 --> 25:00.560] which every five minutes, perhaps, changes an image and does a slideshow, which is very low, [25:00.560 --> 25:03.560] but it's usually not interactive. [25:03.560 --> 25:09.560] I think people use it a lot for this, and for the Raspberry PI, for instance, [25:09.560 --> 25:15.560] because I think there is no X there, or, let's say, it's good to use the frame buffer there. [25:15.560 --> 25:26.560] But I encourage using FIM interactively every day, if you like this style of keyboard-oriented usage, of course. [25:26.560 --> 25:32.560] I wish to have menus, and I'm working on that, but that's not the spirit of FIM. [25:32.560 --> 25:35.560] Okay, I think the time is over. [25:36.560 --> 25:38.560] We still have two and a half minutes. [25:38.560 --> 25:41.560] I mean, two hours, 45 seconds. [25:41.560 --> 25:44.560] Sorry, two minutes, 45 seconds. [25:54.560 --> 25:56.560] I still don't see any more questions. [25:56.560 --> 25:58.560] It's probably a bit early in the morning. [25:58.560 --> 26:00.560] Yes. [26:06.560 --> 26:08.560] Okay. [26:21.560 --> 26:26.560] I asked the question about the PDFs, because Emax has something very similar to look at PDFs, [26:26.560 --> 26:29.560] and it has the same problem with the search. [26:29.560 --> 26:36.560] It converts the PDFs to images, and then you can't really do much with the image. [26:36.560 --> 26:40.560] It's not a substitute for a PDF reader, that's the point. [26:47.560 --> 26:51.560] Can you play the SVG images using FIM? [26:51.560 --> 26:53.560] Sorry, can you repeat, please? [26:53.560 --> 26:56.560] Can you handle SVG images in FIM? [26:56.560 --> 26:58.560] Which images? [26:58.560 --> 27:01.560] SVG, scalable vector graphics? [27:01.560 --> 27:04.560] Yes, yes, yes. [27:04.560 --> 27:17.560] There is an internal conversion which uses Inkscape to render an internally pixel map out of the SVG. [27:17.560 --> 27:20.560] You have different converters inside FIM. [27:20.560 --> 27:27.560] Sorry, not inside, being invoked by FIM to make out of even your custom format. [27:28.560 --> 27:30.560] A pixel map. [27:30.560 --> 27:35.560] I invite those who wish to use this FIM, this afternoon, my other talk. [27:35.560 --> 27:39.560] I think it's at 3.30 or something like this. [27:39.560 --> 27:41.560] It will be most about usage. [27:43.560 --> 27:48.560] I think, guys, you should prepare for the next recording. [27:50.560 --> 27:53.560] The next talk, I think someone else will be handy. [27:57.560 --> 27:58.560] Good. [27:58.560 --> 28:00.560] So, we are almost done. [28:00.560 --> 28:02.560] Thanks, Arun. [28:02.560 --> 28:05.560] If you want to add something, you have 20 seconds more. [28:05.560 --> 28:10.560] No, I welcome to follow me live in Brussels this afternoon. [28:10.560 --> 28:13.560] Who is in Brussels? Otherwise, virtually. [28:15.560 --> 28:16.560] Thanks, Arun. [28:16.560 --> 28:19.560] Thanks to organizer Manolis and Piotr. [28:19.560 --> 28:21.560] Thank you, Mr. [28:21.560 --> 28:22.560] Ciao. [28:22.560 --> 28:24.560] Bye. [28:27.560 --> 28:29.560] Thank you. [28:57.560 --> 28:59.560] Thank you. [29:27.560 --> 29:29.560] Thank you. [29:57.560 --> 29:59.560] Thank you.