Code Monkey home page Code Monkey logo

python-autocite's Introduction

python-autocite

python-autocite provides modules and a command line utility for automatically generating citiations of web pages.

Licensed under the MIT license. Though not required by the license, please consider dropping a line if you find this software useful.

Installation

Requirements:

  • BeautifulSoup4
  • Requests
  • Dateutil
  • Python 3
  • (optional) pageres - for capturing screenshots

Run python setup.py install to install.

Usage

Command line usage:

Run autocite --help to see the help text.

Protip: Missing information will be filled in with "[[[field name]]]" which should make it easy to search for.

Currently only supports APA, but is extensible for other formats.

Using in other programs:

from python_autocite.lib import *

The modules available are:

  • python_autocite.lib.datafinder.Datafinder - attempts to pull publication information from a BeautifulSoup soup
  • python_autocite.lib.citation.Citation - Contains citation data, with intelligent setters
  • python_autocite.lib.formatter.CitationFormatter - Interface for creating citation formatters
  • python_autocite.lib.formatter.APAFormatter - formats a Citation into an APA citation

Examples

Cite a single URL:

autocite --url http://arstechnica.com/business/2012/12/report-data-caps-just-a-cash-cow-for-internet-providers/

This will print to stdout:

Anderson, N. (2012, December 18). Report: data caps just a “cash cow” for Internet providers. Retrieved June 18, 2017, from http://arstechnica.com/business/2012/12/report-data-caps-just-a-cash-cow-for-internet-providers/

Cite a list of URLs (newline separated), and save the citations to a file called citations.txt

autocite --from-file urllist.txt --to-text citations.txt

Optionally, you can add the --capture flag to capture screenshots of websites. This will not work for all websites, and may increase the time to generate citations significantly. Each capture will be stored in the current directory.

Disclaimers

This software is not perfect and will make mistakes. Check that your citations are correct before using them for any important purpose.

python-autocite's People

Contributors

thenaterhood avatar weathon avatar kk6axq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.