Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Saturday, May 18 2013 @ 10:02 PM EDT


 Forum Index > Extensions > Cool Hacks New Topic Post Reply
 Mail to story converter
   
fg
 04/07/02 08:52PM (Read 2507 times)  
+----
Newbie

Status: offline


Registered: 04/07/02
Posts: 2
Hi, I was wondering how could I convert a mail archive of a mailing list to Stories, so that when some user sends an e-mail to the list, it will appear as if it was a Story...No I'm using MHonArc to convert an ezmlm mailing list to html...Any ideas? Thanks in advance.

 
Profile Email
 Quote
fg
 04/09/02 08:23PM  
+----
Newbie

Status: offline


Registered: 04/07/02
Posts: 2
At least it could be nice to insert the maillist.html (mail index) to a static page, but anyway what would really be great is to insert everything as static pages... anyone providing some tips to make those inserts?

 
Profile Email
 Quote
kotalampi
 05/19/02 11:04PM  
+----
Newbie

Status: offline


Registered: 05/19/02
Posts: 1
Here's a quick hack for mail to geeklog gateway:

- take mail_to_db.pl that ships with MySQL
- import emails to table Mails:

CREATE TABLE Mails (
mail_id mediumint(8) unsigned NOT NULL auto_increment,
date datetime NOT NULL default '0000-00-00 00:00:00',
time_zone varchar(20) default NULL,
mail_from varchar(120) NOT NULL default '',
reply varchar(120) default NULL,
mail_to text,
cc text,
sbj varchar(200) default NULL,
txt mediumtext NOT NULL,
file varchar(64) NOT NULL default '',
hash int(11) NOT NULL default '0',
Category varchar(50) NOT NULL default 'Misc',
sid varchar(20) default NULL,
submitted int(11) NOT NULL default '0',
PRIMARY KEY (mail_from,date,hash),
KEY mail_id (mail_id),
KEY mail_from (mail_from),
KEY date (date),
KEY time_zone (time_zone),
KEY mail_from_2 (mail_from),
KEY reply (reply),
KEY sbj (sbj),
KEY file (file),
KEY hash (hash)
) TYPE=MyISAM;

- create random sids for articles which don't yet have it
- write couple of lines of SQL which will take stuff 'Mails' table and convert them to gl_storysubmission table.

For example:

INSERT INTO gl_storysubmission (sid, uid, tid, title, introtext, date, postmode) select sid, '14', 'Unsorted', sbj, txt, date, 'plaintext' from Mails WHERE submitted = 0 ORDER by mail_id DESC;
UPDATE Mails SET submitted = 1;

14 is the uid I'm using as a sender of these articles. And I'm importing things to Unsorted category. I have also added --category option to mail_to_db.pl which can set the Category column during the import.

Of course, there's much to improve here.

I'd be very interested in seeing complete mail list <-> geeklog gateway (both ways). Does anyone have anything available or should I code this myself (anyone else interested in?).

 
Profile Email
 Quote
Content generated in: 0.17 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content