Python

Moderators: None (Apply to moderate this forum)
Number of threads: 400
Number of posts: 1055

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Py Script for html/comment/adsense mass replace in one directory Posted by ArchEnemy on 30 Jun 2010 at 11:22 AM
Hi,

I have old big (~2000 pages ) html site with standard template.

Idea is to make php cms to reduce hand coding in future.

I want to strip all html tags, all comments in html and all Adsense code (just one Adsense type for all pages).

Latter I will find my way to export important stripped data to MySql with Python or PHP.

I am novice to Python/PHP, so I need script to:

1. Walk for files in ONE directory
2. stript html/comments/adsense
3. Save that files under same name under same directory

I found script for replacing in one page, but I need that "walk in dir + replace" option.

Any ideas how to start that in Python ?

Tnx for help.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.