Import posts from existing blog?

User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

donblanco wrote: Thu Jun 07, 2018 3:58 pm These files are from a previous Hugo > Github Pages install. Hugo does a static site generation thing.
The problem is not the import, and the question was: Is there a tool for exporting the data or how can they be exported. There can be found a lot of information of how to import to Hugo, but not how to export.

Because this is not a Bludit related problem please ask the developer of Hugo, if and how this can be done.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Hi
I was using Guppy for years, a french flat files cms, and I would also like to switch to Bludit. I va hundred of articles, i began to do it manually, by splitting my data into several Bludit, but it took a hell of a time :(
https://sucrepop.com
Candies for the ears
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

LRAM wrote: Mon Jun 11, 2018 2:37 pm I was using Guppy for years, a french flat files cms, and I would also like to switch to Bludit.
Same question: Is there a way to export content from GuppY? In which format is it stored?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
Fergo
Jr. Bludit
Posts: 6
Joined: Sat Nov 07, 2015 2:04 am

Jumping on this train...

I also intend to port my current website do Bludit. I coded my own CMS at the time so I have the freedom to export it to the format it needs to be. Question is: in order to import it into Bludit, all I have to do is create the folder structures in the content folder with the index.txt (and it's fields) and update the pages.php database? Is there anything else that I need to mess with?

If so, it should be quite straightforward to write a script and convert from my previous custom CMS to Bludit's format.

Thanks!
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Fergo wrote: Mon Jun 11, 2018 10:34 pm Question is: in order to import it into Bludit, all I have to do is create the folder structures in the content folder with the index.txt (and it's fields) and update the pages.php database?
Yes, this is all that has to be done.

If you have tags and categories this database files also have to be updated.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
Fergo
Jr. Bludit
Posts: 6
Joined: Sat Nov 07, 2015 2:04 am

Edi wrote: Tue Jun 12, 2018 12:15 am
Fergo wrote: Mon Jun 11, 2018 10:34 pm Question is: in order to import it into Bludit, all I have to do is create the folder structures in the content folder with the index.txt (and it's fields) and update the pages.php database?
Yes, this is all that has to be done.

If you have tags and categories this database files also have to be updated.
Thanks. Two more questions when creating the pages.php database, though:

1) The "md5file" is just the md5 of index.txt?
2) How to generate the "uuid"? EDIT. Nvm, its just md5(uniqid(currtime)). I thought it might be related to something, but it's just some unique identifier.

Thanks!
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

As Guppy is a flat files CSM too, there is no need to export, each articles is already a txt file
https://sucrepop.com
Candies for the ears
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

LRAM wrote: Thu Jun 14, 2018 1:41 pm As Guppy is a flat files CSM too, there is no need to export, each articles is already a txt file
And where is the database structure? In which format?

Also it depends which data each txt file contains. Text, Markdown, HTML, CSS, links to images etc.?
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
LRAM
Master Bludit
Posts: 199
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Has thanked: 22 times
Been thanked: 2 times
Contact:

Bonjour Edi
here's one of my article. Every article are stored in the same directory
$type says it an article, a news, a blog ...

Code: Select all

<?php
$type = 'ar';
$fileid = '10';
$status = 'a';
$creadate = '200412060400-';
$moddate = '200912111108';
$author = stripslashes('Phil');
$email = stripslashes('webmaster@sucrepop.com');
$fielda1 = stripslashes('<!--09-->2005 - C12H22011POP');
$fielda2 = stripslashes('');
$fieldb1 = stripslashes('<!--01-->Les ombres (bossa)');
$fieldb2 = stripslashes('');
$fieldc1 = stripslashes('<h1>Les ombres</h1>
<br />
<div id=\"credits\" style=\"color: blueviolet; font-weight: bold;\"><i>credits&gt;Crédits: Auteur: Isabelle - Compositeur: Phil - Interprète: Laura</i></div>
<center><br />
<audio controls="controls" preload="none"><source src="mp3/075lesombres.mp3" type="audio/mp3" /> Votre navigateur n\'est pas compatible</audio></center><br />
<br />
<center><img height=\"27\" border=\"0\" width=\"226\" src=\"img/gratuiciels/Ico_Telechargements.gif\" alt=\"Ico_Telechargements.gif\" title=\"Ico_Telechargements.gif\" /><br />
<font size=\"-3\" color=\"#cc0066\">Le mp3 est accessible en cliquant sur le bouton de droite du lecteur</font></center>
<table height=\"70\" align=\"center\" width=\"300\">
    <tbody>
        <tr align=\"center\">
            <td><a href=\"../kok/075kok.zip\"><img height=\"51\" border=\"0\" width=\"51\" delmp3karaoke=\"\" karawin=\"\" karafun=\"\" pour=\"\" mp3=\"\" alt=\"Karaoke\" src=\"img/gratuiciels/Ico_Karaoke.gif\" /></a></td>
            <td><a href=\"../tabs/075lesombres.pdf\"><img height=\"51\" border=\"0\" width=\"51\" accords=\"\" d=\"\" alt=\"Grille\" src=\"img/gratuiciels/Ico_Accord.gif\" /></a></td>
            <td><a href=\"../kar/075sucrepop-lesombres.zip\"><img height=\"51\" border=\"0\" width=\"51\" delmpkaraoke=\"\" karawin=\"\" karafun=\"\" vanbasco=\"\" pour=\"\" kar=\"\" midi=\"\" alt=\"Fichier\" src=\"img/gratuiciels/Ico_Midi.gif\" /></a></td>
        </tr>
        <tr align=\"center\">
            <td><font size=\"-2\" color=\"#808080\">Version karaoke mp3</font></td>
            <td><font size=\"-2\" color=\"#808080\">Grille d\'accords</font></td>
            <td><font size=\"-2\" color=\"#808080\">Fichier midi - kar</font></td>
        </tr>
    </tbody>
</table>
<br />
Comme une feuille de papier déchirée,<br />
elle colle sa tête sur le miroir brisé,<br />
dans un ultime essayage,<br />
elle tente de se refaire un visage.<br />
Dans un ultime maquillage,<br />
elle cherche à dessiner le rivage.<br />
Dans un ultime reflet<br />
elle le voit, qui apparaît.<br />
<br />
Silhouette fragile,<br />
funambule aux pas agiles,<br />
juste posé sur un fil,<br />
apprend moi comment le difficile<br />
est devenu facile,<br />
toi, qui fait le vide docile.<br />
Sur le fil, je voudrais tant me laisser glisser<br />
pour oublier qu\'il peut aussi à la gorge me serrer,<br />
me laisser dans un linceul vide, seul, à en crever.<br />
<br />
Dans la rue les ombres passent et défilent,<br />
pantins à la recherche de fils.<br />
La pluie dans la gouttière fait flic-floc,<br />
ils marchent tous non stop.<br />
<br />
A trop bouger, s&rsquo;est coupée<br />
repose à présent la tête penchée,<br />
contre un miroir cassé.<br />
Ne semble pas avoir pleuré,<br />
ne semble pas avoir pleuré,<br />
allez savoir c\'quelle a pensé.<br />
<br />
Comme une feuille de papier déchirée,<br />
elle colle sa tête sur la vitre cassée,<br />
Rouge carmin à la lippe,<br />
empreintes signées au stick,<br />
flamme dans l&rsquo;regard d&rsquo;un type,<br />
rapport manuscrit d&rsquo;un flic.<br />
L&rsquo;enfantine gamine féminine féline<br />
d&rsquo;une ligne identité décline<br />
énigme au fragile mime<br />
de la pensée, est ce le crime ?<br />
<br />
<br />
Dans la rue les ombres passent et défilent,<br />
pantins à la recherche de fils.<br />
La pluie dans la gouttière fait flic-floc,<br />
ils marchent tous non stop,<br />
ils marchent tous non stop.<br />
<br />
<br />
<hr color=\"#c0c0c0\" align=\"center\" width=\"80%\" />
<br />
Textes et musiques sont mis à disposition sous <a href=\"http://creativecommons.org/licenses/by-nc-nd/2.0/fr/\" rel=\"license\">license Creative Commons by-nc-nd</a>.<!-- /Contrat Creative Commons --><br />
<p align=\"center\"><a href=\"http://creativecommons.org/licenses/by-nc-nd/2.0/fr/\" rel=\"license\"><img border=\"0\" src=\"http://creativecommons.org/images/public/somerights20.gif\" alt=\"Contrat Creative Commons\" /></a></p>');
$fieldc2 = stripslashes('');
$fieldd1 = stripslashes('MNU 15763');
$fieldd2 = stripslashes('');
$fieldweb = stripslashes('');
$fieldmail = stripslashes('');
$fieldmod = stripslashes('');
?>
https://sucrepop.com
Candies for the ears
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

It seems that every post, page etc. is a hard coded static php file.

I think GuppY has a RSS feed that could be used to export the content. The import could be done either by a script or as a sort of workaround using WordPress (to import, export and migrate to Bludit with the plugin WordPress to Bludit Converter):

https://codex.wordpress.org/Importing_C ... n_RSS_feed

Otherwise I think the easiest and fastest way would be copy and paste.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply