Coder Social home page Coder Social logo

3gpp-citations's Introduction

3GPP Bibtex entry generator

Build Status Coverage Status Gitter chat HitCount

This project aims to generate BiBTeX files that can be used when citing 3GPP specifications. The input is a document list exported from the 3GPP Portal.

Installation

pip install 3gpp-citations

To also install test dependencies run

pip install 3gpp-citations[test]

Instructions

  1. Go to the 3GPP Portal
  2. Generate the list of specifications you want.
  3. Download to Excel and save file
  4. Run python 3gpp-citations.py -i exported.xlsx -o 3gpp.bib
  5. Use in LaTeX.

Optionally use the provided 3gpp.bib directly.

Things to note

  • The output bibtex class is set to @techreport.
  • If you add the option --xelatex, break-symbols \- will be used in url-fields.
  • The version and date are read from 3gpp.org, but it is slow so it takes a while to parse the list. If you find an easy solution to this, let me know.

Example output

@techreport{3gpp.36.331,
 author = {3GPP},
 day = {20},
 institution = {{3rd Generation Partnership Project (3GPP)}},
 month = {04},
 note = {Version 14.2.2},
 number = {36.331},
 title = {{Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification}},
 type = {Technical Specification (TS)},
 url = {https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=2440},
 year = {2017}
}

Contribute

See our contribution guidelines and our Code of Conduct.

Other

A presentation about the CI-pipeline used in this project can be found here.

Acknowledgment

This project has been updated as part of the WASP Software and Cloud Technology course.

This work was partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.

3gpp-citations's People

Contributors

martisak 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

3gpp-citations's Issues

Python 3 Support

Since all dependencies (openpyxl, bibtexparser, lxml, requests) are already Python 3 compatible, making a one-liner fix will make the script working on both Python 2 and 3.

diff --git a/3gpp-citations.py b/3gpp-citations.py
index 91f6a64..628dfef 100644
--- a/3gpp-citations.py
+++ b/3gpp-citations.py
@@ -71,7 +71,7 @@ for row in ws.iter_rows(row_offset=1):
                     entry['month'] = date[1].strip()
                 break
 
-    print entry
+    print(entry)
     db.entries.append(entry)
 
 writer = BibTexWriter()

Shorten bibtex entries

The entries can be long and take up a lot of space. See if there is a way to abbreviate or shorten entries and add this as an option.

Installer Deprecated

Describe the bug
When attempting to install, I am met with an error stating that the Installer is deprecated

To Reproduce
Steps to reproduce the behavior:

  1. Run pip install 3gpp-citations with Python 3.10

Expected behavior
The library is installed correctly

Desktop (please complete the following information):

  • OS: Arch Linux
  • Python version 3.10

Additional context
Here is the output from pip:

$ pip install 3gpp-citations
Defaulting to user installation because normal site-packages is not writeable
Collecting 3gpp-citations
  Downloading 3gpp-citations-1.1.4.tar.gz (14 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      /usr/lib/python3.10/site-packages/setuptools/__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`.
        dist.fetch_build_eggs(dist.setup_requires)
      error in 3gpp-citations setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]

Even when using the proposed flag, the installer fails:

$ pip install 3gpp-citations --use-pep517
Defaulting to user installation because normal site-packages is not writeable
Collecting 3gpp-citations
  Using cached 3gpp-citations-1.1.4.tar.gz (14 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in 3gpp-citations setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]

Local links broken on PyPI

Describe the bug
Local links broken on PyPI.

To Reproduce

See project description. Links to contribution guide and code of conduct are broken.

Expected behavior

We expect that the link leads to the Github repo or to the docs.

Parallell processing of input data

Is your feature request related to a problem? Please describe.
Is takes a very long time to process an Excel-sheet.

Describe the solution you'd like
Parallell processing over the rows would be better.

Describe alternatives you've considered
No other alternatives considered.

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.