GithubHelp home page GithubHelp logo

fixme-lausanne / hackerspaces_ch Goto Github PK

View Code? Open in Web Editor NEW
5.0 7.0 1.0 1.49 MB

The site that was hackerspaces.ch

Home Page: http://hackerspaces.ch

Shell 0.12% Python 6.37% CSS 79.91% JavaScript 9.95% HTML 3.65%

hackerspaces_ch's Introduction

hackerspaces.ch

  • A project to squat the hackerspaces.ch domain name. The original goal was to make a list of hackerspaces in switzerland.

Scraper

  • A scraper exist that will search in hackerspaces.org for any hackerspaces registered in switzerland. It will then provide a json file in "site/list". The key are the names of the hackerspace and the value a dictionnary containing all the information in the hackerspace. If an information doesn't exist, the key will be absent

Site

  • The site use the list json to provide a map with one marker per hackerspace.
  • to test it, just open the index.html, it should work out of the box.
  • The directory structure for the site is as follow
    • libs : javascript library or element needed by them.
    • script : script used directly in the html.
    • img : png icons used in the map (icons were created at fixme) and images used in the template.
    • css : stylesheets used in the template.
  • To launch a devloppement version, simply execute the dev.sh script. This will launch a simple http server in the site directory on port 8000.

hackerspaces_ch's People

Contributors

crazygolem avatar diadzine avatar gcmalloc avatar ludomedia avatar rorist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

wrought

hackerspaces_ch's Issues

Scraper can't decode JSON

When trying to run the scraper, the following error appears:

$ python scraper.py 
http://hackerspaces.org/w/api.php?action=ask&query=[[country::Switzerland]]
[[Category:Hackerspace]]&format=json&offset=0
Traceback (most recent call last):
  File "scraper.py", line 163, in <module>
    hs = hackerspaces.get_hackerspaces()
  File "scraper.py", line 84, in get_hackerspaces
    hackerspaces_page = Hackerspaces.get_json(Hackerspaces.country_list(self.country, offset=offset))
  File "scraper.py", line 63, in get_json
    return resp.json()
  File "/Library/Python/2.7/site-packages/requests-2.7.0-py2.7.egg/requests/models.py", line 819, in json
    return json.loads(self.text, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

It seems that hackerspaces.org automatically redirects to https. When I tried changing the URL to https, the parser claimed that there was an issue with tag mismatches:

XMLSyntaxError: Opening and ending tag mismatch: hr line 5 and body, line 6, column

According to a question on stackexchange, this appears to be an issue with hs.org's JSON formatting.

Javascript coding-style

We should have a way to check for the javascript style. It can get pretty inconsistant in our code. As our codebase will grow, it would be good to have a javascript linter.
Therefore I would advice us to follow the javascript linter.
This is a pretty simple and standard one used in a lot of other projects.

Menu issues

Change list-style to

list-style:none;

Make it usable on different devices (fluid design)

Relative marker sizes

Change the marker sizes from absolute ones to relative ones to be better adapted for different sizes of screens.

Update member count

How to update the member count?

On hackerspaces.org the member count for coredump is 16 (was 14 some time ago), but on hackerspaces.ch it still reads 7.

Synchronization

Hi

Nice project. How is the data synchronized? Is there some automated job to do synchronize regularly? The list seems to be outdated.

Danilo

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.