Code Monkey home page Code Monkey logo

digital-scholarship's People

Contributors

baskaufs avatar cliffordanderson avatar juarezfd avatar scurryjohnson 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digital-scholarship's Issues

Wikibase Bot: combining data types?

Hi,
I successfully used your 2 Python scripts to populate my Wikibase instance, thank you!
It took me a while, but I also managed to modify the data type to have 'strings' instead of 'items' in the script load_csv.py.
By the way, I would recommend suggesting in your tutorial [https://heardlibrary.github.io/digital-scholarship/host/wikidata/bot/] that the line 95 can be replaced by 'value':'"' + stringValue + '"' OR by '"' + objectQNumber + '"' (maybe not the best practice but it works) if we want to add the content of the csv column below 'P...' instead of one specific string literal. (And of course, examples for other types would help ;))

I was wondering to what extent the script can be adapted to deal with various types/values (url, string, items, external ID, etc.) contained in the same csv file?
For the moment I can't see how to do it, but your script is the most crystal clear I've tested so far (compare with Piwikibot or WikidataIntegrator, for example), so I'd love to continue working with...
I hope you can help on this point and thx again for sharing (and commenting!) your code @baskaufs.

Invalid snak data

Running the write-statements script on a local wikibase instance results in the following error:

Write confirmation: {'error': {'code': 'invalid-snak', 'info': 'Invalid snak data.', 'messages': [{'name': 'wikibase-api-invalid-snak', 'parameters': [], 'html': {'*': 'Invalid snak data.'}}], '*': 'See http://.../w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.'}}.

I have updated Lines 129 - 131 in the script to refer to items that have been verified to exist in my local Wikibase instance.

I suspect the error is related to the issue of how to represent the JSON "value" property that is an item and not a string as discussed in the "Time for a snak" section of this blog post: http://baskauf.blogspot.com/2019/06/putting-data-into-wikidata-using.html.

However, the Wikibase API sandbox also gives the same error when providing a seemingly valid value property e.g. {"entity-type":"item","numeric-id":1} for the wbcreateclaim endpoint. Interestingly, the sandbox does respond successfully when providing the following value: "{\"entity-type\":\"item\",\"numeric-id\":1}" however, use of quotes in this manner appears to treat the value as a string and not an item, the latter is the expected behavior.

My goal is conceptually simple - I just want to be able to add a triple (e.g. Q6 P4 Q9) to a Wikibase instance using Python. Your write-statements script appears to be the closest or most relevant potential solution. I have tried https://github.com/SuLab/WikidataIntegrator and https://github.com/samuelmeuli/wikibase-api, both unsuccessfully.

Add events to University calendar

Do on Friday, Mar 4. We'll submit to university calendar and tag DiSC and Libraries so that it will automatically get picked up there.

Get approval for rocket launch

Met with Facilities review committee on 2022-03-17. Action items:

  • Talk to Rec center people about using their field.
  • get back with Facilities Review Committee for further contacts
  • Risk and Insurance
  • Life Flight
  • weather person about checking windspeed
  • Lynn Maddox community person/ Shelby somebody to put something in MyVU to inform community.
  • Scott Martin can help us if necessary.

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.