Exemplo n.º 1
0
# -----------------------------------------------------------------

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import standard modules
import argparse

# Import the relevant PTS classes and modules
from pts.core.tools.papers import Papers

# -----------------------------------------------------------------

# Create the command-line parser
parser = argparse.ArgumentParser()

# Arguments
parser.add_argument("label", type=str, help="label")

# Parse the command line arguments
arguments = parser.parse_args()

# -----------------------------------------------------------------

papers = Papers()

papers.open(arguments.label)

# -----------------------------------------------------------------
Exemplo n.º 2
0
# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import standard modules
import argparse

# Import the relevant PTS classes and modules
from pts.core.tools.papers import Papers

# -----------------------------------------------------------------

# Create the command-line parser
parser = argparse.ArgumentParser()

# Arguments
parser.add_argument("label", type=str, help="label")
parser.add_argument("url", type=str, help="url")

# Parse the command line arguments
arguments = parser.parse_args()

# -----------------------------------------------------------------

papers = Papers()

papers.add_entry(arguments.label, arguments.url)

papers.save()

# -----------------------------------------------------------------