bibtex-reference-generator

command module
v0.0.0-...-f2655dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 12 Imported by: 0

README

Bibtex online reference generator

This repo contains a small script that given an url will generate a Bibtex or Biblatex reference with the most informations possible included to help you gain time.

So you will be able to generate something like this:

@misc{2021-07-python-vulnerabilities-code-execution-in-jinja-templates-podalirius,
  author = "Podalirius",
  title = "Python vulnerabilities : Code execution in jinja templates · Podalirius",
  year = "2021",
  month = "Juillet",
  howpublished = "\url{https://podalirius.net/en/articles/python-vulnerabilities-code-execution-in-jinja-templates/}",
  note = "[En ligne, accédé le 27 Juillet 2021]"
}

With only the link: https://podalirius.net/en/articles/python-vulnerabilities-code-execution-in-jinja-templates/ (poke @Podalirius by the way, thanks for your article 😇).

How do I do that?

This is quite simple (provided that you have Go installed on your machine)! Simply follow the next steps:

  1. Get the code:
git clone https://github.com/bastantoine/bibtex-reference-generator
  1. Get the dependencies:
go get .
  1. Run the script. Two possibilities here:
    1. You compile it to a standalone executable and then use it to generate the references:
      go build -o bibtex-reference-generator .
      ./bibtex-reference-generator -bibtex -url "https://podalirius.net/en/articles/python-vulnerabilities-code-execution-in-jinja-templates/"
      
    2. You use the go run method to run it:
      go run main.go -bibtex -url "https://podalirius.net/en/articles/python-vulnerabilities-code-execution-in-jinja-templates/"
      
      Note that if you are using this method, you must not move the main.go file away from the go.mod and go.sum files.

Note : switch -bibtex with -biblatex to use a Biblatex format.

Why some informations might be missing sometimes?

This script uses the meta informations of the page you provide to generate the reference. These meta informations are provided using the HTML <meta> tags and the OpenGraph protocol. The problem here is that these meta tags are not mandatory, so sometimes there are some informations that can't be retreived, especially the author(s) and year and month of publication date.

For those specially cases, you'll have to fill them by hand, sorry.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL