Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SebGen
spacedirectory
Commits
3c8f9a27
Commit
3c8f9a27
authored
Mar 15, 2018
by
SebGen
Browse files
Prepare the release of the version 0.0.4
parent
35896f6d
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
3c8f9a27
version 0.0.3:
- Manifest: Add requirements.txt
version 0.0.4:
- Define a better command line arguments, with subcommands
- Move error printing from CLI to views
- Separate the code in views, models and controller
- Space: v0.13 data reader, manage when state last change is not given
version 0.0.3:
- Manifest: Add requirements.txt
version 0.0.2:
- Add a manifest
- Setup, include keywords
version 0.0.2:
- Add a manifest
- Setup, include keywords
version 0.0.1:
- Command line:
- Get the list of spaces from spacedirectory
- Get, in one time, infos of a given space name
- Get infos of a given Space API
- Infos you can get on the terminal (ony what space publish):
- Name
- Website URL
- Status
- If open
- Last time the status changed
- The person who lastly changed the state
- Status message
- Location
- Postal address
- Latitude
- Longitude
- Contact
- Phone number
- SIP URL
- IRC channel URL
- Public Jabber/XMPP multi-user chatroom
- Twitter account
- Identi.ca or StatusNet account
- Mailing list address
- E-mail address for contacting
- E-mail address for issue reports
- Get a dump of space data in JSON
- Python module
- Compatible with Space API V0.13
- Get the list of spaces from spacedirectory
- Get a Python object (spacedirectory.Space) with infos of a given space
name or a given JSON data (ony what space publish):
- Name
- Logo URL
- Website URL
- Status
- If open
- Last time the status changed
- The person who lastly changed the state
- Status message
- open and close logo URL
- Location
- Postal address
- Latitude
- Longitude
- Contact
- Phone number
- SIP URL
- IRC channel URL
- Public Jabber/XMPP multi-user chatroom
- Twitter account
- Identi.ca or StatusNet account
- Mailing list address
- E-mail address for contacting
- E-mail address for issue reports
- Get a dump of spacedirectory.Space data in JSON
version 0.0.1:
- Command line:
- Get the list of spaces from spacedirectory
- Get, in one time, infos of a given space name
- Get infos of a given Space API
- Infos you can get on the terminal (ony what space publish):
- Name
- Website URL
- Status
- If open
- Last time the status changed
- The person who lastly changed the state
- Status message
- Location
- Postal address
- Latitude
- Longitude
- Contact
- Phone number
- SIP URL
- IRC channel URL
- Public Jabber/XMPP multi-user chatroom
- Twitter account
- Identi.ca or StatusNet account
- Mailing list address
- E-mail address for contacting
- E-mail address for issue reports
- Get a dump of space data in JSON
- Python module
- Compatible with Space API V0.13
- Get the list of spaces from spacedirectory
- Get a Python object (spacedirectory.Space) with infos of a given space
name or a given JSON data (ony what space publish):
- Name
- Logo URL
- Website URL
- Status
- If open
- Last time the status changed
- The person who lastly changed the state
- Status message
- open and close logo URL
- Location
- Postal address
- Latitude
- Longitude
- Contact
- Phone number
- SIP URL
- IRC channel URL
- Public Jabber/XMPP multi-user chatroom
- Twitter account
- Identi.ca or StatusNet account
- Mailing list address
- E-mail address for contacting
- E-mail address for issue reports
- Get a dump of spacedirectory.Space data in JSON
README.org
View file @
3c8f9a27
...
...
@@ -110,30 +110,30 @@
spacedirectory
#+END_SRC
Or call the program with
flag =-l= or =--list-spaces
=:
Or call the program with
the command =list
=:
#+BEGIN_SRC sh
spacedirectory
-
l
spacedirectory l
ist
#+END_SRC
**** Get infos of a space
Simply
write
the space name:
Simply
call the program with the command =info= and
the space name:
#+BEGIN_SRC sh
spacedirectory "space name"
spacedirectory
info
"space name"
#+END_SRC
**** Get infos of a space api
W
ith option =-a= or =--api=:
Call the program with the command =info= and w
ith option =-a= or =--api=:
#+BEGIN_SRC sh
spacedirectory -a "api url"
spacedirectory
info
-a "api url"
#+END_SRC
**** Get a dump of an asked space infos in JSON
W
ith flag =-j= or =--json=:
Call the program with the command =info= and w
ith flag =-j= or =--json=:
#+BEGIN_SRC sh
spacedirectory "space name" -j
spacedirectory
info
"space name" -j
#+END_SRC
...
...
doc/modules/usage.org
View file @
3c8f9a27
* Space Directory Python modules usage
The module =spacedirectory= provide 4 sub-modules:
- =directory=: Functions to query the Space Directory
- =space=: Classes to represent informations about a space
- =
models.
directory=: Functions to query the Space Directory
- =
models.
space=: Classes to represent informations about a space
- =tools=: Some usefull functions, not specific to a part
- =cli=: All command line tool code
- =views=: All view functions
- =cli=: Controller code for the command line tool
** =directory=
** =
models.
directory=
Provide functions:
- =get_spaces_list()=: Return the list of spaces as a dictionary
- =get_space_from_data(space_data)=: Return a space.Space object
- =get_space_from_data(space_data)=: Return a
models.
space.Space object
from the space data given
- =get_space_from_name(space_name)=: Return a space.Space object
- =get_space_from_name(space_name)=: Return a
models.
space.Space object
from the space name given
Provide errors classes:
...
...
@@ -20,9 +21,9 @@
- =SpaceApiNotExist=: When a Space Api not exist on the directory
for the space required
- =NoSpaceData=: When no space data is available on the Space Api
to build a space.Space object
to build a
models.
space.Space object
** =space=
** =
models.
space=
Provide classes:
- =StatusIcon=: Icons that show the status graphically
...
...
@@ -42,7 +43,7 @@
- message (str): An additional free-form string, could be
something like 'open for public', 'members only' or whatever
you want it to be
- icon (space.StatusIcon): Icons that show the status graphically
- icon (
models.
space.StatusIcon): Icons that show the status graphically
- =Location=: Position data such as a postal address or geographic coordinates
Attributes:
- address (str): The postal address of the space
...
...
@@ -69,10 +70,10 @@
- name (str): The name of the space
- logo_url (str): URL to the space logo
- website (str): URL to the space website
- status (space.Status): Status about the space
- location (space.Location): Position data such as a postal address or
- status (
models.
space.Status): Status about the space
- location (
models.
space.Location): Position data such as a postal address or
geographic coordinates
- contact (space.Contact): Contact information about the space
- contact (
models.
space.Contact): Contact information about the space
- data: List of all data get by space json
Provide error classe:
...
...
@@ -85,14 +86,21 @@
- =get_json_data_from_url(json_url)=: Return data, from a given json
url, as a list or a dictionary
** =
cli
=
** =
views
=
Provide functions:
- =print_infos(space_required, print_json)=: Print infos of the
- =print_
space_
infos(space_required, print_json)=: Print infos of the
given space name
Parameters:
- space_required (space.Space): The space required by the user
- print_json (bool): Print his json
- =print_spaces_list()=: Print the list of spaces
- =print_error(message)=: Print error on the stderr
** =cli=
- =main()=: Function called by the command line tool. Parse the
command line arguments and do what arguments request
- =show_list_spaces_names(args)=: Show the list of spaces names
- =show_space_info(args)=: Show informations of a given space
spacedirectory/__init__.py
View file @
3c8f9a27
...
...
@@ -14,5 +14,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
version
=
"0.0.
3
"
version
=
"0.0.
4
"
description
=
"Get informations about (hacker)spaces from the Spacedirectory (or a Space API)"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment