 So we are going to change the gears now and from mind-bending splines we are going to talk about stupid shell scripts. So there are so many open source tools that it seems like a very simple thing to create a perfect photographic workflow on Linux. Like if I want to import photos I can either use an import module in DigiCam or a dedicated tool like Rapid Photo Downloader. If I need to keep tabs on my photos I can use DigiCam. If I need to process raw files, I don't have to tell you how many raw processing applications are out there. If I want to publish my photos there are also open source tools for that. It's also fine in the end, I think we realize that there are some cracks in this beautiful smooth imaginary workflow. And I discovered some of these cracks and I tried to develop tools that will fill them. Today I'm going to talk about them. So the first tool is probably one of the most popular ones, well at least by my measure. It's called little backup box. It is a set of scripts, passion PHP scripts that transform regular Raspberry Pi into backup box. So you can use it when you need to backup your photos while traveling. So you don't have to carry a laptop and use it as a glorified backup solution. You don't need to have any proprietary solutions like WD, wireless passport, which is both expensive and not upgradeable, not tweakable. If the battery dies you are pretty much screwed. So what you have is basically a Raspberry Pi running a set of scripts. My setup looks something like this. So this is what I carry with me at all times. This is a Raspberry Pi powered by PowerBank. And this is my very old phone running web interface that you can use to control little backup box. So little backup box can operate in three modes. The first one is card backup mode. So the idea is that you use a USB stick or high capacity USB stick as a backup device, backup storage. And you use a card reader to transfer the contents of the card to the backup storage. And in the card backup mode, this is what little backup box does. And it does so completely automatically. So it detects, it has a very simple primitive mechanism for detecting storage device, then detecting the card reader, and then copying the whole thing to the storage device using RC. The second mode is camera mode, which uses a screen based on Gphoto. Basically as soon as you connect your camera directly to little backup box, it will offload all the photos from your camera to the storage device, to the backup storage device. And the third mode is remote control mode. So in this mode you can actually perform simple actions or trigger new card or camera backups manually. And in addition to that, little backup box has the mean, the DNA and SAMBA servers. So you can activate it from the web UI. So you can view your photos, assume your photos to any DNA device like your smartphone, your DNA, and your TV set. And you can of course use SAMBA to transfer files to other devices. So that was little backup box. So now that I started the problem with keeping my photos safe when I'm on the move, the second problem is to offload them. Yes, you can use the input module in DigiCam, you can use Rabbit for the downloader, but neither of these tools did what I really wanted. And what I wanted was quite a lot. So what I wanted was to transfer photos to JPEGs and RAW files. I wanted to extract basic information like camera model and lens model. I wanted the script to fetch weather conditions for the day the photo was taken because I'm obsessed with weather, so I want to know the exact weather conditions when the photo was taken. And I want all these data to be written in the commands field of the basic metadata. I want the script to magically write copyright notice. And I wanted the script to rename all my photos based on the dates time. And I wanted my script to organize all the photos in folders by date. So this is how auto was born. This is, again, a relatively simple batch script. And it does exactly that. So it transfers photos. Oh yeah, and I forgot one more thing on my wishlist, to geotide my photos. So it's a pretty basic script. When you run it for the first time, it will ask you a few basic questions like where do you want to copy your photos in the destination folder. It will prompt you to enter your copyright notice. It will also ask you to specify your notify token, which is a simple Android application which can receive push notifications. So I run auto in mass. So when the transfer is finished and when the script is done, it will send the notification to my phone so I don't have to sit and wait when it's done. So when you run the script without any parameters, it will do just that. It will assume that your photos are already geotacked. It will copy the photos, add the data, which features the weather conditions, write everything where it's supposed to be, execute the data, and organize the photos and raw files into folders. In addition to that, you can specify several parameters. Like if you have, for example, a GPX file, if you use a geotracking application and you can save your tracks in the GPX format, then you can use a special parameter to provide a path to this file and the script will geocorrelate your photos. And if you have several GPX files, you can use another parameter so it will combine, merge all the GPX files into one, and then go to geocorrelation. If you don't have anything of this, you can perform a course correlation. Basically, it uses a specific parameter to specify the city where you took your photos and the script will fetch an approximate geographical coordinates and will use them instead. So the problem with important photos is solved. At least partly. I mean none of my solutions are perfect. There are some weird things going on and I still can figure out why they're doing that. There are still some weak spots like, for example, in the little backup box there is no mechanism, or at least there is no easy way to teach the device to recognize which storage device is what. You have to go through the specific sequence. The first device you insert is considered to be a backup device and the second one you insert is considered to be the source. So these are two screens that I use most of the time. On my desktop, as you can probably notice, I use KDE as my preferred desktop environment. And the best thing about the default file manager in KDE is that you can specify custom actions, context actions, meaning that in the browser when you right click on a specific file you can get access to commands that you have created. So I have several things, several actions I use very often. It's not very difficult to specify this, to create these actions, but if you have something like five or ten of them, then it could be becoming useless to create an entry for each year in every one of them. So what I created is simple, it's not a script, but it's sort of a package that has all the elements required for these context actions. And there is an installer script that downloads everything, compiles the required stuff, puts everything where it's supposed to be. And what you have in the end is a very nice little menu that gives you access to all the actions. So as you can see, I can use it right click. I can geotype by CT, add the active command, resize the image. This is particularly useful if you like posting your images to your blog or website or whatever. Re-compress using the absolutely excellent tool called JPEG Archive. You can show geotype photos on the map and so on and so on. And finally, so I share office with colleagues whom I describe as privacy fundamentalists and they brainwashed me into leaving Google, photos, Facebook, Instagram, Twitter, everything. And I don't miss it, this decision of my life. The only problem is, another problem, the only feature I sort of missed was what I call photos from the past. So you know that in Facebook it will scan through your photos and if they find photos from the past even on today's date, it will sort of show them to you. I really like the idea and I wanted to create something similar that would run in my NAS, scan through my photo library and do pretty much the same. And this is how NAS Fashion was born. So this is a solution, a tool that consists of two parts. First there is a shell script that does pretty mundane thing. It goes through all the files, reads, creation date and time, date and month, compares it to date dates and puts all the final photos in specific folder. And after that, a simple PHP script generates a page. So it looks something like that. This is an offline version. And yesterday I ran the script on my machine. Let's see if I can show it to you. I didn't do it today because that would be typical if I ran it and it didn't work. So it looks something like this. And as you can see it also, maybe you can't see, but the captions of the photos comes from the command field and this is where the whole weather thing is important. So I can immediately see what camera I used to take the photo and what camera and lens combo and what the weather was at the given moment. So as I can see, very nice memories. Seems like in 2015 I was running Tokyo. So I have a little bit of time. As I said, none of these tools are perfect. Natsukashin, for example, is pretty slow because it's in its nature. It has to go through every single file, read the dates, creation dates and compare it and so on and so on. So I have something like a couple of southern photos on my mask and it usually takes between half an hour and 45 minutes to go through the entire collection. So usually I run it during the night by drone job. But if you have any suggestions how to make the screen faster and if you have suggestions how to improve the web front, I would be very grateful to hear them. So that's my tip for now. Questions? Do you do hash verification like check zoning when you copy? Because that has been made in the past when I copy a file. Actually my prototype is the simultaneous backup and copy to work and directory. And I've had a circumstance where the backup was corrupted when work and directory was not copied from the same source. So I started checking after I write. Can you try to summarize the question for the video? Okay, whether I use hashes to make sure that files are not corrupt. Is that correct? After copying. After copying. Yes, I thought about that. No, I haven't implemented it because I cannot code to save my life as it said in the description. So that's the reason. I mean it's an interesting exercise for me because I'm not a programmer. And it's my only programming skill worth mentioning is copy paste from Stack or Flow. But I thought about that. And it would be a very good idea to implement it just to make sure that everything is supposed to be the same. Yes? Do you use a web service to get the weather information or how do you get the weather information? Ah, yeah. It uses DAX Guide API. It's not the best weather service. They can be sort of... Yeah, they're weather forecasts at least, I know it's not precise. But it's close enough. So it's DAX Guide. You can... I think they have a free account. You can get 1000 requests per day. After that, it costs some symbolic amount of money. I've been using them for almost a year. I still haven't received any bills from them. If you start the photos into folder with the date, you need to search the photos now. Sorry? If you put the date in the folder, you don't need to search the wallet photos for yourself. Yeah. But you're right. But I try to make my script sort of more universal in a way. So it doesn't depend on the name of the folder. So it reads the dates of what is in the file. So if you choose the name... Choose a different naming convention for your photos, then the people still work. At least they're educated. I haven't tried it. Thanks. By the way, I usually talk about DigiCam. And normally my audience is like a quarter of what is now. So my conclusion is talking about stupid scripts is better than talking about DigiCam. Do you really know it? Yeah. I'm here for the rest of the day. If you have any questions and even better, if you have any bright ideas how things can be improved, done differently, please. You might be able to store that hash of the extended attribute to the file itself. Yeah. We were carrying the hash. Yeah. So we can do that for some things. What's that? Well, any more questions? No, extended hash. Thank you very much.