Menu

Import Textfiles to be viewed in CalendarList

Help
2004-04-13
2012-10-11
  • Andre Gellert

    Andre Gellert - 2004-04-13

    Hi Folks,
    I want to do a mass import of text files into phpwiki, those shall be viewable in the CalendarList Plugin.
    My 1.3.9 is mysql based.

    I have checked:
    A new entry inserts into this tables:

    INSERT INTO `link` VALUES (320, 320);                
    INSERT INTO `nonempty` VALUES (320);                 
    INSERT INTO `page` VALUES (320, 'diary_2004-04-15', .....
    INSERT INTO `recent` VALUES (320, 1, 1, 0);          
    INSERT INTO `version` VALUES (320, 1, 1081882229, 0, 'D....

    (truncated for reading purposes.)

    I want to write a skript , which browses directories and imports the textfiles ( YYYY-MM-DD.txt ) into "diary_YYYY-MM-DD" pages.

    I quick-checked the internas for half an hour, now, but not everything is clear.
    1st: is there a tool to import content ?
    2nd: i add pages with the insert statements above, is this everything i need to do ?
    3rd: The content is ony serialize() ? (Seems so to be in the peardb.class)

    Thx for ideas,
    Andre

     
    • Reini Urban

      Reini Urban - 2004-04-14

      Don't do it directly into the database for sure!
      We have several importing methods on the PhpWikiAdministration page.

      Easiest would be to load flatfiles from a seperate directory, with the correct filenames, but without any special headers, like LOCKED MARKUP, AUTHOR.

      Do you have to do this only once (use loadfile) or automatically on some kind of email or IRC request? Then I would write a xml-rpc method to import a new page.

       
      • Andre Gellert

        Andre Gellert - 2004-04-14

        Hi Reini,
        I have to do this as a one-time-only job.
        I will try to batch-rename them , zip and upload as soon as i am at home.
        Results will be posted here, to close the thread.

        Is there an existing xml-rpc interface to fill the wiki?

        Bye Andre

         
        • Reini Urban

          Reini Urban - 2004-04-15

          sure

           
    • Andre Gellert

      Andre Gellert - 2004-04-14

      Okay, everything is great with the import via a zip-file.
      Thx for the advice, this was the last thing I was thinking of, the direct, dirty way was too obvious to me :-)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.