Jump to content

Has this been done?


omcaree
 Share

Recommended Posts

Hey everyone,

 

I've got a month left until I go back to university and i've exhausted all of my holiday resources (so i'm now tired, sunburnt and poor). So for the remainder of the holiday I intend to sit here. Now obviously I'm sitting infront of a linux machine, so the possibilities are endless, and i've decided to make and host my own website. Now I've tried this in the past (admittedly using Windows with MS IIS, and making websites with Frontpage or Dreamweaver), and all has gone fine but the sites have died out of lack of maintenence. So I've come up with a new approach, rather than just make a load of pages about me, my interests and general stuff that no one else cares about, I'll base my site on linux, literally.

 

Heres the plan. Rather than doing a load of fancy graphical design to make it look pretty but not very functional, and then filling it with java, flash, and god knows what else to make it work, I'm going to write a load of shell scripts to make/update the pages for me. Now I'm sure most of you would find this pretty simple, but I have next to no experience with shell scripts (all my knowledge of 'Programming' comes from Matlab at Uni) and even less experience with html.

 

So far I have a script which automatically places thumbnails on a page and links to the fullsize picture, one that keeps track of what I listen to on xmms, and one to combine my "linux diary" (which is basically a changelog, listing what I do to my computer). As well as this I have a very crude counter on my frontpage (counts the number of different IP addresses in the server log), as well as a display of server uptime.

 

Now I'm sure there are far more effective ways of doing this, but this is the method I have chosen and will stick to because if nothing else I'll learn how to write scripts, and might even pick up some html. I'm interested to see if anyone has done similar to this, I'm kind of hoping I'm the first, but I doubt it.

 

Anyone who wants to see (or laugh at) my progress should check out http://omcaree.myftp.org

If there is enough (any) interest then I'll post regular updates here

 

Thank you for your time B)

 

Owen Mc

Edited by omcaree
Link to comment
Share on other sites

This sounds like an ideal candidate for using CSS to style your web pages. You'd only need simple tags around each section - which are then styled however you like by a seperate stylesheet. You can even have multiple stykesheets to change the look and feel of the entire site very quickly.

Link to comment
Share on other sites

Qchem: I have looked into CSS but at the moment I'm just trying to test my idea, getting basic pages put together, then I'll think about styling.

 

Leo: The XMMS page is pretty buggy at the moment, should contain links to previous days lists but they dont seem to want to appear, I'm working on that though. Formatting will follow once the thing works.

 

Cheers for the replies,

 

Owen Mc

Link to comment
Share on other sites

Since there appears to be a little bit of interest in this I'll post the odd update here when I change things, todays changes include:

 

-XMMS page now works (i think), will work on formatting next

-IP Counter on frontpage works (discovered that the script has to be run as root, hence why it was stuck on 9 for a while)

-Uptime counter changed from using the "uptime" command to using a formatted version of /proc/uptime

 

 

if I make anymore changes today then I'll just edit this post

 

Cheers

 

Owen Mc

Edited by omcaree
Link to comment
Share on other sites

I apologise for posting in the wrong place :unsure:

 

Well, it's the middle of the night and I've just finished adding a guest book. I had to use a little bit of perl (admitted I know next to nothing about perl so I borrowed a script and modified it for my needs) as well as another shell script.

 

Data (name, email, url, message and ip) from a form is saved to a temporary folder where it is formatted by a script. Formatting includes removal of various characters (to prevent posting html) as well as changing the email address from name@somewhere.com to name at somewhere dot com. Messages are placed within a table (to wrap text) and a line break is added to each line to allow carriage returns. Once everything is added to html a log entry is made and the temporary files are deleted.

 

I know I still need to work on formatting, but other than that i've kind of run out of ideas. Any suggestions from anyone as to what I might include?

 

Cheers,

 

Owen Mc

Link to comment
Share on other sites

How about addng some 'back to main page' links to make navigation easier.

 

On the changelog how about automating links to more information on items or project homepages (maybe using a fairly strightforward google search could accomplish this to some extent, I guess the challenge is getting the script to identify what to include a search for)

 

 

Leo

Link to comment
Share on other sites

Hey Leo

 

I've added the links back to "Home", simple formatting at the moment, but I'l work on that once I have a site together.

 

As for links in the changelog, I like the idea. I think I'll do something allong the lines of creating a file full of keywords and their corresponding links, then some how search the document(grep?) and replace those keywords with links.

 

After today I'll be away for a few days so there wont be many changes (and a few "No Entries" in the changelog).

 

Thanks for the ideas,

 

Owen Mc

Link to comment
Share on other sites

Hit counter added (to suppliment visitor counter). uses grep to count occurances of "GET / HTTP/1.1" in the apache log file (which occurs once per load of the homepage). It also filters out local hits (ie from 127.0.0.1) so as not to count those (using grep -v).

Link to comment
Share on other sites

Hey all,

 

I've incorporated Leo's suggestion of including links on the changelog using the following:

sed "s/ $keyword / <a href=$link>$keyword<\/a>/g"

 

This only applies to the current changelog on display, not those archived for previous weeks.

 

Hope this impresses someone out there :P

 

Cheers

 

Owen Mc

Link to comment
Share on other sites

added some CSS, allong with a splash page, and some other updates.

 

Changed the name to The Black Box (as this is a nickname which i've aquired for my computer)

 

Cheers

 

Owen Mc

Link to comment
Share on other sites

  • 8 months later...

I know this is reviving the dead, but I just happened to be browsing Workbench and stumbled on this. I go to that site now and all I see is:

Welcome to The Black Box ITX

 

This page is currently under construction and may not be complete for some time, please visit again

omcaree.myftp.org

<<my ip address>>

<<text box>>

<<Submit button>>

 

Are you gonna continue with this? I would've liked to have seen this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...