Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Egon Willighagen
    @egonw
    hi
    Lars Willighagen
    @larsgw
    hi
    Egon Willighagen
    @egonw
    dit werkt dus :)
    Lars Willighagen
    @larsgw
    it does, although I don't know how to get notifications about this, because I never saw one for this message
    Lars Willighagen
    @larsgw
    Update on the lerna progress: it's really annoying
    Okay it's fine now, my bad
    Ryan Mason
    @Rytiggy

    Hey guys! currently working on implementing a workflow that uses citation-js and im getting a werid bug when i import Cite from "citation-js";

    this is the error any help is appreciated:

     Failed to compile with 1 errors            10:59:21 AM
    
     error  in ./node_modules/quasar-app-extension-citation-builde
    r/node_modules/@citation-js/core/src/plugins/input/parser.js
    
    Module parse failed: Unexpected token (86:17)
    You may need an appropriate loader to handle this file type.
    | 
    | export class TypeParser {
    >   validDataTypes = ['String', 'Array', 'SimpleObject', 'Comp
    lexObject', 'Primitive']
    | 
    |   /**
    
     @ ./node_modules/quasar-app-extension-citation-builder/node_m
    odules/@citation-js/core/src/plugins/input/index.js 8:0-34 15:
    48-54
     @ ./node_modules/quasar-app-extension-citation-builder/node_m
    odules/@citation-js/core/src/plugins/index.js
     @ ./node_modules/quasar-app-extension-citation-builder/node_m
    odules/@citation-js/core/src/index.js
     @ ./node_modules/quasar-app-extension-citation-builder/node_m
    odules/citation-js/index.js
     @ ./node_modules/quasar-app-extension-citation-builder/src/boot/citation.js
     @ ./.quasar/client-entry.js
     @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js
    Lars Willighagen
    @larsgw
    Hi! I was afraid this was going to be a problem, should have tested more first. Basically: I got a PR to enable tree-shaking for webpack, but that disabled Babel too. I'll see if I can setup Babel so that there's one build with CommonJS and one with MJS. citation-js/citation-js#38
    Lars Willighagen
    @larsgw
    I setup a script for the build, just have to test it https://github.com/citation-js/citation-js/tree/mjs-build
    Lars Willighagen
    @larsgw
    I published @citation-js/core@0.4.3-alpha.0, could you test it @Rytiggy ? Since it's a prerelease installing could be a bit tricky though
    Ryan Mason
    @Rytiggy
    Perfect! I will give it a test!
    Ryan Mason
    @Rytiggy
    Hey I tried to get it working with the latest alpha you posted but still am getting the error above any other ideas?
    Lars Willighagen
    @larsgw
    Not if it's the exact same error, no. That file isn't in the new alpha anymore (it replaced src with lib-mjs), so either there's a different error, or the new version didn't install as intended (which can definitely happen with alphas, depending on how you installed it). Could you replace that file with https://unpkg.com/@citation-js/core@0.4.3-alpha.0/lib-mjs/plugins/input/parser.js and check again? There may be another file that's causing trouble too, but we'll cross that bridge when we get there
    Lars Willighagen
    @larsgw
    @Rytiggy Published 0.4.3 (a while ago now, but I forgot to get back to you), which should work properly
    Sam
    @ThatKawaiiSam
    Hey guys, I am currently attempting to use citation.js with Vue. When using it I am getting the eeror that "This format is not supported" while using the following code
    import { Cite } from '@citation-js/core'
    export default {
      layout: 'app',
      created() {
        const data = new Cite('Q30000000')
        data.format('bibliography', {
          format: 'html',
          template: 'apa',
          lang: 'en-US'
        })
      }
    }
    Lars Willighagen
    @larsgw
    Hi @ThatKawaiiSam you have to import the relevant plugins (in this case @citation-js/plugin-csl and @citation-js/plugin-wikidata) or use the citation-js npm package, which has a few plugins preloaded.
    Ryan Mason
    @Rytiggy
    @larsgw Thanks!
    Chovin
    @Chovin

    Hi guys, I'm trying to use citation.js to parse a bibtex file. I seem to lose some data though. For example, when I run the following through

    @TechReport{randall_marine_1984,
      author    = {Randall, R. H. and Siegrist, H. G. and Neill, J. B.},
      title     = {A marine survey and an environmental evaluation of three coastal regions of {Tinian} for proposed amphibious assault training exercises. {Final} report submitted to {Commander} {U}.{S}. {Naval} {Forces} {Marianas}, {Guam} ({Contract}-{Ng}-1119-84-{M}-2947).},
      year      = {1984},
      groups    = {Micronesia},
      keywords  = {Mendeley references, MICRONESIA, GUAM MORE},
      pages     = {26 pp.},
      timestamp = {2019-02-21 16:06},
    }

    I get this:

    [
      {
        "label": "randall_marine_1984",
        "type": "techreport",
        "properties": {
          "title": "A marine survey and an environmental evaluation of three coastal regions of Tinian for proposed amphibious assault training exercises. Final report submitted to Commander U.S. Naval Forces Marianas, Guam (Contract-Ng-1119-84-M-2947).",
          "author": "Randall, R. H. and Siegrist, H. G. and Neill, J. B.",
          "pages": "26 pp.",
          "date": "1984",
          "year": "1984"
        }
      }
    ]

    notice, the groups, keywords, and timestamp attributes are missing.
    I'm guessing that's because citation.js is meant only to provide citations. Do you know how I could use its parser to give me a json representing all the data in the bib file?

    Chovin
    @Chovin
    hmm.. I also found some of this bibtex/latex syntax that citation.js has a difficult time parsing
    ... from low ({\textbackslash}textless 25 g/m2) to high ({\textbackslash}textgreater 60 g/m2)
    was worth {\textbackslash}textgreater\$2 million/year... attribute, worth \$15–20 
    million/year. Divers ... contribute (\$900thousand) towards ...
    Lars Willighagen
    @larsgw
    For the first issue, I'm getting expected results when running Cite.plugins.input.chainLink('...'). However, if you run Cite('...').format('bibtex', { format: 'object' }) the output is limited by the intermediary format, in this case CSL-JSON, which does not have groups or timestamp -- although it should support keywords.
    Lars Willighagen
    @larsgw
    As for the second issue, Citation.js at the moment does not recognize commands unless they're within {...} or $...$, I'll work on that in the BibTeX update.
    Lars Willighagen
    @larsgw
    There are two impersonating Twitter accounts now (https://twitter.com/citation_js is legit though)