Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 28th, 2009, 8:28 AM   #1
Panos
Newbie
 
Join Date: Jun 2009
Posts: 3
Rep Power: 0 Panos is on a distinguished road
Combine CSS files

I would like to create a simple program for this purpose: I wish to combine css files.
A usual css file is like that.
------------------------------------------------------------------------------------------------------------
body { background-color: #000;
font-size: 62.5%;
margin: 0;
padding: 0; }

#main p.first {
margin-bottom: 0;
}

a:link img, a:visited img {
border: none;
}

li.clearFloat {
clear: both;
}

------------------------------------------------------------------------------------------------------------

- A css file is pure text.
- Words in pink color, are rules and they customize web pages.
- Data inside the braces, are explaining how a web page is customized. As you see, characteristics that are applied are colors, sizes, etc.

It happens that i need to include many rules from different files to one. But, i don't want to have same rules from 4 or 5 files repeated like that
-------------------------------------------------------------------------------------------------------

li.clearFloat {clear: both;}

.rowWrap {width: 100%;}

li.clearFloat {clear: both;}

.rowWrap {
width: 100%;
}

li.clearFloat {
clear: both;
}
...
--------------------------------------------------------------------------------------------------------

What i thought it could be my goal using a programming language is to create a program that is going to:

1. read 1 whole css file,
2. then start reading a second css file until it reaches the character ' } ' ,
3. if what reads in the second file until the ' } ' character, already exists in the first file, then it should delete it, else, it should leave it as is,
4. continue reading from last ' } ' to next ' } ' and repeating the 3. procedure.

I would appreciate it if you could point me to a web site or a programming language.
Thank you
Panos is offline   Reply With Quote
Old Jun 28th, 2009, 12:55 PM   #2
kolosick.m188
Newbie and proud of it
 
kolosick.m188's Avatar
 
Join Date: Jun 2009
Location: Galactic Sector ZZ9 Plural Z Alpha
Posts: 30
Rep Power: 0 kolosick.m188 is on a distinguished road
Re: Combine CSS files

Any programming language would do though I recommend using python
__________________
There are 10 types of people in the world, those who get this, those who don't, and those who thought this was binary.
kolosick.m188 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking source codes of image, audio and video files on_auc C++ 5 Jan 1st, 2010 10:14 AM
How do I read .mbm (Multi BitMap) files? moondog Other Programming Languages 19 Aug 16th, 2007 9:59 PM
utility i wrote to maul index.dat files on root partition c0ldshadow C++ 6 Jun 16th, 2005 4:24 PM
shutil.copy corrupting files? TimL Python 0 Feb 20th, 2005 4:32 PM
Bash script to access all files in a directory shinni Bash / Shell Scripting 4 Feb 18th, 2005 4:26 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:30 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC