You are not logged in.

#1 2009-07-25 16:21:51

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

arch-home

What is it?
arch-home is a webpy script that generates an Arch Linux homepage.

Community Inspired
CodeBlock originally came up with the basic design. http://bbs.archlinux.org/viewtopic.php?id=69554&p=1
I liked it and wanted to expand on the idea.

Screenshot
arch-home_small.png

Source
http://github.com/pyther/arch-home

Link
http://home.archlinux.ca - Big thanks to Dusty for hosting this!

Last edited by pyther (2011-12-10 22:53:18)


Website - Blog - arch-home
Arch User since March 2005

Offline

#2 2009-07-25 17:13:31

9nqksfhn
Member
Registered: 2009-07-22
Posts: 28

Re: arch-home

Nice, but you should escape ampersands in urls.

Replace:

rchlinux.org/viewtopic.php?id=69554&p=1">community</a>. Source at <a href="ht

with:

rchlinux.org/viewtopic.php?id=69554&p=1">community</a>. Source at <a href="ht

Also since it's valid XHTML why don't you serve it with mime type "application/xhtml+xml" so our web browsers can process it as xml?

Last edited by 9nqksfhn (2009-07-25 17:14:30)

Offline

#3 2009-07-25 17:38:34

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

Yes I should escape ampersands, I overlooked that, thanks!

Also I added "<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />" not sure if this does what you want...

How can I get firefox to process xml?


Website - Blog - arch-home
Arch User since March 2005

Offline

#4 2009-07-25 18:35:13

9nqksfhn
Member
Registered: 2009-07-22
Posts: 28

Re: arch-home

OK, I'll explain.

Basically when HTML is rendered; if the code is incorrect and has tags all over the place etc web browsers try to automatically correct the errors and still display the web page, without giving an error. This has three problems:

1. It is hard to write correct code because the web browser does not tell you when you make a mistake.
2. It massively increases the amount of processing power needed to render the page and the complexity of the web browser's rendering engine.
3. It means that websites written for one web browser are less likely to work in other web-browsers because the error correction handling of different web browsers might be different.

So the w3c created XHTML; an application of XML, because XML does not tollerate errors so it solves the above problems.

XHTML 1.0, which you have written that page in, is backwards compatible XHTML; it works as either HTML or XHTML. You are currently serving it as html. Type: "curl -I http://arch.pyther.net/"

The http-equiv setting makes no difference because the http headers overwride it. In order to make web browsers process it as XML you need to change the http headers. I think you need to change this in /etc/lighttpd/lighttpd.conf

Microsoft Internet Explorer does not support rendering XHTML as XML, which is why most webservers use text/html by default. But since people who use IE aren't likely to use that page you might as well serve it as XHTML to save a bit of electricity and make the page load faster.

Offline

#5 2009-07-25 18:50:54

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

Ahh okay thanks for explaining! That is very interesting and I'm surprised IE8 doesn't support it either, considering IE8 has been getting better at supporting css.

I implemented the feature and its in git right now. I simply added web.header('Content-Type','application/xhtml+xml;') in index.py

Thank you


Website - Blog - arch-home
Arch User since March 2005

Offline

#6 2009-07-25 19:03:19

9nqksfhn
Member
Registered: 2009-07-22
Posts: 28

Re: arch-home

smile

Offline

#7 2009-07-25 20:05:33

Melson
Member
Registered: 2008-08-29
Posts: 39

Re: arch-home

Nicely written, I just quite doubt about the power saving argument. It sounds like "I don't drink much water to make rivers cleaner." Most users will probably prefer viewing an invalid page to saving power parsing it. But right, I think I know what you mean.

Offline

#8 2009-07-25 20:59:35

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

Thank you, dusty helped me out with the list comprehensions.

It probably won't save power, but I like the idea behind it. If one wants text rendering they just have to comment out the web.header() line in index.py


Website - Blog - arch-home
Arch User since March 2005

Offline

#9 2009-07-25 21:50:56

scragar
Member
Registered: 2009-07-14
Posts: 108

Re: arch-home

Melson wrote:

Nicely written, I just quite doubt about the power saving argument. It sounds like "I don't drink much water to make rivers cleaner." Most users will probably prefer viewing an invalid page to saving power parsing it. But right, I think I know what you mean.

Don't valid pages render faster, since the engine does less error checking etc?

I ask because I'm not sure, in my tests XML renders much faster than invalid HTML for larger pages, and much slower for the smallest pages, I'm not sure what that means about the page speed though.

Offline

#10 2009-07-25 22:54:07

Melson
Member
Registered: 2008-08-29
Posts: 39

Re: arch-home

I am not much into it but it seems probable. Note that crossing tags and things like this are not allowed in HTML either. The main difference is only that the engine doesn't try to figure out what was meant.

Your tests are interesting, there must be a speed benchmark out there.

Offline

#11 2009-07-25 23:47:47

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

Huge thanks goes out to Dusty for hosting arch-home!

http://home.archlinux.ca


Website - Blog - arch-home
Arch User since March 2005

Offline

#12 2009-07-26 00:18:12

baddog144
Member
Registered: 2009-07-10
Posts: 36

Re: arch-home

Nice. Homepage'd big_smile

Offline

#13 2009-07-26 01:33:00

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: arch-home

Really nice! Now if we can get google to replace their search engine with ours, we can have world domination! tongue

EDIT: Actually I was thinking, why not have a dedicated tab for this on this site? Where the Home, Forums, Wiki, Bugs, AUR, Download tabs are?

Last edited by Acecero (2009-07-26 01:41:21)

Offline

#14 2009-07-26 04:51:34

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

Version 0.7 has been released.  http://github.com/pyther/arch-home/tarball/0.7
A special thanks to Dusty for helping me with the CSS/Design and again for the hosting!

Noteworthy items:
*i686 and x86_64 design was updated
*CSS uses ems instead of pixels. This should cause arch-home to render better with various resolutions.

http://home.archlinux.ca/


Website - Blog - arch-home
Arch User since March 2005

Offline

#15 2009-07-26 08:59:48

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: arch-home

Could you post the source on github instead of the tar ball please?

Offline

#16 2009-07-26 12:51:10

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home


Website - Blog - arch-home
Arch User since March 2005

Offline

#17 2009-07-26 13:12:03

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: arch-home

nice job, i am thinking of making a custom one myself with my own rss feeds wink

Offline

#18 2009-07-29 16:44:22

Confuseling
Member
Registered: 2009-07-23
Posts: 13

Re: arch-home

Not capable of technical contributions, sorry. smile

But could the word 'google' link to google.com, equivalent to what the other words (forums, wiki etc) do, to make it easier to get to image searches and so forth?

Great idea though!

Offline

#19 2009-08-01 22:04:36

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

^^
Done


Website - Blog - arch-home
Arch User since March 2005

Offline

#20 2009-08-03 20:18:02

Confuseling
Member
Registered: 2009-07-23
Posts: 13

Re: arch-home

Cheers wink

ETA:

Thinking about it, RECENT UPDATES could sensibly link to http://www.archlinux.org/packages/?sort=-last_update as well...

Or even X86_64 to http://www.archlinux.org/packages/?sort … =&limit=50 and i686 http://www.archlinux.org/packages/?sort … =&limit=50

(though that might be overkill... tongue)

Last edited by Confuseling (2009-08-04 12:33:39)

Offline

#21 2009-08-07 20:53:09

darose
Member
Registered: 2004-04-13
Posts: 158

Re: arch-home

Nice work, pyther!

Offline

#22 2009-08-08 07:56:52

nDray
Member
From: Portugal
Registered: 2007-01-21
Posts: 143
Website

Re: arch-home

uau!

I was just going to suggest you to make the "Forums", "Wiki", "Aur", etc actual links for the respective places, but it is already like that!

Thanks for a wonderful job!

Offline

#23 2009-08-08 18:49:35

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: arch-home

Edit: Wrong thread. Opps.

Last edited by simongmzlj (2009-08-10 02:28:54)

Offline

#24 2009-08-10 17:30:04

okplayer02
Member
From: Denver, Colorado
Registered: 2008-11-24
Posts: 84

Re: arch-home

how do u set this up on my as a localhost instead of using the webserver


Say what is good or keep silent  --Prophet Muhammad (SAW)

Offline

#25 2009-08-11 01:10:58

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: arch-home

Well you can set it up on a local apache or lighttpd server, however for your needs, it might be easier to just use the basic webpy server.

To do that you need the following packages:
python-feedparser, feedcache (aur), python-flup, and of course python

Then just extract it and run ./index.py

That should set the server up on port 8080. Do not put your server online using the webpy backend as it is by no means secure!


Website - Blog - arch-home
Arch User since March 2005

Offline

Board footer

Powered by FluxBB