Giter VIP home page Giter VIP logo

gca-python's People

Contributors

achilleas-k avatar cgars avatar gicmo avatar hkchekc avatar janscience avatar jgrewe avatar lowks avatar mpsonntag avatar twachtler avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gca-python's Issues

How to filter for abstracts that apply for a talk?

This is in the abstrTypes field in the Jason file. Unfortunately this is a list, and the only field of interest in the list is "short" ("poster" or "talk"). How can gca-filter used for this? Or: could you update gca_filter to do that? So that a call like

./gca-filter abstracts.json "abstypes=talk"

will check whether at least one "short" field in the list is set to "talk".

how to filter for authors last name?

Just another problem of the same issue (missing info about valid filednames #12):

How to I filter (./gca-filter) for author last names?

I tried authors.lastName and many variations of this, but that does not work.

Update scripts to work with Python 3

gca-client was updated to work with Python3 (see #3) but most of the other scripts are still not working. See below:

GCA CLIENT (working)

$ ./GCA-Python/gca-client https://abstracts.g-node.org abstracts --full NI2019 > abs_all.json

GCA FILTER

$ ./GCA-Python/gca-filter abs_all.json "state=Submitted" > abs_submitted.json
Traceback (most recent call last):
   File "GCA-Python/gca-filter", line 54, in <module>
     sys.stdout.write(data.encode('utf-8'))
TypeError: write() argument must be str, not bytes

GCA SORT

$ ./GCA-Python/gca-sort abs_all.json '+topic' abs_all_sorted.json
Traceback (most recent call last):
   File "./GCA-Python/gca-sort", line 74, in <module>
     abstracts = sorted(abstracts, key=s['fn'], reverse=s['reverse'])
   File "./GCA-Python/gca-sort", line 44, in sort_fn
     val = abstract.select_field(fields, fold=True)
   File "./GCA-Python/gca/core.py", line 489, in select_field
     if len(val) == 0:
TypeError: object of type 'Abstract' has no len()

GCA SELECT

$ ./GCA-Python/gca-select abs_all.json 'title' > abs_titles.csv
Traceback (most recent call last):
   File "./GCA-Python/gca-select", line 57, in <module>
     data = delimiter.join(map(str, val))
TypeError: 'Abstract' object is not iterable


$ ./GCA-Python/gca-tex abs_all.json > abs_all.tex
Traceback (most recent call last):
   File "./GCA-Python/gca-tex", line 71, in <module>
     txt = text_replace_all(txt, text_replacements['input'])
   File "./GCA-Python/gca-tex", line 28, in text_replace_all
     for key, val in replacements.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Option to search authors

It would be nice to have an option in the Admin web interface to search for authors, respectively if they have submitted an abstract. We had a few cases in which people had difficulties to log in (various reasons, like mistake in email address) and contacted us. Knowing if it eventually worked out for them would then be easy .

dublicate affiliations

Sometimes authors repeat the same affiliation for many authors. The gca-tex script should detect such duplications and condense them to one.

weired dash in references

In the abstract body text (jason file) I got "... clock$^3$$^−$$^5$". This persists after running gca-tex on it. pdflatex then breaks:

! Missing { inserted.
<to be read again> 
                   \begingroup 
l.105 ... They exhibit a circatidal clock$^3$$^−
                                                  $$^5$ plays a role in thei...

If I replace the dash (which is not a normal dash) by a normal dash or by {--} it works.

Show valid field names

You could add a '-l' argument to gca-filter and gca-select scripts that simply lists all valid field names and if appropriate valid values. Right now one has to dig into the code to figure that out.

The Abstract class field names differ from the ones in the json file. That does not help, either. Maybe this can be unified.

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.