Scribusoid

Author Topic: Linking in text from the Web (ie. google docs)  (Read 4679 times)

ejnaren

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Linking in text from the Web (ie. google docs)
« on: September 24, 2013, 11:07:13 pm »
Hi all.

I have just asked a question on google docs forums to find a way of linking sections from a google doc to Scribus or other DTP programs.
Any thoughts?

The link to the discussion on google:
https://productforums.google.com/forum/#!starred/docs/tzDFsatXAPY

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Linking in text from the Web (ie. google docs)
« Reply #1 on: September 25, 2013, 05:08:38 pm »
Unfortunately, Scribus doesn't link to text documents, you can only insert their text.

Without putting too much thought into it I can imagine linking a text frame to some text in another document would be a nightmare programatically.

For instance, how would you handle formatting? I.e. If you apply some formatting to a bit of text and the original text is changed, what do you do with the formatting? You can know exactly what changes have been made to the content but you have no idea of the intentions of the formatter. You could end up creating loads more problems by second-guessing the user.

And what about escalation? Just checking one document might be possible, technically, but if Scribus has to keep checking dozens - or even hundreds - of files for changes and then re-jigging frames to cope then that'd put a strain on the system and probably create a lag in the UI.

(I know Scribus links to images but they're easy, in comparison, to cope with changes - they're essentially just a re-load/re-display type of refresh operation.)

And I'm sure there are way more technical difficulties than the simple ones above.

And that's just for documents on the same system. For distributed docs, for example in Google Docs, the Scribus document would have to have some way of repeatedly accessing the distributed files to see if changes have been made and sending requests via different security systems. (Would the SLA have to hold the logon details? What about when you share the SLA? etc.) I don't know how this could be done but I'd say it would be outside the scope of what Scribus is about. And you still come up against the same problems I mentioned earlier.

I could be well off the mark here and someone might say that I'm totally wrong and it's easy to implement - or that I'm just a ranting fool! - but I'm fairly sure what you want isn't something that will be a up-and-coming feature in the near future.

It would be nice though!

ejnaren

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Linking in text from the Web (ie. google docs)
« Reply #2 on: September 25, 2013, 08:15:00 pm »
I see your points.
And I will readily admit that I cant answer them satisfactorily as I have not looked at the source code of scribus yet.

The point you raise with formatting is the toughest for me to reply to as I do not know much of how different sections of text is marked as a certain formatting... I can try with some pseudo markup thoug:

Say we link some text from an internet service using a specific API, and Scribus recieves text with simple formatting:

"Hi. My name is <b>Ejnar</b>. I use Scribus every day!"

Then Scribus could use this formatting. If the user then chooses to italic "Scribus every day":

"Hi. My name is <b>Ejnar</b>. I use <i(scribus)>Scribus every day!</i(scribus)>"

The (scribus) formatting takes presidence of course and if the text is updated from the internet API:

"Hi. My name is <b>Ejnar</b>. I use Scribus for work at my studio every day!"

It would become:

"Hi. My name is <b>Ejnar</b>. I use <i(scribus)>Scribus for work at my studio every day!</i(scribus)>"

As already mentioned I dont even know if this is at all feasible as I know nothing of how the formatting is marked.


As for updating the text I would not check the text automatically as you are right that might be too much.
Only allow the user to manually update all text or a given text box.

I see that more issues arise like: how does scribus know the difference of the updated text or show what text has been updated. And you point about the security/access issues are tough as well.

At least I voiced it and if anyone else have some inputs I would highly appreciate it.
Thanks for the feedback though.

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Linking in text from the Web (ie. google docs)
« Reply #3 on: September 26, 2013, 02:55:29 pm »
Once Scribus can handle the importing of character styles - as it already does with paragraph styles - then linking a text frame to another local document might be very possible. It would just need a "Refresh Text" menu item that would work like the existing "Get Text" but with an implicit "and use the same file name and previous import settings".

It wouldn't be perfect - and any non-style formatting would be lost - but it would go somewhere towards what a lot of people would find useful and it wouldn't need any complicated text change/comparison stuff.

If I understand your needs correctly, what you are looking at is a subset of what's sometimes called "database publishing". This kind of thing allows you to link a document object to an external data source - usually a database, but it could be a spreadsheet or something else - with a "locator function" which tells the document where to retrieve the necessary data from in that data source.

This sort of thing is extremely useful for people who need to publish information that changes often or where multiple versions are needed, e.g. prices in catalogues, many languages, etc. etc.

Including this kind of functionality into Scribus would really open it up to a whole new world of additional users who currently have to use specialist - and very costly - software.

If Scribus could make some inroads into this kind of thing then I think it would be great but I've a feeling that the team is already busy enough with other things. (But I hope I'm wrong.)

ejnaren

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Linking in text from the Web (ie. google docs)
« Reply #4 on: September 26, 2013, 06:01:37 pm »
 @GarryP True.
I guess it would go a long way to just be able to get the data from an external source.
Its all about not having to double click the text box in scribus and have to reenter what someone has already typed in another file.
Maybe start small and work the way up is a valid way to go.
But yes I know they are very busy with 1.5 and more.

Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Linking in text from the Web (ie. google docs)
« Reply #5 on: September 26, 2013, 06:26:53 pm »
Well you don't have to re-enter, just use Get text and import the file.

You could even use some external application or script to re-format the text and maybe give it som markup that can be used by text filters.

ejnaren

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Linking in text from the Web (ie. google docs)
« Reply #6 on: December 17, 2013, 12:41:13 pm »
Hi all.
I know its a long time since I replied to this thread. Sorry. I just thought of it again today and went to the roadmap of 1.5.0 and saw that this might have begun to be worked on?

It currently says: "Updatable Linked Text (external developer) IN PROGRESS".
Maybe someone can elaborate on progress or approaches?

Thanks

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2250
  • Karma: 28
    • the graphics lab
Re: Linking in text from the Web (ie. google docs)
« Reply #7 on: December 17, 2013, 01:50:58 pm »
i'm working on a project that does go in that direction and i can use help...

the idea is to start with a markdown loader/exporter for the text fields... and see how far one can go with keeping the formatting.

the code (not yet working) is in the greg branch of my github repository dedicated to the markdown get plugin:
https://github.com/aoloe/scribus-plugin-gettext-markdown/tree/greg

if anybody can give some help with greg/leg, now you know that it will be very welcome (and i plan to work on this between now and the january 6th)

ciao
a.l.e

ejnaren

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Linking in text from the Web (ie. google docs)
« Reply #8 on: December 17, 2013, 06:53:04 pm »
Sounds great! I thought about markdown as well and even had it written in the prev post, but decided I did not want to squeeze your working load... If the one goes towards solving the other thats just great!
I will take a look, but doubtful if I can help.
I posted a shoutout in my circles though so maybe someone has some exp with this kind of work.