
|
|
||
Agrandir
|
Nic0's SphereNic0's Sphere
Blog Informatique Linux, propose des informations sur l'actualité du libre en général tout en restant accessible à tous.
URL ...........:
www.nicosphere.netSoumis le .....: 07/10/2009
Catégorie .....: Logiciel libreURL réciproque : http://www.annusurf.net/in.php?id=7389 [Les codes] |
|
|
Nic0's Sphere |
04/01/12 Clint, Command Line Library for PythonThis library is the kind I like, the kind which make your life easier, perfect for someone like me, who uses Python all the time. So, what can Clint do for you? Well, there are a bunch of tools that might come handy when you do some command line based programming, especially quick scripts. If you use Python as your primary langage, CLI stuff is always useful. ColorsHaving some colored output can be nice, but I don’t want to use some ncurses
interface to have a nice display. A common request is for text color to be
green for an expected result, and red otherwise. The highest ranked answer from
this stackoverflow’s question gives some Let’s see the simplest example possible:
How intuitive was that! At least, I don’t need to check on the documentation every time I want a red message! If you only need one word in different color, it’s as simple as a concatenation, here’s a quick example:
IndentationOne of the main feature of Clint, is to handle nicely indentations. It even managed nested indentation, a quote system, allow you to set some prefix chars, like quotes in emails for example. Here a quick example:
Once executed, the output gives:
Looks good without breaking a sweat! ArgumentsThere are ways to handle arguments, like the module
For a redistributed program that I take time over, I would probably use
Progress bar, files and pipesClint comes with more tools, which are easy to use. Let’s look at a progress bar with Clint:
Clint handles pipes, eg. Documentation and ConclusionThis post is not a review of every possible utility that Clint has to offer,
but more of a quick overview, and memo for myself. I really think Clint could
come in handy from time to time. Unfortunately, there is a lack of documentation, not
much more than the README from the github repository, as the Another thing that could bother you is, so far, Clint only works with python
2.x. Python 3 compatibility is include in the todo list, as is
documentations. I hope you enjoyed this quick review of Clint. Anyway, it’s in my toolbox now. |
01/01/12 Changes on This BlogSince I started blogging, this is the biggest change I’ve done. So I felt like I own you an explanation. The main reason was to separate the English content from the French one. Well, at least, it’s what I’m telling myself, as I know I changed the blog engine for Jekyll, just because I like the way it works. I’m aware that it might sounds unreasonable to change of CMS like that, but I’m blogging for my pleasure, spending lots of time with, so it worth to change for a better system, that suite better my way about computers. About French ContentFirst time I said in this blog that I wanted to write in english was in this post, it was more than 9 months ago. It took me some time to find the courage to do so, as I started only a couple of months ago. Anyway, I moved the content to this link, I had to manage some redirections, as it isn’t a good idea to leaves 404 pages. I probably won’t use it that much now. I certainly only publish the Hacker Weekly News series, I did think about to stop it, but I like this series, helps me to classify information, and keep track of it. So I’ll should carry on the series on the French part of this site. So, if you still want follow the Hacker Weekly News series, you should add this feed on your reader. The main site, of this post, keep the same feed as before, so no need to change anything. About JekyllIf you never heard about Jekyll, is a static website generator, the main idea is to generate the entire site in plain HTML, with obviously some JavaScript, but no server side language such as PHP. I never really liked hack into Wordpress, at the opposite to Jekyll, witch is much easier to get into. You just need some Ruby background. I hesitated with blogofile as it’s written in Python. I won’t explain why Jekyll, or any static website generator, are nice to use, there is already lots of blog post around the web. About Github PagesI did want try this solution, Jekyll was build to works with Github pages, the idea is simply to push on the repository, and Github does the generation of the site. The problem is Github doesn’t allow any plugins. Fair enough, I can understand that they don’t want any arbitrary code to be run on them server, but it loose one of the main interest of it. No plugins, no hack, no interest, simple as that. So I’ll host myself, with some kind of rsync over ftp, seems like lftp does something like that with the mirror mode. I would think about Github pages if I haven’t used a plugin to generate all my redirection. I still have some stuffs and improvements to take care of. That’s all for now, see you soon with some real blog posts! |
03/12/11 PhotoShow, Web gallery without SQLWhen it comes to web gallery, I usually choose Piwigo, a safe choice for a stable PHP gallery. Last week, I heard about a new project, called PhotoShow, a nice looking web gallery. A demo website is available. Here a quick functionalities review.
First, I have to warn you that PhotoShow still on a early stage of his developpment. It seems stable enough, the project should improve quickly in a near future, with probably some new features. So perhaps it isn’t ready for production, but should be fine for a personal use. Installation and configuration are straight forward, the easiest is use
Some would appreciate the drag n' drop system, I personally liked the disposition of thumbnails, compact as google galleries, managed well different size to find the optimal display, allow you to quickly see every photos of an album. I will keep an eye on this project for sure. At last, the code can be found on github, under the GNU GPLv3. |
02/12/11 Manage automatically two dictionaries with FirefoxWhen your native language isn’t English, and when, like me, you spend time writing around the Internet, between comments from some news sites, blog posts and programming question-answer site, you have to deal with at least two languages, English, and whatever language you use at home. Unfortunately, I have trouble with grammar and spelling^1. I probably have done what everyone else with bad spelling would do in this case, add to Firefox a spell checker. It does what I want, but as I write across websites, I need to switch the spell checker from French to English, certainly more often that I even notice. Switching of dictionaries is annoying, but not enough to really do something about it. When you’re switching it, you think that perhaps you should try to google about it if there is any kind of shortcut or whatever would do the trick and save you some time, but you forget as soon as you switched the dictionary, and your mind focus on the answer/comment you’re writing. Same thing for asking to some geek friends, quickly forgotten to ask, every time. So I’d carry this problem who isn’t really one, and by chance, I found the perfect solution for what I’m asking for. It could be obvious to some persons, but after all, I’m not switching of dictionary for that long time ago. The answer I found is no more that a Firefox plugin, called dictionary switcher. This plugin recognize automatically the language you are taping of, and adapt the dictionary in function of it, few more options on it to do more precisely what you want. With a name link that, I could find it earlier, but the thing is I didn’t toke time to look for. Short blog post, for a quick trick, maybe it could be useful to someone else. |
01/12/11 The missing newsletter of Arch LinuxMost of Linux distributions comes with newsletters, a short summary of what happen around distributions and the community himself. Interestingly enough, Arch Linux doesn’t have anymore one, as far as I know. It wasn’t always like this, here a quick review of what was done so far. y apologies if any informations was inaccurate. The newsletterFeb 2004 – Jul 2009 As the Arch community is growing, some of you may never heard about this old newsletter, start with weekly issue, quickly became a twice a month release, finished as a monthly issue. The information provide was good, but as I became an Arch user around this time, I haven’t the opportunity to read lots of them. For information, you still can read old archives on this link. Arch Linux Newsletters Archives I’m certainly not the only one, but I miss this newsletter. Arch User MagazineApr 2009 – Jun 2009 Unofficial project initiate by Ghost1227, in a paper magazine style, old issues can be grab in the same link as the Newsletters Archives. We can still read the bbs thread for the first released issue. Three issues was made, and it will be merge with the official newsletter, as the author doesn’t have the time to carry on the project as he wanted. Arch Linux MagazineAug 2009 – Mar 2010 The official newsletter, by Kensai, and the Arch User Magazine, by Ghost1227, will join their force together to provide a magazine available in both format html (newsletter format) and pdf (scribus/magazine format). Here is the bbs thread for nostalgic, about the first released announce by Kensai. I proudly translate issues with others French contributors in my language back this time. Unfortunately, a lack of contribution, and certainly of time as well, ended the magazine after 4 releases. But meanwhile, Kensai left for personal reasons. Rolling ReleaseSep 2010 – May 2011 (Until now?) Rolling Release is an official website that aimed to succeed the Arch Linux agazine, as it’s an e-zine, no need to have a regular issue, or even spend time with scribus to make a nice looking pdf. Here the forum announce of the official launch of the site. Technically, the website look nice, allows comments. Even someone, jdarnold, started for few weeks a weekly issue on this site. The website has nice posts for a while, but hasn’t published anything since May 2011, without any official reason that I’m aware of, other than the lack of time I guess. The missing newsletterAll this news was great informations, I’m very thankful for all the time that contributors spends on this, on their own time. But what’s now? I know what you think, “you want one? Do It Yourself!”, it’s absolutely true if I was following Arch Linux actuality enough, and a more fluent English. What I do know is that this kind of initiatives often come from one man, no more, after all, Arch Linux came from a one man project as well. So, maybe if you are close to the community, following forum or mailing list, you might consider start some kind of newsletter. It doesn’t need to be great, long, with lots informations. Few links in a paper, with a short description, a couple of tricks or applications taken from the forum, it’s all it need to start something, I’m sure the community would be thankful for this, well I’ll be thankful for sure. |
Agrandir





