Building trust in media

CiteIt is developing new digital tools that help combat misinformation and selective quotations. These tools show the context surrounding the quoted media in order to build trust and understanding.

Code:

Install WordPress plugin

The CiteIt Wordpress plugin is the easiest way to start experimenting with CiteIt on your website.

Installation

Download WordPress plugin    (alpha) WordPress logo (How to Install the plugin)

Alpha Status

The WordPress plugin is not yet part of the WordPress Plugin directory because it has not yet been widely tested.

I don't want to get a bunch of negative reviews for bugs. After you've tried it out, send me an email with feeback.

Once I get enough positive feedback, I hope to add it to the plugin directory.

Gutenburg Volunteer Wanted

I’m looking for a volunteer to convert this plugin to Gutenberg. The CiteIt WordPress plugin currently uses the Classic Editor (TinyMCE).

Version History

Oct 4, 2020: (download: 0.4.8)
  • add labels to Blockquote Context
  • add style formatting
    • add background color to blockquote
    • indent context: indent,
    • add tooltip to label
  • Edit Popup
    • add “source” label & url
    • change title
Aug 17, 2020: (download: 0.4.7)
  • add permalink to blockquote and q tags to display context on non-canonical pages (the home page, etc)
July 30, 2020: (download 0.4.6)
  • add “Right and Left Quotation” to Unicode Escape characters
  • change style: q-tag link: double underline, remove border from quote arrows
July 25, 2020: (download 0.4.5)
  • update dependency: bump lodaash from 4.17.15 to 44.17.19 in /lib/link-to-text-fragment
  • format q-tag links and popup window
  • add error hardlinking to YouTube embed: url_parsed.params.start
July 6, 2020: (download 0.4.4)
  • add Logic to Expand: YouTube Vimeo, and Soundcloud
  • fix Quote-Context Arrows: remove border
Jun 27, 2020: (download 0.4.3)
  • change version to 3-part number
  • convert UTF-16 to UTF-8
June 22, 2020: (download 0.4.2)
  • change webservice submission url: http://api.citeit.net/v0.4/url/
  • add forge-sha256 build
  • update jQuery version to 3.4.1
  • update forge-sha256
June 19, 2020: (download 0.4.1) (0.64)
  • update jsVideoURLParser
  • preserve html in TinyMCE editor quote selection
June 18, 2020: (download 0.4.x) (0.63)
  • format and document code
June 13, 2020: (download 0.4.x) (0.62)
  • add function isWordpressPreview() to CiteIt-quote-context:
    – detect if current URL is in preview mode
    – remove querystring if in “preview” mode
  • rename existing function names: use camel case
Jan 29, 2020: (download 0.4.x) (0.61)
  • switch toggle_quote to reference arrow anchor
    rather than parent div
  • switch toggle_quote to reference arrow anchor
    rather than parent div
  • CSS
    • add <a class=‘quote_arrows’ to support styling
    • change display to “block” to get rotate to work
    • remove link outline from arrows
    • add transform support for legacy browsers
  • make contextual popup appear on top: z-index: 9999
  • rename neotext -> citeit
Jan 25, 2020: (download 0.x.x) (0.60)
  • quote-context.php: register style, remove text/css attrib from style sheets
  • enqueue style sheet
  • fix validation errors
  • add toggleClass(“rotated180”);
Jan 18, 2020:
  • Escape Text using Unicode Codepoints
  • switch endpoint to: http://api.citeit.net

(View More History)

Developers

1) Frontend Sample Code: Basic Html & Javascript

See simple sample code that marks up citations and calls the web service.

If you want to use CiteIt.net with a CMS or other platform, this code should give you an idea of how to adapt your code.

Get Sample Code on GitHub

2) Python API Webservice

Python logo

This is the code for the API server that the javascript clients talk to when creating a new quote JSON file.

This program accepts a URL “POST” request

  • The program downloads the contents of the POSTED URL and looks for <blockquote cite="URL1"> and <q cite="URL2"> tags.
  • It then downloads the contents of each URL and calculates the context immediately prior and after the quote
  • It saves the results to a SQL-lite or PostgreSQL database (todo)
  • It saves a JSON file to the local filesystem
  • It (optionally) uploads the JSON file up to a Cloud Service
2 Ways to run the webservice:
A) Python

The webservice is written in Python, using the Flask framework.

Get Python Code on GitHub
B) Docker
Docker Logo

Docker Image on Docker Hub

If you don’t want to configure the Python code, you can run the Docker image instead:

Get Docker Hub ImageNote: Amazon S3 Dependency

At this point the webservice uploads the JSON files to Amazon's S3 service.

If you want to abstract away this dependency on Amazon, I'd be happy for a contribution that provides alternatives.

(The python code involving Amazon S3 is part of the citation class's json_upload method)

Webservice Calls

Volunteer

CiteIt.net is an open-source project (MIT license) whose mission to create a higher standard of citation is accelerated through the help of volunteers.

If you know how to code (especially in Python or Javascript) contact Tim to help out.

View Trello board

Top Tasks

WordPress Gutenberg

Here are a few of the top-priority tasks you can help with:

  1. Create WordPress Gutenberg Block Editor to Replace old WordPress v4 plugin
  2. Verify Quote before allowing Citation: Enforce Rules or Flag Suspicious Quotes that do not exactly match the original version, allowing for structured variation:
    • Modify Parsing to handle [C]apitalization:
      • [T]his is a quote that was pulled from the middle of a sentence, but capitalized to fit with the new context”
    • Allow new [additional] words to be added if the word is surrounded by brackets.
    • Modify Parsing to handle Elipses ..
      • “The quote was pulled from a sentence .. and the middle was skipped. This was noted with an ellipse.” It would be nice if the middle of the quote could be expanded.
  3. Machine Learning: Create a script or machine learning program to “upgrade” existing Wikipedia quotes to Contextual Citations
  4. Implement Google Text fragments in Python if necessary: Allow unique specification if phrase occurs multiple times in a document.
    • This could be done by specifiying enough of the “before” and “after” text to make the phrase unique.
  5. Javascript: Port Python-based webservice to Javascript. The advantage of a javascript-based lookup service is that it could run in the browser and use Google's Text-Fragment to specify which instance of a quote to link to.
  6. Design an interface and Citation Structure for Nested Quotes:
    • How does CiteIt have to be modified to allow quotations of quotations, nested multiple levels deep?
  7. YouTube Logo Make YouTube (and other) transcripts highlight the current word/s while the recording plays. This will likely require creating a format for an intermediate data structure which stores the start and end times for each word/phrase in the transcript.  (example: YouTube Speech-Text API script)
  8. Create a Standardized Text Version of Every Submitted page. The standardized text version is used to create the contextual JSON file containing the 500 characters before and after the quote PDF Support
    • from HTML
    • from PDF
    • from Word Doc
    • from Open Ofice
    • from PowerPoint
    • from Image
  9. Modify Document class to save a copy of the original file in its original encoding to S3-style storage
    • call archive.org API to archive the citing and cited pages if the page is new or the hash has changed
      • It would be nice if the archive process didn’t slow down the citation process. Perhaps this means that the archive process (which could take several seconds) should be done asynchronously.
  10. Setup Tests to verify that changes to the web service do not break existing quotes.
    • Setup CI Server to run tests before Github commits code
  11. Add Ability to Standardize Quotes on Canonical Sources
    • The Bible has multiple versions and translations. Can quotation be done in a way that quotes from different versions and different websites are standardized?
  12. Create a streamlined process of uploading audio and creating transcripts from Google Speech-to-Text. See work already done in Git Repo. Example: Otto von Bismark biography. (Links)
  13. Develop a web interface to crowdsource the process of cleaning up auto-generated transcripts. Would a wiki be of use here?

Interested?

Contact Tim if you’re interested in helping.

Open Source License

Open Source Initiative Approved License

I released the CiteIt client and server code under an open source license because I want the concept of Contextual Citations to spread as widely as possible.

What is the MIT License?

According to Wikipedia:
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license compatibility.

Commercial-Friendly:

Some people and companies are wary about using open source software because they do not like the GPL's requirement that they make their code revisions open source.

I wanted to remove this objection to adopting CiteIt, so I chose an open source license that does not require derivate works to be open-sourced. Use it as you like. Feel free to sell your derivative works without revealing your source code changes.   Just don't sue me!    :-)

The MIT License Text

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.