Contributing to the Financial Modelling Wiki: Difference between revisions

From Financial Modelling Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 15: Line 15:
Open the page in your browser, then click either "Edit" or "Edit source" (each of these are near the top right).
Open the page in your browser, then click either "Edit" or "Edit source" (each of these are near the top right).


* Edit opens a visual editor. Most people will find this simplest for editing text (including headings, bold / italic / code blocks etc, lists and tables. You cannot embed or change images, GIFs, videos or spreasheets this way.
* <strong>Edit</strong> opens a visual editor. Most people will find this simplest for editing text (including headings, bold / italic / code blocks etc, lists and tables. You cannot embed or change images, GIFs, videos or spreasheets this way.
* Edit sources opens a source editor. The markup language is called [https://en.wikipedia.org/wiki/Help:Wikitext wikitext]. It is similar to HTML. People who are familiar with using any markup language or code will probably find it simple to edit the source, and copy/adapt new elements from other pages. You can embed and changes images, GIFs, videos and spreadsheets this way - refer to the section below on specifics for the Financial Modelling Wiki.
* <strong>Edit source</strong> opens a source editor. The markup language is called [https://en.wikipedia.org/wiki/Help:Wikitext wikitext]. It is similar to HTML. People who are familiar with using any markup language or code will probably find it simple to edit the source, and copy/adapt new elements from other pages. You can embed and changes images, GIFs, videos and spreadsheets this way - refer to the section below on specifics for the Financial Modelling Wiki.


====Creating a new page====
====Creating a new page====
Line 23: Line 23:


===Specifics for the Financial Modelling Wiki===
===Specifics for the Financial Modelling Wiki===
This wiki is unusual in the need to embed spreadsheets. We were unaware of a suitable native solution and have implemented a custom approach, and that same approach is used for embedding videos, pictures and GIFs. Videos are explained first because they are simplest.


====Embedding spreadsheets====
====Embedding spreadsheets====
This wiki is unusual in the need to embed spreadsheets. We were unaware of a suitable native solution and have implemented a custom approach.


# <strong>File type</strong> Save the spreadsheet as an Excel .XLSX workbook. The XLSX requirement is a security measure - no macros, please (although it is fine to include code within wiki pages).
# <strong>File type</strong> Save the spreadsheet as an Excel .XLSX workbook. The XLSX requirement is a security measure - no macros, please (although it is fine to include code within wiki pages).
# Upload the workbook to a publicly viewable location of a cloud service on an account that we trust.
# <strong>Upload</strong> the workbook to a publicly viewable location of a <strong>cloud service on an account that we trust</strong>.
#* [https://twitter.com/FinModWiki Tweet us] if you are not already aware of anyone you know that has a trusted account.
#* <strong>[https://twitter.com/FinModWiki Tweet us]</strong> if you are not already aware of anyone you know that has a trusted account.
# Find the regular HTML &lt;iframe> embed code for the workbook.
# Find the <strong>regular HTML</strong> &lt;iframe> embed code for the workbook.
#* If the trusted account is a OneDrive - Personal account, [https://chandoo.org/wp/embed-excel-file-on-your-website/ this page] describes a way of finding the regular HTML &lt;iframe> embed code.
#* If the trusted account is a OneDrive - Personal account, [https://chandoo.org/wp/embed-excel-file-on-your-website/ this page] describes a way of finding the regular HTML &lt;iframe> embed code.
#* Test whether the regular HTML &lt;iframe> embed code works. One way to do this is to create an HTML file (which can be done in most simple text editors, like Windows Notepad) and opening in your browser. Test whether the workbook is publicly available by opening in an InPrivate/Incognito window.
#* Test whether the regular HTML &lt;iframe> embed code works. One way to do this is to create an HTML file (which can be done in most simple text editors, like Windows Notepad) and opening in your browser. Test whether the workbook is publicly available by opening in an InPrivate/Incognito window.
# Convert the regular HTML &lt;iframe> embed code to the wikitext markup that this wiki uses.
# Convert the regular HTML &lt;iframe> embed code to the <strong>wikitext markup</strong> that this wiki uses.
#* You should specify the following attributes:
#* You should specify the following attributes:
#** <strong>key</strong> is the identifier for the account that is trusted by this wiki. Note that the key evaluates to the start of the URL - in the first example below the key "KEYOFTRUSTEDACCOUNT" evaluates to "<nowiki>https://onedrive.live.com</nowiki>/embed?resid=ACCOUNTIDENTIFIER". The mapping from keys to starts of urls is specified in an admin area of this wiki when we set up trusted accounts.
#** <strong>key</strong> is the identifier for the account that is trusted by this wiki. Note that the key evaluates to the start of the URL - in the first example below the key <code>KEYOFTRUSTEDACCOUNT</code>evaluates to <code><nowiki>https://onedrive.live.com</nowiki>/embed?resid=ACCOUNTIDENTIFIER</code>. The mapping from keys to starts of URLs is specified in an admin area of this wiki when we set up trusted accounts.
#** <strong>path</strong> is the remainder of the path to the workbook.
#** <strong>path</strong> is the remainder of the path to the workbook.
#** <strong>width</strong> is the width (in pixels) of the embedded workbook as it will be displayed in this wiki. We prefer for this to be 1000 or less so that the embedded workbook renders reasonably on low-resolution monitors.
#** <strong>width</strong> is the width (in pixels) of the embedded workbook as it will be displayed in this wiki. We prefer for this to be 1000 or less so that the embedded workbook renders reasonably on low-resolution monitors.
#** <strong>height</strong> is the height (in pixels).
#** <strong>height</strong> is the height (in pixels).
#* In the following examples, the '''bold''' parts get copied across from the regular HTML iframe embed code to the wikitext markup, the ''italics'' parts are lost, and the rest is supporting.
#* In the following examples, the '''bold''' parts get copied across from the regular HTML &lt;iframe> embed code to the wikitext markup, the ''italics'' parts are lost, and the rest is supporting.
#** OneDrive - Personal
#** OneDrive - Personal
#*** Regular HTML &lt;iframe> embed code:
#*** Regular HTML &lt;iframe> embed code:
#***: &lt;iframe '''width="1000" height="187"''' ''frameborder="0" scrolling="no"'' src="'''<nowiki>https://onedrive.live.com</nowiki>/embed?resid=ACCOUNTIDENTIFIER%21FILEIDENTIFIER&authkey=%21ACCESSKEY&em=2&AllowTyping=True&'''
#***: <code>&lt;iframe '''width="1000" height="187"''' ''frameborder="0" scrolling="no"'' src="'''<nowiki>https://onedrive.live.com</nowiki>/embed?resid=ACCOUNTIDENTIFIER%21FILEIDENTIFIER&authkey=%21ACCESSKEY&em=2&AllowTyping=True&'''</code>
#***:'''ActiveCell=<nowiki>'SHEETOFACTIVECELL'</nowiki>!ACTIVECELL&Item=DEFINEDNAMEOFAREATOSHOW&wdHideGridlines=True&'''
#***:'''<code>ActiveCell=<nowiki>'SHEETOFACTIVECELL'</nowiki>!ACTIVECELL&Item=DEFINEDNAMEOFAREATOSHOW&wdHideGridlines=True&</code>'''
#***:'''wdDownloadButton=True&wdInConfigurator=True'''">&lt;/iframe>
#***:<code>'''wdDownloadButton=True&wdInConfigurator=True'''">&lt;/iframe></code>
#*** Wikitext markup that this wiki uses:
#*** Wikitext markup that this wiki uses:
#***: &lt;div style="text-align: center;">&lt;iframe key="'''KEYOFTRUSTEDACCOUNT'''" path="'''FILEIDENTIFIER&authkey=%21ACCESSKEY&em=2&AllowTyping=True&ActiveCell=<nowiki>'SHEETOFACTIVECELL'</nowiki>!ACTIVECELL&'''
#***: <code>&lt;div style="text-align: center;">&lt;iframe key="'''KEYOFTRUSTEDACCOUNT'''" path="'''FILEIDENTIFIER&authkey=%21ACCESSKEY&em=2&AllowTyping=True&ActiveCell=<nowiki>'SHEETOFACTIVECELL'</nowiki>!ACTIVECELL&'''</code>
#***:'''Item=DEFINEDNAMEOFAREATOSHOW&wdHideGridlines=True&wdDownloadButton=True&wdInConfigurator=True'''" '''width="1000" height="187"'''>&lt;/iframe>&lt;/div>
#***:<code>'''Item=DEFINEDNAMEOFAREATOSHOW&wdHideGridlines=True&wdDownloadButton=True&wdInConfigurator=True'''" '''width="1000" height="187"'''>&lt;/iframe>&lt;/div></code>
# <strong>Apply</strong> the wikitext markup to the relevant page of this wiki. Use <strong>edit source</strong> for this.


[To be continued - preferably also show pictures/GIFs/videos/spreadsheets, but at least show videos. Maybe put videos before spreadsheets because they are simpler and demonstrate most of the workflow]
====Embedding videos====
Embedding videos is simpler than embedding spreadsheets.
 
# <strong>Upload</strong> the video to [https://www.youtube.com/ YouTube]. We can enable other video sharing platforms if requirements arise - [https://twitter.com/FinModWiki tweet us] if you have a need.
# Ensure that the video settings <strong>allow embedding</strong> on other websites. The standard default is is for embedding to be allowed, so if you are not sure then move on and just keep it in mind in case you have trouble later. If you need to change the setting then search how to do so at the time - the YouTube user interface changes over time and differs between devices/apps etc.
# Find the <strong>unique part of the URL</strong> for your video. For example, if the address bar of the video shows <code>https://www.youtube.com/watch?v=qqU2xllewk4</code>, then the unique part of the URL is <code>qqU2xllewk4</code>. You can usually find a clean version of the URL by clicking "share".
# Determine the <strong>wikitext markup</strong> to embed the video in this wiki.
#* It goes like this:
#*: <code>&lt;div style="text-align: center;">&lt;iframe key="YouTube" path="'''UNIQUEPARTOFTHEURLFORYOURVIDEO'''" width="960" height="540">&lt;/iframe>&lt;/div></code>
#* Continuing the example, if the unique part of the URL for your video is <code>qqU2xllewk4</code>, then the wikitext markup is:
#*: <code>&lt;div style="text-align: center;">&lt;iframe key="YouTube" path="'''qqU2xllewk4'''" width="960" height="540">&lt;/iframe>&lt;/div></code>
# <strong>Apply</strong> the wikitext markup to the relevant page of this wiki. Use <strong>edit source</strong> for this.
 
====Embedding pictures and GIFs====
 
We expect that pictures and GIFs can be embedded in basically the same way as spreadsheets, but we have not yet had a need to test it. [https://twitter.com/FinModWiki Tweet us] if you have a need and trying to adapt the steps for spreadsheets does not work for you.

Latest revision as of 00:14, 3 January 2022

Why contribute

Contribute to share information that is useful for people that work with or use financial models. Do not contribute to promote something - though you can contribute in your own name or the name of a business that you represent, and you can mention that in your user page.

How to contribute

In general

The specifics of contributing to this wiki are mostly like contributing to Wikipedia. This page outlines how to perform some common actions.

Creating an account, logging in and logging out

You do not need to create an account to contribute to this wiki, but you are welcome to.

To perform these actions, click either "Create account", "Log in" or "Log out" as appropriate (each of these is near the top right) and follow the prompts.

Editing an existing page

Open the page in your browser, then click either "Edit" or "Edit source" (each of these are near the top right).

  • Edit opens a visual editor. Most people will find this simplest for editing text (including headings, bold / italic / code blocks etc, lists and tables. You cannot embed or change images, GIFs, videos or spreasheets this way.
  • Edit source opens a source editor. The markup language is called wikitext. It is similar to HTML. People who are familiar with using any markup language or code will probably find it simple to edit the source, and copy/adapt new elements from other pages. You can embed and changes images, GIFs, videos and spreadsheets this way - refer to the section below on specifics for the Financial Modelling Wiki.

Creating a new page

Enter the title into the search box (near the top right corner), click the red link that appears, and follow the prompts.

Specifics for the Financial Modelling Wiki

This wiki is unusual in the need to embed spreadsheets. We were unaware of a suitable native solution and have implemented a custom approach, and that same approach is used for embedding videos, pictures and GIFs. Videos are explained first because they are simplest.

Embedding spreadsheets

  1. File type Save the spreadsheet as an Excel .XLSX workbook. The XLSX requirement is a security measure - no macros, please (although it is fine to include code within wiki pages).
  2. Upload the workbook to a publicly viewable location of a cloud service on an account that we trust.
    • Tweet us if you are not already aware of anyone you know that has a trusted account.
  3. Find the regular HTML <iframe> embed code for the workbook.
    • If the trusted account is a OneDrive - Personal account, this page describes a way of finding the regular HTML <iframe> embed code.
    • Test whether the regular HTML <iframe> embed code works. One way to do this is to create an HTML file (which can be done in most simple text editors, like Windows Notepad) and opening in your browser. Test whether the workbook is publicly available by opening in an InPrivate/Incognito window.
  4. Convert the regular HTML <iframe> embed code to the wikitext markup that this wiki uses.
    • You should specify the following attributes:
      • key is the identifier for the account that is trusted by this wiki. Note that the key evaluates to the start of the URL - in the first example below the key KEYOFTRUSTEDACCOUNTevaluates to https://onedrive.live.com/embed?resid=ACCOUNTIDENTIFIER. The mapping from keys to starts of URLs is specified in an admin area of this wiki when we set up trusted accounts.
      • path is the remainder of the path to the workbook.
      • width is the width (in pixels) of the embedded workbook as it will be displayed in this wiki. We prefer for this to be 1000 or less so that the embedded workbook renders reasonably on low-resolution monitors.
      • height is the height (in pixels).
    • In the following examples, the bold parts get copied across from the regular HTML <iframe> embed code to the wikitext markup, the italics parts are lost, and the rest is supporting.
      • OneDrive - Personal
        • Regular HTML <iframe> embed code:
          <iframe width="1000" height="187" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?resid=ACCOUNTIDENTIFIER%21FILEIDENTIFIER&authkey=%21ACCESSKEY&em=2&AllowTyping=True&
          ActiveCell='SHEETOFACTIVECELL'!ACTIVECELL&Item=DEFINEDNAMEOFAREATOSHOW&wdHideGridlines=True&
          wdDownloadButton=True&wdInConfigurator=True"></iframe>
        • Wikitext markup that this wiki uses:
          <div style="text-align: center;"><iframe key="KEYOFTRUSTEDACCOUNT" path="FILEIDENTIFIER&authkey=%21ACCESSKEY&em=2&AllowTyping=True&ActiveCell='SHEETOFACTIVECELL'!ACTIVECELL&
          Item=DEFINEDNAMEOFAREATOSHOW&wdHideGridlines=True&wdDownloadButton=True&wdInConfigurator=True" width="1000" height="187"></iframe></div>
  5. Apply the wikitext markup to the relevant page of this wiki. Use edit source for this.

Embedding videos

Embedding videos is simpler than embedding spreadsheets.

  1. Upload the video to YouTube. We can enable other video sharing platforms if requirements arise - tweet us if you have a need.
  2. Ensure that the video settings allow embedding on other websites. The standard default is is for embedding to be allowed, so if you are not sure then move on and just keep it in mind in case you have trouble later. If you need to change the setting then search how to do so at the time - the YouTube user interface changes over time and differs between devices/apps etc.
  3. Find the unique part of the URL for your video. For example, if the address bar of the video shows https://www.youtube.com/watch?v=qqU2xllewk4, then the unique part of the URL is qqU2xllewk4. You can usually find a clean version of the URL by clicking "share".
  4. Determine the wikitext markup to embed the video in this wiki.
    • It goes like this:
      <div style="text-align: center;"><iframe key="YouTube" path="UNIQUEPARTOFTHEURLFORYOURVIDEO" width="960" height="540"></iframe></div>
    • Continuing the example, if the unique part of the URL for your video is qqU2xllewk4, then the wikitext markup is:
      <div style="text-align: center;"><iframe key="YouTube" path="qqU2xllewk4" width="960" height="540"></iframe></div>
  5. Apply the wikitext markup to the relevant page of this wiki. Use edit source for this.

Embedding pictures and GIFs

We expect that pictures and GIFs can be embedded in basically the same way as spreadsheets, but we have not yet had a need to test it. Tweet us if you have a need and trying to adapt the steps for spreadsheets does not work for you.