Skip to content

Latest commit

 

History

History
499 lines (473 loc) · 11.6 KB

DOCS.md

File metadata and controls

499 lines (473 loc) · 11.6 KB

Cut-It 1.0@Release


Cut-It.app.main [class] [inherits: GUI]

Adds logic to the GUI class

Methods

main.__init__

No Documentation Provided

main._updater_

Determines whether to present an update window

main._autoBypass

Generates Bypassed Browser

main._loadSettings

Loads all user data into instance vars
Fills in UI with Settings if initialLoad

main.__loadSettingsUI

Loads the Settings into the GUI

main._updateShortcut

Updates shortcut when user wants to view a separate one

main._saveShortcut

Saves shortcut to memory when user is done editing

main._loadShortcuts

Inits custom keybindings for all user-defined shortcuts

main._saveSettings

Saves settings to data.json

main._updates

Changes text of button to notify if update is needed or not

main._feedback

Submits feedback

main._toggleTheme

Changes theme from current to reciprocal (applies on reboot)
(eg. light -> dark, dark -> light)

main._addDelimiter

Triggered when the evidence box's text changes
Adds closing bracket ] when an opening one [ is typed

main._toHTML

Returns list: [text of card, html of card]
Copies plain & rich text to clipboard IFF :param: copy -> True

main._auto

Adds MLA & Debate-Grade Citation and/or article text to evidence box

main._copy

Copies card to clipboard

main._onClose

Behavior for window close (saves card first)

main._tabChanged

Saves settings and reapplies them on tab change

main._log

Posts card objs to API for efficacy monitoring & paywall enforcement
& GitHub badge stats

main.__loadAllCards

Adds all cards to card history selector

main._saveCard

Saves current card if it has data (is not blank)

main._newCard

Saves old card and opens new one

main._loadCard

Loads most recent card (saves previous one as well and adds to card selector)

main._deleteCard

Deletes currently open card after second click for safety

main._addToCardSelector

Adds current card to card selector

main._cardSelectionChanged

Resets the delete status (clicked once) if the selected card changes

main._autoCiteAndPoll

Adds MLA & Debate-Grade Citation & article text to evidence box

main._autoCite

Adds MLA & Debate-Grade Citation to evidence box

main._autoPoll

Adds article text to evidence box

main._print

Triggers User Input for Directory and Saves Card as PDF

main.__getSelectedText

Returns cursor's start index and currently selected text in a tuple

main.__addText

Inserts formatted text at cursor position and reselects text
Copies text to clipboard

main._primaryEmphasis

Styles text with Primary Emphasis

main._secondaryEmphasis

Styles text with Secondary Emphasis

main._tertiaryEmphasis

Styles text with Tertiary Emphasis

main._highlightP

Highlights text with Primary Highlight Color

main._highlightS

Highlights text with Secondary Highlight Color

main._bold_

Bolds selected text

main._underline_

Underlines selected text

main._italic_

Italicises selected text

main._clearFormatting

Clears Formatting on selected text

main._minimizeText

Minimizes Text

main._bold

Returns bolded version of :param: text

main._underline

Returns underlined version of :param: text

main._italic

Returns italicised version of :param: text

main._highlight

Returns highlighted version of :param: text of the color :param: color


Cut-It.GUI.GUI [class] [inherits: MainWindow]

No Documentation Provided

Methods

GUI.__init__

Loads latest UI

GUI.addCardHistory

Manually fill out the Card History groupBox (due to custom widgets)

GUI.updateStyling

No Documentation Provided

GUI.addToolTips

Adds in ToolTips

GUI.addAttrs

Adds in missing attrs.

GUI.addDistroDetails

Returns a formatted String to be inserted into the Distro box in the about section


Cut-It.install.install [function]

No Documentation Provided


Cut-It.utils.bypass_browser.getBrowser [function]

No Documentation Provided


Cut-It.utils.card.Card [class]

No Documentation Provided

Methods

Card.isCard

Returns (bool) if the card actually has data

Card.getDict

Returns (dict) representation of the object


Cut-It.utils.citer.cite [class]

No Documentation Provided

Methods

cite.__init__

:param: URL (str) - the URL for your citation
:desc: creates citation

cite.cite

gets raw citation data from API

cite.format

formats raw citation date

cite.getMissingAttrs

Returns a list of missing attributes (key) or None (if all present)

cite.debate

Returns a simplified debate-ready citation

cite.mla

Returns an MLA 8 citation


Cut-It.utils.clipboard_OSX.clipboard [class]

No Documentation Provided

Methods

clipboard.add

Injects both regular text (unformatted)
and html ('rich' text) to clipboard


Cut-It.utils.clipboard_WIN.clipboard [class]

No Documentation Provided

Methods

clipboard.add

Injects both regular text (unformatted)
and html ('rich' text) to clipboard


Cut-It.utils.data.init [function]

Initializes both Card and Preferences storage

Cut-It.utils.data.getIndex [function]

Returns (int) current card index

Cut-It.utils.data.setIndex [function]

Sets the stored card index

Cut-It.utils.data.getPrefData [function]

Returns a dict of data.json

Cut-It.utils.data.setPrefData [function]

Writes to data.json

Cut-It.utils.data.getPref [function]

Returns the value of the inputted preference key

Cut-It.utils.data.setPref [function]

Sets the value of the inputted preference key to the
inputted value

Cut-It.utils.data.getShort [function]

Returns the value of the inputted shortcut key

Cut-It.utils.data.setShort [function]

Sets the value of the inputted shortcut key to the
inputted value

Cut-It.utils.data.getCardData [function]

Returns a dict of cards.json

Cut-It.utils.data.setCardData [function]

Writes to cards.json

Cut-It.utils.data.getCard [function]

Returns card at start OR at supplied index

Cut-It.utils.data.addCard [function]

Checks if a card contains information, if so adds it
to the end of cards.json, or if an index is
supplied it will overwrite the card at that pos

Cut-It.utils.data.deleteCard [function]

Deletes card at specified index

Cut-It.utils.distro.version [function]

Returns current software version

Cut-It.utils.distro.tag [function]

Returns current software tag

Cut-It.utils.distro.releases [function]

Returns GitHub API Releases URL

Cut-It.utils.export.printPDF [function]

Saves html to pdf with Selenium

Args:
    body (str): the "body" section of the html
    path (str): path to the save folder
    cardName (str, optional): the name of the card (becomes filename). Defaults to "Cut-It Export".

Cut-It.utils.ext_combobox.ExtendedComboBox [class] [inherits: QComboBox]

No Documentation Provided

Methods

ExtendedComboBox.__init__

No Documentation Provided

ExtendedComboBox.goToStart

No Documentation Provided

ExtendedComboBox.on_completer_activated

No Documentation Provided

ExtendedComboBox.setModel

No Documentation Provided

ExtendedComboBox.setModelColumn

No Documentation Provided


Cut-It.utils.feedback.send_feedback [function]

No Documentation Provided


Cut-It.utils.MainWindow.MainWindow [class] [inherits: QMainWindow]

No Documentation Provided

Methods

MainWindow.__init__

No Documentation Provided

MainWindow.retranslateUi

No Documentation Provided


Cut-It.utils.resource.PATH [class]

No Documentation Provided

Methods

PATH.get

returns path for included files
(used when packaged into a binary)


Cut-It.utils.text_scraper.text [class]

No Documentation Provided

Methods

text.scrape

No Documentation Provided


Cut-It.utils.UpdateDialog.UpdateDialog [class] [inherits: QDialog]

No Documentation Provided

Methods

UpdateDialog.__init__

No Documentation Provided

UpdateDialog.retranslateUi

No Documentation Provided


Cut-It.utils.updater.Updater [class] [inherits: UpdateDialog]

No Documentation Provided

Methods

Updater.__init__

Loads latest UI

Updater.addOptions

Adds data about an update, if any

Updater.getUpdate

Opens download URL in Selenium Chrome

Updater._quit

No Documentation Provided

Updater._close

No Documentation Provided


Cut-It.utils.version_check.pollReleases [function]

Searches GitHub Releases for new version of matching tag

Cut-It.utils.version_check.check [function]

No Documentation Provided