Getting started with the clipboard class in Election.js

I still want to write at least a few more posts on electronjs, before moving on to focusing on other topics as that just strokes me as the thing to do if I am going to start a new collection of content on something. Anyway when it comes to making an electron application one of many things that comes to mind is how to go about copying something that might be in the clipboard of an operating system into my electronjs application as well as the inversion of doing so. In other words there must be a way in electron to handle the whole copy and paste thing with text, images, and data in general so that I can move content easily to and from my electron application and other applications.

So with that said of course there is a class for this sort of thing which is the clipboard class that can be used as a means to both read and write to the clipboard of the house OS which allows for making use of this common OS feature to transfer some kind of content from one application to another. In this post then I will be going over a simple example of this class, and while I am in the process of doing so I will of course also touch base on a wide range of other electronjs features.

Read More

Transform and delete standard input text in bash with the Linux tr command

Every once in a while I want to delete end of line characters, or transform characters from some standard input when piping two or more Linux commands together. So far I have found that the Linux awk command might be the best tool for the job when it comes to thing and just about everything else when it comes to text processing type tasks. However there are also a lot of various alternative commands that come up and one of them is the Linux tr command.

Read More

Electronjs application example that I am using to make videos

This year I wanted to start looking into how to go about using electronjs, and so far I have a small collection of tech demos, and hello world type programs that make use of various features of electronjs to make desktop applications with html and javaScript. So far I all ready have wrote my getting started post on electronjs, and a few others on top of that. However over the long term though I am going to want to make at least one or two actual programs that I use to make some kind of content, such as a text editor, an art program of some kind, or maybe even something that can be used to make a video project of some kind. With that said I have a simple text editor program in the works, but for todays post I am going to be writing about the current state of something that I have been putting a whole lot more time into to make videos that I am calling VideoGround.

Over the years I have wrote a whole lot of posts on threejs which is a popular javaScript library that has to do with 3d modeling. I have learned, and continue to learn, a whole lot about threejs, and also while I am at it 3d modeling in general inside and outside of threejs when it comes to using blender for example. I also like vuejs when it comes to using a front end framework, and I have also logged a fair amount of time working with nodejs as well when it comes to working in a javaScript environment outside of a web browser. So then working on a project like this allows me to use, refresh, and refine knowledge of a wide range of skills that I developed over many years. That is always a good thing for what that is worth, but the real motivation with this is to also work on something that is fun, and even if it is a little buggy can still be used to make a final product.

Read More

Using ffmpeg to create videos in Linux

The ffmpeg command can be used to create videos from a collection of frames, as well as a wide range of other tasks that have to do with video editing. For example on top of creating a video from a whole bunch of frames in the form of image files, a new collection of frames can be made with ffmpeg from a video file also. In addition I can create new frames or videos with ffmpeg with one or more filters applied to scale, crop, add noise and so much more as there is a whole lot to work with it.

So when it comes to just about anything video related in Linux this is the default goto solution for editing video from the command line. There are a lot of other great programs to work with in Linux to edit video though, such as OpenShot which is one of my favorite options thus far. However often a great many of these video editing programs are for the most part just graphical front ends for ffmpeg which does all the leg work in the background.

When it comes to really learning a thing or two about ffmpeg there is always the man page that helps. However if you are like me then that of course is not the reason why you are here. There are just so many little uses cases that apply to one specif little thing, so then there is looking at various forums and blog posts such as this.

Read More

The App Module in electronjs

This month I started learning electronjs, and although I all ready have some prototypes together for actual projects, I still think I have a lot to learn about the various modules in electron. So for todays post on electron I thought I would create a quick example centered around the app module of electron, and the various features that I should be aware of in that specific module. The main thing that the app module is used for would be to attach event handers for a wide range of events that happen when an application starts, is used, and closed. For example there is attaching an event handler for the ready event that should fire once Electron has finished initializing. Sense there is a ready event it goes without saying that there is also will-quit, and quit events that can be used to define some logic that should fire when an application is being closed.

This app module is one of the many main process modules to work with that should not be confused with other modules that are used for a preload script, or render process as it often seems to be called.

In this post then I will be going over the source code of an electronjs example that just makes use of a few features of the app module in electronjs. This will not be a comprehensive example of course, as there are a whole lot of features for this one that will have to be coved in any and all future posts on electronjs. However when it comes to learning electron, or anything really, one must start somewhere, and this will then be a kind of hello world type example but with the app module specify. While doing so I will need to also write about at least a few other modules in electronjs such as the BrowserWindow module, ipcMain, and the ipcRender module sense I will want to have a front end for this example.

Read More