Git Product home page Git Product logo

Comments (6)

jspaaks avatar jspaaks commented on June 3, 2024 1

I've updated cffconvert to include a Google Cloud interface (https://github.com/citation-file-format/cff-converter-python/blob/b7e43b8038b7afb36ea599ca0b519fd808948998/cffconvert/gcloud.py). It basically makes available the complete cffconvert cli, except it works by entering data via url arguments, e.g.:

I'll leave the Google Cloud function running for the immediate future

from citation-file-format.

larsgw avatar larsgw commented on June 3, 2024

I can look into support for both formats in Citation.js. However, until I start using JSON-LD instead of regular objects (planned for v0.5), conversion from CFF to CodeMeta JSON would be pretty lossy, I think. [EDIT: But CSL-JSON, BibTeX, and RIS would work, insofar as those formats can represent CFF data.]

from citation-file-format.

sdruskat avatar sdruskat commented on June 3, 2024

@larsgw Thanks! That would be awesome!

Let me know if you need any help, and please file an issue should you come across any issues/inconsistencies with CFF, or any ideas you might have to enhance the docs.

from citation-file-format.

larsgw avatar larsgw commented on June 3, 2024

I published the first version of a plugin to add support for CFF to Citation.js: @citation-js/plugin-software-formats. Examples:

const Cite = require('[email protected]')

// Install plugin
require('@citation-js/plugin-software-formats')

const cff = new Cite(`cff-version: 1.0.3
message: If you use this software, please cite it as below.
authors:
  - family-names: Druskat
    given-names: Stephan
    orcid: https://orcid.org/0000-0003-4925-7248
title: My Research Tool
version: 1.0.4
doi: 10.5281/zenodo.1234
date-released: 2017-12-18`)

cff.data // (CSL-JSON)
/*
[ { author: [ { family: 'Druskat', given: 'Stephan' } ],
    issued: { 'date-parts': [ [ 2017, 12, 18 ] ] },
    DOI: '10.5281/zenodo.1234',
    title: 'My Research Tool',
    version: '1.0.4',
    id: 'temp_id_37569928872458447' } ]
*/

cff.format('bibext')
/*
@misc{Druskat2017My,
  doi={10.5281/zenodo.1234},
  title={{My Research Tool}},
  author={Druskat, Stephan},
  date={2017-12-18},
  year=2017,
  month=12,
  day=18,
}
*/

cff.format('ris')
/*
AU  - Druskat, Stephan
DA  - 2017/12/18
PY  - 2017
DO  - 10.5281/zenodo.1234
TI  - My Research Tool
ER  - 
*/

cff.format('bibliography', {template: 'apa'})
// Druskat, S. (2017, December 18). My Research Tool (Version 1.0.4). https://doi.org/10.5281/zenodo.1234

There are still some problems regarding reference types, which invalidates the RIS output, but I'm working on that.

from citation-file-format.

sdruskat avatar sdruskat commented on June 3, 2024

Cool, great news! Thanks for your effort!

from citation-file-format.

jspaaks avatar jspaaks commented on June 3, 2024

FWIW, there is also a conversion tool cffconvert available from PyPI, part of which has been made available as a Google Cloud Function https://us-central1-citation-cff.cloudfunctions.net/convert
It works by passing it parameters, i.e. a github repo as url and the format you want to convert to, which should be one of [zenodo|ris|bibtex|endnote|codemeta]. For example, https://us-central1-citation-cff.cloudfunctions.net/convert?url=https://github.com/NLeSC/Xenon&format=zenodo

Note that cffconvert currently implements just the basics of the CFF spec, e.g it ignores the references part of CFF files.

from citation-file-format.

Related Issues (20)

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.