Giter Site home page Giter Site logo

alfred-workflows-scientific's Introduction

alfred-workflows-scientific

A collection of Alfred v2 workflows targeting scientific applications. Use of workflows requires the Alfred PowerPack.

  • Reference Importer: search for an article/book from a variety of sources and import the corresponding reference data (BibTex, PDF) into BibDesk, copy BibTeX to clipboard, go to the landing page for the article, or copy a formatted reference. Also supports reference lookup from a PDF file. (This workflow was formerly known as "Citation Search" and "AIAA Search")
  • Go To Current File: Keyboard shortcut to quickly go to the file in the frontmost app (either in Finder, Terminal, iTerm2, or Alfred's File Action Window).
  • NumPy Search: search methods within the NumPy module and open the associated documentation in your browser.
  • LaTeX Tools: tools for working with LaTeX files. Currently a word/figure/equation count, and a diff workflow for comparing two LaTeX files in a compiled PDF.

Reference Importer

This workflow is a combination of two of my former workflows (Citation Search and AIAA Search) with many improvements and new features. It allows you to import BibTeX, and in some cases a linked PDF, for:

  • journal articles through a CrossRef DOI lookup
  • books thorough Google Books
  • journal and conference papers through Google Scholar search
  • a PDF on your computer by scanning the PDF for its DOI and then going through CrossRef
  • AIAA journal and conference papers (these are now available through CrossRef so the separate AIAA functionality was removed)

This workflow is primarily intended to work with BibDesk, but it also copies the BibTeX to the clipboard so it can be used with other applications. If you do use BibDesk it is recommended that you set the preference in BibDesk to open a certain file at application launch. Otherwise, you will need to have the BibDesk document open that you want to import to before running the workflow.

ref "search terms"

A search api (beta) provided by CrossRef attempts to match your provided citation metadata. You can search using any part of a citation (e.g., author names, article title, digital object identifier (DOI), etc.), or even a full citation. The workflow then grabs the associated BibTeX reference from CrossRef. Obviously the article you're interested in needs to have a registered DOI (generally only applies to journal articles). Occasionaly some articles don't have associated BibTeX data stored with them, and a "Not Available" notification will be posted.

For certain journals (currently only Wind Energy, because that's what I happen to use) the PDF will also be automatically downloaded (if you have a subscription to the journal) and linked to your BibDesk entry. Unfortunately there is no universal way to automatically get the PDF because every journal uses a different link format, but I provide hooks in the script to allow addition of other journals. Or the workflow can take you to the article's landing page as discussed below, and you can manually download the PDF.

ref "search terms" [cmd]

Hold down [cmd] when actioning an article to go to the landing page associated with the article. If you have a subscription to the associated journal you can then access the PDF.

ref "search terms" [alt]

Hold down alt (option) when actioning an article to copy a formatted reference to the clipboard. Theoretically the API used by CrossRef should allow you to format the reference using any style in the Citation Style Language database. However, in practice I've found that the vast majority are not working. For now, until a better solution can be found, the formatted reference is in APA format.

ref "doi"!!

I've noticed that for some recently added papers the DOI information will be registered, but the data is not yet indexed by the CrossRef search engine. If you do have the DOI, you can bypass the search and attempt to just grab the relevant citation data directly. Just add a double bang (two exclamation marks) after the DOI to bypass the metadata search. (This option also works will the [cmd] and [alt] modifiers).

book "search terms"

Uses Google Books API to search the Google books repository. Selecting a book will import corresponding BibTeX into BibDesk and copy the BibTeX to the clipboard.

gsref "search terms". (note the period)

Searches Google Scholar for relevant journal/conference papers, imports the associated BibTeX, and if a PDF is available will also download the PDF and link it to the corresponding BibDesk entry. I've disabled search as you type for this particular query, because Google Scholar will block you for the day if you send searches too rapidly and it thinks you are a bot. When your query is complete, add a period "." to the end in order to actually trigger the search.

Keyboard Shortcut or File Action

You can select a PDF in Finder and press a custom keyboard shortcut, or use a file action on an PDF to try to get the associated BibTeX. The script will scan the first page of the PDF, and will attempt to find a DOI. If it cannot find a valid DOI, it will grab the first dozen capitalized words. In either case, it will use those terms (DOI, or capitalized words) to initiate the CrossRef search from above. The search will not be immediately executed so you can still modify the search terms to your liking. Additionally, the location of the PDF will be remembered so that it will be automatically linked to the new BibTeX entry.

Acknowledgments

The following packages/codes are used within this workflows:

Go To Current File

Allows you to assign a keyboard shortcut to quickly go to the current file in Finder, Terminal (or iTerm2), or Alfred's File Action Window. For example, you are working on a presentation in Keynote and want to go to the corresponding directory. You could right click on the title of the file in the menu bar and then click in the folder (plus an additional step if you want to get to the terminal), or just hit a keyboard shortcut and go right there.

This may not necessarily work for all applications---some are not file-based so it wouldn't make sense, and some use non-standard properties. It should definitely work for apps that follow standard AppleScript conventions: iWork (Keynote, Pages, Numbers), Preview, Skim, BibDesk, Byword, MS Office (PowerPoint, Word, Excel), Marked, etc.. It has a fall-back method for those apps that don't provide an AppleScript Dictionary or are non-standard (Sublime Text). If you come across an app this doesn't work for, let me know and I'll see if it's possible to add.

Note for Microsoft Office users:

Microsoft Office doesn't follow standard AppleScript. To prevent the script from throwing errors from those who did not use MS Office, I left this functionality out by default. You should download this version instead. The only difference is each "Run Script" adds the key phrase MS at the end which lets the script know its OK to check for MS Office files in addition to all the others.

Note on Terminal/iTerm2:

If you don't use iTerm2, don't set the third keyboard shortcut. That one is only for iTerm.

Note for Mavericks users:

If it does not work for certain applications, make sure you have given Alfred permission to control the computer through the Accessibility pane in the Security & Privacy settings of OS X preferences.

NumPy Search

np "method name"

Search the methods in the NumPy module, and see a short description from the docstring. Actioning the item opens the documentation for the method in your browser. Useful if you can't quite remember the name of one of the methods (e.g, atan or arctan), or if can't remember the order of the arguments for one of the methods and want to pull it up in your browser. Currently, NumPy Search only includes methods that are directly in the numpy module and not in submodules (e.g., numpy.polynomial or numpy.linalg)

scrapenp

The workflow contains a cached version of the relevant information from the NumPy docs. If NumPy is updated and the local cache is out of date, you can run "scrapenp" to redownload the relevant data. Be patient though, as it will take a few minutes. A notification will pop-up when its complete.

LaTeX Tools

texcount "tex file"

Parses LaTeX file to do a word count using the Perl script texcount.pl. Reports back a concise summary on the number of words (text, headers, and captions), number of floats, and number of displayed equations (not counting inline equations). Depending on the journal of interest you can then convert the floats/equations to equivalent word counts.

TeXDiff [file action] (alpha)

TexDiff is a file action to compare two LaTeX files using the Perl script latexdiff.pl. Add the files to Alfred's Temporary File Buffer (⌥↑ by default) then action the items in the buffer (⌥→ by default). The shell script will then recursively copy both directories in which the files are contained (in order to get associated images, BibTeX files, etc.), run latexdiff.pl, run latexmk to build a pdf, and then open the pdf showing the difference between the files. This workflow requires that you have MacTeX installed (more specifically you need latexmk and pdflatex in /usr/texbin). This workflow should be considered in alpha status. If you don't see a PDF open up within a minute, then there was likely an error with the pdf building process. Open the workflow folder and check output.log. If reliability becomes a common problem, the workflow may be reduced to stop at building the diff.tex file and leave the final compilation to pdf to the user.

License

Copyright (c) 2013, S. Andrew Ning. All rights reserved.

All code is licensed under The MIT License.

alfred-workflows-scientific's People

Contributors

andrewning avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-workflows-scientific's Issues

Final step of reference import not working

Sorry for the vague description of this issue but: in Bibdesk 1.7.5 the final step of the reference import appears to have stopped working. The record is copied to the clipboard, and the app pops up, but I have to then paste the record to finish the job. It was working for me prior to this update.

Thanks in advance for any help!

Mark

Import Reference file action throws error

In Alfred's workflow debugging log, the error is "[ERROR: action.script] 43:44: syntax error: Expected end of line, etc. but found “"”. (-2741)". This happens for any pdf file I tried with.

I'm using the workflow with Alfred v3.0.2 [676]

format change of crossref.org

Recently crossref changed the format of bibtex string by adding an extra space in front of @. This will cause the following lines in common.py always return false

if bibtex[0] != '@':
    sys.stdout.write('BibTeX Not Available')
    # sys.stdout.write(bibtex)
    exit()

Adding a line

    bibtex = bibtex.strip()

in doi.py solves this problem

Simply autocomplete/copy a citekey from a .bib file?

Hi,

I'm looking for an Alfred workflow that will simply autocomplete a cite key from a database of cite keys in the form of a .bib file. and copy/paste it into the current text field. That is, I just want to autocomplete/paste the citekey, not the whole reference.

Does this workflow do this somehow?

Background:
The reason I'm doing this is that I'm using Typora as a Markdown editor using for advanced TeX-like internal references, and converting it via pandoc using pandic-citeproc to converting e.g. [@newton] to references. And Typora doesn't support autocompletion of .bib file references, making it quite tedious to do citations.

reference importer stopped working in Alfred 3.5.1

The reference importer stopped working for me with the most recent version of Alfred 3 (3.5.1, Build 883). It's a bummer since I love the tool and use it a ton. Any suggestions on how to fix things (or help with fixing) would be appreciated.

Reference importer not working; seems to fail in crossref.py "No JSON object could be decode"

As of today, the reference importer workflow for Alfred is not working for me. I type 'ref' followed by search terms and then I get nothing. Below I have the debug log output from Alfred. You will see me try to different searches. The first one, I just copied and pasted in the query. The second one, I typed the query terms, so you see the queuing working correctly. In both cases the workflow fails and the error message says, ValueError: No JSON object could be decoded.

Does anyone have any idea what is going on and how to fix it?

Note: I am running on Catalina and I have the most recent version of Reference Importer installed on Alfred 4.1.1.

[13:24:46.560] Logging Started...
[13:24:51.728] Reference Importer[Script Filter] Queuing argument 'A Tutorial on Lateral Boundary Conditions as a Basic and Potentially Serious Limitation to Regional Numerical Weather Prediction'
[13:24:52.610] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:24:52.613] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:03.860] Reference Importer[Script Filter] Queuing argument 'm'
[13:26:03.993] Reference Importer[Script Filter] Queuing argument 'ma'
[13:26:04.149] Reference Importer[Script Filter] Queuing argument 'mar'
[13:26:04.307] Reference Importer[Script Filter] Queuing argument 'mart'
[13:26:04.464] Reference Importer[Script Filter] Queuing argument 'marti'
[13:26:04.647] Reference Importer[Script Filter] Queuing argument 'martia'
[13:26:04.895] Reference Importer[Script Filter] Queuing argument 'martian'
[13:26:04.904] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:04.906] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:05.049] Reference Importer[Script Filter] Queuing argument 'martian '
[13:26:05.297] Reference Importer[Script Filter] Queuing argument 'martian a'
[13:26:05.431] Reference Importer[Script Filter] Queuing argument 'martian at'
[13:26:05.567] Reference Importer[Script Filter] Queuing argument 'martian atm'
[13:26:05.702] Reference Importer[Script Filter] Queuing argument 'martian atmo'
[13:26:05.719] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:05.719] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:05.904] Reference Importer[Script Filter] Queuing argument 'martian atmos'
[13:26:05.994] Reference Importer[Script Filter] Queuing argument 'martian atmosp'
[13:26:06.265] Reference Importer[Script Filter] Queuing argument 'martian atmosph'
[13:26:06.283] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:06.284] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:06.377] Reference Importer[Script Filter] Queuing argument 'martian atmosphe'
[13:26:06.534] Reference Importer[Script Filter] Queuing argument 'martian atmospher'
[13:26:06.715] Reference Importer[Script Filter] Queuing argument 'martian atmospheri'
[13:26:07.045] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:07.070] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:07.459] Reference Importer[Script Filter] Queuing argument 'martian atmospheric'
[13:26:07.751] Reference Importer[Script Filter] Queuing argument 'martian atmospheric '
[13:26:07.841] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:07.848] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:07.999] Reference Importer[Script Filter] Queuing argument 'martian atmospheric c'
[13:26:08.086] Reference Importer[Script Filter] Queuing argument 'martian atmospheric co'
[13:26:08.312] Reference Importer[Script Filter] Queuing argument 'martian atmospheric col'
[13:26:08.469] Reference Importer[Script Filter] Queuing argument 'martian atmospheric coll'
[13:26:08.524] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:08.533] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:08.582] Reference Importer[Script Filter] Queuing argument 'martian atmospheric colla'
[13:26:08.694] Reference Importer[Script Filter] Queuing argument 'martian atmospheric collap'
[13:26:08.806] Reference Importer[Script Filter] Queuing argument 'martian atmospheric collaps'
[13:26:08.989] Reference Importer[Script Filter] Queuing argument 'martian atmospheric collapse'
[13:26:09.167] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:09.181] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[13:26:09.923] Reference Importer[Script Filter] Script with argv '(null)' finished
[13:26:09.943] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last):
  File "crossref.py", line 36, in <module>
    for j in r.json():
  File "/Users/asoto/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.621446A5-1079-4155-9F7E-7A1416FC6D41/requests/models.py", line 638, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Reference Importer skips to standard wikipedia search

When I initiate a reference search in Alfred 4 using the Reference Importer Workflow, the workflow is recognized, but as soon as I hit space and start typing a search term the options go to the standard Wikipedia, Amazon, google (see screenshots).
Screen Shot 2022-02-22 at 11 10 46 AM
Screen Shot 2022-02-22 at 11 11 08 AM

crossrefs.py not working

I think the underlying problem is a server issue at crossrefs.org but for whatever reason I'm no longer getting any results, just an error message that No JSON object could be decoded.

[2017-01-20 09:51:42][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last): File "crossref.py", line 36, in <module> for j in r.json(): File "Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FF564346-F29D-4386-BCE5-4A04E1A02B12/requests/models.py", line 638, in json return json.loads(self.text or self.content, **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Scholar reference search throws error

This happens as soon as I finish the search e.g. "gsref narwhal mating patterns."

Starting debug for 'Reference Importer'

[2016-08-26 16:36:34][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last):
  File "gscholar.py", line 75, in <module>
    pdflink = pdfdata.a['href']
AttributeError: 'NoneType' object has no attribute 'a'

cref works fine.

Go To Current File : To pass terminal as parameter.

Hi,

Currently it assumes terminal as the default app. It would be nice to allow a parameter to be passed instead and one can choose between say terminal and iTerm (I use iTerm).

Nothing major, small tweak to the workflow.
Thanks. :)

Go To Current File : To add support for Emacs?

Hi,

Is it possible to add support for Emacs? I tried in Emacs 24, but didn't work. Nothing happens for opening the current file in finder.

Neat set of workflows you have there.
Thanks for sharing! :)

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.