From 5b91553c0a03d76647cfe47f116c54070c430d82 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Tue, 29 Sep 2020 12:31:16 -0500 Subject: [PATCH] Update Readme and latex-example --- Readme.md | 22 ++++++++++----------- docker/emacs/Dockerfile | 12 +++++++++-- examples/python/scholarly/test-scholarly.py | 16 +++++++++++++++ 3 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 examples/python/scholarly/test-scholarly.py diff --git a/Readme.md b/Readme.md index 2b8f3cc..dfb2662 100644 --- a/Readme.md +++ b/Readme.md @@ -14,12 +14,6 @@ Then, it is possible to build the *scientifc-emacs* container by: ``` $ docker build -t scientific-emacs:0.1 docker/emacs/ ``` - - - - - - Write here about container # How to install @@ -53,12 +47,16 @@ docker run --rm -it -v`pwd`/emacs-config:/root \ the 'emacs-config' folder contains the '.emacs' configuration file -To install: -- aspell -- curl -- wget -- git -- zsh +# What is installed on the repository +The repository has previously installed +- aspell: +- curl: +- auctex: +- pdftools: +- oh-my-zshell: +- + +## How to run pyhton scripts ## After first run the container Upgrade texlive to be able to install new packages by : diff --git a/docker/emacs/Dockerfile b/docker/emacs/Dockerfile index be0f51d..057ce4b 100644 --- a/docker/emacs/Dockerfile +++ b/docker/emacs/Dockerfile @@ -18,8 +18,9 @@ texlive-science \ texlive-bibtex-extra # useful apps +RUN apt-get update RUN apt-get -y install \ -git \ +git \ wget \ curl \ aspell \ @@ -27,7 +28,14 @@ vim \ python3 \ elpa-pdf-tools \ auctex \ -zsh +zsh \ +python3-pip + +# installing python modules +RUN pip3 install pandas \ +numpy \ +matplotlib \ +scholarly # oh-my-zshell RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" diff --git a/examples/python/scholarly/test-scholarly.py b/examples/python/scholarly/test-scholarly.py new file mode 100644 index 0000000..7acb0ae --- /dev/null +++ b/examples/python/scholarly/test-scholarly.py @@ -0,0 +1,16 @@ +from scholarly import scholarly + +# Retrieve the author's data, fill-in, and print +search_query = scholarly.search_author('Steven A Cholewiak') +author = next(search_query).fill() +print(author) + +# Print the titles of the author's publications +print([pub.bib['title'] for pub in author.publications]) + +# Take a closer look at the first publication +pub = author.publications[0].fill() +print(pub) + +# Which papers cited that publication? +print([citation.bib['title'] for citation in pub.citedby])