EPG grabber written with PythonFew months ago I was researching things around EPG for IPTV. I came across with WebGrab+Plus which handles fetching of data pretty well, but after some time the entire program stopped working because the config file wasn’t correct anymore. Logic behind WebGrab+Plus is to parse the data from websites where TV schedule is published and to save it into XMLTV file. Nothing harder to think about, but if you get more into the details, you may encounter problems with connection to some website. WebGrab+Plus is not a program which is statically oriented into some website, but it’s dynamic program which requires config file for parsing the data. It has it’s own syntax which is on first look a little bit complex, but I believe that after reading of documentation you can easily write those files. Because the config file was already prepared when I started using WebGrab+Plus and it worked without any problems, I didn’t pay additional attention on it. The biggest problem became when I should rewrite config, but I didn’t understand syntax. So instead of looking into documentation I started working on my own program for grabbing data for EPG. Programming language which I chose was Python, because I expected that this will be the fastest and easiest way and I was right.

Continue reading

BootstrapAbout a year ago I read that instead of writing complete cascading style sheet from scratch, many people started using Bootstrap. Because this was interesting to me, I said myself that in a near future I should do something with this front-end framework. And I did. My first project where I used Bootstrap was accepted very well and a lot of users commended design together with user experience. I was really impressed what I have done in such a short period of time and the feedback on that from numerous people was incredible. But it didn’t last long since I figured out that I was writing CSS on completely different way as proposed from main and other developers of Bootstrap. What do you think about how I wrote markup code for this design? I downloaded Bootstrap distribution files and included them into header of HTML document. Next step was to write code and there wasn’t any problem at all. I must say that this is the fastest way to begin with Bootstrap, but you should be aware of the file size at the end. This also affects the time of website loading, especially if you include all Bootstrap’s CSS and JavaScript files. At that point I asked myself several times, why I’m including something that my website doesn’t need. After few months I figured out a tool named LESS, which I had already noticed somewhere on Bootstrap website. At this point I asked myself again with a little different question  – why I didn’t give a few minutes to myself to read documentation on installation before I started writing the code?

Continue reading

VirtualBoxWhen I was making backup for transition from HDD to SSD I came to the folder where VirtualBox Machines’ files are stored. Recently I read that it’s not recommended just to copy folders of machines to another partition and that it’s a must to create backup with VirtualBox itself. I said okay, let’s do the backup of machines with VirtualBox and started program. I exported two of all machines without any problem and I left other machines because they were just for testing different operating system configurations. I was copying everything to external 500 GB disk which I’m using for backup, but back in the year 2008 when I bought it, I noticed the problem of FAT file system. I’m writing about this because I had the same problem in that year and few days ago when I was copying data. I must admit that I didn’t want to change file system in 2008 because of some reasons which I don’t remember now. Over time I filled external disk for about 45 % and there’s no way to copy all files to another disk just to change file system. This is the problem that disallowed me to copy backup file of VirtualBox Machine to external disk. Just for the information, backup file of machine was large around 25 GB and FAT file system allows you to store a little bit more than 2 GB large file. I solved problem on very special way – I left machine’s backup file on HDD. After operating system installation to SSD, I imported that file into VirtualBox but that wasn’t a good idea since complete size of extracted file was around 50 GB. I decided to move files of this VirtualBox Machine back to HDD after format. And I did it, but not without problems, so there’s procedure how to do it correctly.

Continue reading

Android Developer Tools

In the last few days I was upgrading my computer with fresh power and I removed some unnecessary fans which were just raising the dust. It wasn’t a complete system replacement or something like that, but a special upgrade with SSD. I was tired of HDD’s slowness, so I decided to replace it, to get more responsiveness from the whole system. After the upgrade I’ve installed Ubuntu 14.04 LTS because it’s only few days until release and it would be pointless to install older version and upgrade to the new one. Alongside other programs I needed to install Android Developer Tools, but as you may know it’s not available in Ubuntu Software Center. Because of that we need to install it manually from official webpage and after that on Ubuntu we need to create launcher for Unity. It’s really easy procedure to do the whole thing but it may be a little bit complicated if you’re using Ubuntu for the first time. Before we start with procedure I must warn you that there’s no any installation file or anything similar to it, so we’ll install Android Developer Tools manually.

Continue reading

In the times when I was learning basics of C#, I asked myself why should I ever use libraries for anything. I didn’t realize that a lot of work can be done with separated file containing piece of code. But why you should create new file and write down the code into it instead of writing into main file? The answer is easy. First of all you need to separate code which can be used in numerous ways, but for now you might think that it’s suitable only for your needs. If you will publish your code anywhere and someone will try to look at the code, this person will have a big problems to understand what you’ve thought, but if you write code into separated files with right syntax, previously mentioned person will understand it easily. The second thing is, that you might need data saving but you won’t find the right way where to store it. You know the answer. In the library you can create more classes and inside one class you can specify a variables with different types which correspond to data types of information you’re storing. After that you can use that class in connection with list and all your data can be separated by indexes because you need to insert each part of data as an object. Inside class you can provide additional methods or functions which are operating with data of created object and you don’t need to do that for each object inside main file. Inside one library you can create a lot of classes or similar things, but that I don’t recommend you that. The reason is that each library has it’s own purpose and it would be pointless to include more different things. So, if you’re writing a library for data importing and exporting you will probably not add the method for working with some graphical widgets or something like that.

Continue reading

Last few days I was working on my most desirable project which I wanted to create almost one year ago, but the time didn’t allow me that. So I took all the things in my hands and started working on new project IPTV Playlist Editor which is written in Visual C# with a beautiful user interface. I hope you agree with me on that. The problem because of that project exists are TVHeadEnd channel, channel tag and iptv service files which are needed to play IPTV and DVB-T or DVB-C (I’m not sure for other two, because I don’t have any experience with it, but I think it’s the same) streams and inside that files are some information allowing TVHeadEnd’s backend to properly open video streams. In our country we had two types of ISP’s video streams playlists, but a day after I published my new project on CodePlex, website with TV channels disappeared. Luckily I was faster than this problem and I succeed to download both versions – M3U and CSV playlists, so I could built a program with basic features. Since I established my Raspberry Pi to work well with OpenELEC I always wanted to have a fully configurated operating system with a lot of content in library and I was barely working on that, month after month. Finally there’s been a month in which I programmed this program and now I have almost everything that is expected from average set top box. Good operating system with good configuration, content in different libraries, channels for IPTV and some other stuff which I don’t use everytime when I power up Raspberry Pi converted into media center.

Continue reading

Each book has a beginning and an end. Let’s start with beginning and leave the end alone for a long, long time. codenovel is a blog which will provide useful guides and projects from the world of programming and will try to integrate them to the good of wide technology’s community. I can’t say how many posts will be added in some time, but the most important is that there will be enough informations for all newcomers and professionals looking for their knowledge improvement. So as I. My programming skills are not on the level of the best programmers, but who are they? Every unique programmer must have it’s own style of code and algorithms for solving problems. I believe that the best programmer doesn’t exist, because we all could solve one problem on thousand and more different ways. What if you’re not a programmer and you are reading this code? If you would like to become one of “us” you’re warmly invited to learn how the things stand together, but if you’re not looking for that, than you can support projects and guides by using and reading them.

For now I don’t know what content will exactly be published, except the programming code. This will probably be written in PHP, C#, C++ and other programming languages. Be prepared on usage of frameworks and stuff similar to it, because we won’t be spending our time for things that already exists and are necessary for the project. In some cases we will also take a look to the configuration of operating systems and programs needed by our projects.

I hope that you will be satisfied with my posts, projects and guides and that you will enjoy reading codenovel! :)