Can I import content of a text file

Help each other out

Can I import content of a text file

Postby lar282 on Mon Mar 21, 2005 9:38 am

Is it possible to import the content of a txt file into a database? I dont need the name of the file just the content of it!

The format is like this:

show=Ed
StartDate=3/21/2005
starttime=9:15:00 AM
EndTime=10:05:00 AM
ChannelName=Kanal 5


regards


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby lar282 on Tue Mar 22, 2005 8:23 am

If not possible does anybody know if I can do it from a plugin?If so does any have an source code as an example?



//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby art on Wed Mar 23, 2005 3:59 am

try this:
http://home.comcast.net/~artcrazy/dload/readTXT.zip
it's not a plugin, but it does what you want, read readme file in zip.
I'm not a programmer, so it may not look good (the source) but it works :)
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby embee on Mon Jun 20, 2005 10:45 pm

it's been a while since this was posted...

I'd like to import some text (similar to that you posted lar282, program markers for digiguide) did you have any success?

do you still have that zip art? would like to try it, if you've got it and don't mind :)
embee
 
Posts: 9
Joined: Wed Sep 15, 2004 1:38 am

Postby lar282 on Wed Jun 22, 2005 6:24 am

I still have the zip file if u want it.Give me your mail adress and I'll send it to u.


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby art on Wed Jun 22, 2005 3:35 pm

embee wrote:do you still have that zip art? would like to try it, if you've got it and don't mind :)


Sorry I deleted it (was doing spring cleaning... :)), didn't know if it was useful and didn't think anybody else would want it :), but it looks like lar still has it.....
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby embee on Wed Jun 22, 2005 4:34 pm

embee
 
Posts: 9
Joined: Wed Sep 15, 2004 1:38 am

Postby lar282 on Thu Jun 23, 2005 6:12 am

Tried to send it to u as a zip file with a password but your mail refused it.It bounched back!!I put it here instead

http://hem.passagen.se/lar282/ReadTxt.zip

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby embee on Thu Jun 23, 2005 6:49 pm

got it Lasse, Thankyou :) and Thankyou art for posting it originally :)

I've run into a problem that's not related to the program but another i'm using to run it...

running it with the windows run command I get this -

<?xml version="1.0"?>
<database>
<item>
<display>Emmerdale</display>
<information>
<Startdate>23/06/2005</Startdate>
<Starttime>19:00</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
</information>
</item>
<item>
<display>Go North West</display>
<information>
<Startdate>23/06/2005</Startdate>
<Starttime>19:30</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
</information>
</item>
<item>
<display>The Bill</display>
<information>
<Startdate>23/06/2005</Startdate>
<Starttime>20:00</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
</information>
</item>
<item>
<display>Ladette to Lady</display>
<information>
<Startdate>23/06/2005</Startdate>
<Starttime>21:00</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
</information>
</item>
</database>

when I try running it with my other program (Startup Magic) I get this -

<?xml version="1.0"?>
<database>
<item>
<display>Emmerdale</display>
<information>
<Startdate>23/06/2005</Startdate>
<Starttime>19:00</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
<show>Go North West</show>
<Startdate>23/06/2005</Startdate>
<Starttime>19:30</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
<show>The Bill</show>
<Startdate>23/06/2005</Startdate>
<Starttime>20:00</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
<show>Ladette to Lady</show>
<Startdate>23/06/2005</Startdate>
<Starttime>21:00</Starttime>
<ChannelName>ITV1 Granada</ChannelName>
</information>
</item>
</database>

any idea why it's doing that? (just curious really, will be trying it with girder later so hopefully won't need a 'fix' for it)
embee
 
Posts: 9
Joined: Wed Sep 15, 2004 1:38 am

Postby lar282 on Thu Jun 23, 2005 7:46 pm

I have no clue but I am curious what u are trying to do? Looks like the same info I have in the Schedule plugin!!All u wanna do is write a xml file from the epg info?

let me know if u want me to add something to the plugin so we can have everything at one place.

//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby embee on Thu Jun 23, 2005 10:44 pm

i'm importing my DigiGuide markers into xlobby (txt - xml) programmes marked for watching/favourites etc. If I could initiate channel changing and recording from these at some point in the future that would be great :) not sure if it would fit in with the way your plugin works or wether it would be worth the time spent doing it? (on a usefulness to others basis) i'll have a read of your thread.
embee
 
Posts: 9
Joined: Wed Sep 15, 2004 1:38 am

Postby art on Thu Jun 23, 2005 11:18 pm

embee wrote:any idea why it's doing that? (just curious really, will be trying it with girder later so hopefully won't need a 'fix' for it)


Startup Magic is converting command line into CAPS. Try this link from my first post it should be fixed. I uploaded new zip ...
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby embee on Fri Jun 24, 2005 12:05 am

that doesn't work eiher way art (getting an exception error) lmk if you want the details
embee
 
Posts: 9
Joined: Wed Sep 15, 2004 1:38 am

Postby art on Sat Jun 25, 2005 10:30 pm

embee wrote:that doesn't work eiher way art (getting an exception error) lmk if you want the details


Got your email, problem was in your input.txt file - description was broken into multiple lines instead of one. I changed source to ignore lines without "=". Use link in my first post, new zip uploaded.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX