PDA

View Full Version : Feature Request: Export Calendar Entries



JohnD
January 15th, 2013, 16:55
I wonder if it would be possible to add an export function to the Calendar so that the date/year along with whatever text has been entered on the date(s) in question can be sent to a text file.

Trenloe
January 15th, 2013, 17:56
Add the request to JPG's feature request list. :)

In the meantime, I've just put this little extension together (should be CoreRPG based ruleset compatible and perhaps more).

Type /calexport in the chat window and it will export all of the calendar XML from the campaign. Within this XML is the <log> XML element that has all of the log entries.

See post #4 below for some basic XSL that can be used to create a viewable HTML page.

JohnD
January 15th, 2013, 19:19
Cool - thanks.

Trenloe
January 15th, 2013, 20:33
I've done a bit of messing around and I have a few manual steps that can be used to create some nice, viewable HTML from the raw calendar XML exported using the FG extension in post #2.

3622

Steps:

Download the attached file above and extract FGcalLog.xsl into a directory.
Using the Calendar Export extension (post #2) export your calendar into the same directory where you extracted FGcalLog.xsl (step #1).
In Notepad++ or a similar text/XML editor, open the calendar XML exported in step #2 and add the following line between the first line (<?xml version=...) and the second line (<root ...): <?xml-stylesheet type="text/xsl" href="FGcallog.xsl"?> The first 3 lines of the XML file should look like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="FGcallog.xsl"?>
<root version="2.9" release="10">
Save the FG calendar XML file that you modified in step #3.
Open Windows explorer and go to the directory where the FGcalLog.xsl and FG Calendar export XML files are located. Right-click on the FG calendar export XML file and select "Open With". If Internet Explorer or FireFox are not listed, select "Choose Default Program" and select "Internet Explorer" (or FireFox if you prefer that and have it installed), remove the check from "Always use the selected program to open this kind of file" and press OK. Your calendar entries should appear in the web browser.

Here is a very basic example:
3623

Perhaps GMs who have calendar log entries in a 3.5E campaign could give it a try and see how it works?

JohnD
January 15th, 2013, 20:52
I'll look this evening.

Hecklerus Prime
November 4th, 2014, 02:55
Trenloe, tried using the calendar export in a 3.5e campaign. Using the slash command does nothing. Perhaps I copied the .ext file into the wrong folder. Does in go in the extensions folder, because that's where I put it. Tried restarting FG a couple times and no difference. Current (v3.0.8) edition. I'd really like to help get this function to work.

Trenloe
November 4th, 2014, 03:02
Trenloe, tried using the calendar export in a 3.5e campaign. Using the slash command does nothing. Perhaps I copied the .ext file into the wrong folder. Does in go in the extensions folder, because that's where I put it. Tried restarting FG a couple times and no difference. Current (v3.0.8) edition. I'd really like to help get this function to work.
Have you activated the extension before you load your campaign? Select "Calendar Export" from the "Campaign Details" list on the "Load Campaign" screen. When you start your campaign it will write some info to the chat window saying "Calendar Log Export Extension..." so you'll know it's loaded properly if you see that note in the chat window.

Hecklerus Prime
November 4th, 2014, 03:25
Gotcha. Did that and it seems to have exported everything. I got it to open in Firefox (but not Chrome). It looks like all the entries are there only they are not in chronological order. I can't yet see any pattern to the order, though.

Trenloe
November 4th, 2014, 03:31
Gotcha. Did that and it seems to have exported everything. I got it to open in Firefox (but not Chrome). It looks like all the entries are there only they are not in chronological order. I can't yet see any pattern to the order, though.
It'll be the order in which they were entered into the calendar. The extension is just a straight export of the data from the campaign database.

damned
November 4th, 2014, 04:10
Hey Trenloe - how hard would it be to allow Players to Add Calendar Entries?

Trenloe
November 4th, 2014, 04:23
Hey Trenloe - how hard would it be to allow Players to Add Calendar Entries?
Without delving into the code to fully understand the process... It would require using the OOB messaging process to pass the calendar entry data from the player to the GM (the GM will need to create the calendar entry on behalf of the player as the player doesn't have full access to the calendar portion of the database), then keeping the access correct to allow players to view the records. The problem would come with assigning ownership of a player calendar entry - what if 2 players want to add an entry on the same day? Do you end up with an entry for each player? What if they player wants to share their entry with the other players? This could soon get very complex - which is more than likely the reason why it hasn't been done yet.

damned
November 4th, 2014, 07:38
Thanks Trenloe.

Moon Wizard
November 4th, 2014, 18:28
The consideration right now is that FG only supports the concept of one owner for each data record. The GM can always edit all data, but the player can only edit records that they own. Even then, there are situations where there are race conditions between player/GM editing the same record, which can cause some strangeness.

To allow "public" editing of records would mean that an entirely new concept of editing would need to be defined within FG to define when fields should be "locked" or "unlocked" based on whether people are currently editing the fields or not. Otherwise, it would be chaos as people overwrote each other, and data was lost therein.

Regards,
JPG

Nylanfs
November 4th, 2014, 23:51
Cool, Smiteworks is playing Fantasy Grounds! Just happend to be looking at this thread and Steam was up at the same time. :)