 So over the last few weeks or so I've done quite a few videos talking about my transition to using them as a full-time Writing tool something that I use for my daily job and it's so far. It's gone really well I've because I've made a few videos about this so one of the things that I had to figure out how to do when I made this transition was figuring out how to get the Documents that I was creating in markdown basically through them into a format that I could actually send to Wordpress or my bosses or wherever At first I thought I was just gonna have to like copy and paste stuff out of markdown or out of them and into like Google Docs And that would have been a I mean it would have been fine I would have continued on but it wouldn't have been a great solution because it's not It wouldn't just wouldn't have been great things would have been broken like That getting the headers to work in Google Docs that were written in markdown wouldn't have been easy So this led me to trying to find a tool that would allow me to convert markdown into Regular formatted text and I had heard about pandoc, but I had never really Understood what it was for like I'd never used it before and honestly I never thought that I'd have a reason to use it like I always associated pandoc with law text Which is something that is used for Scientific and technical papers and that's not something that I ever Right, so I never really considered even using pandoc until I had this need So today what I thought I would do is talk about my brand new favorite app and that's pandoc now It's been around for a long time like a long time, but it is so cool So let's go ahead and take a look at what this is so basically at a very non-technical level Pandoc will take one file and convert it to another type of file So so a for example, you have a markdown file and you want to translate it to a EPUB you could do that if you wanted to translate say a doc x file to an ODT file You could do that I don't know really why you want to do that because they could still both be opened in Labor office, but you could do it if you wanted to translate a ODT file to say Org mode you could do that That is one of the neat things about pandoc is that there's not really a limit on what you can do now I'll talk about a few of the things that are kind of Janky with it in a little bit But for the most part if you want to go from one file format to another file format It's really awesome, and it does a ton of these so if we scroll down here You can see that there's just a ton of stuff that it supports So you mark down ODT doc x a lot of wiki formats EPUB Lautex Doc book things I mean just just a ton of different stuff CSV tables a lot of stuff obviously PDFs and stuff as well So that is really all pandoc does so it's not as if it's gonna be a tool that everybody has a need for because Like I said at the beginning This is not a tool that I expected to ever have to have a use for Until I actually did so I can understand if this doesn't really appeal to everybody But for people who do writing in certain formats and need to get those formats to different, you know another format It's an amazing tool So let's just go ahead and show you how this works, and then we'll talk about a few of the limitations So if we open up a terminal here and zoom in and then if I go into my documents folder I have a file called test MD So if I them into this test IMD file and look here and get rid of that stupid annoying fold I don't know why them has been folding everything on me. I don't know why I don't understand it It's been doing it on multiple computers. I'm getting really tired of it, but anyways, that's a big problem Well, I'll deal with that later. This is basically just a markdown file. There's a there's headers There's a there's a table there. There's another header, and there's a column of text Nothing extravagant now you can go through and put in metadata if you want to put in metadata and you know how to do that I never really have to do that So I've never really explored how to do it, but you can do it if you want to and there's just a ton of stuff You can do and mark down like if you know mark down. There's a ton of stuff. You can do equations. You can do Bibliographies if you wanted to you can do links you can do images you can drop in images and stuff like that You can do a ton of stuff So that's markdown, but let's just say we wanted to take this and put it into a PDF or a An odt file. Let's just do an odt file because that's easier. So we get out of this Hopefully it's works for that stupid fold. We want to translate a markdown file to an odt file So first we need to have pandoc install so if you're on arch Linux do sudo pacman dash s pandoc If you're on adebian or Ubuntu based distro apt install pandoc Just like that and now I'm happening to be on mx links right now So this is what I would do for me I hit that and then enter a password and it would tell me that I actually already have it installed But for you you just go through hit yes, and it would install it So once you have it installed the command to do this is pandoc And then the name of the file you have already so in this case, it's test the md and then dash o And then the name of the file and the extension of the File type that you want so in this case we want odt so we want to go through and do test odt And then if we do an ls here We can see that we now have a test odt and we can actually open that up Right here and as you can see we now have the column we have the header and we have The I had an image in there too, but it's really big So that's why it's taken up a whole page there and then we have another header here And we have the column of text that I had so that's how it photo ran You can see that it got the headers right it even got the columns right And and sort of the image just like you'd expect it to it's a huby gem And so it doesn't really show up all that great But whatever, you know, you can go through and do that now That's Was a markdown file and we translated it into An office document that can be written and changed and edited in library office if you want to now you can if you wanted to We can oops. I tried to quit that was the capital zq. Did you see that? I've been using vim way too often. Okay, we can close this. We don't need to save it We'll go back to this here and let's just remove test md What we can do now if we wanted to we could go to something else. So let's just say we wanted to Open up to translate that odt file into html. Okay, so let's just go ahead and do that. So we do pandoc test odt dash o and test dot html Do that it's done now. We can actually vim into test dot html And we can see that it's gone through and put all the proper html tags and formatting right here Inside a file that you can then open up into like a web browser or whatever and see what it looks like So we can actually go through and do that. Let me open up a if we open it up in a in a web browser we can actually see that For the most part it translated it just fine It didn't get the link to the the image correct But that's okay if we scroll all the way down are the rest of our text and stuff is here as well So as you can see it translated it from an office document to html just fine. I'm not sure why the Link to the wallpaper didn't come through. I'm surming it. It's just a path problem So that's what pandoc pandoc does. There's a ton of other stuff I can do now the one limitation I found is there's some formats here if we close this and go back here There are some formats here that can't translate directly to another one So for example, let's say you have a an odt file You can't translate that directly from odt to markdown. It just doesn't work Instead what you'd have to do is go from odt to html to then markdown. So there's there's some Reason why that's the case But as long as you don't mind doing that extra Conversion it comes out just fine. It's just a matter of knowing that sometimes So we actually we can if we open up the terminal again And we go into the documents thing again and zoom in here Do us now we have an odt file. So if I wanted to translate that so pandoc test odt dash o into test md Okay, so usually it doesn't work, but I'm guessing that it did work in this case. So we're just going to vim test md and Open it up. Yeah, it works just fine. Um, kind of I mean, there's some Weird translations there, but it worked fine that time. I don't know why normally it didn't work for me. So Maybe I've been doing it wrong all this time and I just didn't know You guys saw that live on camera. I learned something new Maybe it's just for longer documents. I don't know But the the point is is that sometimes you may come across where it gives you an error And that means you'll have to translate or transition a file into like an intermediate intermediary File format before you can go to the ultimate destination. My point of bringing that up is that if you come across a File format that won't convert into another file format, which is possible. Like I've For whatever reason that that odt to md didn't work for me the first few times I tried it For like the last three or four weeks So I don't know why I did it this time because probably because I was recording it But the point is if you get to that point and don't give up Go through and do a google search because chances are someone has tried the exact same Conversion as you and have has come up with some kind of path for you to get to where you need to go So there are Several more things that you can do at pandoc that I just haven't kind of dealt Delved into because I just don't need them. So for example If you're going through and converting h an html like website to a pdf or something And you want to go through and make sure all that website css is embedded right in with the html into the pdf There's a flag for that and there are other flags and options that you can use for other things that have to do with law tech with pdf All those things that I've really haven't got into yet, but the point is Is that if you're going to get into this there's it's There's much more to it than just the few things that I covered in this video So I highly recommend checking out the documentation on the website Checking out the man page because the documentation for pandoc is fantastic. It's really really good And basically anything you want to do has been documented on the website or in the man page And if you're trying to get from the Something simple something more complicated like law techs or pdf or whatever And you need to know more information on how to do that The documentation is a good place to start. So that is pandoc It's my new favorite linux application right now because it's saved me just a ton of time And anything that saves me time just makes me happy So if you have examples of how pandoc has saved you time or if you are interested in this app Leave your comments below. You can follow me on twitter at the linux cast You can support me on patreon at patreon.com slash linux cast before I go I'd like to take a moment to thank my current patrons Today devon east coast web pedrigal primus margus meaglin jackson hath tool steve sabragirlinux Garrett Mitchell art center carbonated jeremy shawnd odin martiney merit camp drashley daydog Keter a crucible dart bayonet six takes everybody for watching. I'll see you next time