Importing posts

Well done Saul (@Octoberon ), that is a fantastic result. Can I ask how long it took you to replicate @BrownMouse post?

That particular one was quite long with a lot of pics so took about 15 minutes but I have a couple of ideas about how I can streamline it. The time-consuming part at the moment is removing the hyperlinks for the images and copying them over so they’re stored on this forum.

1 Like

Will you put some instructions together so folk can do it themselves?

Do you have any way of uploading images from the command-line? Seems to me there various ways to get old posts as HTML with jpegs, but as you say, the tricky bit is automating uploading those jpgs and fixing the URLs.

I’ve moved the conversation away from the touring post as we’re not actually talking about the Welsh hills. :slight_smile:

@Wessa I’ll play around a bit more to see if I can make it a bit quicker and easier then I’ll put up some instructions for anyone wanting to do it themselves. It’s pretty straightforward. The only thing you won’t be able to do is set the date as per the original posting, but I can do that anyone wants me to. It’s a two second job. Well, maybe ten. :slight_smile:

@BrownMouse I’m thinking the easiest way is probably to pull the original post to a staging point - a non-html intermediary app - then create the whole post in one go with all the pics being uploaded. Copying from another forum creates referential http links to pics (and emojis), which is fine but not what we’re looking to achieve here as they would still only be on TTF (or wherever). I’ll have a play around with it later. I could do with another candidate post if anyone has one. (@DCS222)

To do it via the command line on the Linux server would require some proper SQL shenanigans. I’d probably end up having to write a load of bash/python for it to work properly. There’s also the risk of currupting the database, whcih would be a Bad Thing. By default SQL access is removed, even for me, though it can be enabled.

1 Like

Probably a wise precaution. :slight_smile: A bit of Googling seemed to indicate images are stored individually in the filesystem, but I expect it likely there would be some corresponding database reference to it, not just as simple as the “upload://xyz.jpeg” URL in the post.

Yeah, that’s right about the images now you mention it. There would heve to be a database reference, as you say, which is where my head was at…

You can use any of my travel writing from TTF @octoberon . I might be able to pull up an old fiddling n fettling one too, if it’s of interest.

Now, don’t I have enough to do without searching for your old travelogues on TTF? :grin: :wink:

@Octoberon if you’re looking for another post to copy across I would like this one coming over sometime…

2 Likes

I’m quite happy to do it when I know how… it’s the pic issue that will be my stumbling block

I’ll see about making it as simple as possible and putting a user guide on the forum. In the meantime I’m happy to copy over any posts on request.

1 Like

I think this may just have become a whole lot simpler. When pasting a post from the other place it was showing an http link to the image, but what I hadn’t realised was that it is an instruction to upload the file from that location. I’ve tried this with a test on TTF. I created a post with a pic, selected the entire post contents and copied it here. Then I deleted the post from TTF…and the image is still on this forum. The image link also refences this forum.

What this mean is anyone can copy stuff over quite simply. Roll separate TTF posts into one by just pasting each of those to the bottom of the one here, no need to create it post-for-post. There is a finite limit to the number of characters in a post (32000) so if you do hit that limit, let me know.

The one thing that will be wrong is the posting date. If you want that to match the original you’ll have to let me know what it should be and I’ll change the datestamp.

Hopefully most people will be able to do this but if not PM me and I’ll help or do it for you.

@DCS222 I noticed on the most recent post you sent me tht it had a Google map link. It’s just a textual link on TTF but this forum will embedded the map properly, letting you scroll and zoom.

2 Likes

Are you sure it’s not just your browser caching the image from TTF? I’m sure when I did experiments the markdown it just showed a link to the old post.

Edit: I just tested and I’m wrong, the image is from this forum, and it acts as a hyperlink to the image on the other place. :slight_smile: Thought I would double check before lots of people started copying posts.

Checking the link to the image, once it’s over here, shows a URL for this domain. It doesn’t mention the other forum in the page HTML so I’m assuming that means if definitely stored locally. I may be able to check assets directly on the back end but I haven’t looked in to that as yet.

@DCS222 I had a look at the post you copied across. For some reason it hadn’t uploaded the pics. I’ll play around with it later but my first though (which may well be wrong) is that you saved the reply before the pics had uploaded. You can check that while editing by looking at the preview pane if you’re using a laptop. Anyway, I’ll experiment more later. For now I’ve sorted out the missing images, including the stuff that wasn’t quite right on the original post.

Copied emojis are back to the original images as well, which is why they don’t display properly. At the moment, the only way to sort that out that I can think of is to replace them with the local versions. I’ve done that in your post.

Lastly, you have a date in the title of Sept '21 but your post on TTF was April '22. Do you want me to set the datestamp to one or the other? I can make it a specific day if you know when the trip was otherwise I’ll set set it to the first of the month.

I was rushing a bit (school run), and doing it on an ancient tablet… so it wasn’t the fairest test of the system, sorry.
The date was the 13th April 22… don’t know where I got sept 21??? Maybe that was when I rejoined TTF?

No worries. It’s worth knowing what devices will work and which have limitations. I’ll try it on my iPad later and see what that’s like.

I’ve updated the timestamp.

1 Like

I’ve tried to bring the photos across, but not convinced it worked

I’m going to do this one later for a bit more experimentation.

1 Like